From 3cafe3219d54d1d303bd01a6ee6cb257601e94e5 Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Wed, 23 Nov 2022 15:37:53 +0100 Subject: [PATCH 01/42] WIP: gRPC gateway --- Makefile | 12 +- buf.gen.yaml | 29 +- proto/buf.lock | 11 + proto/buf.md | 206 ++++++- proto/buf.yaml | 3 + proto/openapiv2/gateway.swagger.json | 578 ++++++++++++++++++ .../keto/opl/v1alpha1/syntax_service.pb.go | 2 +- .../keto/opl/v1alpha1/syntax_service_pb.js | 8 +- .../v1alpha2/check_service.pb.go | 124 ++-- .../v1alpha2/check_service.proto | 21 +- .../v1alpha2/check_service_grpc_pb.d.ts | 1 + .../v1alpha2/check_service_grpc_pb.js | 2 + .../v1alpha2/check_service_pb.d.ts | 1 + .../v1alpha2/check_service_pb.js | 12 +- .../v1alpha2/expand_service.pb.go | 2 +- .../v1alpha2/expand_service_pb.js | 8 +- .../v1alpha2/namespaces_service.pb.go | 2 +- .../v1alpha2/namespaces_service_pb.js | 8 +- .../v1alpha2/read_service.pb.go | 19 +- .../v1alpha2/read_service_grpc.pb.go | 4 +- .../v1alpha2/read_service_grpc_pb.js | 4 +- .../v1alpha2/read_service_pb.js | 8 +- .../v1alpha2/relation_tuples.pb.go | 17 +- .../v1alpha2/relation_tuples_pb.js | 8 +- .../relation_tuples/v1alpha2/version.pb.go | 2 +- .../relation_tuples/v1alpha2/version_pb.js | 8 +- .../v1alpha2/write_service.pb.go | 6 +- .../v1alpha2/write_service_grpc.pb.go | 8 +- .../v1alpha2/write_service_grpc_pb.js | 4 +- .../v1alpha2/write_service_pb.js | 8 +- 30 files changed, 944 insertions(+), 182 deletions(-) create mode 100644 proto/buf.lock create mode 100644 proto/openapiv2/gateway.swagger.json diff --git a/Makefile b/Makefile index e5257d440..42416903b 100644 --- a/Makefile +++ b/Makefile @@ -7,21 +7,16 @@ GO_DEPENDENCIES = golang.org/x/tools/cmd/goimports \ github.com/mattn/goveralls \ github.com/ory/go-acc \ github.com/bufbuild/buf/cmd/buf \ - google.golang.org/protobuf/cmd/protoc-gen-go \ - google.golang.org/grpc/cmd/protoc-gen-go-grpc \ - github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc \ github.com/josephburnett/jd \ github.com/mikefarah/yq/v4 \ golang.org/x/tools/cmd/stringer \ github.com/go-swagger/go-swagger/cmd/swagger \ github.com/mdempsky/go114-fuzz-build -SCRIPT_DEPENDENCIES = protoc \ - grype \ +SCRIPT_DEPENDENCIES = grype \ trivy \ ory \ - licenses \ - protoc-gen-js + licenses define make-go-dependency # go install is responsible for not re-building when the code hasn't changed @@ -103,9 +98,8 @@ build: # Generate APIs and client stubs from the definitions # .PHONY: buf-gen -buf-gen: .bin/buf .bin/protoc .bin/protoc-gen-go .bin/protoc-gen-go-grpc .bin/protoc-gen-js .bin/protoc-gen-doc node_modules +buf-gen: .bin/buf node_modules buf generate proto - make format @echo "All code was generated successfully!" # diff --git a/buf.gen.yaml b/buf.gen.yaml index 5b447b542..fa86b64f0 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,23 +1,38 @@ version: v1 + plugins: - - name: go + - remote: buf.build/protocolbuffers/plugins/go:v1.28.1-1 out: proto opt: paths=source_relative - - name: go-grpc + + - remote: buf.build/grpc/plugins/go:v1.2.0-1 out: proto opt: paths=source_relative,require_unimplemented_servers=false - - name: js + + - remote: buf.build/grpc-ecosystem/plugins/grpc-gateway:v2.14.0-1 + out: gen/go + opt: paths=source_relative + + - remote: buf.build/grpc-ecosystem/plugins/openapiv2:v2.14.0-1 + opt: + - allow_merge=true + - merge_file_name=gateway + - openapi_naming_strategy=simple + out: proto/openapiv2 + + - remote: buf.build/protocolbuffers/plugins/js:v3.20.1-1 out: proto opt: import_style=commonjs,binary - - name: js-grpc + + - remote: buf.build/grpc/plugins/node:v1.11.3-1 out: proto opt: grpc_js,binary,import_style=commonjs - path: node_modules/.bin/grpc_tools_node_protoc_plugin + - name: ts out: proto opt: ts_out=proto path: node_modules/.bin/protoc-gen-ts - - name: doc + + - remote: buf.build/sawadashota/plugins/protoc-gen-doc:v1.5.1 out: proto opt: markdown,proto/buf.md - strategy: all diff --git a/proto/buf.lock b/proto/buf.lock new file mode 100644 index 000000000..656b82fa2 --- /dev/null +++ b/proto/buf.lock @@ -0,0 +1,11 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: googleapis + repository: googleapis + commit: 5abafbf55b5c4c07ad5fb06d2599560f + - remote: buf.build + owner: grpc-ecosystem + repository: grpc-gateway + commit: b98ae2f8ce63452e97e6bae65c5add1b diff --git a/proto/buf.md b/proto/buf.md index f0675dbeb..5b3587be4 100644 --- a/proto/buf.md +++ b/proto/buf.md @@ -71,6 +71,18 @@ - [WriteService](#ory-keto-relation_tuples-v1alpha2-WriteService) +- [ory/keto/v1beta/relation_tuples.proto](#ory_keto_v1beta_relation_tuples-proto) + - [RelationQuery](#ory-keto-v1beta-RelationQuery) + - [RelationTuple](#ory-keto-v1beta-RelationTuple) + - [Subject](#ory-keto-v1beta-Subject) + - [SubjectSet](#ory-keto-v1beta-SubjectSet) +- [ory/keto/v1beta/check_service.proto](#ory_keto_v1beta_check_service-proto) + + - [CheckRequest](#ory-keto-v1beta-CheckRequest) + - [CheckResponse](#ory-keto-v1beta-CheckResponse) + + - [CheckService](#ory-keto-v1beta-CheckService) + - [Scalar Value Types](#scalar-value-types) @@ -134,8 +146,8 @@ The service that checks the syntax of an OPL file. ### RelationQuery -The query for listing relation tuples. Clients can specify any optional field to -partially filter for specific relation tuples. +The query for listing relationships. Clients can specify any optional field to +partially filter for specific relationships. Example use cases (namespace is always required): @@ -455,8 +467,8 @@ from the previous page. | ### ListRelationTuplesRequest.Query -The query for listing relation tuples. Clients can specify any optional field to -partially filter for specific relation tuples. +The query for listing relationships. Clients can specify any optional field to +partially filter for specific relationships. Example use cases (namespace is always required): @@ -485,20 +497,20 @@ The response of a ReadService.ListRelationTuples RPC. | Field | Type | Label | Description | | --------------- | ----------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------ | -| relation_tuples | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | repeated | The relation tuples matching the list request. | +| relation_tuples | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | repeated | The relationships matching the list request. | | next_page_token | [string](#string) | | The token required to get the next page. If this is the last page, the token will be the empty string. | ### ReadService -The service to query relation tuples. +The service to query relationships. This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). -| Method Name | Request Type | Response Type | Description | -| ------------------ | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -------------------------- | -| ListRelationTuples | [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) | [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) | Lists ACL relation tuples. | +| Method Name | Request Type | Response Type | Description | +| ------------------ | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------ | +| ListRelationTuples | [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) | [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) | Lists ACL relationships. | @@ -554,7 +566,7 @@ and [write-APIs](../concepts/api-overview.mdx#write-apis). ### DeleteRelationTuplesRequest.Query -The query for deleting relation tuples +The query for deleting relationships | Field | Type | Label | Description | | --------- | ----------------------------------------------------- | ----- | ------------------------------------ | @@ -584,9 +596,9 @@ Write-delta for a TransactRelationTuplesRequest. The request of a WriteService.TransactRelationTuples RPC. -| Field | Type | Label | Description | -| --------------------- | --------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -| relation_tuple_deltas | [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) | repeated | The write delta for the relation tuples operated in one single transaction. Either all actions succeed or no change takes effect on error. | +| Field | Type | Label | Description | +| --------------------- | --------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| relation_tuple_deltas | [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) | repeated | The write delta for the relationships operated in one single transaction. Either all actions succeed or no change takes effect on error. | @@ -620,10 +632,170 @@ The write service to create and delete Access Control Lists. This service is part of the [write-APIs](../concepts/api-overview.mdx#write-apis). -| Method Name | Request Type | Response Type | Description | -| ---------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | -| TransactRelationTuples | [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) | [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) | Writes one or more relation tuples in a single transaction. | -| DeleteRelationTuples | [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) | [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) | Deletes relation tuples based on relation query | +| Method Name | Request Type | Response Type | Description | +| ---------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | +| TransactRelationTuples | [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) | [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) | Writes one or more relationships in a single transaction. | +| DeleteRelationTuples | [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) | [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) | Deletes relationships based on relation query | + + + +

Top

+ +## ory/keto/v1beta/relation_tuples.proto + + + +### RelationQuery + +The query for listing relation tuples. Clients can specify any optional field to +partially filter for specific relation tuples. + +Example use cases (namespace is always required): + +- object only: display a list of all permissions referring to a specific object +- relation only: get all groups that have members; get all directories that have + content +- object & relation: display all subjects that have a specific permission + relation +- subject & relation: display all groups a subject belongs to; display all + objects a subject has access to +- object & relation & subject: check whether the relation tuple already + exists + +| Field | Type | Label | Description | +| --------- | ----------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| namespace | [string](#string) | optional | The namespace this relation tuple lives in. | +| object | [string](#string) | optional | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | optional | The relation between an Object and a Subject. | +| subject | [Subject](#ory-keto-v1beta-Subject) | optional | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | + + + +### RelationTuple + +RelationTuple defines a relation between an Object and a Subject. + +| Field | Type | Label | Description | +| --------- | ----------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------- | +| namespace | [string](#string) | | The namespace this relation tuple lives in. | +| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | The relation between an Object and a Subject. | +| subject | [Subject](#ory-keto-v1beta-Subject) | | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | + + + +### Subject + +Subject is either a concrete subject id or a `SubjectSet` expanding to more +Subjects. + +| Field | Type | Label | Description | +| ----- | ----------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | +| id | [string](#string) | | A concrete id of the subject. | +| set | [SubjectSet](#ory-keto-v1beta-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + +### SubjectSet + +SubjectSet refers to all subjects who have the same `relation` on an `object`. + +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ------------------------------------------------------------------------ | +| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | +| object | [string](#string) | | The object related by this subject set. | +| relation | [string](#string) | | The relation between the object and the subjects. | + + + +

Top

+ +## ory/keto/v1beta/check_service.proto + + + +### CheckRequest + +The request for a CheckService.Check RPC. Checks whether a specific subject is +related to an object. + +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ---------------------------------------------------- | +| namespace | [string](#string) | | **Deprecated.** The namespace to evaluate the check. | + +Note: If you use the expand-API and the check evaluates a RelationTuple +specifying a SubjectSet as subject or due to a rewrite rule in a namespace +config this check request may involve other namespaces automatically. | | object +| [string](#string) | | **Deprecated.** The related object in this check. | | +relation | [string](#string) | | **Deprecated.** The relation between the Object +and the Subject. | | subject | [Subject](#ory-keto-v1beta-Subject) | | +**Deprecated.** The related subject in this check. | | tuple | +[RelationTuple](#ory-keto-v1beta-RelationTuple) | | | | latest | [bool](#bool) | +| This field is not implemented yet and has no effect. <!-- Set this field to +`true` in case your application needs to authorize depending on up to date ACLs, +also called a "content-change check". + +If set to `true` the `snaptoken` field is ignored, the check is evaluated at the +latest snapshot (globally consistent) and the response includes a snaptoken for +clients to store along with object contents that can be used for subsequent +checks of the same content version. + +Example use case: - You need to authorize a user to modify/delete some resource +and it is unacceptable that if the permission to do that had just been revoked +some seconds ago so that the change had not yet been fully replicated to all +availability zones. --> | | snaptoken | [string](#string) | | This field is +not implemented yet and has no effect. <!-- Optional. Like reads, a check is +always evaluated at a consistent snapshot no earlier than the given snaptoken. + +Leave this field blank if you want to evaluate the check based on eventually +consistent ACLs, benefiting from very low latency, but possibly slightly stale +results. + +If the specified token is too old and no longer known, the server falls back as +if no snaptoken had been specified. + +If not specified the server tries to evaluate the check on the best snapshot +version where it is very likely that ACLs had already been replicated to all +availability zones. --> | | max_depth | [int32](#int32) | | The maximum depth +to search for a relation. + +If the value is less than 1 or greater than the global max-depth then the global +max-depth will be used instead. | + + + +### CheckResponse + +The response for a CheckService.Check rpc. + +| Field | Type | Label | Description | +| ------- | ------------- | ----- | ---------------------------------------------------------------------- | +| allowed | [bool](#bool) | | Whether the specified subject (id) is related to the requested object. | + +It is false by default if no ACL matches. | | snaptoken | [string](#string) | | +This field is not implemented yet and has no effect. <!-- The last known +snapshot token ONLY specified if the request had not specified a snaptoken, +since this performed a "content-change request" and consistently fetched +the last known snapshot token. + +This field is not set if the request had specified a snaptoken! + +If set, clients should cache and use this token for subsequent requests to have +minimal latency, but allow slightly stale responses (only some milliseconds or +seconds). --> | + + + +### CheckService + +The service that performs authorization checks based on the stored Access +Control Lists. + +This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). + +| Method Name | Request Type | Response Type | Description | +| ----------- | --------------------------------------------- | ----------------------------------------------- | -------------------------------- | +| Check | [CheckRequest](#ory-keto-v1beta-CheckRequest) | [CheckResponse](#ory-keto-v1beta-CheckResponse) | Performs an authorization check. | ## Scalar Value Types diff --git a/proto/buf.yaml b/proto/buf.yaml index d1d48abc0..97e53a155 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -8,3 +8,6 @@ lint: breaking: use: - FILE +deps: + - buf.build/googleapis/googleapis + - buf.build/grpc-ecosystem/grpc-gateway diff --git a/proto/openapiv2/gateway.swagger.json b/proto/openapiv2/gateway.swagger.json new file mode 100644 index 000000000..5b8f018c7 --- /dev/null +++ b/proto/openapiv2/gateway.swagger.json @@ -0,0 +1,578 @@ +{ + "swagger": "2.0", + "info": { + "title": "ory/keto/relation_tuples/v1alpha2/check_service.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "CheckService" + }, + { + "name": "SyntaxService" + }, + { + "name": "ExpandService" + }, + { + "name": "NamespacesService" + }, + { + "name": "ReadService" + }, + { + "name": "VersionService" + }, + { + "name": "WriteService" + }, + { + "name": "CheckService" + } + ], + "consumes": ["application/json"], + "produces": ["application/json"], + "paths": { + "/relation-tuples/check": { + "get": { + "summary": "Performs an authorization check.", + "operationId": "checkPermissionOrError", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha2.CheckResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Status" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "The namespace to evaluate the check.\n\nNote: If you use the expand-API and the check\nevaluates a RelationTuple specifying a SubjectSet as\nsubject or due to a rewrite rule in a namespace config\nthis check request may involve other namespaces automatically.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "object", + "description": "The related object in this check.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "relation", + "description": "The relation between the Object and the Subject.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "subject.id", + "description": "A concrete id of the subject.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "subject.set.namespace", + "description": "The namespace of the object and relation\nreferenced in this subject set.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "subject.set.object", + "description": "The object related by this subject set.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "subject.set.relation", + "description": "The relation between the object and the subjects.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "tuple.namespace", + "description": "The namespace this relation tuple lives in.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "tuple.object", + "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "tuple.relation", + "description": "The relation between an Object and a Subject.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "tuple.subject.id", + "description": "A concrete id of the subject.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "tuple.subject.set.namespace", + "description": "The namespace of the object and relation\nreferenced in this subject set.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "tuple.subject.set.object", + "description": "The object related by this subject set.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "tuple.subject.set.relation", + "description": "The relation between the object and the subjects.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "latest", + "description": "This field is not implemented yet and has no effect.\n\u003c!--\nSet this field to `true` in case your application\nneeds to authorize depending on up to date ACLs,\nalso called a \"content-change check\".\n\nIf set to `true` the `snaptoken` field is ignored,\nthe check is evaluated at the latest snapshot\n(globally consistent) and the response includes a\nsnaptoken for clients to store along with object\ncontents that can be used for subsequent checks\nof the same content version.\n\nExample use case:\n - You need to authorize a user to modify/delete some resource\n and it is unacceptable that if the permission to do that had\n just been revoked some seconds ago so that the change had not\n yet been fully replicated to all availability zones.\n--\u003e", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "snaptoken", + "description": "This field is not implemented yet and has no effect.\n\u003c!--\nOptional. Like reads, a check is always evaluated at a\nconsistent snapshot no earlier than the given snaptoken.\n\nLeave this field blank if you want to evaluate the check\nbased on eventually consistent ACLs, benefiting from very\nlow latency, but possibly slightly stale results.\n\nIf the specified token is too old and no longer known,\nthe server falls back as if no snaptoken had been specified.\n\nIf not specified the server tries to evaluate the check\non the best snapshot version where it is very likely that\nACLs had already been replicated to all availability zones.\n--\u003e", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "max-depth", + "description": "The maximum depth to search for a relation.\n\nIf the value is less than 1 or greater than the global\nmax-depth then the global max-depth will be used instead.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded"] + } + } + }, + "definitions": { + "Action": { + "type": "string", + "enum": ["ACTION_UNSPECIFIED", "ACTION_INSERT", "ACTION_DELETE"], + "default": "ACTION_UNSPECIFIED", + "description": " - ACTION_UNSPECIFIED: Unspecified.\nThe `TransactRelationTuples` RPC ignores this\nRelationTupleDelta if an action was unspecified.\n - ACTION_INSERT: Insertion of a new RelationTuple.\nIt is ignored if already existing.\n - ACTION_DELETE: Deletion of the RelationTuple.\nIt is ignored if it does not exist." + }, + "Any": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "DeleteRelationTuplesRequest.Query": { + "type": "object", + "properties": { + "namespace": { + "type": "string", + "description": "Optional. The namespace to query." + }, + "object": { + "type": "string", + "description": "Optional. The object to query for." + }, + "relation": { + "type": "string", + "description": "Optional. The relation to query for." + }, + "subject": { + "$ref": "#/definitions/v1alpha2.Subject", + "description": "Optional. The subject to query for." + } + }, + "title": "The query for deleting relationships" + }, + "DeleteRelationTuplesResponse": { + "type": "object" + }, + "ExpandResponse": { + "type": "object", + "properties": { + "tree": { + "$ref": "#/definitions/SubjectTree", + "description": "The tree the requested subject set expands to.\nThe requested subject set is the subject of the root.\n\nThis field can be nil in some circumstances." + } + }, + "description": "The response for a ExpandService.Expand RPC." + }, + "GetVersionResponse": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "The version string of the Ory Keto instance." + } + }, + "description": "Response of the VersionService.GetVersion RPC." + }, + "ListNamespacesResponse": { + "type": "object", + "properties": { + "namespaces": { + "type": "array", + "items": { + "$ref": "#/definitions/Namespace" + } + } + } + }, + "ListRelationTuplesRequest.Query": { + "type": "object", + "properties": { + "namespace": { + "type": "string", + "description": "Required. The namespace to query." + }, + "object": { + "type": "string", + "description": "Optional. The object to query for." + }, + "relation": { + "type": "string", + "description": "Optional. The relation to query for." + }, + "subject": { + "$ref": "#/definitions/v1alpha2.Subject", + "description": "Optional. The subject to query for." + } + }, + "description": "The query for listing relationships.\nClients can specify any optional field to\npartially filter for specific relationships.\n\nExample use cases (namespace is always required):\n - object only: display a list of all permissions referring to a specific object\n - relation only: get all groups that have members; get all directories that have content\n - object \u0026 relation: display all subjects that have a specific permission relation\n - subject \u0026 relation: display all groups a subject belongs to; display all objects a subject has access to\n - object \u0026 relation \u0026 subject: check whether the relation tuple already exists" + }, + "ListRelationTuplesResponse": { + "type": "object", + "properties": { + "relationTuples": { + "type": "array", + "items": { + "$ref": "#/definitions/v1alpha2.RelationTuple" + }, + "description": "The relationships matching the list request." + }, + "nextPageToken": { + "type": "string", + "description": "The token required to get the next page.\nIf this is the last page, the token will be the empty string." + } + }, + "description": "The response of a ReadService.ListRelationTuples RPC." + }, + "Namespace": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "NodeType": { + "type": "string", + "enum": [ + "NODE_TYPE_UNSPECIFIED", + "NODE_TYPE_UNION", + "NODE_TYPE_EXCLUSION", + "NODE_TYPE_INTERSECTION", + "NODE_TYPE_LEAF" + ], + "default": "NODE_TYPE_UNSPECIFIED", + "description": " - NODE_TYPE_UNION: This node expands to a union of all children.\n - NODE_TYPE_EXCLUSION: Not implemented yet.\n - NODE_TYPE_INTERSECTION: Not implemented yet.\n - NODE_TYPE_LEAF: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached." + }, + "ParseError": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "start": { + "$ref": "#/definitions/SourcePosition" + }, + "end": { + "$ref": "#/definitions/SourcePosition" + } + } + }, + "RelationTupleDelta": { + "type": "object", + "properties": { + "action": { + "$ref": "#/definitions/Action", + "description": "The action to do on the RelationTuple." + }, + "relationTuple": { + "$ref": "#/definitions/v1alpha2.RelationTuple", + "description": "The target RelationTuple." + } + }, + "description": "Write-delta for a TransactRelationTuplesRequest." + }, + "SourcePosition": { + "type": "object", + "properties": { + "line": { + "type": "integer", + "format": "int64" + }, + "column": { + "type": "integer", + "format": "int64" + } + } + }, + "Status": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/Any" + } + } + } + }, + "SubjectTree": { + "type": "object", + "properties": { + "nodeType": { + "$ref": "#/definitions/NodeType", + "description": "The type of the node." + }, + "subject": { + "$ref": "#/definitions/v1alpha2.Subject", + "description": "The subject this node represents.\nDeprecated: More information is now available in the tuple field." + }, + "tuple": { + "$ref": "#/definitions/v1alpha2.RelationTuple", + "description": "The relation tuple this node represents." + }, + "children": { + "type": "array", + "items": { + "$ref": "#/definitions/SubjectTree" + }, + "description": "The children of this node.\n\nThis is never set if `node_type` == `NODE_TYPE_LEAF`." + } + } + }, + "TransactRelationTuplesResponse": { + "type": "object", + "properties": { + "snaptokens": { + "type": "array", + "items": { + "type": "string" + }, + "description": "This field is not implemented yet and has no effect.\n\u003c!--\nThe list of the new latest snapshot tokens of the affected RelationTuple,\nwith the same index as specified in the `relation_tuple_deltas` field of\nthe TransactRelationTuplesRequest request.\n\nIf the RelationTupleDelta_Action was DELETE\nthe snaptoken is empty at the same index.\n--\u003e" + } + }, + "description": "The response of a WriteService.TransactRelationTuples rpc." + }, + "v1alpha1.CheckResponse": { + "type": "object", + "properties": { + "parseErrors": { + "type": "array", + "items": { + "$ref": "#/definitions/ParseError" + } + } + } + }, + "v1alpha2.CheckResponse": { + "type": "object", + "properties": { + "allowed": { + "type": "boolean", + "description": "Whether the specified subject (id)\nis related to the requested object.\n\nIt is false by default if no ACL matches." + }, + "snaptoken": { + "type": "string", + "description": "This field is not implemented yet and has no effect.\n\u003c!--\nThe last known snapshot token ONLY specified if\nthe request had not specified a snaptoken,\nsince this performed a \"content-change request\"\nand consistently fetched the last known snapshot token.\n\nThis field is not set if the request had specified a snaptoken!\n\nIf set, clients should cache and use this token\nfor subsequent requests to have minimal latency,\nbut allow slightly stale responses (only some milliseconds or seconds).\n--\u003e" + } + }, + "description": "The response for a CheckService.Check rpc." + }, + "v1alpha2.RelationQuery": { + "type": "object", + "properties": { + "namespace": { + "type": "string", + "description": "The namespace this relation tuple lives in." + }, + "object": { + "type": "string", + "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple." + }, + "relation": { + "type": "string", + "description": "The relation between an Object and a Subject." + }, + "subject": { + "$ref": "#/definitions/v1alpha2.Subject", + "description": "The subject related by this tuple.\nA Subject either represents a concrete subject id or\na `SubjectSet` that expands to more Subjects." + } + }, + "description": "The query for listing relationships.\nClients can specify any optional field to\npartially filter for specific relationships.\n\nExample use cases (namespace is always required):\n - object only: display a list of all permissions referring to a specific object\n - relation only: get all groups that have members; get all directories that have content\n - object \u0026 relation: display all subjects that have a specific permission relation\n - subject \u0026 relation: display all groups a subject belongs to; display all objects a subject has access to\n - object \u0026 relation \u0026 subject: check whether the relation tuple already exists" + }, + "v1alpha2.RelationTuple": { + "type": "object", + "properties": { + "namespace": { + "type": "string", + "description": "The namespace this relation tuple lives in." + }, + "object": { + "type": "string", + "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple." + }, + "relation": { + "type": "string", + "description": "The relation between an Object and a Subject." + }, + "subject": { + "$ref": "#/definitions/v1alpha2.Subject", + "description": "The subject related by this tuple.\nA Subject either represents a concrete subject id or\na `SubjectSet` that expands to more Subjects." + } + }, + "description": "RelationTuple defines a relation between an Object and a Subject." + }, + "v1alpha2.Subject": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A concrete id of the subject." + }, + "set": { + "$ref": "#/definitions/v1alpha2.SubjectSet", + "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." + } + }, + "description": "Subject is either a concrete subject id or\na `SubjectSet` expanding to more Subjects." + }, + "v1alpha2.SubjectSet": { + "type": "object", + "properties": { + "namespace": { + "type": "string", + "description": "The namespace of the object and relation\nreferenced in this subject set." + }, + "object": { + "type": "string", + "description": "The object related by this subject set." + }, + "relation": { + "type": "string", + "description": "The relation between the object and the subjects." + } + }, + "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`." + }, + "v1beta.CheckResponse": { + "type": "object", + "properties": { + "allowed": { + "type": "boolean", + "description": "Whether the specified subject (id)\nis related to the requested object.\n\nIt is false by default if no ACL matches." + }, + "snaptoken": { + "type": "string", + "description": "This field is not implemented yet and has no effect.\n\u003c!--\nThe last known snapshot token ONLY specified if\nthe request had not specified a snaptoken,\nsince this performed a \"content-change request\"\nand consistently fetched the last known snapshot token.\n\nThis field is not set if the request had specified a snaptoken!\n\nIf set, clients should cache and use this token\nfor subsequent requests to have minimal latency,\nbut allow slightly stale responses (only some milliseconds or seconds).\n--\u003e" + } + }, + "description": "The response for a CheckService.Check rpc." + }, + "v1beta.RelationTuple": { + "type": "object", + "properties": { + "namespace": { + "type": "string", + "description": "The namespace this relation tuple lives in." + }, + "object": { + "type": "string", + "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple." + }, + "relation": { + "type": "string", + "description": "The relation between an Object and a Subject." + }, + "subject": { + "$ref": "#/definitions/v1beta.Subject", + "description": "The subject related by this tuple.\nA Subject either represents a concrete subject id or\na `SubjectSet` that expands to more Subjects." + } + }, + "description": "RelationTuple defines a relation between an Object and a Subject." + }, + "v1beta.Subject": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A concrete id of the subject." + }, + "set": { + "$ref": "#/definitions/v1beta.SubjectSet", + "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." + } + }, + "description": "Subject is either a concrete subject id or\na `SubjectSet` expanding to more Subjects." + }, + "v1beta.SubjectSet": { + "type": "object", + "properties": { + "namespace": { + "type": "string", + "description": "The namespace of the object and relation\nreferenced in this subject set." + }, + "object": { + "type": "string", + "description": "The object related by this subject set." + }, + "relation": { + "type": "string", + "description": "The relation between the object and the subjects." + } + }, + "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`." + } + } +} diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go index e6a9f7bfa..df6d97d76 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1-devel +// protoc-gen-go v1.28.1 // protoc (unknown) // source: ory/keto/opl/v1alpha1/syntax_service.proto diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js index fd530a99f..d507711c2 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js +++ b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js @@ -13,13 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); goog.exportSymbol('proto.ory.keto.opl.v1alpha1.CheckRequest', null, global); goog.exportSymbol('proto.ory.keto.opl.v1alpha1.CheckResponse', null, global); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go index 04fa1ffb8..b36601802 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go @@ -1,12 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1-devel +// protoc-gen-go v1.28.1 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/check_service.proto package rts import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -63,11 +65,10 @@ type CheckRequest struct { // of the same content version. // // Example use case: - // - You need to authorize a user to modify/delete some resource - // and it is unacceptable that if the permission to do that had - // just been revoked some seconds ago so that the change had not - // yet been fully replicated to all availability zones. - // + // - You need to authorize a user to modify/delete some resource + // and it is unacceptable that if the permission to do that had + // just been revoked some seconds ago so that the change had not + // yet been fully replicated to all availability zones. // --> Latest bool `protobuf:"varint,5,opt,name=latest,proto3" json:"latest,omitempty"` // This field is not implemented yet and has no effect. @@ -91,7 +92,7 @@ type CheckRequest struct { // // If the value is less than 1 or greater than the global // max-depth then the global max-depth will be used instead. - MaxDepth int32 `protobuf:"varint,7,opt,name=max_depth,json=maxDepth,proto3" json:"max_depth,omitempty"` + MaxDepth int32 `protobuf:"varint,7,opt,name=max_depth,json=max-depth,proto3" json:"max_depth,omitempty"` } func (x *CheckRequest) Reset() { @@ -267,57 +268,70 @@ var file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDesc = []byte{ 0x68, 0x61, 0x32, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, - 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xd1, 0x02, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x46, 0x0a, 0x05, - 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, - 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x05, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, - 0x78, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, - 0x61, 0x78, 0x44, 0x65, 0x70, 0x74, 0x68, 0x22, 0x47, 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x32, 0x7a, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x6a, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x2f, 0x2e, 0x6f, 0x72, 0x79, 0x2e, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 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, 0x37, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, + 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 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, 0xd2, 0x02, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x48, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x02, 0x18, + 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x46, 0x0a, 0x05, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, + 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x05, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6e, + 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, + 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, + 0x2d, 0x64, 0x65, 0x70, 0x74, 0x68, 0x22, 0x47, 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, + 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, + 0xe5, 0x01, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0xd4, 0x01, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x2f, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xc2, 0x01, 0x0a, - 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, - 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, - 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6f, 0x72, + 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x68, 0x92, + 0x41, 0x47, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x16, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4f, + 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x32, 0x21, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x75, + 0x72, 0x6c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, + 0x16, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x42, 0xd7, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, + 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x42, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, + 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, + 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x92, 0x41, 0x12, 0x3a, + 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, + 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/check_service.proto index 7476964e3..896e05de2 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.proto @@ -2,22 +2,37 @@ syntax = "proto3"; package ory.keto.relation_tuples.v1alpha2; +import "google/api/annotations.proto"; import "ory/keto/relation_tuples/v1alpha2/relation_tuples.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; +option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option java_multiple_files = true; option java_outer_classname = "CheckServiceProto"; option java_package = "sh.ory.keto.relation_tuples.v1alpha2"; option php_namespace = "Ory\\Keto\\RelationTuples\\v1alpha2"; +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + produces: "application/json"; +}; + // The service that performs authorization checks // based on the stored Access Control Lists. // // This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). service CheckService { // Performs an authorization check. - rpc Check(CheckRequest) returns (CheckResponse); + rpc Check(CheckRequest) returns (CheckResponse) { + option (google.api.http) = { + get: "/relation-tuples/check" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + consumes: "application/x-www-form-urlencoded"; + tags: "permission"; + operation_id: "checkPermissionOrError"; + }; + } } // The request for a CheckService.Check RPC. @@ -80,7 +95,7 @@ message CheckRequest { // // If the value is less than 1 or greater than the global // max-depth then the global max-depth will be used instead. - int32 max_depth = 7; + int32 max_depth = 7 [json_name="max-depth"]; } // The response for a CheckService.Check rpc. diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts index 2cd99f6ba..c79a3c34b 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts @@ -7,6 +7,7 @@ import * as grpc from "grpc"; import * as ory_keto_relation_tuples_v1alpha2_check_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/check_service_pb"; import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; interface ICheckServiceService extends grpc.ServiceDefinition { check: ICheckServiceService_ICheck; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js index 65fe201f5..527ead315 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js @@ -3,7 +3,9 @@ 'use strict'; var grpc = require('@grpc/grpc-js'); var ory_keto_relation_tuples_v1alpha2_check_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/check_service_pb.js'); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); function serialize_ory_keto_relation_tuples_v1alpha2_CheckRequest(arg) { if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest)) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts index 277e8081a..a45f2b736 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts @@ -6,6 +6,7 @@ import * as jspb from "google-protobuf"; import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; export class CheckRequest extends jspb.Message { getNamespace(): string; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js index d1912cc0b..abcc9d523 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js @@ -13,16 +13,14 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); +goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CheckRequest', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CheckResponse', null, global); /** diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go index 9892938eb..7a2afc10b 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1-devel +// protoc-gen-go v1.28.1 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/expand_service.proto diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js index 36b6412a4..795001f25 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js @@ -13,13 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go index 0f6a2c3e0..fb7244686 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1-devel +// protoc-gen-go v1.28.1 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/namespaces_service.proto diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js index 0d7ed7949..33de4127e 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js @@ -13,13 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse', null, global); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go index b9084ed20..941b8d9eb 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1-devel +// protoc-gen-go v1.28.1 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/read_service.proto @@ -149,7 +149,7 @@ type ListRelationTuplesResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The relation tuples matching the list request. + // The relationships matching the list request. RelationTuples []*RelationTuple `protobuf:"bytes,1,rep,name=relation_tuples,json=relationTuples,proto3" json:"relation_tuples,omitempty"` // The token required to get the next page. // If this is the last page, the token will be the empty string. @@ -202,16 +202,17 @@ func (x *ListRelationTuplesResponse) GetNextPageToken() string { return "" } -// The query for listing relation tuples. +// The query for listing relationships. // Clients can specify any optional field to -// partially filter for specific relation tuples. +// partially filter for specific relationships. // // Example use cases (namespace is always required): -// - object only: display a list of all permissions referring to a specific object -// - relation only: get all groups that have members; get all directories that have content -// - object & relation: display all subjects that have a specific permission relation -// - subject & relation: display all groups a subject belongs to; display all objects a subject has access to -// - object & relation & subject: check whether the relation tuple already exists +// - object only: display a list of all permissions referring to a specific object +// - relation only: get all groups that have members; get all directories that have content +// - object & relation: display all subjects that have a specific permission relation +// - subject & relation: display all groups a subject belongs to; display all objects a subject has access to +// - object & relation & subject: check whether the relation tuple already exists +// type ListRelationTuplesRequest_Query struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc.pb.go index 98a58d963..52e8fe3bf 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc.pb.go @@ -22,7 +22,7 @@ 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 ReadServiceClient interface { - // Lists ACL relation tuples. + // Lists ACL relationships. ListRelationTuples(ctx context.Context, in *ListRelationTuplesRequest, opts ...grpc.CallOption) (*ListRelationTuplesResponse, error) } @@ -47,7 +47,7 @@ func (c *readServiceClient) ListRelationTuples(ctx context.Context, in *ListRela // All implementations should embed UnimplementedReadServiceServer // for forward compatibility type ReadServiceServer interface { - // Lists ACL relation tuples. + // Lists ACL relationships. ListRelationTuples(context.Context, *ListRelationTuplesRequest) (*ListRelationTuplesResponse, error) } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js index 5fb177d71..b7f6ffdba 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js @@ -29,11 +29,11 @@ function deserialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesRespons } -// The service to query relation tuples. +// The service to query relationships. // // This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). var ReadServiceService = exports.ReadServiceService = { - // Lists ACL relation tuples. + // Lists ACL relationships. listRelationTuples: { path: '/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples', requestStream: false, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js index 6b06c56b4..170aeb9c6 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js @@ -13,13 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go index a00278938..54c95be85 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1-devel +// protoc-gen-go v1.28.1 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/relation_tuples.proto @@ -99,16 +99,16 @@ func (x *RelationTuple) GetSubject() *Subject { return nil } -// The query for listing relation tuples. +// The query for listing relationships. // Clients can specify any optional field to -// partially filter for specific relation tuples. +// partially filter for specific relationships. // // Example use cases (namespace is always required): -// - object only: display a list of all permissions referring to a specific object -// - relation only: get all groups that have members; get all directories that have content -// - object & relation: display all subjects that have a specific permission relation -// - subject & relation: display all groups a subject belongs to; display all objects a subject has access to -// - object & relation & subject: check whether the relation tuple already exists +// - object only: display a list of all permissions referring to a specific object +// - relation only: get all groups that have members; get all directories that have content +// - object & relation: display all subjects that have a specific permission relation +// - subject & relation: display all groups a subject belongs to; display all objects a subject has access to +// - object & relation & subject: check whether the relation tuple already exists type RelationQuery struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -197,7 +197,6 @@ type Subject struct { // The reference of this abstract subject. // // Types that are assignable to Ref: - // // *Subject_Id // *Subject_Set Ref isSubject_Ref `protobuf_oneof:"ref"` diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js index feb5a1a5a..f05a0ef12 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js @@ -13,13 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.RelationQuery', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.RelationTuple', null, global); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go index f59044490..f8ebdb16d 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1-devel +// protoc-gen-go v1.28.1 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/version.proto diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js index 827707b8d..340497c68 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js @@ -13,13 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse', null, global); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go index cee6ce58e..53ca4e238 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1-devel +// protoc-gen-go v1.28.1 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/write_service.proto @@ -82,7 +82,7 @@ type TransactRelationTuplesRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The write delta for the relation tuples operated in one single transaction. + // The write delta for the relationships operated in one single transaction. // Either all actions succeed or no change takes effect on error. RelationTupleDeltas []*RelationTupleDelta `protobuf:"bytes,1,rep,name=relation_tuple_deltas,json=relationTupleDeltas,proto3" json:"relation_tuple_deltas,omitempty"` } @@ -336,7 +336,7 @@ func (*DeleteRelationTuplesResponse) Descriptor() ([]byte, []int) { return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{4} } -// The query for deleting relation tuples +// The query for deleting relationships type DeleteRelationTuplesRequest_Query struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go index 6a234e635..23b67cf9c 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go @@ -22,9 +22,9 @@ 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 WriteServiceClient interface { - // Writes one or more relation tuples in a single transaction. + // Writes one or more relationships in a single transaction. TransactRelationTuples(ctx context.Context, in *TransactRelationTuplesRequest, opts ...grpc.CallOption) (*TransactRelationTuplesResponse, error) - // Deletes relation tuples based on relation query + // Deletes relationships based on relation query DeleteRelationTuples(ctx context.Context, in *DeleteRelationTuplesRequest, opts ...grpc.CallOption) (*DeleteRelationTuplesResponse, error) } @@ -58,9 +58,9 @@ func (c *writeServiceClient) DeleteRelationTuples(ctx context.Context, in *Delet // All implementations should embed UnimplementedWriteServiceServer // for forward compatibility type WriteServiceServer interface { - // Writes one or more relation tuples in a single transaction. + // Writes one or more relationships in a single transaction. TransactRelationTuples(context.Context, *TransactRelationTuplesRequest) (*TransactRelationTuplesResponse, error) - // Deletes relation tuples based on relation query + // Deletes relationships based on relation query DeleteRelationTuples(context.Context, *DeleteRelationTuplesRequest) (*DeleteRelationTuplesResponse, error) } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js index fc1785c12..7fe0972b5 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js @@ -54,7 +54,7 @@ function deserialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesRes // // This service is part of the [write-APIs](../concepts/api-overview.mdx#write-apis). var WriteServiceService = exports.WriteServiceService = { - // Writes one or more relation tuples in a single transaction. + // Writes one or more relationships in a single transaction. transactRelationTuples: { path: '/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples', requestStream: false, @@ -66,7 +66,7 @@ transactRelationTuples: { responseSerialize: serialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesResponse, responseDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesResponse, }, - // Deletes relation tuples based on relation query + // Deletes relationships based on relation query deleteRelationTuples: { path: '/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples', requestStream: false, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js index 0d7dd3426..f41cbb2ea 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js @@ -13,13 +13,7 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); +var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); From 866380cff013bbb7a5e9cd9d2bbad28cb7290184 Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Fri, 2 Dec 2022 15:46:34 +0100 Subject: [PATCH 02/42] WIP: generate complete OpenAPI spec --- .schema/openapi/patches/checkServices.yaml | 22 + .schema/openapi/patches/health.yaml | 20 +- .schema/openapi/patches/meta.yaml | 2 +- .schema/openapi/patches/replacements.sed | 10 + Makefile | 17 +- buf.gen.yaml | 6 +- internal/e2e/grpc_client_test.go | 2 +- internal/e2e/sdk_client_test.go | 4 +- internal/httpclient/.openapi-generator/FILES | 44 +- internal/httpclient/README.md | 44 +- internal/httpclient/api/openapi.yaml | 781 ++++++----- internal/httpclient/api_metadata.go | 2 +- internal/httpclient/api_permission.go | 134 +- internal/httpclient/api_relationship.go | 131 +- .../httpclient/docs/CheckOplSyntaxResult.md | 8 +- .../httpclient/docs/CheckPermissionResult.md | 9 +- .../httpclient/docs/CreateRelationshipBody.md | 8 +- internal/httpclient/docs/ErrorGeneric.md | 15 +- .../httpclient/docs/ExpandedPermissionTree.md | 38 +- internal/httpclient/docs/GenericError.md | 233 ---- .../httpclient/docs/HealthNotReadyStatus.md | 56 - internal/httpclient/docs/HealthStatus.md | 56 - ...ror.md => OryKetoOplV1alpha1ParseError.md} | 42 +- ...md => OryKetoOplV1alpha1SourcePosition.md} | 30 +- ...plesV1alpha2CreateRelationTupleResponse.md | 56 + ...ryKetoRelationTuplesV1alpha2ErrorObject.md | 238 ++++ ...etoRelationTuplesV1alpha2ExpandResponse.md | 56 + ...elationTuplesV1alpha2GetVersionResponse.md | 56 + ...OryKetoRelationTuplesV1alpha2Namespace.md} | 24 +- .../OryKetoRelationTuplesV1alpha2NodeType.md | 25 + .../OryKetoRelationTuplesV1alpha2Subject.md | 82 ++ internal/httpclient/docs/PermissionApi.md | 134 +- .../docs/PostCheckPermissionBody.md | 42 +- .../docs/PostCheckPermissionOrErrorBody.md | 160 --- internal/httpclient/docs/RelationQuery.md | 160 --- internal/httpclient/docs/Relationship.md | 8 +- internal/httpclient/docs/RelationshipApi.md | 116 +- ...ationshipPatch.md => RelationshipDelta.md} | 32 +- .../docs/RelationshipDeltaAction.md | 15 + .../httpclient/docs/RelationshipNamespaces.md | 8 +- internal/httpclient/docs/Relationships.md | 4 +- internal/httpclient/docs/SubjectSet.md | 6 +- internal/httpclient/docs/SubjectSetQuery.md | 108 ++ internal/httpclient/docs/Version.md | 56 - .../model_check_opl_syntax_result.go | 13 +- .../model_check_permission_result.go | 37 +- .../model_create_relationship_body.go | 10 +- internal/httpclient/model_error_generic.go | 43 +- .../model_expanded_permission_tree.go | 57 +- .../model_health_not_ready_status.go | 115 -- internal/httpclient/model_health_status.go | 115 -- internal/httpclient/model_namespace.go | 115 -- ...odel_ory_keto_opl_v1alpha1_parse_error.go} | 76 +- ..._ory_keto_opl_v1alpha1_source_position.go} | 54 +- ...v1alpha2_create_relation_tuple_response.go | 114 ++ ..._relation_tuples_v1alpha2_error_object.go} | 154 ++- ...elation_tuples_v1alpha2_expand_response.go | 114 ++ ...on_tuples_v1alpha2_get_version_response.go | 115 ++ ...keto_relation_tuples_v1alpha2_namespace.go | 114 ++ ...keto_relation_tuples_v1alpha2_node_type.go | 90 ++ ...y_keto_relation_tuples_v1alpha2_subject.go | 151 +++ .../model_post_check_permission_body.go | 61 +- ...del_post_check_permission_or_error_body.go | 262 ---- internal/httpclient/model_relation_query.go | 262 ---- internal/httpclient/model_relationship.go | 10 +- ...p_patch.go => model_relationship_delta.go} | 66 +- .../model_relationship_delta_action.go | 85 ++ .../model_relationship_namespaces.go | 14 +- internal/httpclient/model_relationships.go | 7 +- internal/httpclient/model_subject_set.go | 8 +- .../httpclient/model_subject_set_query.go | 189 +++ internal/httpclient/model_version.go | 115 -- internal/relationtuple/transact_server.go | 22 + internal/schema/handler.go | 2 +- ketoapi/enc_proto.go | 48 +- proto/buf.md | 366 +++-- proto/buf.yaml | 7 + proto/openapiv2/gateway.swagger.json | 1027 ++++++++++---- .../keto/opl/v1alpha1/syntax_service.pb.go | 101 +- .../keto/opl/v1alpha1/syntax_service.proto | 29 +- .../opl/v1alpha1/syntax_service_grpc_pb.d.ts | 1 + .../opl/v1alpha1/syntax_service_grpc_pb.js | 2 + .../keto/opl/v1alpha1/syntax_service_pb.d.ts | 11 +- .../keto/opl/v1alpha1/syntax_service_pb.js | 22 +- .../v1alpha2/check_service.pb.go | 253 ++-- .../v1alpha2/check_service.proto | 64 +- .../v1alpha2/check_service_grpc_pb.d.ts | 3 +- .../v1alpha2/check_service_grpc_pb.js | 3 +- .../v1alpha2/check_service_pb.d.ts | 24 +- .../v1alpha2/check_service_pb.js | 134 +- .../v1alpha2/expand_service.pb.go | 282 +++- .../v1alpha2/expand_service.proto | 84 +- .../v1alpha2/expand_service_grpc_pb.d.ts | 3 + .../v1alpha2/expand_service_grpc_pb.js | 4 + .../v1alpha2/expand_service_pb.d.ts | 23 + .../v1alpha2/expand_service_pb.js | 113 +- .../v1alpha2/namespaces_service.pb.go | 91 +- .../v1alpha2/namespaces_service.proto | 30 +- .../v1alpha2/namespaces_service_grpc.pb.go | 4 + .../v1alpha2/namespaces_service_grpc_pb.d.ts | 1 + .../v1alpha2/namespaces_service_grpc_pb.js | 4 + .../v1alpha2/namespaces_service_pb.d.ts | 1 + .../v1alpha2/namespaces_service_pb.js | 4 + .../v1alpha2/read_service.pb.go | 302 +++-- .../v1alpha2/read_service.proto | 62 +- .../v1alpha2/read_service_grpc_pb.d.ts | 4 +- .../v1alpha2/read_service_grpc_pb.js | 5 +- .../v1alpha2/read_service_pb.d.ts | 34 +- .../v1alpha2/read_service_pb.js | 230 +++- .../v1alpha2/relation_tuples.pb.go | 403 +++++- .../v1alpha2/relation_tuples.proto | 52 +- .../v1alpha2/relation_tuples_pb.d.ts | 87 ++ .../v1alpha2/relation_tuples_pb.js | 594 +++++++- .../keto/relation_tuples/v1alpha2/utils.go | 21 +- .../relation_tuples/v1alpha2/version.pb.go | 66 +- .../relation_tuples/v1alpha2/version.proto | 28 +- .../v1alpha2/version_grpc.pb.go | 10 + .../v1alpha2/version_grpc_pb.d.ts | 1 + .../v1alpha2/version_grpc_pb.js | 7 + .../relation_tuples/v1alpha2/version_pb.d.ts | 1 + .../relation_tuples/v1alpha2/version_pb.js | 4 + .../v1alpha2/write_service.pb.go | 723 ++++++++-- .../v1alpha2/write_service.proto | 139 +- .../v1alpha2/write_service_grpc.pb.go | 38 + .../v1alpha2/write_service_grpc_pb.d.ts | 19 + .../v1alpha2/write_service_grpc_pb.js | 37 + .../v1alpha2/write_service_pb.d.ts | 129 ++ .../v1alpha2/write_service_pb.js | 1134 ++++++++++++++-- spec/api.json | 665 ++++----- spec/goswagger.swagger.json | 1095 +++++++++++++++ spec/swagger.json | 1197 ++++++++--------- 131 files changed, 10405 insertions(+), 5111 deletions(-) create mode 100644 .schema/openapi/patches/checkServices.yaml create mode 100644 .schema/openapi/patches/replacements.sed delete mode 100644 internal/httpclient/docs/GenericError.md delete mode 100644 internal/httpclient/docs/HealthNotReadyStatus.md delete mode 100644 internal/httpclient/docs/HealthStatus.md rename internal/httpclient/docs/{ParseError.md => OryKetoOplV1alpha1ParseError.md} (53%) rename internal/httpclient/docs/{SourcePosition.md => OryKetoOplV1alpha1SourcePosition.md} (59%) create mode 100644 internal/httpclient/docs/OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse.md create mode 100644 internal/httpclient/docs/OryKetoRelationTuplesV1alpha2ErrorObject.md create mode 100644 internal/httpclient/docs/OryKetoRelationTuplesV1alpha2ExpandResponse.md create mode 100644 internal/httpclient/docs/OryKetoRelationTuplesV1alpha2GetVersionResponse.md rename internal/httpclient/docs/{Namespace.md => OryKetoRelationTuplesV1alpha2Namespace.md} (53%) create mode 100644 internal/httpclient/docs/OryKetoRelationTuplesV1alpha2NodeType.md create mode 100644 internal/httpclient/docs/OryKetoRelationTuplesV1alpha2Subject.md delete mode 100644 internal/httpclient/docs/PostCheckPermissionOrErrorBody.md delete mode 100644 internal/httpclient/docs/RelationQuery.md rename internal/httpclient/docs/{RelationshipPatch.md => RelationshipDelta.md} (61%) create mode 100644 internal/httpclient/docs/RelationshipDeltaAction.md create mode 100644 internal/httpclient/docs/SubjectSetQuery.md delete mode 100644 internal/httpclient/docs/Version.md delete mode 100644 internal/httpclient/model_health_not_ready_status.go delete mode 100644 internal/httpclient/model_health_status.go delete mode 100644 internal/httpclient/model_namespace.go rename internal/httpclient/{model_parse_error.go => model_ory_keto_opl_v1alpha1_parse_error.go} (50%) rename internal/httpclient/{model_source_position.go => model_ory_keto_opl_v1alpha1_source_position.go} (54%) create mode 100644 internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_create_relation_tuple_response.go rename internal/httpclient/{model_generic_error.go => model_ory_keto_relation_tuples_v1alpha2_error_object.go} (52%) create mode 100644 internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_expand_response.go create mode 100644 internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_get_version_response.go create mode 100644 internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_namespace.go create mode 100644 internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_node_type.go create mode 100644 internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_subject.go delete mode 100644 internal/httpclient/model_post_check_permission_or_error_body.go delete mode 100644 internal/httpclient/model_relation_query.go rename internal/httpclient/{model_relationship_patch.go => model_relationship_delta.go} (54%) create mode 100644 internal/httpclient/model_relationship_delta_action.go create mode 100644 internal/httpclient/model_subject_set_query.go delete mode 100644 internal/httpclient/model_version.go create mode 100755 spec/goswagger.swagger.json diff --git a/.schema/openapi/patches/checkServices.yaml b/.schema/openapi/patches/checkServices.yaml new file mode 100644 index 000000000..75c04f184 --- /dev/null +++ b/.schema/openapi/patches/checkServices.yaml @@ -0,0 +1,22 @@ +- op: add + path: /paths/~1relation-tuples~1check/get/operationId + value: checkPermissionOrError +- op: add + path: /paths/~1relation-tuples~1check/post/operationId + value: postCheckPermissionOrError +- op: add + path: /paths/~1relation-tuples~1check~1openapi/get/operationId + value: checkPermission +- op: add + path: /paths/~1relation-tuples~1check~1openapi/post/operationId + value: postCheckPermission + +# Remove schema from empty response. +- op: replace + path: /paths/~1admin~1relation-tuples/delete/responses/204 + value: + description: An empty response. +- op: replace + path: /paths/~1admin~1relation-tuples/patch/responses/204 + value: + description: An empty response. diff --git a/.schema/openapi/patches/health.yaml b/.schema/openapi/patches/health.yaml index 1d42a1d63..e662f65c6 100644 --- a/.schema/openapi/patches/health.yaml +++ b/.schema/openapi/patches/health.yaml @@ -1,4 +1,4 @@ -- op: replace +- op: add path: /paths/~1health~1alive value: get: @@ -17,17 +17,23 @@ content: application/json: schema: - "$ref": "#/components/schemas/healthStatus" + required: + - status + type: object + properties: + status: + description: Always "ok". + type: string description: {{.ProjectHumanName}} is ready to accept connections. '500': content: application/json: schema: - "$ref": "#/components/schemas/genericError" + "$ref": "#/definitions/errorGeneric" description: genericError summary: Check HTTP Server Status tags: {{ .HealthPathTags | toJson }} -- op: replace +- op: add path: /paths/~1health~1ready value: get: @@ -46,6 +52,8 @@ content: application/json: schema: + required: + - status type: object properties: status: @@ -56,6 +64,8 @@ content: application/json: schema: + required: + - errors properties: errors: additionalProperties: @@ -85,6 +95,8 @@ application/json: schema: type: object + required: + - version properties: version: description: The version of {{.ProjectHumanName}}. diff --git a/.schema/openapi/patches/meta.yaml b/.schema/openapi/patches/meta.yaml index 8df46a312..8874df403 100644 --- a/.schema/openapi/patches/meta.yaml +++ b/.schema/openapi/patches/meta.yaml @@ -1,4 +1,4 @@ -- op: replace +- op: add path: /info value: title: Ory Keto API diff --git a/.schema/openapi/patches/replacements.sed b/.schema/openapi/patches/replacements.sed new file mode 100644 index 000000000..95527c06d --- /dev/null +++ b/.schema/openapi/patches/replacements.sed @@ -0,0 +1,10 @@ +s/ory.keto.relation_tuples.v1alpha2.ErrorResponse/errorGeneric/g +s/ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship/createRelationshipBody/g +s/ory.keto.relation_tuples.v1alpha2.SubjectSet/subjectSet/g +s/ory.keto.relation_tuples.v1alpha2.SubjectTree/expandedPermissionTree/g +s/ory.keto.relation_tuples.v1alpha2.RelationTuple/relationship/g +s/ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse/relationships/g +s/ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse/relationshipNamespaces/g +s/ory.keto.relation_tuples.v1alpha2.CheckRequest/postCheckPermissionBody/g +s/ory.keto.relation_tuples.v1alpha2.CheckResponse/checkPermissionResult/g +s/ory.keto.opl.v1alpha1.CheckResponse/checkOplSyntaxResult/g diff --git a/Makefile b/Makefile index 42416903b..805bbd8e4 100644 --- a/Makefile +++ b/Makefile @@ -59,20 +59,23 @@ docker: # Generates the SDKs .PHONY: sdk -sdk: .bin/swagger .bin/ory node_modules +sdk: buf .bin/swagger .bin/ory node_modules rm -rf internal/httpclient - swagger generate spec -m -o spec/swagger.json \ - -c github.com/ory/keto \ - -c github.com/ory/x/healthx \ - -x internal/httpclient \ - -x internal/e2e + cp proto/openapiv2/gateway.swagger.json spec/swagger.json + # swagger generate spec -m -o spec/swagger.json \ + # -c github.com/ory/keto \ + # -c github.com/ory/x/healthx \ + # -x internal/httpclient \ + # -x internal/e2e .bin/ory dev swagger sanitize ./spec/swagger.json + sed -i -f ./.schema/openapi/patches/replacements.sed ./spec/swagger.json swagger validate ./spec/swagger.json CIRCLE_PROJECT_USERNAME=ory CIRCLE_PROJECT_REPONAME=keto \ .bin/ory dev openapi migrate \ --health-path-tags metadata \ - -p https://raw.githubusercontent.com/ory/x/master/healthx/openapi/patch.yaml \ + -p file://.schema/openapi/patches/health.yaml \ -p file://.schema/openapi/patches/meta.yaml \ + -p file://.schema/openapi/patches/checkServices.yaml \ spec/swagger.json spec/api.json mkdir -p internal/httpclient diff --git a/buf.gen.yaml b/buf.gen.yaml index fa86b64f0..a0b868234 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -17,7 +17,11 @@ plugins: opt: - allow_merge=true - merge_file_name=gateway - - openapi_naming_strategy=simple + - openapi_naming_strategy=fqn + - visibility_restriction_selectors=PUBLIC + - disable_service_tags=true + - disable_default_errors=true + - disable_default_responses=true out: proto/openapiv2 - remote: buf.build/protocolbuffers/plugins/js:v3.20.1-1 diff --git a/internal/e2e/grpc_client_test.go b/internal/e2e/grpc_client_test.go index e78329403..0244b6a25 100644 --- a/internal/e2e/grpc_client_test.go +++ b/internal/e2e/grpc_client_test.go @@ -240,7 +240,7 @@ func (g *grpcClient) oplCheckSyntax(t require.TestingT, content []byte) (parseEr res, err := c.Check(g.ctx, &opl.CheckRequest{Content: content}) require.NoError(t, err) - raw, err := json.Marshal(res.ParseErrors) + raw, err := json.Marshal(res.Errors) require.NoError(t, err) err = json.Unmarshal(raw, &parseErrors) require.NoError(t, err) diff --git a/internal/e2e/sdk_client_test.go b/internal/e2e/sdk_client_test.go index 44e5e9acf..065f7a88a 100644 --- a/internal/e2e/sdk_client_test.go +++ b/internal/e2e/sdk_client_test.go @@ -171,7 +171,7 @@ func compileParams(req httpclient.RelationshipApiApiGetRelationshipsRequest, q * pagination := x.GetPaginationOptions(opts...) if pagination.Size != 0 { - req = req.PageSize(int64(pagination.Size)) + req = req.PageSize(int32(pagination.Size)) } if pagination.Token != "" { req = req.PageToken(pagination.Token) @@ -273,7 +273,7 @@ func (c *sdkClient) expand(t require.TestingT, r *ketoapi.SubjectSet, depth int) Namespace(r.Namespace). Object(r.Object). Relation(r.Relation). - MaxDepth(int64(depth)) + MaxDepth(int32(depth)) resp, _, err := request.Execute() require.NoError(t, err) diff --git a/internal/httpclient/.openapi-generator/FILES b/internal/httpclient/.openapi-generator/FILES index 498f627cb..c0e038de7 100644 --- a/internal/httpclient/.openapi-generator/FILES +++ b/internal/httpclient/.openapi-generator/FILES @@ -13,27 +13,29 @@ docs/CheckPermissionResult.md docs/CreateRelationshipBody.md docs/ErrorGeneric.md docs/ExpandedPermissionTree.md -docs/GenericError.md -docs/HealthNotReadyStatus.md -docs/HealthStatus.md docs/InlineResponse200.md docs/InlineResponse2001.md docs/InlineResponse503.md docs/MetadataApi.md -docs/Namespace.md -docs/ParseError.md +docs/OryKetoOplV1alpha1ParseError.md +docs/OryKetoOplV1alpha1SourcePosition.md +docs/OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse.md +docs/OryKetoRelationTuplesV1alpha2ErrorObject.md +docs/OryKetoRelationTuplesV1alpha2ExpandResponse.md +docs/OryKetoRelationTuplesV1alpha2GetVersionResponse.md +docs/OryKetoRelationTuplesV1alpha2Namespace.md +docs/OryKetoRelationTuplesV1alpha2NodeType.md +docs/OryKetoRelationTuplesV1alpha2Subject.md docs/PermissionApi.md docs/PostCheckPermissionBody.md -docs/PostCheckPermissionOrErrorBody.md -docs/RelationQuery.md docs/Relationship.md docs/RelationshipApi.md +docs/RelationshipDelta.md +docs/RelationshipDeltaAction.md docs/RelationshipNamespaces.md -docs/RelationshipPatch.md docs/Relationships.md -docs/SourcePosition.md docs/SubjectSet.md -docs/Version.md +docs/SubjectSetQuery.md git_push.sh go.mod go.sum @@ -42,23 +44,25 @@ model_check_permission_result.go model_create_relationship_body.go model_error_generic.go model_expanded_permission_tree.go -model_generic_error.go -model_health_not_ready_status.go -model_health_status.go model_inline_response_200.go model_inline_response_200_1.go model_inline_response_503.go -model_namespace.go -model_parse_error.go +model_ory_keto_opl_v1alpha1_parse_error.go +model_ory_keto_opl_v1alpha1_source_position.go +model_ory_keto_relation_tuples_v1alpha2_create_relation_tuple_response.go +model_ory_keto_relation_tuples_v1alpha2_error_object.go +model_ory_keto_relation_tuples_v1alpha2_expand_response.go +model_ory_keto_relation_tuples_v1alpha2_get_version_response.go +model_ory_keto_relation_tuples_v1alpha2_namespace.go +model_ory_keto_relation_tuples_v1alpha2_node_type.go +model_ory_keto_relation_tuples_v1alpha2_subject.go model_post_check_permission_body.go -model_post_check_permission_or_error_body.go -model_relation_query.go model_relationship.go +model_relationship_delta.go +model_relationship_delta_action.go model_relationship_namespaces.go -model_relationship_patch.go model_relationships.go -model_source_position.go model_subject_set.go -model_version.go +model_subject_set_query.go response.go utils.go diff --git a/internal/httpclient/README.md b/internal/httpclient/README.md index 16bff2500..caa828460 100644 --- a/internal/httpclient/README.md +++ b/internal/httpclient/README.md @@ -82,17 +82,17 @@ Class | Method | HTTP request | Description *MetadataApi* | [**GetVersion**](docs/MetadataApi.md#getversion) | **Get** /version | Return Running Software Version. *MetadataApi* | [**IsAlive**](docs/MetadataApi.md#isalive) | **Get** /health/alive | Check HTTP Server Status *MetadataApi* | [**IsReady**](docs/MetadataApi.md#isready) | **Get** /health/ready | Check HTTP Server and Database Status -*PermissionApi* | [**CheckPermission**](docs/PermissionApi.md#checkpermission) | **Get** /relation-tuples/check/openapi | Check a permission -*PermissionApi* | [**CheckPermissionOrError**](docs/PermissionApi.md#checkpermissionorerror) | **Get** /relation-tuples/check | Check a permission -*PermissionApi* | [**ExpandPermissions**](docs/PermissionApi.md#expandpermissions) | **Get** /relation-tuples/expand | Expand a Relationship into permissions. -*PermissionApi* | [**PostCheckPermission**](docs/PermissionApi.md#postcheckpermission) | **Post** /relation-tuples/check/openapi | Check a permission -*PermissionApi* | [**PostCheckPermissionOrError**](docs/PermissionApi.md#postcheckpermissionorerror) | **Post** /relation-tuples/check | Check a permission -*RelationshipApi* | [**CheckOplSyntax**](docs/RelationshipApi.md#checkoplsyntax) | **Post** /opl/syntax/check | Check the syntax of an OPL file -*RelationshipApi* | [**CreateRelationship**](docs/RelationshipApi.md#createrelationship) | **Put** /admin/relation-tuples | Create a Relationship -*RelationshipApi* | [**DeleteRelationships**](docs/RelationshipApi.md#deleterelationships) | **Delete** /admin/relation-tuples | Delete Relationships -*RelationshipApi* | [**GetRelationships**](docs/RelationshipApi.md#getrelationships) | **Get** /relation-tuples | Query relationships -*RelationshipApi* | [**ListRelationshipNamespaces**](docs/RelationshipApi.md#listrelationshipnamespaces) | **Get** /namespaces | Query namespaces -*RelationshipApi* | [**PatchRelationships**](docs/RelationshipApi.md#patchrelationships) | **Patch** /admin/relation-tuples | Patch Multiple Relationships +*PermissionApi* | [**CheckPermission**](docs/PermissionApi.md#checkpermission) | **Get** /relation-tuples/check/openapi | Performs an authorization check. +*PermissionApi* | [**CheckPermissionOrError**](docs/PermissionApi.md#checkpermissionorerror) | **Get** /relation-tuples/check | Performs an authorization check. +*PermissionApi* | [**ExpandPermissions**](docs/PermissionApi.md#expandpermissions) | **Get** /relation-tuples/expand | Expands the subject set into a tree of subjects. +*PermissionApi* | [**PostCheckPermission**](docs/PermissionApi.md#postcheckpermission) | **Post** /relation-tuples/check/openapi | Performs an authorization check. +*PermissionApi* | [**PostCheckPermissionOrError**](docs/PermissionApi.md#postcheckpermissionorerror) | **Post** /relation-tuples/check | Performs an authorization check. +*RelationshipApi* | [**CheckOplSyntax**](docs/RelationshipApi.md#checkoplsyntax) | **Post** /opl/syntax/check | Performs a syntax check request. +*RelationshipApi* | [**CreateRelationship**](docs/RelationshipApi.md#createrelationship) | **Put** /admin/relation-tuples | Creates a relationship +*RelationshipApi* | [**DeleteRelationships**](docs/RelationshipApi.md#deleterelationships) | **Delete** /admin/relation-tuples | Deletes relationships based on relation query +*RelationshipApi* | [**GetRelationships**](docs/RelationshipApi.md#getrelationships) | **Get** /relation-tuples | Lists ACL relationships. +*RelationshipApi* | [**ListRelationshipNamespaces**](docs/RelationshipApi.md#listrelationshipnamespaces) | **Get** /namespaces | Lists Namespaces +*RelationshipApi* | [**PatchRelationships**](docs/RelationshipApi.md#patchrelationships) | **Patch** /admin/relation-tuples | Writes one or more relationships in a single transaction. ## Documentation For Models @@ -102,24 +102,26 @@ Class | Method | HTTP request | Description - [CreateRelationshipBody](docs/CreateRelationshipBody.md) - [ErrorGeneric](docs/ErrorGeneric.md) - [ExpandedPermissionTree](docs/ExpandedPermissionTree.md) - - [GenericError](docs/GenericError.md) - - [HealthNotReadyStatus](docs/HealthNotReadyStatus.md) - - [HealthStatus](docs/HealthStatus.md) - [InlineResponse200](docs/InlineResponse200.md) - [InlineResponse2001](docs/InlineResponse2001.md) - [InlineResponse503](docs/InlineResponse503.md) - - [Namespace](docs/Namespace.md) - - [ParseError](docs/ParseError.md) + - [OryKetoOplV1alpha1ParseError](docs/OryKetoOplV1alpha1ParseError.md) + - [OryKetoOplV1alpha1SourcePosition](docs/OryKetoOplV1alpha1SourcePosition.md) + - [OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse](docs/OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse.md) + - [OryKetoRelationTuplesV1alpha2ErrorObject](docs/OryKetoRelationTuplesV1alpha2ErrorObject.md) + - [OryKetoRelationTuplesV1alpha2ExpandResponse](docs/OryKetoRelationTuplesV1alpha2ExpandResponse.md) + - [OryKetoRelationTuplesV1alpha2GetVersionResponse](docs/OryKetoRelationTuplesV1alpha2GetVersionResponse.md) + - [OryKetoRelationTuplesV1alpha2Namespace](docs/OryKetoRelationTuplesV1alpha2Namespace.md) + - [OryKetoRelationTuplesV1alpha2NodeType](docs/OryKetoRelationTuplesV1alpha2NodeType.md) + - [OryKetoRelationTuplesV1alpha2Subject](docs/OryKetoRelationTuplesV1alpha2Subject.md) - [PostCheckPermissionBody](docs/PostCheckPermissionBody.md) - - [PostCheckPermissionOrErrorBody](docs/PostCheckPermissionOrErrorBody.md) - - [RelationQuery](docs/RelationQuery.md) - [Relationship](docs/Relationship.md) + - [RelationshipDelta](docs/RelationshipDelta.md) + - [RelationshipDeltaAction](docs/RelationshipDeltaAction.md) - [RelationshipNamespaces](docs/RelationshipNamespaces.md) - - [RelationshipPatch](docs/RelationshipPatch.md) - [Relationships](docs/Relationships.md) - - [SourcePosition](docs/SourcePosition.md) - [SubjectSet](docs/SubjectSet.md) - - [Version](docs/Version.md) + - [SubjectSetQuery](docs/SubjectSetQuery.md) ## Documentation For Authorization diff --git a/internal/httpclient/api/openapi.yaml b/internal/httpclient/api/openapi.yaml index 15838381c..8948ba987 100644 --- a/internal/httpclient/api/openapi.yaml +++ b/internal/httpclient/api/openapi.yaml @@ -12,10 +12,9 @@ servers: paths: /admin/relation-tuples: delete: - description: Use this endpoint to delete relationships operationId: deleteRelationships parameters: - - description: Namespace of the Relationship + - description: The namespace this relation tuple lives in. explode: true in: query name: namespace @@ -23,7 +22,9 @@ paths: schema: type: string style: form - - description: Object of the Relationship + - description: |- + The object related by this tuple. + It is an object in the namespace of the tuple. explode: true in: query name: object @@ -31,7 +32,7 @@ paths: schema: type: string style: form - - description: Relation of the Relationship + - description: The relation between an Object and a Subject. explode: true in: query name: relation @@ -39,7 +40,7 @@ paths: schema: type: string style: form - - description: SubjectID of the Relationship + - description: A concrete id of the subject. explode: true in: query name: subject_id @@ -47,7 +48,9 @@ paths: schema: type: string style: form - - description: Namespace of the Subject Set + - description: |- + The namespace of the object and relation + referenced in this subject set. explode: true in: query name: subject_set.namespace @@ -55,7 +58,7 @@ paths: schema: type: string style: form - - description: Object of the Subject Set + - description: The object related by this subject set. explode: true in: query name: subject_set.object @@ -63,7 +66,7 @@ paths: schema: type: string style: form - - description: Relation of the Subject Set + - description: The relation between the object and the subjects. explode: true in: query name: subject_set.relation @@ -73,88 +76,66 @@ paths: style: form responses: "204": - description: Empty responses are sent when, for example, resources are deleted. - The HTTP status code for empty responses is typically 201. - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: errorGeneric + description: An empty response. default: content: application/json: schema: $ref: '#/components/schemas/errorGeneric' - description: errorGeneric - summary: Delete Relationships + description: Generic error + summary: Deletes relationships based on relation query tags: - relationship patch: - description: Use this endpoint to patch one or more relationships. operationId: patchRelationships requestBody: content: application/json: schema: items: - $ref: '#/components/schemas/relationshipPatch' + $ref: '#/components/schemas/relationshipDelta' type: array - x-originalParamName: Body + description: |- + The write delta for the relationships operated in one single transaction. + Either all actions succeed or no change takes effect on error. + required: true + x-originalParamName: relationTupleDeltas responses: "204": - description: Empty responses are sent when, for example, resources are deleted. - The HTTP status code for empty responses is typically 201. - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: errorGeneric - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: errorGeneric + description: An empty response. default: content: application/json: schema: $ref: '#/components/schemas/errorGeneric' - description: errorGeneric - summary: Patch Multiple Relationships + description: Generic error + summary: Writes one or more relationships in a single transaction. tags: - relationship put: - description: Use this endpoint to create a relationship. operationId: createRelationship requestBody: content: application/json: schema: $ref: '#/components/schemas/createRelationshipBody' - x-originalParamName: Body + description: The relationship to create. + required: true + x-originalParamName: relationTuple responses: "201": content: application/json: schema: $ref: '#/components/schemas/relationship' - description: relationship - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: errorGeneric + description: The created relationship. default: content: application/json: schema: $ref: '#/components/schemas/errorGeneric' - description: errorGeneric - summary: Create a Relationship + description: Generic error + summary: Creates a relationship tags: - relationship /health/alive: @@ -180,7 +161,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/genericError' + $ref: '#/definitions/errorGeneric' description: genericError summary: Check HTTP Server Status tags: @@ -215,7 +196,7 @@ paths: - metadata /namespaces: get: - description: Get all namespaces + description: Get all namespaces. operationId: listRelationshipNamespaces responses: "200": @@ -223,70 +204,75 @@ paths: application/json: schema: $ref: '#/components/schemas/relationshipNamespaces' - description: relationshipNamespaces + description: The list of namespaces. default: content: application/json: schema: $ref: '#/components/schemas/errorGeneric' - description: errorGeneric - summary: Query namespaces + description: Generic error + summary: Lists Namespaces tags: - relationship /opl/syntax/check: post: - description: The OPL file is expected in the body of the request. operationId: checkOplSyntax requestBody: content: text/plain: schema: - $ref: '#/components/schemas/checkOplSyntaxBody' - x-originalParamName: Body + format: byte + type: string + required: true + x-originalParamName: content responses: "200": content: application/json: schema: $ref: '#/components/schemas/checkOplSyntaxResult' - description: checkOplSyntaxResult - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: errorGeneric + description: The result of the syntax checker default: content: application/json: schema: $ref: '#/components/schemas/errorGeneric' - description: errorGeneric - summary: Check the syntax of an OPL file + description: Generic error + summary: Performs a syntax check request. tags: - relationship /relation-tuples: get: - description: Get all relationships that match the query. Only the namespace - field is required. operationId: getRelationships parameters: - - explode: true + - description: |- + Optional. The maximum number of + RelationTuples to return in the response. + + Default: 100 + explode: true in: query - name: page_token + name: page_size required: false schema: - type: string + format: int32 + type: integer style: form - - explode: true + - description: |- + Optional. An opaque pagination token returned from + a previous call to `ListRelationTuples` that + indicates where the page should start at. + + An empty token denotes the first page. All successive + pages require the token from the previous page. + explode: true in: query - name: page_size + name: page_token required: false schema: - format: int64 - type: integer + type: string style: form - - description: Namespace of the Relationship + - description: The namespace explode: true in: query name: namespace @@ -294,7 +280,7 @@ paths: schema: type: string style: form - - description: Object of the Relationship + - description: The related object in this check. explode: true in: query name: object @@ -302,7 +288,7 @@ paths: schema: type: string style: form - - description: Relation of the Relationship + - description: The relation between the Object and the Subject. explode: true in: query name: relation @@ -310,7 +296,7 @@ paths: schema: type: string style: form - - description: SubjectID of the Relationship + - description: A concrete id of the subject. explode: true in: query name: subject_id @@ -318,7 +304,9 @@ paths: schema: type: string style: form - - description: Namespace of the Subject Set + - description: |- + The namespace of the object and relation + referenced in this subject set. explode: true in: query name: subject_set.namespace @@ -326,7 +314,7 @@ paths: schema: type: string style: form - - description: Object of the Subject Set + - description: The object related by this subject set. explode: true in: query name: subject_set.object @@ -334,7 +322,7 @@ paths: schema: type: string style: form - - description: Relation of the Subject Set + - description: The relation between the object and the subjects. explode: true in: query name: subject_set.relation @@ -348,29 +336,27 @@ paths: application/json: schema: $ref: '#/components/schemas/relationships' - description: relationships - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: errorGeneric + description: The list of relationships. default: content: application/json: schema: $ref: '#/components/schemas/errorGeneric' - description: errorGeneric - summary: Query relationships + description: Generic error + summary: Lists ACL relationships. tags: - relationship /relation-tuples/check: get: - description: To learn how relationship tuples and the check works, head over - to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). operationId: checkPermissionOrError parameters: - - description: Namespace of the Relationship + - description: |- + The namespace to evaluate the check. + + Note: If you use the expand-API and the check + evaluates a RelationTuple specifying a SubjectSet as + subject or due to a rewrite rule in a namespace config + this check request may involve other namespaces automatically. explode: true in: query name: namespace @@ -378,7 +364,7 @@ paths: schema: type: string style: form - - description: Object of the Relationship + - description: The related object in this check. explode: true in: query name: object @@ -386,7 +372,7 @@ paths: schema: type: string style: form - - description: Relation of the Relationship + - description: The relation between the Object and the Subject. explode: true in: query name: relation @@ -394,7 +380,7 @@ paths: schema: type: string style: form - - description: SubjectID of the Relationship + - description: A concrete id of the subject. explode: true in: query name: subject_id @@ -402,7 +388,9 @@ paths: schema: type: string style: form - - description: Namespace of the Subject Set + - description: |- + The namespace of the object and relation + referenced in this subject set. explode: true in: query name: subject_set.namespace @@ -410,7 +398,7 @@ paths: schema: type: string style: form - - description: Object of the Subject Set + - description: The object related by this subject set. explode: true in: query name: subject_set.object @@ -418,7 +406,7 @@ paths: schema: type: string style: form - - description: Relation of the Subject Set + - description: The relation between the object and the subjects. explode: true in: query name: subject_set.relation @@ -426,12 +414,17 @@ paths: schema: type: string style: form - - explode: true + - description: |- + The maximum depth to search for a relation. + + If the value is less than 1 or greater than the global + max-depth then the global max-depth will be used instead. + explode: true in: query name: max-depth required: false schema: - format: int64 + format: int32 type: integer style: form responses: @@ -440,82 +433,74 @@ paths: application/json: schema: $ref: '#/components/schemas/checkPermissionResult' - description: checkPermissionResult - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: errorGeneric + description: The response of the permission check, in case it is allowed. + For the `/openapi` endpoints, the status code is always 200. "403": content: application/json: schema: $ref: '#/components/schemas/checkPermissionResult' - description: checkPermissionResult + description: The response of the permission check, in case it is not allowed. + For the `/openapi` endpoints, the status code is always 200. default: content: application/json: schema: $ref: '#/components/schemas/errorGeneric' - description: errorGeneric - summary: Check a permission + description: Generic error + summary: Performs an authorization check. tags: - permission post: - description: To learn how relationship tuples and the check works, head over - to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). operationId: postCheckPermissionOrError - parameters: - - explode: true - in: query - name: max-depth - required: false - schema: - format: int64 - type: integer - style: form requestBody: content: application/json: schema: - $ref: '#/components/schemas/postCheckPermissionOrErrorBody' - x-originalParamName: Body + $ref: '#/components/schemas/postCheckPermissionBody' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/postCheckPermissionBody' + description: |- + The request for a CheckService.Check RPC. + Checks whether a specific subject is related to an object. + required: true + x-originalParamName: body responses: "200": content: application/json: schema: $ref: '#/components/schemas/checkPermissionResult' - description: checkPermissionResult - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: errorGeneric + description: The response of the permission check, in case it is allowed. + For the `/openapi` endpoints, the status code is always 200. "403": content: application/json: schema: $ref: '#/components/schemas/checkPermissionResult' - description: checkPermissionResult + description: The response of the permission check, in case it is not allowed. + For the `/openapi` endpoints, the status code is always 200. default: content: application/json: schema: $ref: '#/components/schemas/errorGeneric' - description: errorGeneric - summary: Check a permission + description: Generic error + summary: Performs an authorization check. tags: - permission /relation-tuples/check/openapi: get: - description: To learn how relationship tuples and the check works, head over - to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). operationId: checkPermission parameters: - - description: Namespace of the Relationship + - description: |- + The namespace to evaluate the check. + + Note: If you use the expand-API and the check + evaluates a RelationTuple specifying a SubjectSet as + subject or due to a rewrite rule in a namespace config + this check request may involve other namespaces automatically. explode: true in: query name: namespace @@ -523,7 +508,7 @@ paths: schema: type: string style: form - - description: Object of the Relationship + - description: The related object in this check. explode: true in: query name: object @@ -531,7 +516,7 @@ paths: schema: type: string style: form - - description: Relation of the Relationship + - description: The relation between the Object and the Subject. explode: true in: query name: relation @@ -539,7 +524,7 @@ paths: schema: type: string style: form - - description: SubjectID of the Relationship + - description: A concrete id of the subject. explode: true in: query name: subject_id @@ -547,7 +532,9 @@ paths: schema: type: string style: form - - description: Namespace of the Subject Set + - description: |- + The namespace of the object and relation + referenced in this subject set. explode: true in: query name: subject_set.namespace @@ -555,7 +542,7 @@ paths: schema: type: string style: form - - description: Object of the Subject Set + - description: The object related by this subject set. explode: true in: query name: subject_set.object @@ -563,7 +550,7 @@ paths: schema: type: string style: form - - description: Relation of the Subject Set + - description: The relation between the object and the subjects. explode: true in: query name: subject_set.relation @@ -571,12 +558,17 @@ paths: schema: type: string style: form - - explode: true + - description: |- + The maximum depth to search for a relation. + + If the value is less than 1 or greater than the global + max-depth then the global max-depth will be used instead. + explode: true in: query name: max-depth required: false schema: - format: int64 + format: int32 type: integer style: form responses: @@ -585,69 +577,86 @@ paths: application/json: schema: $ref: '#/components/schemas/checkPermissionResult' - description: checkPermissionResult - "400": + description: The response of the permission check, in case it is allowed. + For the `/openapi` endpoints, the status code is always 200. + "403": content: application/json: schema: - $ref: '#/components/schemas/errorGeneric' - description: errorGeneric + $ref: '#/components/schemas/checkPermissionResult' + description: The response of the permission check, in case it is not allowed. + For the `/openapi` endpoints, the status code is always 200. default: content: application/json: schema: $ref: '#/components/schemas/errorGeneric' - description: errorGeneric - summary: Check a permission + description: Generic error + summary: Performs an authorization check. tags: - permission post: - description: To learn how relationship tuples and the check works, head over - to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). operationId: postCheckPermission - parameters: - - explode: true - in: query - name: max-depth - required: false - schema: - format: int64 - type: integer - style: form requestBody: content: application/json: schema: $ref: '#/components/schemas/postCheckPermissionBody' - x-originalParamName: Payload + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/postCheckPermissionBody' + description: |- + The request for a CheckService.Check RPC. + Checks whether a specific subject is related to an object. + required: true + x-originalParamName: body responses: "200": content: application/json: schema: $ref: '#/components/schemas/checkPermissionResult' - description: checkPermissionResult - "400": + description: The response of the permission check, in case it is allowed. + For the `/openapi` endpoints, the status code is always 200. + "403": content: application/json: schema: - $ref: '#/components/schemas/errorGeneric' - description: errorGeneric + $ref: '#/components/schemas/checkPermissionResult' + description: The response of the permission check, in case it is not allowed. + For the `/openapi` endpoints, the status code is always 200. default: content: application/json: schema: $ref: '#/components/schemas/errorGeneric' - description: errorGeneric - summary: Check a permission + description: Generic error + summary: Performs an authorization check. tags: - permission /relation-tuples/expand: get: - description: Use this endpoint to expand a relationship tuple into permissions. operationId: expandPermissions parameters: - - description: Namespace of the Subject Set + - description: |- + The maximum depth of tree to build. + + If the value is less than 1 or greater than the global + max-depth then the global max-depth will be used instead. + + It is important to set this parameter to a meaningful + value. Ponder how deep you really want to display this. + explode: true + in: query + name: max-depth + required: false + schema: + format: int32 + type: integer + style: form + - description: |- + The namespace of the object and relation + referenced in this subject set. explode: true in: query name: namespace @@ -655,7 +664,7 @@ paths: schema: type: string style: form - - description: Object of the Subject Set + - description: The object related by this subject set. explode: true in: query name: object @@ -663,7 +672,7 @@ paths: schema: type: string style: form - - description: Relation of the Subject Set + - description: The relation between the object and the subjects. explode: true in: query name: relation @@ -671,40 +680,21 @@ paths: schema: type: string style: form - - explode: true - in: query - name: max-depth - required: false - schema: - format: int64 - type: integer - style: form responses: "200": content: application/json: schema: $ref: '#/components/schemas/expandedPermissionTree' - description: expandedPermissionTree - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: errorGeneric - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: errorGeneric + description: The response of the permission check, in case it is allowed. + For the `/openapi` endpoints, the status code is always 200. default: content: application/json: schema: $ref: '#/components/schemas/errorGeneric' - description: errorGeneric - summary: Expand a Relationship into permissions. + description: Generic error + summary: Expands the subject set into a tree of subjects. tags: - permission /version: @@ -729,46 +719,10 @@ paths: tags: - metadata components: - responses: - emptyResponse: - description: Empty responses are sent when, for example, resources are deleted. - The HTTP status code for empty responses is typically 201. schemas: - ParseError: - example: - start: - Line: 0 - column: 6 - end: - Line: 0 - column: 6 - message: message - properties: - end: - $ref: '#/components/schemas/SourcePosition' - message: - type: string - start: - $ref: '#/components/schemas/SourcePosition' - type: object - SourcePosition: - example: - Line: 0 - column: 6 - properties: - Line: - format: int64 - type: integer - column: - format: int64 - type: integer - type: object UUID: format: uuid4 type: string - checkOplSyntaxBody: - description: Ory Permission Language Document - type: string checkOplSyntaxResult: example: errors: @@ -788,55 +742,46 @@ components: message: message properties: errors: - description: The list of syntax errors items: - $ref: '#/components/schemas/ParseError' + $ref: '#/components/schemas/ory.keto.opl.v1alpha1.ParseError' type: array - title: CheckOPLSyntaxResponse represents the response for an OPL syntax check - request. type: object checkPermissionResult: - description: The content of the allowed field is mirrored in the HTTP status - code. + description: The response for a CheckService.Check rpc. example: allowed: true properties: allowed: - description: whether the relation tuple is allowed + description: |- + Whether the specified subject (id) + is related to the requested object. + + It is false by default if no ACL matches. type: boolean - required: - - allowed - title: Check Permission Result type: object createRelationshipBody: - description: Create Relationship Request Body properties: namespace: - description: Namespace to query + description: The namespace this relation tuple lives in. type: string object: - description: Object to query + description: |- + The object related by this tuple. + It is an object in the namespace of the tuple. type: string relation: - description: Relation to query + description: The relation between an Object and a Subject. type: string subject_id: - description: |- - SubjectID to query - - Either SubjectSet or SubjectID can be provided. + description: A concrete id of the subject. type: string subject_set: $ref: '#/components/schemas/subjectSet' type: object errorGeneric: - description: The standard Ory JSON API error format. properties: error: - $ref: '#/components/schemas/genericError' - required: - - error - title: JSON API Error Response + $ref: '#/components/schemas/ory.keto.relation_tuples.v1alpha2.ErrorObject' type: object expandedPermissionTree: example: @@ -852,187 +797,204 @@ components: children: - null - null - type: union + subject: + set: + namespace: namespace + object: object + relation: relation + id: id properties: children: - description: The children of the node, possibly none. + description: |- + The children of this node. + + This is never set if `node_type` == `NODE_TYPE_LEAF`. items: $ref: '#/components/schemas/expandedPermissionTree' type: array + subject: + $ref: '#/components/schemas/ory.keto.relation_tuples.v1alpha2.Subject' tuple: $ref: '#/components/schemas/relationship' type: - description: |- - The type of the node. - union TreeNodeUnion - exclusion TreeNodeExclusion - intersection TreeNodeIntersection - leaf TreeNodeLeaf - tuple_to_subject_set TreeNodeTupleToSubjectSet - computed_subject_set TreeNodeComputedSubjectSet - not TreeNodeNot - unspecified TreeNodeUnspecified - enum: - - union - - exclusion - - intersection - - leaf - - tuple_to_subject_set - - computed_subject_set - - not - - unspecified - type: string - x-go-enum-desc: |- - union TreeNodeUnion - exclusion TreeNodeExclusion - intersection TreeNodeIntersection - leaf TreeNodeLeaf - tuple_to_subject_set TreeNodeTupleToSubjectSet - computed_subject_set TreeNodeComputedSubjectSet - not TreeNodeNot - unspecified TreeNodeUnspecified + $ref: '#/components/schemas/ory.keto.relation_tuples.v1alpha2.NodeType' required: - type type: object - genericError: + ory.keto.opl.v1alpha1.ParseError: + example: + start: + Line: 0 + column: 6 + end: + Line: 0 + column: 6 + message: message + properties: + end: + $ref: '#/components/schemas/ory.keto.opl.v1alpha1.SourcePosition' + message: + type: string + start: + $ref: '#/components/schemas/ory.keto.opl.v1alpha1.SourcePosition' + type: object + ory.keto.opl.v1alpha1.SourcePosition: + example: + Line: 0 + column: 6 + properties: + Line: + format: int64 + type: integer + column: + format: int64 + type: integer + type: object + ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse: + description: The response from creating a new relationship. + properties: + relationTuple: + $ref: '#/components/schemas/relationship' + type: object + ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse: + type: object + ory.keto.relation_tuples.v1alpha2.ErrorObject: properties: code: description: The status code example: 404 format: int64 + pattern: ^[0-9]$ + title: code type: integer debug: description: |- - Debug information - This field is often not exposed to protect against leaking - sensitive information. - example: SQL field "foo" is not a bool. + sensitive information + example: SQL field 'foo' is not a bool + title: Debug information type: string details: - additionalProperties: {} - description: Further error details + additionalProperties: + type: string + title: Further error details type: object id: - description: |- - The error ID - - Useful when trying to identify various errors in application logic. + description: Useful when trying to identify various errors in application + logic. + title: The error ID type: string message: - description: |- - Error message - - The error's message. + description: Response message example: The resource could not be found + title: message type: string reason: description: A human-readable reason for the error example: User with ID 1234 does not exist. + title: The reason for the failure type: string request: description: |- - The request ID - The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. example: d7ef54b1-ec15-46e6-bccb-524b82c035e6 + title: The request ID type: string status: - description: The status description + description: The human-readable description of the code. example: Not Found + title: The status description type: string - required: - - message type: object - healthNotReadyStatus: + ory.keto.relation_tuples.v1alpha2.ExpandResponse: + description: The response for a ExpandService.Expand RPC. properties: - errors: - additionalProperties: - type: string - description: Errors contains a list of errors that caused the not ready - status. - type: object + tree: + $ref: '#/components/schemas/expandedPermissionTree' type: object - healthStatus: + ory.keto.relation_tuples.v1alpha2.GetVersionResponse: + description: Response of the VersionService.GetVersion RPC. properties: - status: - description: Status always contains "ok". + version: + description: The version string of the Ory Keto instance. type: string type: object - namespace: + ory.keto.relation_tuples.v1alpha2.Namespace: example: name: name properties: name: - description: Name of the namespace. type: string type: object - postCheckPermissionBody: - description: Check Permission using Post Request Body + ory.keto.relation_tuples.v1alpha2.NodeType: + default: unspecified + enum: + - unspecified + - union + - exclusion + - intersection + - leaf + - tuple_to_subject_set + - computed_subject_set + - not + type: string + ory.keto.relation_tuples.v1alpha2.Subject: + description: |- + Subject is either a concrete subject id or + a `SubjectSet` expanding to more Subjects. + example: + set: + namespace: namespace + object: object + relation: relation + id: id properties: - namespace: - description: Namespace to query - type: string - object: - description: Object to query - type: string - relation: - description: Relation to query - type: string - subject_id: - description: |- - SubjectID to query - - Either SubjectSet or SubjectID can be provided. + id: + description: A concrete id of the subject. type: string - subject_set: + set: $ref: '#/components/schemas/subjectSet' type: object - postCheckPermissionOrErrorBody: - description: Post Check Permission Or Error Body + ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse: + description: The response of a WriteService.TransactRelationTuples rpc. + type: object + postCheckPermissionBody: + description: |- + The request for a CheckService.Check RPC. + Checks whether a specific subject is related to an object. properties: - namespace: - description: Namespace to query - type: string - object: - description: Object to query - type: string - relation: - description: Relation to query - type: string - subject_id: + max-depth: description: |- - SubjectID to query + The maximum depth to search for a relation. - Either SubjectSet or SubjectID can be provided. - type: string - subject_set: - $ref: '#/components/schemas/subjectSet' - type: object - relationQuery: - description: Relation Query - properties: + If the value is less than 1 or greater than the global + max-depth then the global max-depth will be used instead. + format: int32 + type: integer namespace: - description: Namespace to query + description: |- + The namespace to evaluate the check. + + Note: If you use the expand-API and the check + evaluates a RelationTuple specifying a SubjectSet as + subject or due to a rewrite rule in a namespace config + this check request may involve other namespaces automatically. type: string object: - description: Object to query + description: The related object in this check. type: string relation: - description: Relation to query + description: The relation between the Object and the Subject. type: string subject_id: - description: |- - SubjectID to query - - Either SubjectSet or SubjectID can be provided. + description: A concrete id of the subject. type: string subject_set: - $ref: '#/components/schemas/subjectSet' + $ref: '#/components/schemas/subjectSetQuery' type: object relationship: - description: Relationship + description: RelationTuple defines a relation between an Object and a Subject. example: subject_id: subject_id namespace: namespace @@ -1044,19 +1006,18 @@ components: relation: relation properties: namespace: - description: Namespace of the Relation Tuple + description: The namespace this relation tuple lives in. type: string object: - description: Object of the Relation Tuple + description: |- + The object related by this tuple. + It is an object in the namespace of the tuple. type: string relation: - description: Relation of the Relation Tuple + description: The relation between an Object and a Subject. type: string subject_id: - description: |- - SubjectID of the Relation Tuple - - Either SubjectSet or SubjectID can be provided. + description: A concrete id of the subject. type: string subject_set: $ref: '#/components/schemas/subjectSet' @@ -1065,8 +1026,30 @@ components: - object - relation type: object + relationshipDelta: + description: Write-delta for a TransactRelationTuplesRequest. + properties: + action: + $ref: '#/components/schemas/relationshipDelta.Action' + relation_tuple: + $ref: '#/components/schemas/relationship' + type: object + relationshipDelta.Action: + default: ACTION_UNSPECIFIED + description: |2- + - ACTION_UNSPECIFIED: Unspecified. + The `TransactRelationTuples` RPC ignores this + RelationTupleDelta if an action was unspecified. + - insert: Insertion of a new RelationTuple. + It is ignored if already existing. + - delete: Deletion of the RelationTuple. + It is ignored if it does not exist. + enum: + - ACTION_UNSPECIFIED + - insert + - delete + type: string relationshipNamespaces: - description: Relationship Namespace List example: namespaces: - name: name @@ -1074,25 +1057,11 @@ components: properties: namespaces: items: - $ref: '#/components/schemas/namespace' + $ref: '#/components/schemas/ory.keto.relation_tuples.v1alpha2.Namespace' type: array type: object - relationshipPatch: - description: Payload for patching a relationship - properties: - action: - enum: - - insert - - delete - type: string - x-go-enum-desc: |- - insert ActionInsert - delete ActionDelete - relation_tuple: - $ref: '#/components/schemas/relationship' - type: object relationships: - description: Paginated Relationship List + description: The response of a ReadService.ListRelationTuples RPC. example: next_page_token: next_page_token relation_tuples: @@ -1115,39 +1084,55 @@ components: properties: next_page_token: description: |- - The opaque token to provide in a subsequent request - to get the next page. It is the empty string iff this is - the last page. + The token required to get the next page. + If this is the last page, the token will be the empty string. type: string relation_tuples: + description: The relationships matching the list request. items: $ref: '#/components/schemas/relationship' type: array type: object subjectSet: + description: |- + SubjectSet refers to all subjects who have + the same `relation` on an `object`. example: namespace: namespace object: object relation: relation properties: namespace: - description: Namespace of the Subject Set + description: |- + The namespace of the object and relation + referenced in this subject set. type: string object: - description: Object of the Subject Set + description: The object related by this subject set. type: string relation: - description: Relation of the Subject Set + description: The relation between the object and the subjects. type: string required: - namespace - object - relation type: object - version: + subjectSetQuery: + description: |- + SubjectSetQuery refers to all subjects who have + the same `relation` on an `object`. properties: - version: - description: Version is the service's version. + namespace: + description: |- + The namespace of the object and relation + referenced in this subject set. + type: string + object: + description: The object related by this subject set. + type: string + relation: + description: The relation between the object and the subjects. type: string type: object inline_response_200: diff --git a/internal/httpclient/api_metadata.go b/internal/httpclient/api_metadata.go index 8d56775f2..87d656e67 100644 --- a/internal/httpclient/api_metadata.go +++ b/internal/httpclient/api_metadata.go @@ -294,7 +294,7 @@ func (a *MetadataApiService) IsAliveExecute(r MetadataApiApiIsAliveRequest) (*In error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 500 { - var v GenericError + var v ErrorGeneric err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() diff --git a/internal/httpclient/api_permission.go b/internal/httpclient/api_permission.go index af71574a4..666119806 100644 --- a/internal/httpclient/api_permission.go +++ b/internal/httpclient/api_permission.go @@ -27,8 +27,7 @@ var ( type PermissionApi interface { /* - * CheckPermission Check a permission - * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). + * CheckPermission Performs an authorization check. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return PermissionApiApiCheckPermissionRequest */ @@ -41,8 +40,7 @@ type PermissionApi interface { CheckPermissionExecute(r PermissionApiApiCheckPermissionRequest) (*CheckPermissionResult, *http.Response, error) /* - * CheckPermissionOrError Check a permission - * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). + * CheckPermissionOrError Performs an authorization check. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return PermissionApiApiCheckPermissionOrErrorRequest */ @@ -55,8 +53,7 @@ type PermissionApi interface { CheckPermissionOrErrorExecute(r PermissionApiApiCheckPermissionOrErrorRequest) (*CheckPermissionResult, *http.Response, error) /* - * ExpandPermissions Expand a Relationship into permissions. - * Use this endpoint to expand a relationship tuple into permissions. + * ExpandPermissions Expands the subject set into a tree of subjects. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return PermissionApiApiExpandPermissionsRequest */ @@ -69,8 +66,7 @@ type PermissionApi interface { ExpandPermissionsExecute(r PermissionApiApiExpandPermissionsRequest) (*ExpandedPermissionTree, *http.Response, error) /* - * PostCheckPermission Check a permission - * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). + * PostCheckPermission Performs an authorization check. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return PermissionApiApiPostCheckPermissionRequest */ @@ -83,8 +79,7 @@ type PermissionApi interface { PostCheckPermissionExecute(r PermissionApiApiPostCheckPermissionRequest) (*CheckPermissionResult, *http.Response, error) /* - * PostCheckPermissionOrError Check a permission - * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). + * PostCheckPermissionOrError Performs an authorization check. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return PermissionApiApiPostCheckPermissionOrErrorRequest */ @@ -110,7 +105,7 @@ type PermissionApiApiCheckPermissionRequest struct { subjectSetNamespace *string subjectSetObject *string subjectSetRelation *string - maxDepth *int64 + maxDepth *int32 } func (r PermissionApiApiCheckPermissionRequest) Namespace(namespace string) PermissionApiApiCheckPermissionRequest { @@ -141,7 +136,7 @@ func (r PermissionApiApiCheckPermissionRequest) SubjectSetRelation(subjectSetRel r.subjectSetRelation = &subjectSetRelation return r } -func (r PermissionApiApiCheckPermissionRequest) MaxDepth(maxDepth int64) PermissionApiApiCheckPermissionRequest { +func (r PermissionApiApiCheckPermissionRequest) MaxDepth(maxDepth int32) PermissionApiApiCheckPermissionRequest { r.maxDepth = &maxDepth return r } @@ -151,8 +146,7 @@ func (r PermissionApiApiCheckPermissionRequest) Execute() (*CheckPermissionResul } /* - * CheckPermission Check a permission - * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). + * CheckPermission Performs an authorization check. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return PermissionApiApiCheckPermissionRequest */ @@ -251,8 +245,8 @@ func (a *PermissionApiService) CheckPermissionExecute(r PermissionApiApiCheckPer body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorGeneric + if localVarHTTPResponse.StatusCode == 403 { + var v CheckPermissionResult err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -293,7 +287,7 @@ type PermissionApiApiCheckPermissionOrErrorRequest struct { subjectSetNamespace *string subjectSetObject *string subjectSetRelation *string - maxDepth *int64 + maxDepth *int32 } func (r PermissionApiApiCheckPermissionOrErrorRequest) Namespace(namespace string) PermissionApiApiCheckPermissionOrErrorRequest { @@ -324,7 +318,7 @@ func (r PermissionApiApiCheckPermissionOrErrorRequest) SubjectSetRelation(subjec r.subjectSetRelation = &subjectSetRelation return r } -func (r PermissionApiApiCheckPermissionOrErrorRequest) MaxDepth(maxDepth int64) PermissionApiApiCheckPermissionOrErrorRequest { +func (r PermissionApiApiCheckPermissionOrErrorRequest) MaxDepth(maxDepth int32) PermissionApiApiCheckPermissionOrErrorRequest { r.maxDepth = &maxDepth return r } @@ -334,8 +328,7 @@ func (r PermissionApiApiCheckPermissionOrErrorRequest) Execute() (*CheckPermissi } /* - * CheckPermissionOrError Check a permission - * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). + * CheckPermissionOrError Performs an authorization check. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return PermissionApiApiCheckPermissionOrErrorRequest */ @@ -434,16 +427,6 @@ func (a *PermissionApiService) CheckPermissionOrErrorExecute(r PermissionApiApiC body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } if localVarHTTPResponse.StatusCode == 403 { var v CheckPermissionResult err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -482,7 +465,7 @@ type PermissionApiApiExpandPermissionsRequest struct { namespace *string object *string relation *string - maxDepth *int64 + maxDepth *int32 } func (r PermissionApiApiExpandPermissionsRequest) Namespace(namespace string) PermissionApiApiExpandPermissionsRequest { @@ -497,7 +480,7 @@ func (r PermissionApiApiExpandPermissionsRequest) Relation(relation string) Perm r.relation = &relation return r } -func (r PermissionApiApiExpandPermissionsRequest) MaxDepth(maxDepth int64) PermissionApiApiExpandPermissionsRequest { +func (r PermissionApiApiExpandPermissionsRequest) MaxDepth(maxDepth int32) PermissionApiApiExpandPermissionsRequest { r.maxDepth = &maxDepth return r } @@ -507,8 +490,7 @@ func (r PermissionApiApiExpandPermissionsRequest) Execute() (*ExpandedPermission } /* - * ExpandPermissions Expand a Relationship into permissions. - * Use this endpoint to expand a relationship tuple into permissions. + * ExpandPermissions Expands the subject set into a tree of subjects. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return PermissionApiApiExpandPermissionsRequest */ @@ -553,12 +535,12 @@ func (a *PermissionApiService) ExpandPermissionsExecute(r PermissionApiApiExpand return localVarReturnValue, nil, reportError("relation is required and must be specified") } - localVarQueryParams.Add("namespace", parameterToString(*r.namespace, "")) - localVarQueryParams.Add("object", parameterToString(*r.object, "")) - localVarQueryParams.Add("relation", parameterToString(*r.relation, "")) if r.maxDepth != nil { localVarQueryParams.Add("max-depth", parameterToString(*r.maxDepth, "")) } + localVarQueryParams.Add("namespace", parameterToString(*r.namespace, "")) + localVarQueryParams.Add("object", parameterToString(*r.object, "")) + localVarQueryParams.Add("relation", parameterToString(*r.relation, "")) // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -598,26 +580,6 @@ func (a *PermissionApiService) ExpandPermissionsExecute(r PermissionApiApiExpand body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } var v ErrorGeneric err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -643,14 +605,9 @@ func (a *PermissionApiService) ExpandPermissionsExecute(r PermissionApiApiExpand type PermissionApiApiPostCheckPermissionRequest struct { ctx context.Context ApiService PermissionApi - maxDepth *int64 postCheckPermissionBody *PostCheckPermissionBody } -func (r PermissionApiApiPostCheckPermissionRequest) MaxDepth(maxDepth int64) PermissionApiApiPostCheckPermissionRequest { - r.maxDepth = &maxDepth - return r -} func (r PermissionApiApiPostCheckPermissionRequest) PostCheckPermissionBody(postCheckPermissionBody PostCheckPermissionBody) PermissionApiApiPostCheckPermissionRequest { r.postCheckPermissionBody = &postCheckPermissionBody return r @@ -661,8 +618,7 @@ func (r PermissionApiApiPostCheckPermissionRequest) Execute() (*CheckPermissionR } /* - * PostCheckPermission Check a permission - * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). + * PostCheckPermission Performs an authorization check. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return PermissionApiApiPostCheckPermissionRequest */ @@ -697,12 +653,12 @@ func (a *PermissionApiService) PostCheckPermissionExecute(r PermissionApiApiPost localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - - if r.maxDepth != nil { - localVarQueryParams.Add("max-depth", parameterToString(*r.maxDepth, "")) + if r.postCheckPermissionBody == nil { + return localVarReturnValue, nil, reportError("postCheckPermissionBody is required and must be specified") } + // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -742,8 +698,8 @@ func (a *PermissionApiService) PostCheckPermissionExecute(r PermissionApiApiPost body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorGeneric + if localVarHTTPResponse.StatusCode == 403 { + var v CheckPermissionResult err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -775,18 +731,13 @@ func (a *PermissionApiService) PostCheckPermissionExecute(r PermissionApiApiPost } type PermissionApiApiPostCheckPermissionOrErrorRequest struct { - ctx context.Context - ApiService PermissionApi - maxDepth *int64 - postCheckPermissionOrErrorBody *PostCheckPermissionOrErrorBody + ctx context.Context + ApiService PermissionApi + postCheckPermissionBody *PostCheckPermissionBody } -func (r PermissionApiApiPostCheckPermissionOrErrorRequest) MaxDepth(maxDepth int64) PermissionApiApiPostCheckPermissionOrErrorRequest { - r.maxDepth = &maxDepth - return r -} -func (r PermissionApiApiPostCheckPermissionOrErrorRequest) PostCheckPermissionOrErrorBody(postCheckPermissionOrErrorBody PostCheckPermissionOrErrorBody) PermissionApiApiPostCheckPermissionOrErrorRequest { - r.postCheckPermissionOrErrorBody = &postCheckPermissionOrErrorBody +func (r PermissionApiApiPostCheckPermissionOrErrorRequest) PostCheckPermissionBody(postCheckPermissionBody PostCheckPermissionBody) PermissionApiApiPostCheckPermissionOrErrorRequest { + r.postCheckPermissionBody = &postCheckPermissionBody return r } @@ -795,8 +746,7 @@ func (r PermissionApiApiPostCheckPermissionOrErrorRequest) Execute() (*CheckPerm } /* - * PostCheckPermissionOrError Check a permission - * To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). + * PostCheckPermissionOrError Performs an authorization check. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return PermissionApiApiPostCheckPermissionOrErrorRequest */ @@ -831,12 +781,12 @@ func (a *PermissionApiService) PostCheckPermissionOrErrorExecute(r PermissionApi localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - - if r.maxDepth != nil { - localVarQueryParams.Add("max-depth", parameterToString(*r.maxDepth, "")) + if r.postCheckPermissionBody == nil { + return localVarReturnValue, nil, reportError("postCheckPermissionBody is required and must be specified") } + // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -853,7 +803,7 @@ func (a *PermissionApiService) PostCheckPermissionOrErrorExecute(r PermissionApi localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.postCheckPermissionOrErrorBody + localVarPostBody = r.postCheckPermissionBody req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return localVarReturnValue, nil, err @@ -876,16 +826,6 @@ func (a *PermissionApiService) PostCheckPermissionOrErrorExecute(r PermissionApi body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } if localVarHTTPResponse.StatusCode == 403 { var v CheckPermissionResult err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) diff --git a/internal/httpclient/api_relationship.go b/internal/httpclient/api_relationship.go index 72e7e97ea..434872ced 100644 --- a/internal/httpclient/api_relationship.go +++ b/internal/httpclient/api_relationship.go @@ -27,8 +27,7 @@ var ( type RelationshipApi interface { /* - * CheckOplSyntax Check the syntax of an OPL file - * The OPL file is expected in the body of the request. + * CheckOplSyntax Performs a syntax check request. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return RelationshipApiApiCheckOplSyntaxRequest */ @@ -41,8 +40,7 @@ type RelationshipApi interface { CheckOplSyntaxExecute(r RelationshipApiApiCheckOplSyntaxRequest) (*CheckOplSyntaxResult, *http.Response, error) /* - * CreateRelationship Create a Relationship - * Use this endpoint to create a relationship. + * CreateRelationship Creates a relationship * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return RelationshipApiApiCreateRelationshipRequest */ @@ -55,8 +53,7 @@ type RelationshipApi interface { CreateRelationshipExecute(r RelationshipApiApiCreateRelationshipRequest) (*Relationship, *http.Response, error) /* - * DeleteRelationships Delete Relationships - * Use this endpoint to delete relationships + * DeleteRelationships Deletes relationships based on relation query * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return RelationshipApiApiDeleteRelationshipsRequest */ @@ -68,8 +65,7 @@ type RelationshipApi interface { DeleteRelationshipsExecute(r RelationshipApiApiDeleteRelationshipsRequest) (*http.Response, error) /* - * GetRelationships Query relationships - * Get all relationships that match the query. Only the namespace field is required. + * GetRelationships Lists ACL relationships. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return RelationshipApiApiGetRelationshipsRequest */ @@ -82,8 +78,8 @@ type RelationshipApi interface { GetRelationshipsExecute(r RelationshipApiApiGetRelationshipsRequest) (*Relationships, *http.Response, error) /* - * ListRelationshipNamespaces Query namespaces - * Get all namespaces + * ListRelationshipNamespaces Lists Namespaces + * Get all namespaces. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return RelationshipApiApiListRelationshipNamespacesRequest */ @@ -96,8 +92,7 @@ type RelationshipApi interface { ListRelationshipNamespacesExecute(r RelationshipApiApiListRelationshipNamespacesRequest) (*RelationshipNamespaces, *http.Response, error) /* - * PatchRelationships Patch Multiple Relationships - * Use this endpoint to patch one or more relationships. + * PatchRelationships Writes one or more relationships in a single transaction. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return RelationshipApiApiPatchRelationshipsRequest */ @@ -128,8 +123,7 @@ func (r RelationshipApiApiCheckOplSyntaxRequest) Execute() (*CheckOplSyntaxResul } /* - * CheckOplSyntax Check the syntax of an OPL file - * The OPL file is expected in the body of the request. + * CheckOplSyntax Performs a syntax check request. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return RelationshipApiApiCheckOplSyntaxRequest */ @@ -164,6 +158,9 @@ func (a *RelationshipApiService) CheckOplSyntaxExecute(r RelationshipApiApiCheck localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"text/plain"} @@ -206,16 +203,6 @@ func (a *RelationshipApiService) CheckOplSyntaxExecute(r RelationshipApiApiCheck body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } var v ErrorGeneric err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -254,8 +241,7 @@ func (r RelationshipApiApiCreateRelationshipRequest) Execute() (*Relationship, * } /* - * CreateRelationship Create a Relationship - * Use this endpoint to create a relationship. + * CreateRelationship Creates a relationship * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return RelationshipApiApiCreateRelationshipRequest */ @@ -290,6 +276,9 @@ func (a *RelationshipApiService) CreateRelationshipExecute(r RelationshipApiApiC localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.createRelationshipBody == nil { + return localVarReturnValue, nil, reportError("createRelationshipBody is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -332,16 +321,6 @@ func (a *RelationshipApiService) CreateRelationshipExecute(r RelationshipApiApiC body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } var v ErrorGeneric err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -410,8 +389,7 @@ func (r RelationshipApiApiDeleteRelationshipsRequest) Execute() (*http.Response, } /* - * DeleteRelationships Delete Relationships - * Use this endpoint to delete relationships + * DeleteRelationships Deletes relationships based on relation query * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return RelationshipApiApiDeleteRelationshipsRequest */ @@ -505,16 +483,6 @@ func (a *RelationshipApiService) DeleteRelationshipsExecute(r RelationshipApiApi body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } var v ErrorGeneric err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -531,8 +499,8 @@ func (a *RelationshipApiService) DeleteRelationshipsExecute(r RelationshipApiApi type RelationshipApiApiGetRelationshipsRequest struct { ctx context.Context ApiService RelationshipApi + pageSize *int32 pageToken *string - pageSize *int64 namespace *string object *string relation *string @@ -542,12 +510,12 @@ type RelationshipApiApiGetRelationshipsRequest struct { subjectSetRelation *string } -func (r RelationshipApiApiGetRelationshipsRequest) PageToken(pageToken string) RelationshipApiApiGetRelationshipsRequest { - r.pageToken = &pageToken +func (r RelationshipApiApiGetRelationshipsRequest) PageSize(pageSize int32) RelationshipApiApiGetRelationshipsRequest { + r.pageSize = &pageSize return r } -func (r RelationshipApiApiGetRelationshipsRequest) PageSize(pageSize int64) RelationshipApiApiGetRelationshipsRequest { - r.pageSize = &pageSize +func (r RelationshipApiApiGetRelationshipsRequest) PageToken(pageToken string) RelationshipApiApiGetRelationshipsRequest { + r.pageToken = &pageToken return r } func (r RelationshipApiApiGetRelationshipsRequest) Namespace(namespace string) RelationshipApiApiGetRelationshipsRequest { @@ -584,8 +552,7 @@ func (r RelationshipApiApiGetRelationshipsRequest) Execute() (*Relationships, *h } /* - * GetRelationships Query relationships - * Get all relationships that match the query. Only the namespace field is required. + * GetRelationships Lists ACL relationships. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return RelationshipApiApiGetRelationshipsRequest */ @@ -621,12 +588,12 @@ func (a *RelationshipApiService) GetRelationshipsExecute(r RelationshipApiApiGet localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.pageToken != nil { - localVarQueryParams.Add("page_token", parameterToString(*r.pageToken, "")) - } if r.pageSize != nil { localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, "")) } + if r.pageToken != nil { + localVarQueryParams.Add("page_token", parameterToString(*r.pageToken, "")) + } if r.namespace != nil { localVarQueryParams.Add("namespace", parameterToString(*r.namespace, "")) } @@ -687,16 +654,6 @@ func (a *RelationshipApiService) GetRelationshipsExecute(r RelationshipApiApiGet body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } var v ErrorGeneric err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -729,8 +686,8 @@ func (r RelationshipApiApiListRelationshipNamespacesRequest) Execute() (*Relatio } /* - * ListRelationshipNamespaces Query namespaces - * Get all namespaces + * ListRelationshipNamespaces Lists Namespaces + * Get all namespaces. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return RelationshipApiApiListRelationshipNamespacesRequest */ @@ -830,11 +787,11 @@ func (a *RelationshipApiService) ListRelationshipNamespacesExecute(r Relationshi type RelationshipApiApiPatchRelationshipsRequest struct { ctx context.Context ApiService RelationshipApi - relationshipPatch *[]RelationshipPatch + relationshipDelta *[]RelationshipDelta } -func (r RelationshipApiApiPatchRelationshipsRequest) RelationshipPatch(relationshipPatch []RelationshipPatch) RelationshipApiApiPatchRelationshipsRequest { - r.relationshipPatch = &relationshipPatch +func (r RelationshipApiApiPatchRelationshipsRequest) RelationshipDelta(relationshipDelta []RelationshipDelta) RelationshipApiApiPatchRelationshipsRequest { + r.relationshipDelta = &relationshipDelta return r } @@ -843,8 +800,7 @@ func (r RelationshipApiApiPatchRelationshipsRequest) Execute() (*http.Response, } /* - * PatchRelationships Patch Multiple Relationships - * Use this endpoint to patch one or more relationships. + * PatchRelationships Writes one or more relationships in a single transaction. * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @return RelationshipApiApiPatchRelationshipsRequest */ @@ -877,6 +833,9 @@ func (a *RelationshipApiService) PatchRelationshipsExecute(r RelationshipApiApiP localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.relationshipDelta == nil { + return nil, reportError("relationshipDelta is required and must be specified") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -896,7 +855,7 @@ func (a *RelationshipApiService) PatchRelationshipsExecute(r RelationshipApiApiP localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.relationshipPatch + localVarPostBody = r.relationshipDelta req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err @@ -919,26 +878,6 @@ func (a *RelationshipApiService) PatchRelationshipsExecute(r RelationshipApiApiP body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } var v ErrorGeneric err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { diff --git a/internal/httpclient/docs/CheckOplSyntaxResult.md b/internal/httpclient/docs/CheckOplSyntaxResult.md index 38cbe373e..f02421a21 100644 --- a/internal/httpclient/docs/CheckOplSyntaxResult.md +++ b/internal/httpclient/docs/CheckOplSyntaxResult.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Errors** | Pointer to [**[]ParseError**](ParseError.md) | The list of syntax errors | [optional] +**Errors** | Pointer to [**[]OryKetoOplV1alpha1ParseError**](OryKetoOplV1alpha1ParseError.md) | | [optional] ## Methods @@ -27,20 +27,20 @@ but it doesn't guarantee that properties required by API are set ### GetErrors -`func (o *CheckOplSyntaxResult) GetErrors() []ParseError` +`func (o *CheckOplSyntaxResult) GetErrors() []OryKetoOplV1alpha1ParseError` GetErrors returns the Errors field if non-nil, zero value otherwise. ### GetErrorsOk -`func (o *CheckOplSyntaxResult) GetErrorsOk() (*[]ParseError, bool)` +`func (o *CheckOplSyntaxResult) GetErrorsOk() (*[]OryKetoOplV1alpha1ParseError, bool)` GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetErrors -`func (o *CheckOplSyntaxResult) SetErrors(v []ParseError)` +`func (o *CheckOplSyntaxResult) SetErrors(v []OryKetoOplV1alpha1ParseError)` SetErrors sets Errors field to given value. diff --git a/internal/httpclient/docs/CheckPermissionResult.md b/internal/httpclient/docs/CheckPermissionResult.md index 7270de65d..1317f8845 100644 --- a/internal/httpclient/docs/CheckPermissionResult.md +++ b/internal/httpclient/docs/CheckPermissionResult.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Allowed** | **bool** | whether the relation tuple is allowed | +**Allowed** | Pointer to **bool** | Whether the specified subject (id) is related to the requested object. It is false by default if no ACL matches. | [optional] ## Methods ### NewCheckPermissionResult -`func NewCheckPermissionResult(allowed bool, ) *CheckPermissionResult` +`func NewCheckPermissionResult() *CheckPermissionResult` NewCheckPermissionResult instantiates a new CheckPermissionResult object This constructor will assign default values to properties that have it defined, @@ -44,6 +44,11 @@ and a boolean to check if the value has been set. SetAllowed sets Allowed field to given value. +### HasAllowed + +`func (o *CheckPermissionResult) HasAllowed() bool` + +HasAllowed returns a boolean if a field has been set. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/internal/httpclient/docs/CreateRelationshipBody.md b/internal/httpclient/docs/CreateRelationshipBody.md index 91bb3a7ce..40bc8e956 100644 --- a/internal/httpclient/docs/CreateRelationshipBody.md +++ b/internal/httpclient/docs/CreateRelationshipBody.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Namespace** | Pointer to **string** | Namespace to query | [optional] -**Object** | Pointer to **string** | Object to query | [optional] -**Relation** | Pointer to **string** | Relation to query | [optional] -**SubjectId** | Pointer to **string** | SubjectID to query Either SubjectSet or SubjectID can be provided. | [optional] +**Namespace** | Pointer to **string** | The namespace this relation tuple lives in. | [optional] +**Object** | Pointer to **string** | The object related by this tuple. It is an object in the namespace of the tuple. | [optional] +**Relation** | Pointer to **string** | The relation between an Object and a Subject. | [optional] +**SubjectId** | Pointer to **string** | A concrete id of the subject. | [optional] **SubjectSet** | Pointer to [**SubjectSet**](SubjectSet.md) | | [optional] ## Methods diff --git a/internal/httpclient/docs/ErrorGeneric.md b/internal/httpclient/docs/ErrorGeneric.md index a340c2c07..791bd6dac 100644 --- a/internal/httpclient/docs/ErrorGeneric.md +++ b/internal/httpclient/docs/ErrorGeneric.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Error** | [**GenericError**](GenericError.md) | | +**Error** | Pointer to [**OryKetoRelationTuplesV1alpha2ErrorObject**](OryKetoRelationTuplesV1alpha2ErrorObject.md) | | [optional] ## Methods ### NewErrorGeneric -`func NewErrorGeneric(error_ GenericError, ) *ErrorGeneric` +`func NewErrorGeneric() *ErrorGeneric` NewErrorGeneric instantiates a new ErrorGeneric object This constructor will assign default values to properties that have it defined, @@ -27,23 +27,28 @@ but it doesn't guarantee that properties required by API are set ### GetError -`func (o *ErrorGeneric) GetError() GenericError` +`func (o *ErrorGeneric) GetError() OryKetoRelationTuplesV1alpha2ErrorObject` GetError returns the Error field if non-nil, zero value otherwise. ### GetErrorOk -`func (o *ErrorGeneric) GetErrorOk() (*GenericError, bool)` +`func (o *ErrorGeneric) GetErrorOk() (*OryKetoRelationTuplesV1alpha2ErrorObject, bool)` GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetError -`func (o *ErrorGeneric) SetError(v GenericError)` +`func (o *ErrorGeneric) SetError(v OryKetoRelationTuplesV1alpha2ErrorObject)` SetError sets Error field to given value. +### HasError + +`func (o *ErrorGeneric) HasError() bool` + +HasError returns a boolean if a field has been set. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/internal/httpclient/docs/ExpandedPermissionTree.md b/internal/httpclient/docs/ExpandedPermissionTree.md index 3c087822d..f32f9f8f6 100644 --- a/internal/httpclient/docs/ExpandedPermissionTree.md +++ b/internal/httpclient/docs/ExpandedPermissionTree.md @@ -4,15 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Children** | Pointer to [**[]ExpandedPermissionTree**](ExpandedPermissionTree.md) | The children of the node, possibly none. | [optional] +**Children** | Pointer to [**[]ExpandedPermissionTree**](ExpandedPermissionTree.md) | The children of this node. This is never set if `node_type` == `NODE_TYPE_LEAF`. | [optional] +**Subject** | Pointer to [**OryKetoRelationTuplesV1alpha2Subject**](OryKetoRelationTuplesV1alpha2Subject.md) | | [optional] **Tuple** | Pointer to [**Relationship**](Relationship.md) | | [optional] -**Type** | **string** | The type of the node. union TreeNodeUnion exclusion TreeNodeExclusion intersection TreeNodeIntersection leaf TreeNodeLeaf tuple_to_subject_set TreeNodeTupleToSubjectSet computed_subject_set TreeNodeComputedSubjectSet not TreeNodeNot unspecified TreeNodeUnspecified | +**Type** | [**OryKetoRelationTuplesV1alpha2NodeType**](OryKetoRelationTuplesV1alpha2NodeType.md) | | [default to ORYKETORELATIONTUPLESV1ALPHA2NODETYPE_UNSPECIFIED] ## Methods ### NewExpandedPermissionTree -`func NewExpandedPermissionTree(type_ string, ) *ExpandedPermissionTree` +`func NewExpandedPermissionTree(type_ OryKetoRelationTuplesV1alpha2NodeType, ) *ExpandedPermissionTree` NewExpandedPermissionTree instantiates a new ExpandedPermissionTree object This constructor will assign default values to properties that have it defined, @@ -52,6 +53,31 @@ SetChildren sets Children field to given value. HasChildren returns a boolean if a field has been set. +### GetSubject + +`func (o *ExpandedPermissionTree) GetSubject() OryKetoRelationTuplesV1alpha2Subject` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *ExpandedPermissionTree) GetSubjectOk() (*OryKetoRelationTuplesV1alpha2Subject, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *ExpandedPermissionTree) SetSubject(v OryKetoRelationTuplesV1alpha2Subject)` + +SetSubject sets Subject field to given value. + +### HasSubject + +`func (o *ExpandedPermissionTree) HasSubject() bool` + +HasSubject returns a boolean if a field has been set. + ### GetTuple `func (o *ExpandedPermissionTree) GetTuple() Relationship` @@ -79,20 +105,20 @@ HasTuple returns a boolean if a field has been set. ### GetType -`func (o *ExpandedPermissionTree) GetType() string` +`func (o *ExpandedPermissionTree) GetType() OryKetoRelationTuplesV1alpha2NodeType` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk -`func (o *ExpandedPermissionTree) GetTypeOk() (*string, bool)` +`func (o *ExpandedPermissionTree) GetTypeOk() (*OryKetoRelationTuplesV1alpha2NodeType, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType -`func (o *ExpandedPermissionTree) SetType(v string)` +`func (o *ExpandedPermissionTree) SetType(v OryKetoRelationTuplesV1alpha2NodeType)` SetType sets Type field to given value. diff --git a/internal/httpclient/docs/GenericError.md b/internal/httpclient/docs/GenericError.md deleted file mode 100644 index 5a09d7392..000000000 --- a/internal/httpclient/docs/GenericError.md +++ /dev/null @@ -1,233 +0,0 @@ -# GenericError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Code** | Pointer to **int64** | The status code | [optional] -**Debug** | Pointer to **string** | Debug information This field is often not exposed to protect against leaking sensitive information. | [optional] -**Details** | Pointer to **map[string]interface{}** | Further error details | [optional] -**Id** | Pointer to **string** | The error ID Useful when trying to identify various errors in application logic. | [optional] -**Message** | **string** | Error message The error's message. | -**Reason** | Pointer to **string** | A human-readable reason for the error | [optional] -**Request** | Pointer to **string** | The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. | [optional] -**Status** | Pointer to **string** | The status description | [optional] - -## Methods - -### NewGenericError - -`func NewGenericError(message string, ) *GenericError` - -NewGenericError instantiates a new GenericError object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGenericErrorWithDefaults - -`func NewGenericErrorWithDefaults() *GenericError` - -NewGenericErrorWithDefaults instantiates a new GenericError object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCode - -`func (o *GenericError) GetCode() int64` - -GetCode returns the Code field if non-nil, zero value otherwise. - -### GetCodeOk - -`func (o *GenericError) GetCodeOk() (*int64, bool)` - -GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCode - -`func (o *GenericError) SetCode(v int64)` - -SetCode sets Code field to given value. - -### HasCode - -`func (o *GenericError) HasCode() bool` - -HasCode returns a boolean if a field has been set. - -### GetDebug - -`func (o *GenericError) GetDebug() string` - -GetDebug returns the Debug field if non-nil, zero value otherwise. - -### GetDebugOk - -`func (o *GenericError) GetDebugOk() (*string, bool)` - -GetDebugOk returns a tuple with the Debug field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDebug - -`func (o *GenericError) SetDebug(v string)` - -SetDebug sets Debug field to given value. - -### HasDebug - -`func (o *GenericError) HasDebug() bool` - -HasDebug returns a boolean if a field has been set. - -### GetDetails - -`func (o *GenericError) GetDetails() map[string]interface{}` - -GetDetails returns the Details field if non-nil, zero value otherwise. - -### GetDetailsOk - -`func (o *GenericError) GetDetailsOk() (*map[string]interface{}, bool)` - -GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDetails - -`func (o *GenericError) SetDetails(v map[string]interface{})` - -SetDetails sets Details field to given value. - -### HasDetails - -`func (o *GenericError) HasDetails() bool` - -HasDetails returns a boolean if a field has been set. - -### GetId - -`func (o *GenericError) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GenericError) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GenericError) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *GenericError) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetMessage - -`func (o *GenericError) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *GenericError) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *GenericError) SetMessage(v string)` - -SetMessage sets Message field to given value. - - -### GetReason - -`func (o *GenericError) GetReason() string` - -GetReason returns the Reason field if non-nil, zero value otherwise. - -### GetReasonOk - -`func (o *GenericError) GetReasonOk() (*string, bool)` - -GetReasonOk returns a tuple with the Reason field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetReason - -`func (o *GenericError) SetReason(v string)` - -SetReason sets Reason field to given value. - -### HasReason - -`func (o *GenericError) HasReason() bool` - -HasReason returns a boolean if a field has been set. - -### GetRequest - -`func (o *GenericError) GetRequest() string` - -GetRequest returns the Request field if non-nil, zero value otherwise. - -### GetRequestOk - -`func (o *GenericError) GetRequestOk() (*string, bool)` - -GetRequestOk returns a tuple with the Request field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRequest - -`func (o *GenericError) SetRequest(v string)` - -SetRequest sets Request field to given value. - -### HasRequest - -`func (o *GenericError) HasRequest() bool` - -HasRequest returns a boolean if a field has been set. - -### GetStatus - -`func (o *GenericError) GetStatus() string` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *GenericError) GetStatusOk() (*string, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *GenericError) SetStatus(v string)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *GenericError) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/internal/httpclient/docs/HealthNotReadyStatus.md b/internal/httpclient/docs/HealthNotReadyStatus.md deleted file mode 100644 index 9c40dcf5f..000000000 --- a/internal/httpclient/docs/HealthNotReadyStatus.md +++ /dev/null @@ -1,56 +0,0 @@ -# HealthNotReadyStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | Pointer to **map[string]string** | Errors contains a list of errors that caused the not ready status. | [optional] - -## Methods - -### NewHealthNotReadyStatus - -`func NewHealthNotReadyStatus() *HealthNotReadyStatus` - -NewHealthNotReadyStatus instantiates a new HealthNotReadyStatus object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewHealthNotReadyStatusWithDefaults - -`func NewHealthNotReadyStatusWithDefaults() *HealthNotReadyStatus` - -NewHealthNotReadyStatusWithDefaults instantiates a new HealthNotReadyStatus object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetErrors - -`func (o *HealthNotReadyStatus) GetErrors() map[string]string` - -GetErrors returns the Errors field if non-nil, zero value otherwise. - -### GetErrorsOk - -`func (o *HealthNotReadyStatus) GetErrorsOk() (*map[string]string, bool)` - -GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetErrors - -`func (o *HealthNotReadyStatus) SetErrors(v map[string]string)` - -SetErrors sets Errors field to given value. - -### HasErrors - -`func (o *HealthNotReadyStatus) HasErrors() bool` - -HasErrors returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/internal/httpclient/docs/HealthStatus.md b/internal/httpclient/docs/HealthStatus.md deleted file mode 100644 index 0173b4251..000000000 --- a/internal/httpclient/docs/HealthStatus.md +++ /dev/null @@ -1,56 +0,0 @@ -# HealthStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | Pointer to **string** | Status always contains \"ok\". | [optional] - -## Methods - -### NewHealthStatus - -`func NewHealthStatus() *HealthStatus` - -NewHealthStatus instantiates a new HealthStatus object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewHealthStatusWithDefaults - -`func NewHealthStatusWithDefaults() *HealthStatus` - -NewHealthStatusWithDefaults instantiates a new HealthStatus object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetStatus - -`func (o *HealthStatus) GetStatus() string` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *HealthStatus) GetStatusOk() (*string, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *HealthStatus) SetStatus(v string)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *HealthStatus) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/internal/httpclient/docs/ParseError.md b/internal/httpclient/docs/OryKetoOplV1alpha1ParseError.md similarity index 53% rename from internal/httpclient/docs/ParseError.md rename to internal/httpclient/docs/OryKetoOplV1alpha1ParseError.md index 9d0463313..637d31e00 100644 --- a/internal/httpclient/docs/ParseError.md +++ b/internal/httpclient/docs/OryKetoOplV1alpha1ParseError.md @@ -1,104 +1,104 @@ -# ParseError +# OryKetoOplV1alpha1ParseError ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**End** | Pointer to [**SourcePosition**](SourcePosition.md) | | [optional] +**End** | Pointer to [**OryKetoOplV1alpha1SourcePosition**](OryKetoOplV1alpha1SourcePosition.md) | | [optional] **Message** | Pointer to **string** | | [optional] -**Start** | Pointer to [**SourcePosition**](SourcePosition.md) | | [optional] +**Start** | Pointer to [**OryKetoOplV1alpha1SourcePosition**](OryKetoOplV1alpha1SourcePosition.md) | | [optional] ## Methods -### NewParseError +### NewOryKetoOplV1alpha1ParseError -`func NewParseError() *ParseError` +`func NewOryKetoOplV1alpha1ParseError() *OryKetoOplV1alpha1ParseError` -NewParseError instantiates a new ParseError object +NewOryKetoOplV1alpha1ParseError instantiates a new OryKetoOplV1alpha1ParseError object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewParseErrorWithDefaults +### NewOryKetoOplV1alpha1ParseErrorWithDefaults -`func NewParseErrorWithDefaults() *ParseError` +`func NewOryKetoOplV1alpha1ParseErrorWithDefaults() *OryKetoOplV1alpha1ParseError` -NewParseErrorWithDefaults instantiates a new ParseError object +NewOryKetoOplV1alpha1ParseErrorWithDefaults instantiates a new OryKetoOplV1alpha1ParseError object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetEnd -`func (o *ParseError) GetEnd() SourcePosition` +`func (o *OryKetoOplV1alpha1ParseError) GetEnd() OryKetoOplV1alpha1SourcePosition` GetEnd returns the End field if non-nil, zero value otherwise. ### GetEndOk -`func (o *ParseError) GetEndOk() (*SourcePosition, bool)` +`func (o *OryKetoOplV1alpha1ParseError) GetEndOk() (*OryKetoOplV1alpha1SourcePosition, bool)` GetEndOk returns a tuple with the End field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEnd -`func (o *ParseError) SetEnd(v SourcePosition)` +`func (o *OryKetoOplV1alpha1ParseError) SetEnd(v OryKetoOplV1alpha1SourcePosition)` SetEnd sets End field to given value. ### HasEnd -`func (o *ParseError) HasEnd() bool` +`func (o *OryKetoOplV1alpha1ParseError) HasEnd() bool` HasEnd returns a boolean if a field has been set. ### GetMessage -`func (o *ParseError) GetMessage() string` +`func (o *OryKetoOplV1alpha1ParseError) GetMessage() string` GetMessage returns the Message field if non-nil, zero value otherwise. ### GetMessageOk -`func (o *ParseError) GetMessageOk() (*string, bool)` +`func (o *OryKetoOplV1alpha1ParseError) GetMessageOk() (*string, bool)` GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMessage -`func (o *ParseError) SetMessage(v string)` +`func (o *OryKetoOplV1alpha1ParseError) SetMessage(v string)` SetMessage sets Message field to given value. ### HasMessage -`func (o *ParseError) HasMessage() bool` +`func (o *OryKetoOplV1alpha1ParseError) HasMessage() bool` HasMessage returns a boolean if a field has been set. ### GetStart -`func (o *ParseError) GetStart() SourcePosition` +`func (o *OryKetoOplV1alpha1ParseError) GetStart() OryKetoOplV1alpha1SourcePosition` GetStart returns the Start field if non-nil, zero value otherwise. ### GetStartOk -`func (o *ParseError) GetStartOk() (*SourcePosition, bool)` +`func (o *OryKetoOplV1alpha1ParseError) GetStartOk() (*OryKetoOplV1alpha1SourcePosition, bool)` GetStartOk returns a tuple with the Start field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetStart -`func (o *ParseError) SetStart(v SourcePosition)` +`func (o *OryKetoOplV1alpha1ParseError) SetStart(v OryKetoOplV1alpha1SourcePosition)` SetStart sets Start field to given value. ### HasStart -`func (o *ParseError) HasStart() bool` +`func (o *OryKetoOplV1alpha1ParseError) HasStart() bool` HasStart returns a boolean if a field has been set. diff --git a/internal/httpclient/docs/SourcePosition.md b/internal/httpclient/docs/OryKetoOplV1alpha1SourcePosition.md similarity index 59% rename from internal/httpclient/docs/SourcePosition.md rename to internal/httpclient/docs/OryKetoOplV1alpha1SourcePosition.md index 000e5be17..f46c8b48e 100644 --- a/internal/httpclient/docs/SourcePosition.md +++ b/internal/httpclient/docs/OryKetoOplV1alpha1SourcePosition.md @@ -1,4 +1,4 @@ -# SourcePosition +# OryKetoOplV1alpha1SourcePosition ## Properties @@ -9,70 +9,70 @@ Name | Type | Description | Notes ## Methods -### NewSourcePosition +### NewOryKetoOplV1alpha1SourcePosition -`func NewSourcePosition() *SourcePosition` +`func NewOryKetoOplV1alpha1SourcePosition() *OryKetoOplV1alpha1SourcePosition` -NewSourcePosition instantiates a new SourcePosition object +NewOryKetoOplV1alpha1SourcePosition instantiates a new OryKetoOplV1alpha1SourcePosition object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewSourcePositionWithDefaults +### NewOryKetoOplV1alpha1SourcePositionWithDefaults -`func NewSourcePositionWithDefaults() *SourcePosition` +`func NewOryKetoOplV1alpha1SourcePositionWithDefaults() *OryKetoOplV1alpha1SourcePosition` -NewSourcePositionWithDefaults instantiates a new SourcePosition object +NewOryKetoOplV1alpha1SourcePositionWithDefaults instantiates a new OryKetoOplV1alpha1SourcePosition object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetLine -`func (o *SourcePosition) GetLine() int64` +`func (o *OryKetoOplV1alpha1SourcePosition) GetLine() int64` GetLine returns the Line field if non-nil, zero value otherwise. ### GetLineOk -`func (o *SourcePosition) GetLineOk() (*int64, bool)` +`func (o *OryKetoOplV1alpha1SourcePosition) GetLineOk() (*int64, bool)` GetLineOk returns a tuple with the Line field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetLine -`func (o *SourcePosition) SetLine(v int64)` +`func (o *OryKetoOplV1alpha1SourcePosition) SetLine(v int64)` SetLine sets Line field to given value. ### HasLine -`func (o *SourcePosition) HasLine() bool` +`func (o *OryKetoOplV1alpha1SourcePosition) HasLine() bool` HasLine returns a boolean if a field has been set. ### GetColumn -`func (o *SourcePosition) GetColumn() int64` +`func (o *OryKetoOplV1alpha1SourcePosition) GetColumn() int64` GetColumn returns the Column field if non-nil, zero value otherwise. ### GetColumnOk -`func (o *SourcePosition) GetColumnOk() (*int64, bool)` +`func (o *OryKetoOplV1alpha1SourcePosition) GetColumnOk() (*int64, bool)` GetColumnOk returns a tuple with the Column field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetColumn -`func (o *SourcePosition) SetColumn(v int64)` +`func (o *OryKetoOplV1alpha1SourcePosition) SetColumn(v int64)` SetColumn sets Column field to given value. ### HasColumn -`func (o *SourcePosition) HasColumn() bool` +`func (o *OryKetoOplV1alpha1SourcePosition) HasColumn() bool` HasColumn returns a boolean if a field has been set. diff --git a/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse.md b/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse.md new file mode 100644 index 000000000..f11a84e12 --- /dev/null +++ b/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse.md @@ -0,0 +1,56 @@ +# OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RelationTuple** | Pointer to [**Relationship**](Relationship.md) | | [optional] + +## Methods + +### NewOryKetoRelationTuplesV1alpha2CreateRelationTupleResponse + +`func NewOryKetoRelationTuplesV1alpha2CreateRelationTupleResponse() *OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse` + +NewOryKetoRelationTuplesV1alpha2CreateRelationTupleResponse instantiates a new OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOryKetoRelationTuplesV1alpha2CreateRelationTupleResponseWithDefaults + +`func NewOryKetoRelationTuplesV1alpha2CreateRelationTupleResponseWithDefaults() *OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse` + +NewOryKetoRelationTuplesV1alpha2CreateRelationTupleResponseWithDefaults instantiates a new OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRelationTuple + +`func (o *OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse) GetRelationTuple() Relationship` + +GetRelationTuple returns the RelationTuple field if non-nil, zero value otherwise. + +### GetRelationTupleOk + +`func (o *OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse) GetRelationTupleOk() (*Relationship, bool)` + +GetRelationTupleOk returns a tuple with the RelationTuple field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelationTuple + +`func (o *OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse) SetRelationTuple(v Relationship)` + +SetRelationTuple sets RelationTuple field to given value. + +### HasRelationTuple + +`func (o *OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse) HasRelationTuple() bool` + +HasRelationTuple returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2ErrorObject.md b/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2ErrorObject.md new file mode 100644 index 000000000..9c26a646c --- /dev/null +++ b/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2ErrorObject.md @@ -0,0 +1,238 @@ +# OryKetoRelationTuplesV1alpha2ErrorObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | Pointer to **int64** | The status code | [optional] +**Debug** | Pointer to **string** | This field is often not exposed to protect against leaking sensitive information | [optional] +**Details** | Pointer to **map[string]string** | | [optional] +**Id** | Pointer to **string** | Useful when trying to identify various errors in application logic. | [optional] +**Message** | Pointer to **string** | Response message | [optional] +**Reason** | Pointer to **string** | A human-readable reason for the error | [optional] +**Request** | Pointer to **string** | The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. | [optional] +**Status** | Pointer to **string** | The human-readable description of the code. | [optional] + +## Methods + +### NewOryKetoRelationTuplesV1alpha2ErrorObject + +`func NewOryKetoRelationTuplesV1alpha2ErrorObject() *OryKetoRelationTuplesV1alpha2ErrorObject` + +NewOryKetoRelationTuplesV1alpha2ErrorObject instantiates a new OryKetoRelationTuplesV1alpha2ErrorObject object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOryKetoRelationTuplesV1alpha2ErrorObjectWithDefaults + +`func NewOryKetoRelationTuplesV1alpha2ErrorObjectWithDefaults() *OryKetoRelationTuplesV1alpha2ErrorObject` + +NewOryKetoRelationTuplesV1alpha2ErrorObjectWithDefaults instantiates a new OryKetoRelationTuplesV1alpha2ErrorObject object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCode + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetCode() int64` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetCodeOk() (*int64, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetCode(v int64)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetDebug + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetDebug() string` + +GetDebug returns the Debug field if non-nil, zero value otherwise. + +### GetDebugOk + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetDebugOk() (*string, bool)` + +GetDebugOk returns a tuple with the Debug field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDebug + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetDebug(v string)` + +SetDebug sets Debug field to given value. + +### HasDebug + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasDebug() bool` + +HasDebug returns a boolean if a field has been set. + +### GetDetails + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetDetails() map[string]string` + +GetDetails returns the Details field if non-nil, zero value otherwise. + +### GetDetailsOk + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetDetailsOk() (*map[string]string, bool)` + +GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetails + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetDetails(v map[string]string)` + +SetDetails sets Details field to given value. + +### HasDetails + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasDetails() bool` + +HasDetails returns a boolean if a field has been set. + +### GetId + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetMessage + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetMessage(v string)` + +SetMessage sets Message field to given value. + +### HasMessage + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasMessage() bool` + +HasMessage returns a boolean if a field has been set. + +### GetReason + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetReason() string` + +GetReason returns the Reason field if non-nil, zero value otherwise. + +### GetReasonOk + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetReasonOk() (*string, bool)` + +GetReasonOk returns a tuple with the Reason field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReason + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetReason(v string)` + +SetReason sets Reason field to given value. + +### HasReason + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasReason() bool` + +HasReason returns a boolean if a field has been set. + +### GetRequest + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetRequest() string` + +GetRequest returns the Request field if non-nil, zero value otherwise. + +### GetRequestOk + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetRequestOk() (*string, bool)` + +GetRequestOk returns a tuple with the Request field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequest + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetRequest(v string)` + +SetRequest sets Request field to given value. + +### HasRequest + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasRequest() bool` + +HasRequest returns a boolean if a field has been set. + +### GetStatus + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2ExpandResponse.md b/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2ExpandResponse.md new file mode 100644 index 000000000..b181a06d1 --- /dev/null +++ b/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2ExpandResponse.md @@ -0,0 +1,56 @@ +# OryKetoRelationTuplesV1alpha2ExpandResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Tree** | Pointer to [**ExpandedPermissionTree**](ExpandedPermissionTree.md) | | [optional] + +## Methods + +### NewOryKetoRelationTuplesV1alpha2ExpandResponse + +`func NewOryKetoRelationTuplesV1alpha2ExpandResponse() *OryKetoRelationTuplesV1alpha2ExpandResponse` + +NewOryKetoRelationTuplesV1alpha2ExpandResponse instantiates a new OryKetoRelationTuplesV1alpha2ExpandResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOryKetoRelationTuplesV1alpha2ExpandResponseWithDefaults + +`func NewOryKetoRelationTuplesV1alpha2ExpandResponseWithDefaults() *OryKetoRelationTuplesV1alpha2ExpandResponse` + +NewOryKetoRelationTuplesV1alpha2ExpandResponseWithDefaults instantiates a new OryKetoRelationTuplesV1alpha2ExpandResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTree + +`func (o *OryKetoRelationTuplesV1alpha2ExpandResponse) GetTree() ExpandedPermissionTree` + +GetTree returns the Tree field if non-nil, zero value otherwise. + +### GetTreeOk + +`func (o *OryKetoRelationTuplesV1alpha2ExpandResponse) GetTreeOk() (*ExpandedPermissionTree, bool)` + +GetTreeOk returns a tuple with the Tree field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTree + +`func (o *OryKetoRelationTuplesV1alpha2ExpandResponse) SetTree(v ExpandedPermissionTree)` + +SetTree sets Tree field to given value. + +### HasTree + +`func (o *OryKetoRelationTuplesV1alpha2ExpandResponse) HasTree() bool` + +HasTree returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2GetVersionResponse.md b/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2GetVersionResponse.md new file mode 100644 index 000000000..ffd6a378d --- /dev/null +++ b/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2GetVersionResponse.md @@ -0,0 +1,56 @@ +# OryKetoRelationTuplesV1alpha2GetVersionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Version** | Pointer to **string** | The version string of the Ory Keto instance. | [optional] + +## Methods + +### NewOryKetoRelationTuplesV1alpha2GetVersionResponse + +`func NewOryKetoRelationTuplesV1alpha2GetVersionResponse() *OryKetoRelationTuplesV1alpha2GetVersionResponse` + +NewOryKetoRelationTuplesV1alpha2GetVersionResponse instantiates a new OryKetoRelationTuplesV1alpha2GetVersionResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOryKetoRelationTuplesV1alpha2GetVersionResponseWithDefaults + +`func NewOryKetoRelationTuplesV1alpha2GetVersionResponseWithDefaults() *OryKetoRelationTuplesV1alpha2GetVersionResponse` + +NewOryKetoRelationTuplesV1alpha2GetVersionResponseWithDefaults instantiates a new OryKetoRelationTuplesV1alpha2GetVersionResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVersion + +`func (o *OryKetoRelationTuplesV1alpha2GetVersionResponse) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *OryKetoRelationTuplesV1alpha2GetVersionResponse) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *OryKetoRelationTuplesV1alpha2GetVersionResponse) SetVersion(v string)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *OryKetoRelationTuplesV1alpha2GetVersionResponse) HasVersion() bool` + +HasVersion returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/internal/httpclient/docs/Namespace.md b/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2Namespace.md similarity index 53% rename from internal/httpclient/docs/Namespace.md rename to internal/httpclient/docs/OryKetoRelationTuplesV1alpha2Namespace.md index 41c37de32..3e53682ef 100644 --- a/internal/httpclient/docs/Namespace.md +++ b/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2Namespace.md @@ -1,52 +1,52 @@ -# Namespace +# OryKetoRelationTuplesV1alpha2Namespace ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | Name of the namespace. | [optional] +**Name** | Pointer to **string** | | [optional] ## Methods -### NewNamespace +### NewOryKetoRelationTuplesV1alpha2Namespace -`func NewNamespace() *Namespace` +`func NewOryKetoRelationTuplesV1alpha2Namespace() *OryKetoRelationTuplesV1alpha2Namespace` -NewNamespace instantiates a new Namespace object +NewOryKetoRelationTuplesV1alpha2Namespace instantiates a new OryKetoRelationTuplesV1alpha2Namespace object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewNamespaceWithDefaults +### NewOryKetoRelationTuplesV1alpha2NamespaceWithDefaults -`func NewNamespaceWithDefaults() *Namespace` +`func NewOryKetoRelationTuplesV1alpha2NamespaceWithDefaults() *OryKetoRelationTuplesV1alpha2Namespace` -NewNamespaceWithDefaults instantiates a new Namespace object +NewOryKetoRelationTuplesV1alpha2NamespaceWithDefaults instantiates a new OryKetoRelationTuplesV1alpha2Namespace object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName -`func (o *Namespace) GetName() string` +`func (o *OryKetoRelationTuplesV1alpha2Namespace) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *Namespace) GetNameOk() (*string, bool)` +`func (o *OryKetoRelationTuplesV1alpha2Namespace) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName -`func (o *Namespace) SetName(v string)` +`func (o *OryKetoRelationTuplesV1alpha2Namespace) SetName(v string)` SetName sets Name field to given value. ### HasName -`func (o *Namespace) HasName() bool` +`func (o *OryKetoRelationTuplesV1alpha2Namespace) HasName() bool` HasName returns a boolean if a field has been set. diff --git a/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2NodeType.md b/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2NodeType.md new file mode 100644 index 000000000..128f818c9 --- /dev/null +++ b/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2NodeType.md @@ -0,0 +1,25 @@ +# OryKetoRelationTuplesV1alpha2NodeType + +## Enum + + +* `UNSPECIFIED` (value: `"unspecified"`) + +* `UNION` (value: `"union"`) + +* `EXCLUSION` (value: `"exclusion"`) + +* `INTERSECTION` (value: `"intersection"`) + +* `LEAF` (value: `"leaf"`) + +* `TUPLE_TO_SUBJECT_SET` (value: `"tuple_to_subject_set"`) + +* `COMPUTED_SUBJECT_SET` (value: `"computed_subject_set"`) + +* `NOT` (value: `"not"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2Subject.md b/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2Subject.md new file mode 100644 index 000000000..cd7eb9645 --- /dev/null +++ b/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2Subject.md @@ -0,0 +1,82 @@ +# OryKetoRelationTuplesV1alpha2Subject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | A concrete id of the subject. | [optional] +**Set** | Pointer to [**SubjectSet**](SubjectSet.md) | | [optional] + +## Methods + +### NewOryKetoRelationTuplesV1alpha2Subject + +`func NewOryKetoRelationTuplesV1alpha2Subject() *OryKetoRelationTuplesV1alpha2Subject` + +NewOryKetoRelationTuplesV1alpha2Subject instantiates a new OryKetoRelationTuplesV1alpha2Subject object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOryKetoRelationTuplesV1alpha2SubjectWithDefaults + +`func NewOryKetoRelationTuplesV1alpha2SubjectWithDefaults() *OryKetoRelationTuplesV1alpha2Subject` + +NewOryKetoRelationTuplesV1alpha2SubjectWithDefaults instantiates a new OryKetoRelationTuplesV1alpha2Subject object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *OryKetoRelationTuplesV1alpha2Subject) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *OryKetoRelationTuplesV1alpha2Subject) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *OryKetoRelationTuplesV1alpha2Subject) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *OryKetoRelationTuplesV1alpha2Subject) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetSet + +`func (o *OryKetoRelationTuplesV1alpha2Subject) GetSet() SubjectSet` + +GetSet returns the Set field if non-nil, zero value otherwise. + +### GetSetOk + +`func (o *OryKetoRelationTuplesV1alpha2Subject) GetSetOk() (*SubjectSet, bool)` + +GetSetOk returns a tuple with the Set field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSet + +`func (o *OryKetoRelationTuplesV1alpha2Subject) SetSet(v SubjectSet)` + +SetSet sets Set field to given value. + +### HasSet + +`func (o *OryKetoRelationTuplesV1alpha2Subject) HasSet() bool` + +HasSet returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/internal/httpclient/docs/PermissionApi.md b/internal/httpclient/docs/PermissionApi.md index c9bcf6e5f..c60fffa32 100644 --- a/internal/httpclient/docs/PermissionApi.md +++ b/internal/httpclient/docs/PermissionApi.md @@ -4,11 +4,11 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CheckPermission**](PermissionApi.md#CheckPermission) | **Get** /relation-tuples/check/openapi | Check a permission -[**CheckPermissionOrError**](PermissionApi.md#CheckPermissionOrError) | **Get** /relation-tuples/check | Check a permission -[**ExpandPermissions**](PermissionApi.md#ExpandPermissions) | **Get** /relation-tuples/expand | Expand a Relationship into permissions. -[**PostCheckPermission**](PermissionApi.md#PostCheckPermission) | **Post** /relation-tuples/check/openapi | Check a permission -[**PostCheckPermissionOrError**](PermissionApi.md#PostCheckPermissionOrError) | **Post** /relation-tuples/check | Check a permission +[**CheckPermission**](PermissionApi.md#CheckPermission) | **Get** /relation-tuples/check/openapi | Performs an authorization check. +[**CheckPermissionOrError**](PermissionApi.md#CheckPermissionOrError) | **Get** /relation-tuples/check | Performs an authorization check. +[**ExpandPermissions**](PermissionApi.md#ExpandPermissions) | **Get** /relation-tuples/expand | Expands the subject set into a tree of subjects. +[**PostCheckPermission**](PermissionApi.md#PostCheckPermission) | **Post** /relation-tuples/check/openapi | Performs an authorization check. +[**PostCheckPermissionOrError**](PermissionApi.md#PostCheckPermissionOrError) | **Post** /relation-tuples/check | Performs an authorization check. @@ -16,9 +16,7 @@ Method | HTTP request | Description > CheckPermissionResult CheckPermission(ctx).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).MaxDepth(maxDepth).Execute() -Check a permission - - +Performs an authorization check. ### Example @@ -33,14 +31,14 @@ import ( ) func main() { - namespace := "namespace_example" // string | Namespace of the Relationship (optional) - object := "object_example" // string | Object of the Relationship (optional) - relation := "relation_example" // string | Relation of the Relationship (optional) - subjectId := "subjectId_example" // string | SubjectID of the Relationship (optional) - subjectSetNamespace := "subjectSetNamespace_example" // string | Namespace of the Subject Set (optional) - subjectSetObject := "subjectSetObject_example" // string | Object of the Subject Set (optional) - subjectSetRelation := "subjectSetRelation_example" // string | Relation of the Subject Set (optional) - maxDepth := int64(789) // int64 | (optional) + namespace := "namespace_example" // string | The namespace to evaluate the check. Note: If you use the expand-API and the check evaluates a RelationTuple specifying a SubjectSet as subject or due to a rewrite rule in a namespace config this check request may involve other namespaces automatically. (optional) + object := "object_example" // string | The related object in this check. (optional) + relation := "relation_example" // string | The relation between the Object and the Subject. (optional) + subjectId := "subjectId_example" // string | A concrete id of the subject. (optional) + subjectSetNamespace := "subjectSetNamespace_example" // string | The namespace of the object and relation referenced in this subject set. (optional) + subjectSetObject := "subjectSetObject_example" // string | The object related by this subject set. (optional) + subjectSetRelation := "subjectSetRelation_example" // string | The relation between the object and the subjects. (optional) + maxDepth := int32(56) // int32 | The maximum depth to search for a relation. If the value is less than 1 or greater than the global max-depth then the global max-depth will be used instead. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -65,14 +63,14 @@ Other parameters are passed through a pointer to a apiCheckPermissionRequest str Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **namespace** | **string** | Namespace of the Relationship | - **object** | **string** | Object of the Relationship | - **relation** | **string** | Relation of the Relationship | - **subjectId** | **string** | SubjectID of the Relationship | - **subjectSetNamespace** | **string** | Namespace of the Subject Set | - **subjectSetObject** | **string** | Object of the Subject Set | - **subjectSetRelation** | **string** | Relation of the Subject Set | - **maxDepth** | **int64** | | + **namespace** | **string** | The namespace to evaluate the check. Note: If you use the expand-API and the check evaluates a RelationTuple specifying a SubjectSet as subject or due to a rewrite rule in a namespace config this check request may involve other namespaces automatically. | + **object** | **string** | The related object in this check. | + **relation** | **string** | The relation between the Object and the Subject. | + **subjectId** | **string** | A concrete id of the subject. | + **subjectSetNamespace** | **string** | The namespace of the object and relation referenced in this subject set. | + **subjectSetObject** | **string** | The object related by this subject set. | + **subjectSetRelation** | **string** | The relation between the object and the subjects. | + **maxDepth** | **int32** | The maximum depth to search for a relation. If the value is less than 1 or greater than the global max-depth then the global max-depth will be used instead. | ### Return type @@ -96,9 +94,7 @@ No authorization required > CheckPermissionResult CheckPermissionOrError(ctx).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).MaxDepth(maxDepth).Execute() -Check a permission - - +Performs an authorization check. ### Example @@ -113,14 +109,14 @@ import ( ) func main() { - namespace := "namespace_example" // string | Namespace of the Relationship (optional) - object := "object_example" // string | Object of the Relationship (optional) - relation := "relation_example" // string | Relation of the Relationship (optional) - subjectId := "subjectId_example" // string | SubjectID of the Relationship (optional) - subjectSetNamespace := "subjectSetNamespace_example" // string | Namespace of the Subject Set (optional) - subjectSetObject := "subjectSetObject_example" // string | Object of the Subject Set (optional) - subjectSetRelation := "subjectSetRelation_example" // string | Relation of the Subject Set (optional) - maxDepth := int64(789) // int64 | (optional) + namespace := "namespace_example" // string | The namespace to evaluate the check. Note: If you use the expand-API and the check evaluates a RelationTuple specifying a SubjectSet as subject or due to a rewrite rule in a namespace config this check request may involve other namespaces automatically. (optional) + object := "object_example" // string | The related object in this check. (optional) + relation := "relation_example" // string | The relation between the Object and the Subject. (optional) + subjectId := "subjectId_example" // string | A concrete id of the subject. (optional) + subjectSetNamespace := "subjectSetNamespace_example" // string | The namespace of the object and relation referenced in this subject set. (optional) + subjectSetObject := "subjectSetObject_example" // string | The object related by this subject set. (optional) + subjectSetRelation := "subjectSetRelation_example" // string | The relation between the object and the subjects. (optional) + maxDepth := int32(56) // int32 | The maximum depth to search for a relation. If the value is less than 1 or greater than the global max-depth then the global max-depth will be used instead. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -145,14 +141,14 @@ Other parameters are passed through a pointer to a apiCheckPermissionOrErrorRequ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **namespace** | **string** | Namespace of the Relationship | - **object** | **string** | Object of the Relationship | - **relation** | **string** | Relation of the Relationship | - **subjectId** | **string** | SubjectID of the Relationship | - **subjectSetNamespace** | **string** | Namespace of the Subject Set | - **subjectSetObject** | **string** | Object of the Subject Set | - **subjectSetRelation** | **string** | Relation of the Subject Set | - **maxDepth** | **int64** | | + **namespace** | **string** | The namespace to evaluate the check. Note: If you use the expand-API and the check evaluates a RelationTuple specifying a SubjectSet as subject or due to a rewrite rule in a namespace config this check request may involve other namespaces automatically. | + **object** | **string** | The related object in this check. | + **relation** | **string** | The relation between the Object and the Subject. | + **subjectId** | **string** | A concrete id of the subject. | + **subjectSetNamespace** | **string** | The namespace of the object and relation referenced in this subject set. | + **subjectSetObject** | **string** | The object related by this subject set. | + **subjectSetRelation** | **string** | The relation between the object and the subjects. | + **maxDepth** | **int32** | The maximum depth to search for a relation. If the value is less than 1 or greater than the global max-depth then the global max-depth will be used instead. | ### Return type @@ -176,9 +172,7 @@ No authorization required > ExpandedPermissionTree ExpandPermissions(ctx).Namespace(namespace).Object(object).Relation(relation).MaxDepth(maxDepth).Execute() -Expand a Relationship into permissions. - - +Expands the subject set into a tree of subjects. ### Example @@ -193,10 +187,10 @@ import ( ) func main() { - namespace := "namespace_example" // string | Namespace of the Subject Set - object := "object_example" // string | Object of the Subject Set - relation := "relation_example" // string | Relation of the Subject Set - maxDepth := int64(789) // int64 | (optional) + namespace := "namespace_example" // string | The namespace of the object and relation referenced in this subject set. + object := "object_example" // string | The object related by this subject set. + relation := "relation_example" // string | The relation between the object and the subjects. + maxDepth := int32(56) // int32 | The maximum depth of tree to build. If the value is less than 1 or greater than the global max-depth then the global max-depth will be used instead. It is important to set this parameter to a meaningful value. Ponder how deep you really want to display this. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -221,10 +215,10 @@ Other parameters are passed through a pointer to a apiExpandPermissionsRequest s Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **namespace** | **string** | Namespace of the Subject Set | - **object** | **string** | Object of the Subject Set | - **relation** | **string** | Relation of the Subject Set | - **maxDepth** | **int64** | | + **namespace** | **string** | The namespace of the object and relation referenced in this subject set. | + **object** | **string** | The object related by this subject set. | + **relation** | **string** | The relation between the object and the subjects. | + **maxDepth** | **int32** | The maximum depth of tree to build. If the value is less than 1 or greater than the global max-depth then the global max-depth will be used instead. It is important to set this parameter to a meaningful value. Ponder how deep you really want to display this. | ### Return type @@ -246,11 +240,9 @@ No authorization required ## PostCheckPermission -> CheckPermissionResult PostCheckPermission(ctx).MaxDepth(maxDepth).PostCheckPermissionBody(postCheckPermissionBody).Execute() - -Check a permission - +> CheckPermissionResult PostCheckPermission(ctx).PostCheckPermissionBody(postCheckPermissionBody).Execute() +Performs an authorization check. ### Example @@ -265,12 +257,11 @@ import ( ) func main() { - maxDepth := int64(789) // int64 | (optional) - postCheckPermissionBody := *openapiclient.NewPostCheckPermissionBody() // PostCheckPermissionBody | (optional) + postCheckPermissionBody := *openapiclient.NewPostCheckPermissionBody() // PostCheckPermissionBody | The request for a CheckService.Check RPC. Checks whether a specific subject is related to an object. configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PermissionApi.PostCheckPermission(context.Background()).MaxDepth(maxDepth).PostCheckPermissionBody(postCheckPermissionBody).Execute() + resp, r, err := apiClient.PermissionApi.PostCheckPermission(context.Background()).PostCheckPermissionBody(postCheckPermissionBody).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PermissionApi.PostCheckPermission``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -291,8 +282,7 @@ Other parameters are passed through a pointer to a apiPostCheckPermissionRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **maxDepth** | **int64** | | - **postCheckPermissionBody** | [**PostCheckPermissionBody**](PostCheckPermissionBody.md) | | + **postCheckPermissionBody** | [**PostCheckPermissionBody**](PostCheckPermissionBody.md) | The request for a CheckService.Check RPC. Checks whether a specific subject is related to an object. | ### Return type @@ -304,7 +294,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: application/json, application/x-www-form-urlencoded - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -314,11 +304,9 @@ No authorization required ## PostCheckPermissionOrError -> CheckPermissionResult PostCheckPermissionOrError(ctx).MaxDepth(maxDepth).PostCheckPermissionOrErrorBody(postCheckPermissionOrErrorBody).Execute() - -Check a permission - +> CheckPermissionResult PostCheckPermissionOrError(ctx).PostCheckPermissionBody(postCheckPermissionBody).Execute() +Performs an authorization check. ### Example @@ -333,12 +321,11 @@ import ( ) func main() { - maxDepth := int64(789) // int64 | (optional) - postCheckPermissionOrErrorBody := *openapiclient.NewPostCheckPermissionOrErrorBody() // PostCheckPermissionOrErrorBody | (optional) + postCheckPermissionBody := *openapiclient.NewPostCheckPermissionBody() // PostCheckPermissionBody | The request for a CheckService.Check RPC. Checks whether a specific subject is related to an object. configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PermissionApi.PostCheckPermissionOrError(context.Background()).MaxDepth(maxDepth).PostCheckPermissionOrErrorBody(postCheckPermissionOrErrorBody).Execute() + resp, r, err := apiClient.PermissionApi.PostCheckPermissionOrError(context.Background()).PostCheckPermissionBody(postCheckPermissionBody).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `PermissionApi.PostCheckPermissionOrError``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -359,8 +346,7 @@ Other parameters are passed through a pointer to a apiPostCheckPermissionOrError Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **maxDepth** | **int64** | | - **postCheckPermissionOrErrorBody** | [**PostCheckPermissionOrErrorBody**](PostCheckPermissionOrErrorBody.md) | | + **postCheckPermissionBody** | [**PostCheckPermissionBody**](PostCheckPermissionBody.md) | The request for a CheckService.Check RPC. Checks whether a specific subject is related to an object. | ### Return type @@ -372,7 +358,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: application/json, application/x-www-form-urlencoded - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/internal/httpclient/docs/PostCheckPermissionBody.md b/internal/httpclient/docs/PostCheckPermissionBody.md index 852cc00c3..0f4e71bbe 100644 --- a/internal/httpclient/docs/PostCheckPermissionBody.md +++ b/internal/httpclient/docs/PostCheckPermissionBody.md @@ -4,11 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Namespace** | Pointer to **string** | Namespace to query | [optional] -**Object** | Pointer to **string** | Object to query | [optional] -**Relation** | Pointer to **string** | Relation to query | [optional] -**SubjectId** | Pointer to **string** | SubjectID to query Either SubjectSet or SubjectID can be provided. | [optional] -**SubjectSet** | Pointer to [**SubjectSet**](SubjectSet.md) | | [optional] +**MaxDepth** | Pointer to **int32** | The maximum depth to search for a relation. If the value is less than 1 or greater than the global max-depth then the global max-depth will be used instead. | [optional] +**Namespace** | Pointer to **string** | The namespace to evaluate the check. Note: If you use the expand-API and the check evaluates a RelationTuple specifying a SubjectSet as subject or due to a rewrite rule in a namespace config this check request may involve other namespaces automatically. | [optional] +**Object** | Pointer to **string** | The related object in this check. | [optional] +**Relation** | Pointer to **string** | The relation between the Object and the Subject. | [optional] +**SubjectId** | Pointer to **string** | A concrete id of the subject. | [optional] +**SubjectSet** | Pointer to [**SubjectSetQuery**](SubjectSetQuery.md) | | [optional] ## Methods @@ -29,6 +30,31 @@ NewPostCheckPermissionBodyWithDefaults instantiates a new PostCheckPermissionBod This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set +### GetMaxDepth + +`func (o *PostCheckPermissionBody) GetMaxDepth() int32` + +GetMaxDepth returns the MaxDepth field if non-nil, zero value otherwise. + +### GetMaxDepthOk + +`func (o *PostCheckPermissionBody) GetMaxDepthOk() (*int32, bool)` + +GetMaxDepthOk returns a tuple with the MaxDepth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxDepth + +`func (o *PostCheckPermissionBody) SetMaxDepth(v int32)` + +SetMaxDepth sets MaxDepth field to given value. + +### HasMaxDepth + +`func (o *PostCheckPermissionBody) HasMaxDepth() bool` + +HasMaxDepth returns a boolean if a field has been set. + ### GetNamespace `func (o *PostCheckPermissionBody) GetNamespace() string` @@ -131,20 +157,20 @@ HasSubjectId returns a boolean if a field has been set. ### GetSubjectSet -`func (o *PostCheckPermissionBody) GetSubjectSet() SubjectSet` +`func (o *PostCheckPermissionBody) GetSubjectSet() SubjectSetQuery` GetSubjectSet returns the SubjectSet field if non-nil, zero value otherwise. ### GetSubjectSetOk -`func (o *PostCheckPermissionBody) GetSubjectSetOk() (*SubjectSet, bool)` +`func (o *PostCheckPermissionBody) GetSubjectSetOk() (*SubjectSetQuery, bool)` GetSubjectSetOk returns a tuple with the SubjectSet field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSubjectSet -`func (o *PostCheckPermissionBody) SetSubjectSet(v SubjectSet)` +`func (o *PostCheckPermissionBody) SetSubjectSet(v SubjectSetQuery)` SetSubjectSet sets SubjectSet field to given value. diff --git a/internal/httpclient/docs/PostCheckPermissionOrErrorBody.md b/internal/httpclient/docs/PostCheckPermissionOrErrorBody.md deleted file mode 100644 index 821c2a53f..000000000 --- a/internal/httpclient/docs/PostCheckPermissionOrErrorBody.md +++ /dev/null @@ -1,160 +0,0 @@ -# PostCheckPermissionOrErrorBody - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Namespace** | Pointer to **string** | Namespace to query | [optional] -**Object** | Pointer to **string** | Object to query | [optional] -**Relation** | Pointer to **string** | Relation to query | [optional] -**SubjectId** | Pointer to **string** | SubjectID to query Either SubjectSet or SubjectID can be provided. | [optional] -**SubjectSet** | Pointer to [**SubjectSet**](SubjectSet.md) | | [optional] - -## Methods - -### NewPostCheckPermissionOrErrorBody - -`func NewPostCheckPermissionOrErrorBody() *PostCheckPermissionOrErrorBody` - -NewPostCheckPermissionOrErrorBody instantiates a new PostCheckPermissionOrErrorBody object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPostCheckPermissionOrErrorBodyWithDefaults - -`func NewPostCheckPermissionOrErrorBodyWithDefaults() *PostCheckPermissionOrErrorBody` - -NewPostCheckPermissionOrErrorBodyWithDefaults instantiates a new PostCheckPermissionOrErrorBody object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetNamespace - -`func (o *PostCheckPermissionOrErrorBody) GetNamespace() string` - -GetNamespace returns the Namespace field if non-nil, zero value otherwise. - -### GetNamespaceOk - -`func (o *PostCheckPermissionOrErrorBody) GetNamespaceOk() (*string, bool)` - -GetNamespaceOk returns a tuple with the Namespace field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNamespace - -`func (o *PostCheckPermissionOrErrorBody) SetNamespace(v string)` - -SetNamespace sets Namespace field to given value. - -### HasNamespace - -`func (o *PostCheckPermissionOrErrorBody) HasNamespace() bool` - -HasNamespace returns a boolean if a field has been set. - -### GetObject - -`func (o *PostCheckPermissionOrErrorBody) GetObject() string` - -GetObject returns the Object field if non-nil, zero value otherwise. - -### GetObjectOk - -`func (o *PostCheckPermissionOrErrorBody) GetObjectOk() (*string, bool)` - -GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetObject - -`func (o *PostCheckPermissionOrErrorBody) SetObject(v string)` - -SetObject sets Object field to given value. - -### HasObject - -`func (o *PostCheckPermissionOrErrorBody) HasObject() bool` - -HasObject returns a boolean if a field has been set. - -### GetRelation - -`func (o *PostCheckPermissionOrErrorBody) GetRelation() string` - -GetRelation returns the Relation field if non-nil, zero value otherwise. - -### GetRelationOk - -`func (o *PostCheckPermissionOrErrorBody) GetRelationOk() (*string, bool)` - -GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRelation - -`func (o *PostCheckPermissionOrErrorBody) SetRelation(v string)` - -SetRelation sets Relation field to given value. - -### HasRelation - -`func (o *PostCheckPermissionOrErrorBody) HasRelation() bool` - -HasRelation returns a boolean if a field has been set. - -### GetSubjectId - -`func (o *PostCheckPermissionOrErrorBody) GetSubjectId() string` - -GetSubjectId returns the SubjectId field if non-nil, zero value otherwise. - -### GetSubjectIdOk - -`func (o *PostCheckPermissionOrErrorBody) GetSubjectIdOk() (*string, bool)` - -GetSubjectIdOk returns a tuple with the SubjectId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubjectId - -`func (o *PostCheckPermissionOrErrorBody) SetSubjectId(v string)` - -SetSubjectId sets SubjectId field to given value. - -### HasSubjectId - -`func (o *PostCheckPermissionOrErrorBody) HasSubjectId() bool` - -HasSubjectId returns a boolean if a field has been set. - -### GetSubjectSet - -`func (o *PostCheckPermissionOrErrorBody) GetSubjectSet() SubjectSet` - -GetSubjectSet returns the SubjectSet field if non-nil, zero value otherwise. - -### GetSubjectSetOk - -`func (o *PostCheckPermissionOrErrorBody) GetSubjectSetOk() (*SubjectSet, bool)` - -GetSubjectSetOk returns a tuple with the SubjectSet field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubjectSet - -`func (o *PostCheckPermissionOrErrorBody) SetSubjectSet(v SubjectSet)` - -SetSubjectSet sets SubjectSet field to given value. - -### HasSubjectSet - -`func (o *PostCheckPermissionOrErrorBody) HasSubjectSet() bool` - -HasSubjectSet returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/internal/httpclient/docs/RelationQuery.md b/internal/httpclient/docs/RelationQuery.md deleted file mode 100644 index 801006e4c..000000000 --- a/internal/httpclient/docs/RelationQuery.md +++ /dev/null @@ -1,160 +0,0 @@ -# RelationQuery - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Namespace** | Pointer to **string** | Namespace to query | [optional] -**Object** | Pointer to **string** | Object to query | [optional] -**Relation** | Pointer to **string** | Relation to query | [optional] -**SubjectId** | Pointer to **string** | SubjectID to query Either SubjectSet or SubjectID can be provided. | [optional] -**SubjectSet** | Pointer to [**SubjectSet**](SubjectSet.md) | | [optional] - -## Methods - -### NewRelationQuery - -`func NewRelationQuery() *RelationQuery` - -NewRelationQuery instantiates a new RelationQuery object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRelationQueryWithDefaults - -`func NewRelationQueryWithDefaults() *RelationQuery` - -NewRelationQueryWithDefaults instantiates a new RelationQuery object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetNamespace - -`func (o *RelationQuery) GetNamespace() string` - -GetNamespace returns the Namespace field if non-nil, zero value otherwise. - -### GetNamespaceOk - -`func (o *RelationQuery) GetNamespaceOk() (*string, bool)` - -GetNamespaceOk returns a tuple with the Namespace field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNamespace - -`func (o *RelationQuery) SetNamespace(v string)` - -SetNamespace sets Namespace field to given value. - -### HasNamespace - -`func (o *RelationQuery) HasNamespace() bool` - -HasNamespace returns a boolean if a field has been set. - -### GetObject - -`func (o *RelationQuery) GetObject() string` - -GetObject returns the Object field if non-nil, zero value otherwise. - -### GetObjectOk - -`func (o *RelationQuery) GetObjectOk() (*string, bool)` - -GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetObject - -`func (o *RelationQuery) SetObject(v string)` - -SetObject sets Object field to given value. - -### HasObject - -`func (o *RelationQuery) HasObject() bool` - -HasObject returns a boolean if a field has been set. - -### GetRelation - -`func (o *RelationQuery) GetRelation() string` - -GetRelation returns the Relation field if non-nil, zero value otherwise. - -### GetRelationOk - -`func (o *RelationQuery) GetRelationOk() (*string, bool)` - -GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRelation - -`func (o *RelationQuery) SetRelation(v string)` - -SetRelation sets Relation field to given value. - -### HasRelation - -`func (o *RelationQuery) HasRelation() bool` - -HasRelation returns a boolean if a field has been set. - -### GetSubjectId - -`func (o *RelationQuery) GetSubjectId() string` - -GetSubjectId returns the SubjectId field if non-nil, zero value otherwise. - -### GetSubjectIdOk - -`func (o *RelationQuery) GetSubjectIdOk() (*string, bool)` - -GetSubjectIdOk returns a tuple with the SubjectId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubjectId - -`func (o *RelationQuery) SetSubjectId(v string)` - -SetSubjectId sets SubjectId field to given value. - -### HasSubjectId - -`func (o *RelationQuery) HasSubjectId() bool` - -HasSubjectId returns a boolean if a field has been set. - -### GetSubjectSet - -`func (o *RelationQuery) GetSubjectSet() SubjectSet` - -GetSubjectSet returns the SubjectSet field if non-nil, zero value otherwise. - -### GetSubjectSetOk - -`func (o *RelationQuery) GetSubjectSetOk() (*SubjectSet, bool)` - -GetSubjectSetOk returns a tuple with the SubjectSet field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSubjectSet - -`func (o *RelationQuery) SetSubjectSet(v SubjectSet)` - -SetSubjectSet sets SubjectSet field to given value. - -### HasSubjectSet - -`func (o *RelationQuery) HasSubjectSet() bool` - -HasSubjectSet returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/internal/httpclient/docs/Relationship.md b/internal/httpclient/docs/Relationship.md index 6ac130452..efa5abf00 100644 --- a/internal/httpclient/docs/Relationship.md +++ b/internal/httpclient/docs/Relationship.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Namespace** | **string** | Namespace of the Relation Tuple | -**Object** | **string** | Object of the Relation Tuple | -**Relation** | **string** | Relation of the Relation Tuple | -**SubjectId** | Pointer to **string** | SubjectID of the Relation Tuple Either SubjectSet or SubjectID can be provided. | [optional] +**Namespace** | **string** | The namespace this relation tuple lives in. | +**Object** | **string** | The object related by this tuple. It is an object in the namespace of the tuple. | +**Relation** | **string** | The relation between an Object and a Subject. | +**SubjectId** | Pointer to **string** | A concrete id of the subject. | [optional] **SubjectSet** | Pointer to [**SubjectSet**](SubjectSet.md) | | [optional] ## Methods diff --git a/internal/httpclient/docs/RelationshipApi.md b/internal/httpclient/docs/RelationshipApi.md index ba3f33e1c..045665af7 100644 --- a/internal/httpclient/docs/RelationshipApi.md +++ b/internal/httpclient/docs/RelationshipApi.md @@ -4,12 +4,12 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CheckOplSyntax**](RelationshipApi.md#CheckOplSyntax) | **Post** /opl/syntax/check | Check the syntax of an OPL file -[**CreateRelationship**](RelationshipApi.md#CreateRelationship) | **Put** /admin/relation-tuples | Create a Relationship -[**DeleteRelationships**](RelationshipApi.md#DeleteRelationships) | **Delete** /admin/relation-tuples | Delete Relationships -[**GetRelationships**](RelationshipApi.md#GetRelationships) | **Get** /relation-tuples | Query relationships -[**ListRelationshipNamespaces**](RelationshipApi.md#ListRelationshipNamespaces) | **Get** /namespaces | Query namespaces -[**PatchRelationships**](RelationshipApi.md#PatchRelationships) | **Patch** /admin/relation-tuples | Patch Multiple Relationships +[**CheckOplSyntax**](RelationshipApi.md#CheckOplSyntax) | **Post** /opl/syntax/check | Performs a syntax check request. +[**CreateRelationship**](RelationshipApi.md#CreateRelationship) | **Put** /admin/relation-tuples | Creates a relationship +[**DeleteRelationships**](RelationshipApi.md#DeleteRelationships) | **Delete** /admin/relation-tuples | Deletes relationships based on relation query +[**GetRelationships**](RelationshipApi.md#GetRelationships) | **Get** /relation-tuples | Lists ACL relationships. +[**ListRelationshipNamespaces**](RelationshipApi.md#ListRelationshipNamespaces) | **Get** /namespaces | Lists Namespaces +[**PatchRelationships**](RelationshipApi.md#PatchRelationships) | **Patch** /admin/relation-tuples | Writes one or more relationships in a single transaction. @@ -17,9 +17,7 @@ Method | HTTP request | Description > CheckOplSyntaxResult CheckOplSyntax(ctx).Body(body).Execute() -Check the syntax of an OPL file - - +Performs a syntax check request. ### Example @@ -34,7 +32,7 @@ import ( ) func main() { - body := "body_example" // string | (optional) + body := string(BYTE_ARRAY_DATA_HERE) // string | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -83,9 +81,7 @@ No authorization required > Relationship CreateRelationship(ctx).CreateRelationshipBody(createRelationshipBody).Execute() -Create a Relationship - - +Creates a relationship ### Example @@ -100,7 +96,7 @@ import ( ) func main() { - createRelationshipBody := *openapiclient.NewCreateRelationshipBody() // CreateRelationshipBody | (optional) + createRelationshipBody := *openapiclient.NewCreateRelationshipBody() // CreateRelationshipBody | The relationship to create. configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -125,7 +121,7 @@ Other parameters are passed through a pointer to a apiCreateRelationshipRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **createRelationshipBody** | [**CreateRelationshipBody**](CreateRelationshipBody.md) | | + **createRelationshipBody** | [**CreateRelationshipBody**](CreateRelationshipBody.md) | The relationship to create. | ### Return type @@ -149,9 +145,7 @@ No authorization required > DeleteRelationships(ctx).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).Execute() -Delete Relationships - - +Deletes relationships based on relation query ### Example @@ -166,13 +160,13 @@ import ( ) func main() { - namespace := "namespace_example" // string | Namespace of the Relationship (optional) - object := "object_example" // string | Object of the Relationship (optional) - relation := "relation_example" // string | Relation of the Relationship (optional) - subjectId := "subjectId_example" // string | SubjectID of the Relationship (optional) - subjectSetNamespace := "subjectSetNamespace_example" // string | Namespace of the Subject Set (optional) - subjectSetObject := "subjectSetObject_example" // string | Object of the Subject Set (optional) - subjectSetRelation := "subjectSetRelation_example" // string | Relation of the Subject Set (optional) + namespace := "namespace_example" // string | The namespace this relation tuple lives in. (optional) + object := "object_example" // string | The object related by this tuple. It is an object in the namespace of the tuple. (optional) + relation := "relation_example" // string | The relation between an Object and a Subject. (optional) + subjectId := "subjectId_example" // string | A concrete id of the subject. (optional) + subjectSetNamespace := "subjectSetNamespace_example" // string | The namespace of the object and relation referenced in this subject set. (optional) + subjectSetObject := "subjectSetObject_example" // string | The object related by this subject set. (optional) + subjectSetRelation := "subjectSetRelation_example" // string | The relation between the object and the subjects. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -195,13 +189,13 @@ Other parameters are passed through a pointer to a apiDeleteRelationshipsRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **namespace** | **string** | Namespace of the Relationship | - **object** | **string** | Object of the Relationship | - **relation** | **string** | Relation of the Relationship | - **subjectId** | **string** | SubjectID of the Relationship | - **subjectSetNamespace** | **string** | Namespace of the Subject Set | - **subjectSetObject** | **string** | Object of the Subject Set | - **subjectSetRelation** | **string** | Relation of the Subject Set | + **namespace** | **string** | The namespace this relation tuple lives in. | + **object** | **string** | The object related by this tuple. It is an object in the namespace of the tuple. | + **relation** | **string** | The relation between an Object and a Subject. | + **subjectId** | **string** | A concrete id of the subject. | + **subjectSetNamespace** | **string** | The namespace of the object and relation referenced in this subject set. | + **subjectSetObject** | **string** | The object related by this subject set. | + **subjectSetRelation** | **string** | The relation between the object and the subjects. | ### Return type @@ -223,11 +217,9 @@ No authorization required ## GetRelationships -> Relationships GetRelationships(ctx).PageToken(pageToken).PageSize(pageSize).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).Execute() - -Query relationships - +> Relationships GetRelationships(ctx).PageSize(pageSize).PageToken(pageToken).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).Execute() +Lists ACL relationships. ### Example @@ -242,19 +234,19 @@ import ( ) func main() { - pageToken := "pageToken_example" // string | (optional) - pageSize := int64(789) // int64 | (optional) - namespace := "namespace_example" // string | Namespace of the Relationship (optional) - object := "object_example" // string | Object of the Relationship (optional) - relation := "relation_example" // string | Relation of the Relationship (optional) - subjectId := "subjectId_example" // string | SubjectID of the Relationship (optional) - subjectSetNamespace := "subjectSetNamespace_example" // string | Namespace of the Subject Set (optional) - subjectSetObject := "subjectSetObject_example" // string | Object of the Subject Set (optional) - subjectSetRelation := "subjectSetRelation_example" // string | Relation of the Subject Set (optional) + pageSize := int32(56) // int32 | Optional. The maximum number of RelationTuples to return in the response. Default: 100 (optional) + pageToken := "pageToken_example" // string | Optional. An opaque pagination token returned from a previous call to `ListRelationTuples` that indicates where the page should start at. An empty token denotes the first page. All successive pages require the token from the previous page. (optional) + namespace := "namespace_example" // string | The namespace (optional) + object := "object_example" // string | The related object in this check. (optional) + relation := "relation_example" // string | The relation between the Object and the Subject. (optional) + subjectId := "subjectId_example" // string | A concrete id of the subject. (optional) + subjectSetNamespace := "subjectSetNamespace_example" // string | The namespace of the object and relation referenced in this subject set. (optional) + subjectSetObject := "subjectSetObject_example" // string | The object related by this subject set. (optional) + subjectSetRelation := "subjectSetRelation_example" // string | The relation between the object and the subjects. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RelationshipApi.GetRelationships(context.Background()).PageToken(pageToken).PageSize(pageSize).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).Execute() + resp, r, err := apiClient.RelationshipApi.GetRelationships(context.Background()).PageSize(pageSize).PageToken(pageToken).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RelationshipApi.GetRelationships``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -275,15 +267,15 @@ Other parameters are passed through a pointer to a apiGetRelationshipsRequest st Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageToken** | **string** | | - **pageSize** | **int64** | | - **namespace** | **string** | Namespace of the Relationship | - **object** | **string** | Object of the Relationship | - **relation** | **string** | Relation of the Relationship | - **subjectId** | **string** | SubjectID of the Relationship | - **subjectSetNamespace** | **string** | Namespace of the Subject Set | - **subjectSetObject** | **string** | Object of the Subject Set | - **subjectSetRelation** | **string** | Relation of the Subject Set | + **pageSize** | **int32** | Optional. The maximum number of RelationTuples to return in the response. Default: 100 | + **pageToken** | **string** | Optional. An opaque pagination token returned from a previous call to `ListRelationTuples` that indicates where the page should start at. An empty token denotes the first page. All successive pages require the token from the previous page. | + **namespace** | **string** | The namespace | + **object** | **string** | The related object in this check. | + **relation** | **string** | The relation between the Object and the Subject. | + **subjectId** | **string** | A concrete id of the subject. | + **subjectSetNamespace** | **string** | The namespace of the object and relation referenced in this subject set. | + **subjectSetObject** | **string** | The object related by this subject set. | + **subjectSetRelation** | **string** | The relation between the object and the subjects. | ### Return type @@ -307,7 +299,7 @@ No authorization required > RelationshipNamespaces ListRelationshipNamespaces(ctx).Execute() -Query namespaces +Lists Namespaces @@ -366,11 +358,9 @@ No authorization required ## PatchRelationships -> PatchRelationships(ctx).RelationshipPatch(relationshipPatch).Execute() - -Patch Multiple Relationships - +> PatchRelationships(ctx).RelationshipDelta(relationshipDelta).Execute() +Writes one or more relationships in a single transaction. ### Example @@ -385,11 +375,11 @@ import ( ) func main() { - relationshipPatch := []openapiclient.RelationshipPatch{*openapiclient.NewRelationshipPatch()} // []RelationshipPatch | (optional) + relationshipDelta := []openapiclient.RelationshipDelta{*openapiclient.NewRelationshipDelta()} // []RelationshipDelta | The write delta for the relationships operated in one single transaction. Either all actions succeed or no change takes effect on error. configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RelationshipApi.PatchRelationships(context.Background()).RelationshipPatch(relationshipPatch).Execute() + resp, r, err := apiClient.RelationshipApi.PatchRelationships(context.Background()).RelationshipDelta(relationshipDelta).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RelationshipApi.PatchRelationships``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -408,7 +398,7 @@ Other parameters are passed through a pointer to a apiPatchRelationshipsRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **relationshipPatch** | [**[]RelationshipPatch**](RelationshipPatch.md) | | + **relationshipDelta** | [**[]RelationshipDelta**](RelationshipDelta.md) | The write delta for the relationships operated in one single transaction. Either all actions succeed or no change takes effect on error. | ### Return type diff --git a/internal/httpclient/docs/RelationshipPatch.md b/internal/httpclient/docs/RelationshipDelta.md similarity index 61% rename from internal/httpclient/docs/RelationshipPatch.md rename to internal/httpclient/docs/RelationshipDelta.md index 649c62571..35df3bc98 100644 --- a/internal/httpclient/docs/RelationshipPatch.md +++ b/internal/httpclient/docs/RelationshipDelta.md @@ -1,78 +1,78 @@ -# RelationshipPatch +# RelationshipDelta ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Action** | Pointer to **string** | | [optional] +**Action** | Pointer to [**RelationshipDeltaAction**](RelationshipDeltaAction.md) | | [optional] [default to RELATIONSHIPDELTAACTION_ACTION_UNSPECIFIED] **RelationTuple** | Pointer to [**Relationship**](Relationship.md) | | [optional] ## Methods -### NewRelationshipPatch +### NewRelationshipDelta -`func NewRelationshipPatch() *RelationshipPatch` +`func NewRelationshipDelta() *RelationshipDelta` -NewRelationshipPatch instantiates a new RelationshipPatch object +NewRelationshipDelta instantiates a new RelationshipDelta object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewRelationshipPatchWithDefaults +### NewRelationshipDeltaWithDefaults -`func NewRelationshipPatchWithDefaults() *RelationshipPatch` +`func NewRelationshipDeltaWithDefaults() *RelationshipDelta` -NewRelationshipPatchWithDefaults instantiates a new RelationshipPatch object +NewRelationshipDeltaWithDefaults instantiates a new RelationshipDelta object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetAction -`func (o *RelationshipPatch) GetAction() string` +`func (o *RelationshipDelta) GetAction() RelationshipDeltaAction` GetAction returns the Action field if non-nil, zero value otherwise. ### GetActionOk -`func (o *RelationshipPatch) GetActionOk() (*string, bool)` +`func (o *RelationshipDelta) GetActionOk() (*RelationshipDeltaAction, bool)` GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAction -`func (o *RelationshipPatch) SetAction(v string)` +`func (o *RelationshipDelta) SetAction(v RelationshipDeltaAction)` SetAction sets Action field to given value. ### HasAction -`func (o *RelationshipPatch) HasAction() bool` +`func (o *RelationshipDelta) HasAction() bool` HasAction returns a boolean if a field has been set. ### GetRelationTuple -`func (o *RelationshipPatch) GetRelationTuple() Relationship` +`func (o *RelationshipDelta) GetRelationTuple() Relationship` GetRelationTuple returns the RelationTuple field if non-nil, zero value otherwise. ### GetRelationTupleOk -`func (o *RelationshipPatch) GetRelationTupleOk() (*Relationship, bool)` +`func (o *RelationshipDelta) GetRelationTupleOk() (*Relationship, bool)` GetRelationTupleOk returns a tuple with the RelationTuple field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRelationTuple -`func (o *RelationshipPatch) SetRelationTuple(v Relationship)` +`func (o *RelationshipDelta) SetRelationTuple(v Relationship)` SetRelationTuple sets RelationTuple field to given value. ### HasRelationTuple -`func (o *RelationshipPatch) HasRelationTuple() bool` +`func (o *RelationshipDelta) HasRelationTuple() bool` HasRelationTuple returns a boolean if a field has been set. diff --git a/internal/httpclient/docs/RelationshipDeltaAction.md b/internal/httpclient/docs/RelationshipDeltaAction.md new file mode 100644 index 000000000..b881ac6c9 --- /dev/null +++ b/internal/httpclient/docs/RelationshipDeltaAction.md @@ -0,0 +1,15 @@ +# RelationshipDeltaAction + +## Enum + + +* `ACTION_UNSPECIFIED` (value: `"ACTION_UNSPECIFIED"`) + +* `INSERT` (value: `"insert"`) + +* `DELETE` (value: `"delete"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/internal/httpclient/docs/RelationshipNamespaces.md b/internal/httpclient/docs/RelationshipNamespaces.md index 63fa28712..c61e474fa 100644 --- a/internal/httpclient/docs/RelationshipNamespaces.md +++ b/internal/httpclient/docs/RelationshipNamespaces.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Namespaces** | Pointer to [**[]Namespace**](Namespace.md) | | [optional] +**Namespaces** | Pointer to [**[]OryKetoRelationTuplesV1alpha2Namespace**](OryKetoRelationTuplesV1alpha2Namespace.md) | | [optional] ## Methods @@ -27,20 +27,20 @@ but it doesn't guarantee that properties required by API are set ### GetNamespaces -`func (o *RelationshipNamespaces) GetNamespaces() []Namespace` +`func (o *RelationshipNamespaces) GetNamespaces() []OryKetoRelationTuplesV1alpha2Namespace` GetNamespaces returns the Namespaces field if non-nil, zero value otherwise. ### GetNamespacesOk -`func (o *RelationshipNamespaces) GetNamespacesOk() (*[]Namespace, bool)` +`func (o *RelationshipNamespaces) GetNamespacesOk() (*[]OryKetoRelationTuplesV1alpha2Namespace, bool)` GetNamespacesOk returns a tuple with the Namespaces field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetNamespaces -`func (o *RelationshipNamespaces) SetNamespaces(v []Namespace)` +`func (o *RelationshipNamespaces) SetNamespaces(v []OryKetoRelationTuplesV1alpha2Namespace)` SetNamespaces sets Namespaces field to given value. diff --git a/internal/httpclient/docs/Relationships.md b/internal/httpclient/docs/Relationships.md index 83f813e6b..53ec19936 100644 --- a/internal/httpclient/docs/Relationships.md +++ b/internal/httpclient/docs/Relationships.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**NextPageToken** | Pointer to **string** | The opaque token to provide in a subsequent request to get the next page. It is the empty string iff this is the last page. | [optional] -**RelationTuples** | Pointer to [**[]Relationship**](Relationship.md) | | [optional] +**NextPageToken** | Pointer to **string** | The token required to get the next page. If this is the last page, the token will be the empty string. | [optional] +**RelationTuples** | Pointer to [**[]Relationship**](Relationship.md) | The relationships matching the list request. | [optional] ## Methods diff --git a/internal/httpclient/docs/SubjectSet.md b/internal/httpclient/docs/SubjectSet.md index 194228eda..d72e725ce 100644 --- a/internal/httpclient/docs/SubjectSet.md +++ b/internal/httpclient/docs/SubjectSet.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Namespace** | **string** | Namespace of the Subject Set | -**Object** | **string** | Object of the Subject Set | -**Relation** | **string** | Relation of the Subject Set | +**Namespace** | **string** | The namespace of the object and relation referenced in this subject set. | +**Object** | **string** | The object related by this subject set. | +**Relation** | **string** | The relation between the object and the subjects. | ## Methods diff --git a/internal/httpclient/docs/SubjectSetQuery.md b/internal/httpclient/docs/SubjectSetQuery.md new file mode 100644 index 000000000..036cf3525 --- /dev/null +++ b/internal/httpclient/docs/SubjectSetQuery.md @@ -0,0 +1,108 @@ +# SubjectSetQuery + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Namespace** | Pointer to **string** | The namespace of the object and relation referenced in this subject set. | [optional] +**Object** | Pointer to **string** | The object related by this subject set. | [optional] +**Relation** | Pointer to **string** | The relation between the object and the subjects. | [optional] + +## Methods + +### NewSubjectSetQuery + +`func NewSubjectSetQuery() *SubjectSetQuery` + +NewSubjectSetQuery instantiates a new SubjectSetQuery object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSubjectSetQueryWithDefaults + +`func NewSubjectSetQueryWithDefaults() *SubjectSetQuery` + +NewSubjectSetQueryWithDefaults instantiates a new SubjectSetQuery object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetNamespace + +`func (o *SubjectSetQuery) GetNamespace() string` + +GetNamespace returns the Namespace field if non-nil, zero value otherwise. + +### GetNamespaceOk + +`func (o *SubjectSetQuery) GetNamespaceOk() (*string, bool)` + +GetNamespaceOk returns a tuple with the Namespace field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNamespace + +`func (o *SubjectSetQuery) SetNamespace(v string)` + +SetNamespace sets Namespace field to given value. + +### HasNamespace + +`func (o *SubjectSetQuery) HasNamespace() bool` + +HasNamespace returns a boolean if a field has been set. + +### GetObject + +`func (o *SubjectSetQuery) GetObject() string` + +GetObject returns the Object field if non-nil, zero value otherwise. + +### GetObjectOk + +`func (o *SubjectSetQuery) GetObjectOk() (*string, bool)` + +GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObject + +`func (o *SubjectSetQuery) SetObject(v string)` + +SetObject sets Object field to given value. + +### HasObject + +`func (o *SubjectSetQuery) HasObject() bool` + +HasObject returns a boolean if a field has been set. + +### GetRelation + +`func (o *SubjectSetQuery) GetRelation() string` + +GetRelation returns the Relation field if non-nil, zero value otherwise. + +### GetRelationOk + +`func (o *SubjectSetQuery) GetRelationOk() (*string, bool)` + +GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelation + +`func (o *SubjectSetQuery) SetRelation(v string)` + +SetRelation sets Relation field to given value. + +### HasRelation + +`func (o *SubjectSetQuery) HasRelation() bool` + +HasRelation returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/internal/httpclient/docs/Version.md b/internal/httpclient/docs/Version.md deleted file mode 100644 index c186956b8..000000000 --- a/internal/httpclient/docs/Version.md +++ /dev/null @@ -1,56 +0,0 @@ -# Version - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Version** | Pointer to **string** | Version is the service's version. | [optional] - -## Methods - -### NewVersion - -`func NewVersion() *Version` - -NewVersion instantiates a new Version object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewVersionWithDefaults - -`func NewVersionWithDefaults() *Version` - -NewVersionWithDefaults instantiates a new Version object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetVersion - -`func (o *Version) GetVersion() string` - -GetVersion returns the Version field if non-nil, zero value otherwise. - -### GetVersionOk - -`func (o *Version) GetVersionOk() (*string, bool)` - -GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVersion - -`func (o *Version) SetVersion(v string)` - -SetVersion sets Version field to given value. - -### HasVersion - -`func (o *Version) HasVersion() bool` - -HasVersion returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/internal/httpclient/model_check_opl_syntax_result.go b/internal/httpclient/model_check_opl_syntax_result.go index 5f741b6d8..29b902ae1 100644 --- a/internal/httpclient/model_check_opl_syntax_result.go +++ b/internal/httpclient/model_check_opl_syntax_result.go @@ -17,8 +17,7 @@ import ( // CheckOplSyntaxResult struct for CheckOplSyntaxResult type CheckOplSyntaxResult struct { - // The list of syntax errors - Errors []ParseError `json:"errors,omitempty"` + Errors []OryKetoOplV1alpha1ParseError `json:"errors,omitempty"` } // NewCheckOplSyntaxResult instantiates a new CheckOplSyntaxResult object @@ -39,9 +38,9 @@ func NewCheckOplSyntaxResultWithDefaults() *CheckOplSyntaxResult { } // GetErrors returns the Errors field value if set, zero value otherwise. -func (o *CheckOplSyntaxResult) GetErrors() []ParseError { +func (o *CheckOplSyntaxResult) GetErrors() []OryKetoOplV1alpha1ParseError { if o == nil || o.Errors == nil { - var ret []ParseError + var ret []OryKetoOplV1alpha1ParseError return ret } return o.Errors @@ -49,7 +48,7 @@ func (o *CheckOplSyntaxResult) GetErrors() []ParseError { // GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CheckOplSyntaxResult) GetErrorsOk() ([]ParseError, bool) { +func (o *CheckOplSyntaxResult) GetErrorsOk() ([]OryKetoOplV1alpha1ParseError, bool) { if o == nil || o.Errors == nil { return nil, false } @@ -65,8 +64,8 @@ func (o *CheckOplSyntaxResult) HasErrors() bool { return false } -// SetErrors gets a reference to the given []ParseError and assigns it to the Errors field. -func (o *CheckOplSyntaxResult) SetErrors(v []ParseError) { +// SetErrors gets a reference to the given []OryKetoOplV1alpha1ParseError and assigns it to the Errors field. +func (o *CheckOplSyntaxResult) SetErrors(v []OryKetoOplV1alpha1ParseError) { o.Errors = v } diff --git a/internal/httpclient/model_check_permission_result.go b/internal/httpclient/model_check_permission_result.go index 52bbbe7b0..dd09b0124 100644 --- a/internal/httpclient/model_check_permission_result.go +++ b/internal/httpclient/model_check_permission_result.go @@ -15,19 +15,18 @@ import ( "encoding/json" ) -// CheckPermissionResult The content of the allowed field is mirrored in the HTTP status code. +// CheckPermissionResult The response for a CheckService.Check rpc. type CheckPermissionResult struct { - // whether the relation tuple is allowed - Allowed bool `json:"allowed"` + // Whether the specified subject (id) is related to the requested object. It is false by default if no ACL matches. + Allowed *bool `json:"allowed,omitempty"` } // NewCheckPermissionResult instantiates a new CheckPermissionResult object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCheckPermissionResult(allowed bool) *CheckPermissionResult { +func NewCheckPermissionResult() *CheckPermissionResult { this := CheckPermissionResult{} - this.Allowed = allowed return &this } @@ -39,33 +38,41 @@ func NewCheckPermissionResultWithDefaults() *CheckPermissionResult { return &this } -// GetAllowed returns the Allowed field value +// GetAllowed returns the Allowed field value if set, zero value otherwise. func (o *CheckPermissionResult) GetAllowed() bool { - if o == nil { + if o == nil || o.Allowed == nil { var ret bool return ret } - - return o.Allowed + return *o.Allowed } -// GetAllowedOk returns a tuple with the Allowed field value +// GetAllowedOk returns a tuple with the Allowed field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CheckPermissionResult) GetAllowedOk() (*bool, bool) { - if o == nil { + if o == nil || o.Allowed == nil { return nil, false } - return &o.Allowed, true + return o.Allowed, true +} + +// HasAllowed returns a boolean if a field has been set. +func (o *CheckPermissionResult) HasAllowed() bool { + if o != nil && o.Allowed != nil { + return true + } + + return false } -// SetAllowed sets field value +// SetAllowed gets a reference to the given bool and assigns it to the Allowed field. func (o *CheckPermissionResult) SetAllowed(v bool) { - o.Allowed = v + o.Allowed = &v } func (o CheckPermissionResult) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if true { + if o.Allowed != nil { toSerialize["allowed"] = o.Allowed } return json.Marshal(toSerialize) diff --git a/internal/httpclient/model_create_relationship_body.go b/internal/httpclient/model_create_relationship_body.go index a87a89761..c54c2e71d 100644 --- a/internal/httpclient/model_create_relationship_body.go +++ b/internal/httpclient/model_create_relationship_body.go @@ -15,15 +15,15 @@ import ( "encoding/json" ) -// CreateRelationshipBody Create Relationship Request Body +// CreateRelationshipBody struct for CreateRelationshipBody type CreateRelationshipBody struct { - // Namespace to query + // The namespace this relation tuple lives in. Namespace *string `json:"namespace,omitempty"` - // Object to query + // The object related by this tuple. It is an object in the namespace of the tuple. Object *string `json:"object,omitempty"` - // Relation to query + // The relation between an Object and a Subject. Relation *string `json:"relation,omitempty"` - // SubjectID to query Either SubjectSet or SubjectID can be provided. + // A concrete id of the subject. SubjectId *string `json:"subject_id,omitempty"` SubjectSet *SubjectSet `json:"subject_set,omitempty"` } diff --git a/internal/httpclient/model_error_generic.go b/internal/httpclient/model_error_generic.go index 057a6acf3..5031187e7 100644 --- a/internal/httpclient/model_error_generic.go +++ b/internal/httpclient/model_error_generic.go @@ -15,18 +15,17 @@ import ( "encoding/json" ) -// ErrorGeneric The standard Ory JSON API error format. +// ErrorGeneric struct for ErrorGeneric type ErrorGeneric struct { - Error GenericError `json:"error"` + Error *OryKetoRelationTuplesV1alpha2ErrorObject `json:"error,omitempty"` } // NewErrorGeneric instantiates a new ErrorGeneric object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewErrorGeneric(error_ GenericError) *ErrorGeneric { +func NewErrorGeneric() *ErrorGeneric { this := ErrorGeneric{} - this.Error = error_ return &this } @@ -38,33 +37,41 @@ func NewErrorGenericWithDefaults() *ErrorGeneric { return &this } -// GetError returns the Error field value -func (o *ErrorGeneric) GetError() GenericError { - if o == nil { - var ret GenericError +// GetError returns the Error field value if set, zero value otherwise. +func (o *ErrorGeneric) GetError() OryKetoRelationTuplesV1alpha2ErrorObject { + if o == nil || o.Error == nil { + var ret OryKetoRelationTuplesV1alpha2ErrorObject return ret } - - return o.Error + return *o.Error } -// GetErrorOk returns a tuple with the Error field value +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ErrorGeneric) GetErrorOk() (*GenericError, bool) { - if o == nil { +func (o *ErrorGeneric) GetErrorOk() (*OryKetoRelationTuplesV1alpha2ErrorObject, bool) { + if o == nil || o.Error == nil { return nil, false } - return &o.Error, true + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *ErrorGeneric) HasError() bool { + if o != nil && o.Error != nil { + return true + } + + return false } -// SetError sets field value -func (o *ErrorGeneric) SetError(v GenericError) { - o.Error = v +// SetError gets a reference to the given OryKetoRelationTuplesV1alpha2ErrorObject and assigns it to the Error field. +func (o *ErrorGeneric) SetError(v OryKetoRelationTuplesV1alpha2ErrorObject) { + o.Error = &v } func (o ErrorGeneric) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if true { + if o.Error != nil { toSerialize["error"] = o.Error } return json.Marshal(toSerialize) diff --git a/internal/httpclient/model_expanded_permission_tree.go b/internal/httpclient/model_expanded_permission_tree.go index bca9ea04e..b8d015ee3 100644 --- a/internal/httpclient/model_expanded_permission_tree.go +++ b/internal/httpclient/model_expanded_permission_tree.go @@ -17,18 +17,18 @@ import ( // ExpandedPermissionTree struct for ExpandedPermissionTree type ExpandedPermissionTree struct { - // The children of the node, possibly none. - Children []ExpandedPermissionTree `json:"children,omitempty"` - Tuple *Relationship `json:"tuple,omitempty"` - // The type of the node. union TreeNodeUnion exclusion TreeNodeExclusion intersection TreeNodeIntersection leaf TreeNodeLeaf tuple_to_subject_set TreeNodeTupleToSubjectSet computed_subject_set TreeNodeComputedSubjectSet not TreeNodeNot unspecified TreeNodeUnspecified - Type string `json:"type"` + // The children of this node. This is never set if `node_type` == `NODE_TYPE_LEAF`. + Children []ExpandedPermissionTree `json:"children,omitempty"` + Subject *OryKetoRelationTuplesV1alpha2Subject `json:"subject,omitempty"` + Tuple *Relationship `json:"tuple,omitempty"` + Type OryKetoRelationTuplesV1alpha2NodeType `json:"type"` } // NewExpandedPermissionTree instantiates a new ExpandedPermissionTree object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewExpandedPermissionTree(type_ string) *ExpandedPermissionTree { +func NewExpandedPermissionTree(type_ OryKetoRelationTuplesV1alpha2NodeType) *ExpandedPermissionTree { this := ExpandedPermissionTree{} this.Type = type_ return &this @@ -39,6 +39,8 @@ func NewExpandedPermissionTree(type_ string) *ExpandedPermissionTree { // but it doesn't guarantee that properties required by API are set func NewExpandedPermissionTreeWithDefaults() *ExpandedPermissionTree { this := ExpandedPermissionTree{} + var type_ OryKetoRelationTuplesV1alpha2NodeType = ORYKETORELATIONTUPLESV1ALPHA2NODETYPE_UNSPECIFIED + this.Type = type_ return &this } @@ -74,6 +76,38 @@ func (o *ExpandedPermissionTree) SetChildren(v []ExpandedPermissionTree) { o.Children = v } +// GetSubject returns the Subject field value if set, zero value otherwise. +func (o *ExpandedPermissionTree) GetSubject() OryKetoRelationTuplesV1alpha2Subject { + if o == nil || o.Subject == nil { + var ret OryKetoRelationTuplesV1alpha2Subject + return ret + } + return *o.Subject +} + +// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ExpandedPermissionTree) GetSubjectOk() (*OryKetoRelationTuplesV1alpha2Subject, bool) { + if o == nil || o.Subject == nil { + return nil, false + } + return o.Subject, true +} + +// HasSubject returns a boolean if a field has been set. +func (o *ExpandedPermissionTree) HasSubject() bool { + if o != nil && o.Subject != nil { + return true + } + + return false +} + +// SetSubject gets a reference to the given OryKetoRelationTuplesV1alpha2Subject and assigns it to the Subject field. +func (o *ExpandedPermissionTree) SetSubject(v OryKetoRelationTuplesV1alpha2Subject) { + o.Subject = &v +} + // GetTuple returns the Tuple field value if set, zero value otherwise. func (o *ExpandedPermissionTree) GetTuple() Relationship { if o == nil || o.Tuple == nil { @@ -107,9 +141,9 @@ func (o *ExpandedPermissionTree) SetTuple(v Relationship) { } // GetType returns the Type field value -func (o *ExpandedPermissionTree) GetType() string { +func (o *ExpandedPermissionTree) GetType() OryKetoRelationTuplesV1alpha2NodeType { if o == nil { - var ret string + var ret OryKetoRelationTuplesV1alpha2NodeType return ret } @@ -118,7 +152,7 @@ func (o *ExpandedPermissionTree) GetType() string { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. -func (o *ExpandedPermissionTree) GetTypeOk() (*string, bool) { +func (o *ExpandedPermissionTree) GetTypeOk() (*OryKetoRelationTuplesV1alpha2NodeType, bool) { if o == nil { return nil, false } @@ -126,7 +160,7 @@ func (o *ExpandedPermissionTree) GetTypeOk() (*string, bool) { } // SetType sets field value -func (o *ExpandedPermissionTree) SetType(v string) { +func (o *ExpandedPermissionTree) SetType(v OryKetoRelationTuplesV1alpha2NodeType) { o.Type = v } @@ -135,6 +169,9 @@ func (o ExpandedPermissionTree) MarshalJSON() ([]byte, error) { if o.Children != nil { toSerialize["children"] = o.Children } + if o.Subject != nil { + toSerialize["subject"] = o.Subject + } if o.Tuple != nil { toSerialize["tuple"] = o.Tuple } diff --git a/internal/httpclient/model_health_not_ready_status.go b/internal/httpclient/model_health_not_ready_status.go deleted file mode 100644 index 0ecefbd16..000000000 --- a/internal/httpclient/model_health_not_ready_status.go +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Ory Keto API - * - * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. - * - * API version: 1.0.0 - * Contact: hi@ory.sh - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// HealthNotReadyStatus struct for HealthNotReadyStatus -type HealthNotReadyStatus struct { - // Errors contains a list of errors that caused the not ready status. - Errors *map[string]string `json:"errors,omitempty"` -} - -// NewHealthNotReadyStatus instantiates a new HealthNotReadyStatus object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHealthNotReadyStatus() *HealthNotReadyStatus { - this := HealthNotReadyStatus{} - return &this -} - -// NewHealthNotReadyStatusWithDefaults instantiates a new HealthNotReadyStatus object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHealthNotReadyStatusWithDefaults() *HealthNotReadyStatus { - this := HealthNotReadyStatus{} - return &this -} - -// GetErrors returns the Errors field value if set, zero value otherwise. -func (o *HealthNotReadyStatus) GetErrors() map[string]string { - if o == nil || o.Errors == nil { - var ret map[string]string - return ret - } - return *o.Errors -} - -// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HealthNotReadyStatus) GetErrorsOk() (*map[string]string, bool) { - if o == nil || o.Errors == nil { - return nil, false - } - return o.Errors, true -} - -// HasErrors returns a boolean if a field has been set. -func (o *HealthNotReadyStatus) HasErrors() bool { - if o != nil && o.Errors != nil { - return true - } - - return false -} - -// SetErrors gets a reference to the given map[string]string and assigns it to the Errors field. -func (o *HealthNotReadyStatus) SetErrors(v map[string]string) { - o.Errors = &v -} - -func (o HealthNotReadyStatus) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Errors != nil { - toSerialize["errors"] = o.Errors - } - return json.Marshal(toSerialize) -} - -type NullableHealthNotReadyStatus struct { - value *HealthNotReadyStatus - isSet bool -} - -func (v NullableHealthNotReadyStatus) Get() *HealthNotReadyStatus { - return v.value -} - -func (v *NullableHealthNotReadyStatus) Set(val *HealthNotReadyStatus) { - v.value = val - v.isSet = true -} - -func (v NullableHealthNotReadyStatus) IsSet() bool { - return v.isSet -} - -func (v *NullableHealthNotReadyStatus) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHealthNotReadyStatus(val *HealthNotReadyStatus) *NullableHealthNotReadyStatus { - return &NullableHealthNotReadyStatus{value: val, isSet: true} -} - -func (v NullableHealthNotReadyStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHealthNotReadyStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/internal/httpclient/model_health_status.go b/internal/httpclient/model_health_status.go deleted file mode 100644 index 0418134de..000000000 --- a/internal/httpclient/model_health_status.go +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Ory Keto API - * - * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. - * - * API version: 1.0.0 - * Contact: hi@ory.sh - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// HealthStatus struct for HealthStatus -type HealthStatus struct { - // Status always contains \"ok\". - Status *string `json:"status,omitempty"` -} - -// NewHealthStatus instantiates a new HealthStatus object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHealthStatus() *HealthStatus { - this := HealthStatus{} - return &this -} - -// NewHealthStatusWithDefaults instantiates a new HealthStatus object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHealthStatusWithDefaults() *HealthStatus { - this := HealthStatus{} - return &this -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *HealthStatus) GetStatus() string { - if o == nil || o.Status == nil { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HealthStatus) GetStatusOk() (*string, bool) { - if o == nil || o.Status == nil { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *HealthStatus) HasStatus() bool { - if o != nil && o.Status != nil { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *HealthStatus) SetStatus(v string) { - o.Status = &v -} - -func (o HealthStatus) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Status != nil { - toSerialize["status"] = o.Status - } - return json.Marshal(toSerialize) -} - -type NullableHealthStatus struct { - value *HealthStatus - isSet bool -} - -func (v NullableHealthStatus) Get() *HealthStatus { - return v.value -} - -func (v *NullableHealthStatus) Set(val *HealthStatus) { - v.value = val - v.isSet = true -} - -func (v NullableHealthStatus) IsSet() bool { - return v.isSet -} - -func (v *NullableHealthStatus) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHealthStatus(val *HealthStatus) *NullableHealthStatus { - return &NullableHealthStatus{value: val, isSet: true} -} - -func (v NullableHealthStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHealthStatus) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/internal/httpclient/model_namespace.go b/internal/httpclient/model_namespace.go deleted file mode 100644 index f365d2bb6..000000000 --- a/internal/httpclient/model_namespace.go +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Ory Keto API - * - * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. - * - * API version: 1.0.0 - * Contact: hi@ory.sh - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// Namespace struct for Namespace -type Namespace struct { - // Name of the namespace. - Name *string `json:"name,omitempty"` -} - -// NewNamespace instantiates a new Namespace object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewNamespace() *Namespace { - this := Namespace{} - return &this -} - -// NewNamespaceWithDefaults instantiates a new Namespace object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewNamespaceWithDefaults() *Namespace { - this := Namespace{} - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *Namespace) GetName() string { - if o == nil || o.Name == nil { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Namespace) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *Namespace) HasName() bool { - if o != nil && o.Name != nil { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *Namespace) SetName(v string) { - o.Name = &v -} - -func (o Namespace) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Name != nil { - toSerialize["name"] = o.Name - } - return json.Marshal(toSerialize) -} - -type NullableNamespace struct { - value *Namespace - isSet bool -} - -func (v NullableNamespace) Get() *Namespace { - return v.value -} - -func (v *NullableNamespace) Set(val *Namespace) { - v.value = val - v.isSet = true -} - -func (v NullableNamespace) IsSet() bool { - return v.isSet -} - -func (v *NullableNamespace) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableNamespace(val *Namespace) *NullableNamespace { - return &NullableNamespace{value: val, isSet: true} -} - -func (v NullableNamespace) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableNamespace) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/internal/httpclient/model_parse_error.go b/internal/httpclient/model_ory_keto_opl_v1alpha1_parse_error.go similarity index 50% rename from internal/httpclient/model_parse_error.go rename to internal/httpclient/model_ory_keto_opl_v1alpha1_parse_error.go index 8ba4438ea..683ab7856 100644 --- a/internal/httpclient/model_parse_error.go +++ b/internal/httpclient/model_ory_keto_opl_v1alpha1_parse_error.go @@ -15,34 +15,34 @@ import ( "encoding/json" ) -// ParseError struct for ParseError -type ParseError struct { - End *SourcePosition `json:"end,omitempty"` - Message *string `json:"message,omitempty"` - Start *SourcePosition `json:"start,omitempty"` +// OryKetoOplV1alpha1ParseError struct for OryKetoOplV1alpha1ParseError +type OryKetoOplV1alpha1ParseError struct { + End *OryKetoOplV1alpha1SourcePosition `json:"end,omitempty"` + Message *string `json:"message,omitempty"` + Start *OryKetoOplV1alpha1SourcePosition `json:"start,omitempty"` } -// NewParseError instantiates a new ParseError object +// NewOryKetoOplV1alpha1ParseError instantiates a new OryKetoOplV1alpha1ParseError object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewParseError() *ParseError { - this := ParseError{} +func NewOryKetoOplV1alpha1ParseError() *OryKetoOplV1alpha1ParseError { + this := OryKetoOplV1alpha1ParseError{} return &this } -// NewParseErrorWithDefaults instantiates a new ParseError object +// NewOryKetoOplV1alpha1ParseErrorWithDefaults instantiates a new OryKetoOplV1alpha1ParseError object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewParseErrorWithDefaults() *ParseError { - this := ParseError{} +func NewOryKetoOplV1alpha1ParseErrorWithDefaults() *OryKetoOplV1alpha1ParseError { + this := OryKetoOplV1alpha1ParseError{} return &this } // GetEnd returns the End field value if set, zero value otherwise. -func (o *ParseError) GetEnd() SourcePosition { +func (o *OryKetoOplV1alpha1ParseError) GetEnd() OryKetoOplV1alpha1SourcePosition { if o == nil || o.End == nil { - var ret SourcePosition + var ret OryKetoOplV1alpha1SourcePosition return ret } return *o.End @@ -50,7 +50,7 @@ func (o *ParseError) GetEnd() SourcePosition { // GetEndOk returns a tuple with the End field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ParseError) GetEndOk() (*SourcePosition, bool) { +func (o *OryKetoOplV1alpha1ParseError) GetEndOk() (*OryKetoOplV1alpha1SourcePosition, bool) { if o == nil || o.End == nil { return nil, false } @@ -58,7 +58,7 @@ func (o *ParseError) GetEndOk() (*SourcePosition, bool) { } // HasEnd returns a boolean if a field has been set. -func (o *ParseError) HasEnd() bool { +func (o *OryKetoOplV1alpha1ParseError) HasEnd() bool { if o != nil && o.End != nil { return true } @@ -66,13 +66,13 @@ func (o *ParseError) HasEnd() bool { return false } -// SetEnd gets a reference to the given SourcePosition and assigns it to the End field. -func (o *ParseError) SetEnd(v SourcePosition) { +// SetEnd gets a reference to the given OryKetoOplV1alpha1SourcePosition and assigns it to the End field. +func (o *OryKetoOplV1alpha1ParseError) SetEnd(v OryKetoOplV1alpha1SourcePosition) { o.End = &v } // GetMessage returns the Message field value if set, zero value otherwise. -func (o *ParseError) GetMessage() string { +func (o *OryKetoOplV1alpha1ParseError) GetMessage() string { if o == nil || o.Message == nil { var ret string return ret @@ -82,7 +82,7 @@ func (o *ParseError) GetMessage() string { // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ParseError) GetMessageOk() (*string, bool) { +func (o *OryKetoOplV1alpha1ParseError) GetMessageOk() (*string, bool) { if o == nil || o.Message == nil { return nil, false } @@ -90,7 +90,7 @@ func (o *ParseError) GetMessageOk() (*string, bool) { } // HasMessage returns a boolean if a field has been set. -func (o *ParseError) HasMessage() bool { +func (o *OryKetoOplV1alpha1ParseError) HasMessage() bool { if o != nil && o.Message != nil { return true } @@ -99,14 +99,14 @@ func (o *ParseError) HasMessage() bool { } // SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *ParseError) SetMessage(v string) { +func (o *OryKetoOplV1alpha1ParseError) SetMessage(v string) { o.Message = &v } // GetStart returns the Start field value if set, zero value otherwise. -func (o *ParseError) GetStart() SourcePosition { +func (o *OryKetoOplV1alpha1ParseError) GetStart() OryKetoOplV1alpha1SourcePosition { if o == nil || o.Start == nil { - var ret SourcePosition + var ret OryKetoOplV1alpha1SourcePosition return ret } return *o.Start @@ -114,7 +114,7 @@ func (o *ParseError) GetStart() SourcePosition { // GetStartOk returns a tuple with the Start field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ParseError) GetStartOk() (*SourcePosition, bool) { +func (o *OryKetoOplV1alpha1ParseError) GetStartOk() (*OryKetoOplV1alpha1SourcePosition, bool) { if o == nil || o.Start == nil { return nil, false } @@ -122,7 +122,7 @@ func (o *ParseError) GetStartOk() (*SourcePosition, bool) { } // HasStart returns a boolean if a field has been set. -func (o *ParseError) HasStart() bool { +func (o *OryKetoOplV1alpha1ParseError) HasStart() bool { if o != nil && o.Start != nil { return true } @@ -130,12 +130,12 @@ func (o *ParseError) HasStart() bool { return false } -// SetStart gets a reference to the given SourcePosition and assigns it to the Start field. -func (o *ParseError) SetStart(v SourcePosition) { +// SetStart gets a reference to the given OryKetoOplV1alpha1SourcePosition and assigns it to the Start field. +func (o *OryKetoOplV1alpha1ParseError) SetStart(v OryKetoOplV1alpha1SourcePosition) { o.Start = &v } -func (o ParseError) MarshalJSON() ([]byte, error) { +func (o OryKetoOplV1alpha1ParseError) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.End != nil { toSerialize["end"] = o.End @@ -149,38 +149,38 @@ func (o ParseError) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableParseError struct { - value *ParseError +type NullableOryKetoOplV1alpha1ParseError struct { + value *OryKetoOplV1alpha1ParseError isSet bool } -func (v NullableParseError) Get() *ParseError { +func (v NullableOryKetoOplV1alpha1ParseError) Get() *OryKetoOplV1alpha1ParseError { return v.value } -func (v *NullableParseError) Set(val *ParseError) { +func (v *NullableOryKetoOplV1alpha1ParseError) Set(val *OryKetoOplV1alpha1ParseError) { v.value = val v.isSet = true } -func (v NullableParseError) IsSet() bool { +func (v NullableOryKetoOplV1alpha1ParseError) IsSet() bool { return v.isSet } -func (v *NullableParseError) Unset() { +func (v *NullableOryKetoOplV1alpha1ParseError) Unset() { v.value = nil v.isSet = false } -func NewNullableParseError(val *ParseError) *NullableParseError { - return &NullableParseError{value: val, isSet: true} +func NewNullableOryKetoOplV1alpha1ParseError(val *OryKetoOplV1alpha1ParseError) *NullableOryKetoOplV1alpha1ParseError { + return &NullableOryKetoOplV1alpha1ParseError{value: val, isSet: true} } -func (v NullableParseError) MarshalJSON() ([]byte, error) { +func (v NullableOryKetoOplV1alpha1ParseError) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableParseError) UnmarshalJSON(src []byte) error { +func (v *NullableOryKetoOplV1alpha1ParseError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/internal/httpclient/model_source_position.go b/internal/httpclient/model_ory_keto_opl_v1alpha1_source_position.go similarity index 54% rename from internal/httpclient/model_source_position.go rename to internal/httpclient/model_ory_keto_opl_v1alpha1_source_position.go index 0d723e54b..a388254fd 100644 --- a/internal/httpclient/model_source_position.go +++ b/internal/httpclient/model_ory_keto_opl_v1alpha1_source_position.go @@ -15,31 +15,31 @@ import ( "encoding/json" ) -// SourcePosition struct for SourcePosition -type SourcePosition struct { +// OryKetoOplV1alpha1SourcePosition struct for OryKetoOplV1alpha1SourcePosition +type OryKetoOplV1alpha1SourcePosition struct { Line *int64 `json:"Line,omitempty"` Column *int64 `json:"column,omitempty"` } -// NewSourcePosition instantiates a new SourcePosition object +// NewOryKetoOplV1alpha1SourcePosition instantiates a new OryKetoOplV1alpha1SourcePosition object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewSourcePosition() *SourcePosition { - this := SourcePosition{} +func NewOryKetoOplV1alpha1SourcePosition() *OryKetoOplV1alpha1SourcePosition { + this := OryKetoOplV1alpha1SourcePosition{} return &this } -// NewSourcePositionWithDefaults instantiates a new SourcePosition object +// NewOryKetoOplV1alpha1SourcePositionWithDefaults instantiates a new OryKetoOplV1alpha1SourcePosition object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewSourcePositionWithDefaults() *SourcePosition { - this := SourcePosition{} +func NewOryKetoOplV1alpha1SourcePositionWithDefaults() *OryKetoOplV1alpha1SourcePosition { + this := OryKetoOplV1alpha1SourcePosition{} return &this } // GetLine returns the Line field value if set, zero value otherwise. -func (o *SourcePosition) GetLine() int64 { +func (o *OryKetoOplV1alpha1SourcePosition) GetLine() int64 { if o == nil || o.Line == nil { var ret int64 return ret @@ -49,7 +49,7 @@ func (o *SourcePosition) GetLine() int64 { // GetLineOk returns a tuple with the Line field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SourcePosition) GetLineOk() (*int64, bool) { +func (o *OryKetoOplV1alpha1SourcePosition) GetLineOk() (*int64, bool) { if o == nil || o.Line == nil { return nil, false } @@ -57,7 +57,7 @@ func (o *SourcePosition) GetLineOk() (*int64, bool) { } // HasLine returns a boolean if a field has been set. -func (o *SourcePosition) HasLine() bool { +func (o *OryKetoOplV1alpha1SourcePosition) HasLine() bool { if o != nil && o.Line != nil { return true } @@ -66,12 +66,12 @@ func (o *SourcePosition) HasLine() bool { } // SetLine gets a reference to the given int64 and assigns it to the Line field. -func (o *SourcePosition) SetLine(v int64) { +func (o *OryKetoOplV1alpha1SourcePosition) SetLine(v int64) { o.Line = &v } // GetColumn returns the Column field value if set, zero value otherwise. -func (o *SourcePosition) GetColumn() int64 { +func (o *OryKetoOplV1alpha1SourcePosition) GetColumn() int64 { if o == nil || o.Column == nil { var ret int64 return ret @@ -81,7 +81,7 @@ func (o *SourcePosition) GetColumn() int64 { // GetColumnOk returns a tuple with the Column field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *SourcePosition) GetColumnOk() (*int64, bool) { +func (o *OryKetoOplV1alpha1SourcePosition) GetColumnOk() (*int64, bool) { if o == nil || o.Column == nil { return nil, false } @@ -89,7 +89,7 @@ func (o *SourcePosition) GetColumnOk() (*int64, bool) { } // HasColumn returns a boolean if a field has been set. -func (o *SourcePosition) HasColumn() bool { +func (o *OryKetoOplV1alpha1SourcePosition) HasColumn() bool { if o != nil && o.Column != nil { return true } @@ -98,11 +98,11 @@ func (o *SourcePosition) HasColumn() bool { } // SetColumn gets a reference to the given int64 and assigns it to the Column field. -func (o *SourcePosition) SetColumn(v int64) { +func (o *OryKetoOplV1alpha1SourcePosition) SetColumn(v int64) { o.Column = &v } -func (o SourcePosition) MarshalJSON() ([]byte, error) { +func (o OryKetoOplV1alpha1SourcePosition) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Line != nil { toSerialize["Line"] = o.Line @@ -113,38 +113,38 @@ func (o SourcePosition) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableSourcePosition struct { - value *SourcePosition +type NullableOryKetoOplV1alpha1SourcePosition struct { + value *OryKetoOplV1alpha1SourcePosition isSet bool } -func (v NullableSourcePosition) Get() *SourcePosition { +func (v NullableOryKetoOplV1alpha1SourcePosition) Get() *OryKetoOplV1alpha1SourcePosition { return v.value } -func (v *NullableSourcePosition) Set(val *SourcePosition) { +func (v *NullableOryKetoOplV1alpha1SourcePosition) Set(val *OryKetoOplV1alpha1SourcePosition) { v.value = val v.isSet = true } -func (v NullableSourcePosition) IsSet() bool { +func (v NullableOryKetoOplV1alpha1SourcePosition) IsSet() bool { return v.isSet } -func (v *NullableSourcePosition) Unset() { +func (v *NullableOryKetoOplV1alpha1SourcePosition) Unset() { v.value = nil v.isSet = false } -func NewNullableSourcePosition(val *SourcePosition) *NullableSourcePosition { - return &NullableSourcePosition{value: val, isSet: true} +func NewNullableOryKetoOplV1alpha1SourcePosition(val *OryKetoOplV1alpha1SourcePosition) *NullableOryKetoOplV1alpha1SourcePosition { + return &NullableOryKetoOplV1alpha1SourcePosition{value: val, isSet: true} } -func (v NullableSourcePosition) MarshalJSON() ([]byte, error) { +func (v NullableOryKetoOplV1alpha1SourcePosition) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableSourcePosition) UnmarshalJSON(src []byte) error { +func (v *NullableOryKetoOplV1alpha1SourcePosition) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_create_relation_tuple_response.go b/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_create_relation_tuple_response.go new file mode 100644 index 000000000..2d347c709 --- /dev/null +++ b/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_create_relation_tuple_response.go @@ -0,0 +1,114 @@ +/* + * Ory Keto API + * + * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. + * + * API version: 1.0.0 + * Contact: hi@ory.sh + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse The response from creating a new relationship. +type OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse struct { + RelationTuple *Relationship `json:"relationTuple,omitempty"` +} + +// NewOryKetoRelationTuplesV1alpha2CreateRelationTupleResponse instantiates a new OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOryKetoRelationTuplesV1alpha2CreateRelationTupleResponse() *OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse { + this := OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse{} + return &this +} + +// NewOryKetoRelationTuplesV1alpha2CreateRelationTupleResponseWithDefaults instantiates a new OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOryKetoRelationTuplesV1alpha2CreateRelationTupleResponseWithDefaults() *OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse { + this := OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse{} + return &this +} + +// GetRelationTuple returns the RelationTuple field value if set, zero value otherwise. +func (o *OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse) GetRelationTuple() Relationship { + if o == nil || o.RelationTuple == nil { + var ret Relationship + return ret + } + return *o.RelationTuple +} + +// GetRelationTupleOk returns a tuple with the RelationTuple field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse) GetRelationTupleOk() (*Relationship, bool) { + if o == nil || o.RelationTuple == nil { + return nil, false + } + return o.RelationTuple, true +} + +// HasRelationTuple returns a boolean if a field has been set. +func (o *OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse) HasRelationTuple() bool { + if o != nil && o.RelationTuple != nil { + return true + } + + return false +} + +// SetRelationTuple gets a reference to the given Relationship and assigns it to the RelationTuple field. +func (o *OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse) SetRelationTuple(v Relationship) { + o.RelationTuple = &v +} + +func (o OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.RelationTuple != nil { + toSerialize["relationTuple"] = o.RelationTuple + } + return json.Marshal(toSerialize) +} + +type NullableOryKetoRelationTuplesV1alpha2CreateRelationTupleResponse struct { + value *OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse + isSet bool +} + +func (v NullableOryKetoRelationTuplesV1alpha2CreateRelationTupleResponse) Get() *OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse { + return v.value +} + +func (v *NullableOryKetoRelationTuplesV1alpha2CreateRelationTupleResponse) Set(val *OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOryKetoRelationTuplesV1alpha2CreateRelationTupleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOryKetoRelationTuplesV1alpha2CreateRelationTupleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOryKetoRelationTuplesV1alpha2CreateRelationTupleResponse(val *OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse) *NullableOryKetoRelationTuplesV1alpha2CreateRelationTupleResponse { + return &NullableOryKetoRelationTuplesV1alpha2CreateRelationTupleResponse{value: val, isSet: true} +} + +func (v NullableOryKetoRelationTuplesV1alpha2CreateRelationTupleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOryKetoRelationTuplesV1alpha2CreateRelationTupleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/httpclient/model_generic_error.go b/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_error_object.go similarity index 52% rename from internal/httpclient/model_generic_error.go rename to internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_error_object.go index 8f1848243..cc308fca7 100644 --- a/internal/httpclient/model_generic_error.go +++ b/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_error_object.go @@ -15,46 +15,44 @@ import ( "encoding/json" ) -// GenericError struct for GenericError -type GenericError struct { +// OryKetoRelationTuplesV1alpha2ErrorObject struct for OryKetoRelationTuplesV1alpha2ErrorObject +type OryKetoRelationTuplesV1alpha2ErrorObject struct { // The status code Code *int64 `json:"code,omitempty"` - // Debug information This field is often not exposed to protect against leaking sensitive information. - Debug *string `json:"debug,omitempty"` - // Further error details - Details map[string]interface{} `json:"details,omitempty"` - // The error ID Useful when trying to identify various errors in application logic. + // This field is often not exposed to protect against leaking sensitive information + Debug *string `json:"debug,omitempty"` + Details *map[string]string `json:"details,omitempty"` + // Useful when trying to identify various errors in application logic. Id *string `json:"id,omitempty"` - // Error message The error's message. - Message string `json:"message"` + // Response message + Message *string `json:"message,omitempty"` // A human-readable reason for the error Reason *string `json:"reason,omitempty"` - // The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. + // The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. Request *string `json:"request,omitempty"` - // The status description + // The human-readable description of the code. Status *string `json:"status,omitempty"` } -// NewGenericError instantiates a new GenericError object +// NewOryKetoRelationTuplesV1alpha2ErrorObject instantiates a new OryKetoRelationTuplesV1alpha2ErrorObject object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewGenericError(message string) *GenericError { - this := GenericError{} - this.Message = message +func NewOryKetoRelationTuplesV1alpha2ErrorObject() *OryKetoRelationTuplesV1alpha2ErrorObject { + this := OryKetoRelationTuplesV1alpha2ErrorObject{} return &this } -// NewGenericErrorWithDefaults instantiates a new GenericError object +// NewOryKetoRelationTuplesV1alpha2ErrorObjectWithDefaults instantiates a new OryKetoRelationTuplesV1alpha2ErrorObject object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewGenericErrorWithDefaults() *GenericError { - this := GenericError{} +func NewOryKetoRelationTuplesV1alpha2ErrorObjectWithDefaults() *OryKetoRelationTuplesV1alpha2ErrorObject { + this := OryKetoRelationTuplesV1alpha2ErrorObject{} return &this } // GetCode returns the Code field value if set, zero value otherwise. -func (o *GenericError) GetCode() int64 { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetCode() int64 { if o == nil || o.Code == nil { var ret int64 return ret @@ -64,7 +62,7 @@ func (o *GenericError) GetCode() int64 { // GetCodeOk returns a tuple with the Code field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GenericError) GetCodeOk() (*int64, bool) { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetCodeOk() (*int64, bool) { if o == nil || o.Code == nil { return nil, false } @@ -72,7 +70,7 @@ func (o *GenericError) GetCodeOk() (*int64, bool) { } // HasCode returns a boolean if a field has been set. -func (o *GenericError) HasCode() bool { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasCode() bool { if o != nil && o.Code != nil { return true } @@ -81,12 +79,12 @@ func (o *GenericError) HasCode() bool { } // SetCode gets a reference to the given int64 and assigns it to the Code field. -func (o *GenericError) SetCode(v int64) { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetCode(v int64) { o.Code = &v } // GetDebug returns the Debug field value if set, zero value otherwise. -func (o *GenericError) GetDebug() string { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetDebug() string { if o == nil || o.Debug == nil { var ret string return ret @@ -96,7 +94,7 @@ func (o *GenericError) GetDebug() string { // GetDebugOk returns a tuple with the Debug field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GenericError) GetDebugOk() (*string, bool) { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetDebugOk() (*string, bool) { if o == nil || o.Debug == nil { return nil, false } @@ -104,7 +102,7 @@ func (o *GenericError) GetDebugOk() (*string, bool) { } // HasDebug returns a boolean if a field has been set. -func (o *GenericError) HasDebug() bool { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasDebug() bool { if o != nil && o.Debug != nil { return true } @@ -113,22 +111,22 @@ func (o *GenericError) HasDebug() bool { } // SetDebug gets a reference to the given string and assigns it to the Debug field. -func (o *GenericError) SetDebug(v string) { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetDebug(v string) { o.Debug = &v } // GetDetails returns the Details field value if set, zero value otherwise. -func (o *GenericError) GetDetails() map[string]interface{} { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetDetails() map[string]string { if o == nil || o.Details == nil { - var ret map[string]interface{} + var ret map[string]string return ret } - return o.Details + return *o.Details } // GetDetailsOk returns a tuple with the Details field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GenericError) GetDetailsOk() (map[string]interface{}, bool) { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetDetailsOk() (*map[string]string, bool) { if o == nil || o.Details == nil { return nil, false } @@ -136,7 +134,7 @@ func (o *GenericError) GetDetailsOk() (map[string]interface{}, bool) { } // HasDetails returns a boolean if a field has been set. -func (o *GenericError) HasDetails() bool { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasDetails() bool { if o != nil && o.Details != nil { return true } @@ -144,13 +142,13 @@ func (o *GenericError) HasDetails() bool { return false } -// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field. -func (o *GenericError) SetDetails(v map[string]interface{}) { - o.Details = v +// SetDetails gets a reference to the given map[string]string and assigns it to the Details field. +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetDetails(v map[string]string) { + o.Details = &v } // GetId returns the Id field value if set, zero value otherwise. -func (o *GenericError) GetId() string { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetId() string { if o == nil || o.Id == nil { var ret string return ret @@ -160,7 +158,7 @@ func (o *GenericError) GetId() string { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GenericError) GetIdOk() (*string, bool) { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetIdOk() (*string, bool) { if o == nil || o.Id == nil { return nil, false } @@ -168,7 +166,7 @@ func (o *GenericError) GetIdOk() (*string, bool) { } // HasId returns a boolean if a field has been set. -func (o *GenericError) HasId() bool { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasId() bool { if o != nil && o.Id != nil { return true } @@ -177,36 +175,44 @@ func (o *GenericError) HasId() bool { } // SetId gets a reference to the given string and assigns it to the Id field. -func (o *GenericError) SetId(v string) { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetId(v string) { o.Id = &v } -// GetMessage returns the Message field value -func (o *GenericError) GetMessage() string { - if o == nil { +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetMessage() string { + if o == nil || o.Message == nil { var ret string return ret } - - return o.Message + return *o.Message } -// GetMessageOk returns a tuple with the Message field value +// GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GenericError) GetMessageOk() (*string, bool) { - if o == nil { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetMessageOk() (*string, bool) { + if o == nil || o.Message == nil { return nil, false } - return &o.Message, true + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasMessage() bool { + if o != nil && o.Message != nil { + return true + } + + return false } -// SetMessage sets field value -func (o *GenericError) SetMessage(v string) { - o.Message = v +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetMessage(v string) { + o.Message = &v } // GetReason returns the Reason field value if set, zero value otherwise. -func (o *GenericError) GetReason() string { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetReason() string { if o == nil || o.Reason == nil { var ret string return ret @@ -216,7 +222,7 @@ func (o *GenericError) GetReason() string { // GetReasonOk returns a tuple with the Reason field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GenericError) GetReasonOk() (*string, bool) { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetReasonOk() (*string, bool) { if o == nil || o.Reason == nil { return nil, false } @@ -224,7 +230,7 @@ func (o *GenericError) GetReasonOk() (*string, bool) { } // HasReason returns a boolean if a field has been set. -func (o *GenericError) HasReason() bool { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasReason() bool { if o != nil && o.Reason != nil { return true } @@ -233,12 +239,12 @@ func (o *GenericError) HasReason() bool { } // SetReason gets a reference to the given string and assigns it to the Reason field. -func (o *GenericError) SetReason(v string) { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetReason(v string) { o.Reason = &v } // GetRequest returns the Request field value if set, zero value otherwise. -func (o *GenericError) GetRequest() string { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetRequest() string { if o == nil || o.Request == nil { var ret string return ret @@ -248,7 +254,7 @@ func (o *GenericError) GetRequest() string { // GetRequestOk returns a tuple with the Request field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GenericError) GetRequestOk() (*string, bool) { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetRequestOk() (*string, bool) { if o == nil || o.Request == nil { return nil, false } @@ -256,7 +262,7 @@ func (o *GenericError) GetRequestOk() (*string, bool) { } // HasRequest returns a boolean if a field has been set. -func (o *GenericError) HasRequest() bool { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasRequest() bool { if o != nil && o.Request != nil { return true } @@ -265,12 +271,12 @@ func (o *GenericError) HasRequest() bool { } // SetRequest gets a reference to the given string and assigns it to the Request field. -func (o *GenericError) SetRequest(v string) { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetRequest(v string) { o.Request = &v } // GetStatus returns the Status field value if set, zero value otherwise. -func (o *GenericError) GetStatus() string { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetStatus() string { if o == nil || o.Status == nil { var ret string return ret @@ -280,7 +286,7 @@ func (o *GenericError) GetStatus() string { // GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *GenericError) GetStatusOk() (*string, bool) { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetStatusOk() (*string, bool) { if o == nil || o.Status == nil { return nil, false } @@ -288,7 +294,7 @@ func (o *GenericError) GetStatusOk() (*string, bool) { } // HasStatus returns a boolean if a field has been set. -func (o *GenericError) HasStatus() bool { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasStatus() bool { if o != nil && o.Status != nil { return true } @@ -297,11 +303,11 @@ func (o *GenericError) HasStatus() bool { } // SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *GenericError) SetStatus(v string) { +func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetStatus(v string) { o.Status = &v } -func (o GenericError) MarshalJSON() ([]byte, error) { +func (o OryKetoRelationTuplesV1alpha2ErrorObject) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Code != nil { toSerialize["code"] = o.Code @@ -315,7 +321,7 @@ func (o GenericError) MarshalJSON() ([]byte, error) { if o.Id != nil { toSerialize["id"] = o.Id } - if true { + if o.Message != nil { toSerialize["message"] = o.Message } if o.Reason != nil { @@ -330,38 +336,38 @@ func (o GenericError) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableGenericError struct { - value *GenericError +type NullableOryKetoRelationTuplesV1alpha2ErrorObject struct { + value *OryKetoRelationTuplesV1alpha2ErrorObject isSet bool } -func (v NullableGenericError) Get() *GenericError { +func (v NullableOryKetoRelationTuplesV1alpha2ErrorObject) Get() *OryKetoRelationTuplesV1alpha2ErrorObject { return v.value } -func (v *NullableGenericError) Set(val *GenericError) { +func (v *NullableOryKetoRelationTuplesV1alpha2ErrorObject) Set(val *OryKetoRelationTuplesV1alpha2ErrorObject) { v.value = val v.isSet = true } -func (v NullableGenericError) IsSet() bool { +func (v NullableOryKetoRelationTuplesV1alpha2ErrorObject) IsSet() bool { return v.isSet } -func (v *NullableGenericError) Unset() { +func (v *NullableOryKetoRelationTuplesV1alpha2ErrorObject) Unset() { v.value = nil v.isSet = false } -func NewNullableGenericError(val *GenericError) *NullableGenericError { - return &NullableGenericError{value: val, isSet: true} +func NewNullableOryKetoRelationTuplesV1alpha2ErrorObject(val *OryKetoRelationTuplesV1alpha2ErrorObject) *NullableOryKetoRelationTuplesV1alpha2ErrorObject { + return &NullableOryKetoRelationTuplesV1alpha2ErrorObject{value: val, isSet: true} } -func (v NullableGenericError) MarshalJSON() ([]byte, error) { +func (v NullableOryKetoRelationTuplesV1alpha2ErrorObject) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableGenericError) UnmarshalJSON(src []byte) error { +func (v *NullableOryKetoRelationTuplesV1alpha2ErrorObject) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_expand_response.go b/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_expand_response.go new file mode 100644 index 000000000..de24b3f44 --- /dev/null +++ b/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_expand_response.go @@ -0,0 +1,114 @@ +/* + * Ory Keto API + * + * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. + * + * API version: 1.0.0 + * Contact: hi@ory.sh + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// OryKetoRelationTuplesV1alpha2ExpandResponse The response for a ExpandService.Expand RPC. +type OryKetoRelationTuplesV1alpha2ExpandResponse struct { + Tree *ExpandedPermissionTree `json:"tree,omitempty"` +} + +// NewOryKetoRelationTuplesV1alpha2ExpandResponse instantiates a new OryKetoRelationTuplesV1alpha2ExpandResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOryKetoRelationTuplesV1alpha2ExpandResponse() *OryKetoRelationTuplesV1alpha2ExpandResponse { + this := OryKetoRelationTuplesV1alpha2ExpandResponse{} + return &this +} + +// NewOryKetoRelationTuplesV1alpha2ExpandResponseWithDefaults instantiates a new OryKetoRelationTuplesV1alpha2ExpandResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOryKetoRelationTuplesV1alpha2ExpandResponseWithDefaults() *OryKetoRelationTuplesV1alpha2ExpandResponse { + this := OryKetoRelationTuplesV1alpha2ExpandResponse{} + return &this +} + +// GetTree returns the Tree field value if set, zero value otherwise. +func (o *OryKetoRelationTuplesV1alpha2ExpandResponse) GetTree() ExpandedPermissionTree { + if o == nil || o.Tree == nil { + var ret ExpandedPermissionTree + return ret + } + return *o.Tree +} + +// GetTreeOk returns a tuple with the Tree field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OryKetoRelationTuplesV1alpha2ExpandResponse) GetTreeOk() (*ExpandedPermissionTree, bool) { + if o == nil || o.Tree == nil { + return nil, false + } + return o.Tree, true +} + +// HasTree returns a boolean if a field has been set. +func (o *OryKetoRelationTuplesV1alpha2ExpandResponse) HasTree() bool { + if o != nil && o.Tree != nil { + return true + } + + return false +} + +// SetTree gets a reference to the given ExpandedPermissionTree and assigns it to the Tree field. +func (o *OryKetoRelationTuplesV1alpha2ExpandResponse) SetTree(v ExpandedPermissionTree) { + o.Tree = &v +} + +func (o OryKetoRelationTuplesV1alpha2ExpandResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Tree != nil { + toSerialize["tree"] = o.Tree + } + return json.Marshal(toSerialize) +} + +type NullableOryKetoRelationTuplesV1alpha2ExpandResponse struct { + value *OryKetoRelationTuplesV1alpha2ExpandResponse + isSet bool +} + +func (v NullableOryKetoRelationTuplesV1alpha2ExpandResponse) Get() *OryKetoRelationTuplesV1alpha2ExpandResponse { + return v.value +} + +func (v *NullableOryKetoRelationTuplesV1alpha2ExpandResponse) Set(val *OryKetoRelationTuplesV1alpha2ExpandResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOryKetoRelationTuplesV1alpha2ExpandResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOryKetoRelationTuplesV1alpha2ExpandResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOryKetoRelationTuplesV1alpha2ExpandResponse(val *OryKetoRelationTuplesV1alpha2ExpandResponse) *NullableOryKetoRelationTuplesV1alpha2ExpandResponse { + return &NullableOryKetoRelationTuplesV1alpha2ExpandResponse{value: val, isSet: true} +} + +func (v NullableOryKetoRelationTuplesV1alpha2ExpandResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOryKetoRelationTuplesV1alpha2ExpandResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_get_version_response.go b/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_get_version_response.go new file mode 100644 index 000000000..88289d4ed --- /dev/null +++ b/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_get_version_response.go @@ -0,0 +1,115 @@ +/* + * Ory Keto API + * + * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. + * + * API version: 1.0.0 + * Contact: hi@ory.sh + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// OryKetoRelationTuplesV1alpha2GetVersionResponse Response of the VersionService.GetVersion RPC. +type OryKetoRelationTuplesV1alpha2GetVersionResponse struct { + // The version string of the Ory Keto instance. + Version *string `json:"version,omitempty"` +} + +// NewOryKetoRelationTuplesV1alpha2GetVersionResponse instantiates a new OryKetoRelationTuplesV1alpha2GetVersionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOryKetoRelationTuplesV1alpha2GetVersionResponse() *OryKetoRelationTuplesV1alpha2GetVersionResponse { + this := OryKetoRelationTuplesV1alpha2GetVersionResponse{} + return &this +} + +// NewOryKetoRelationTuplesV1alpha2GetVersionResponseWithDefaults instantiates a new OryKetoRelationTuplesV1alpha2GetVersionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOryKetoRelationTuplesV1alpha2GetVersionResponseWithDefaults() *OryKetoRelationTuplesV1alpha2GetVersionResponse { + this := OryKetoRelationTuplesV1alpha2GetVersionResponse{} + return &this +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *OryKetoRelationTuplesV1alpha2GetVersionResponse) GetVersion() string { + if o == nil || o.Version == nil { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OryKetoRelationTuplesV1alpha2GetVersionResponse) GetVersionOk() (*string, bool) { + if o == nil || o.Version == nil { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *OryKetoRelationTuplesV1alpha2GetVersionResponse) HasVersion() bool { + if o != nil && o.Version != nil { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *OryKetoRelationTuplesV1alpha2GetVersionResponse) SetVersion(v string) { + o.Version = &v +} + +func (o OryKetoRelationTuplesV1alpha2GetVersionResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Version != nil { + toSerialize["version"] = o.Version + } + return json.Marshal(toSerialize) +} + +type NullableOryKetoRelationTuplesV1alpha2GetVersionResponse struct { + value *OryKetoRelationTuplesV1alpha2GetVersionResponse + isSet bool +} + +func (v NullableOryKetoRelationTuplesV1alpha2GetVersionResponse) Get() *OryKetoRelationTuplesV1alpha2GetVersionResponse { + return v.value +} + +func (v *NullableOryKetoRelationTuplesV1alpha2GetVersionResponse) Set(val *OryKetoRelationTuplesV1alpha2GetVersionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOryKetoRelationTuplesV1alpha2GetVersionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOryKetoRelationTuplesV1alpha2GetVersionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOryKetoRelationTuplesV1alpha2GetVersionResponse(val *OryKetoRelationTuplesV1alpha2GetVersionResponse) *NullableOryKetoRelationTuplesV1alpha2GetVersionResponse { + return &NullableOryKetoRelationTuplesV1alpha2GetVersionResponse{value: val, isSet: true} +} + +func (v NullableOryKetoRelationTuplesV1alpha2GetVersionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOryKetoRelationTuplesV1alpha2GetVersionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_namespace.go b/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_namespace.go new file mode 100644 index 000000000..e16b70672 --- /dev/null +++ b/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_namespace.go @@ -0,0 +1,114 @@ +/* + * Ory Keto API + * + * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. + * + * API version: 1.0.0 + * Contact: hi@ory.sh + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// OryKetoRelationTuplesV1alpha2Namespace struct for OryKetoRelationTuplesV1alpha2Namespace +type OryKetoRelationTuplesV1alpha2Namespace struct { + Name *string `json:"name,omitempty"` +} + +// NewOryKetoRelationTuplesV1alpha2Namespace instantiates a new OryKetoRelationTuplesV1alpha2Namespace object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOryKetoRelationTuplesV1alpha2Namespace() *OryKetoRelationTuplesV1alpha2Namespace { + this := OryKetoRelationTuplesV1alpha2Namespace{} + return &this +} + +// NewOryKetoRelationTuplesV1alpha2NamespaceWithDefaults instantiates a new OryKetoRelationTuplesV1alpha2Namespace object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOryKetoRelationTuplesV1alpha2NamespaceWithDefaults() *OryKetoRelationTuplesV1alpha2Namespace { + this := OryKetoRelationTuplesV1alpha2Namespace{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *OryKetoRelationTuplesV1alpha2Namespace) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OryKetoRelationTuplesV1alpha2Namespace) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *OryKetoRelationTuplesV1alpha2Namespace) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *OryKetoRelationTuplesV1alpha2Namespace) SetName(v string) { + o.Name = &v +} + +func (o OryKetoRelationTuplesV1alpha2Namespace) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + +type NullableOryKetoRelationTuplesV1alpha2Namespace struct { + value *OryKetoRelationTuplesV1alpha2Namespace + isSet bool +} + +func (v NullableOryKetoRelationTuplesV1alpha2Namespace) Get() *OryKetoRelationTuplesV1alpha2Namespace { + return v.value +} + +func (v *NullableOryKetoRelationTuplesV1alpha2Namespace) Set(val *OryKetoRelationTuplesV1alpha2Namespace) { + v.value = val + v.isSet = true +} + +func (v NullableOryKetoRelationTuplesV1alpha2Namespace) IsSet() bool { + return v.isSet +} + +func (v *NullableOryKetoRelationTuplesV1alpha2Namespace) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOryKetoRelationTuplesV1alpha2Namespace(val *OryKetoRelationTuplesV1alpha2Namespace) *NullableOryKetoRelationTuplesV1alpha2Namespace { + return &NullableOryKetoRelationTuplesV1alpha2Namespace{value: val, isSet: true} +} + +func (v NullableOryKetoRelationTuplesV1alpha2Namespace) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOryKetoRelationTuplesV1alpha2Namespace) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_node_type.go b/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_node_type.go new file mode 100644 index 000000000..5203242e3 --- /dev/null +++ b/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_node_type.go @@ -0,0 +1,90 @@ +/* + * Ory Keto API + * + * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. + * + * API version: 1.0.0 + * Contact: hi@ory.sh + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" + "fmt" +) + +// OryKetoRelationTuplesV1alpha2NodeType the model 'OryKetoRelationTuplesV1alpha2NodeType' +type OryKetoRelationTuplesV1alpha2NodeType string + +// List of ory.keto.relation_tuples.v1alpha2.NodeType +const ( + ORYKETORELATIONTUPLESV1ALPHA2NODETYPE_UNSPECIFIED OryKetoRelationTuplesV1alpha2NodeType = "unspecified" + ORYKETORELATIONTUPLESV1ALPHA2NODETYPE_UNION OryKetoRelationTuplesV1alpha2NodeType = "union" + ORYKETORELATIONTUPLESV1ALPHA2NODETYPE_EXCLUSION OryKetoRelationTuplesV1alpha2NodeType = "exclusion" + ORYKETORELATIONTUPLESV1ALPHA2NODETYPE_INTERSECTION OryKetoRelationTuplesV1alpha2NodeType = "intersection" + ORYKETORELATIONTUPLESV1ALPHA2NODETYPE_LEAF OryKetoRelationTuplesV1alpha2NodeType = "leaf" + ORYKETORELATIONTUPLESV1ALPHA2NODETYPE_TUPLE_TO_SUBJECT_SET OryKetoRelationTuplesV1alpha2NodeType = "tuple_to_subject_set" + ORYKETORELATIONTUPLESV1ALPHA2NODETYPE_COMPUTED_SUBJECT_SET OryKetoRelationTuplesV1alpha2NodeType = "computed_subject_set" + ORYKETORELATIONTUPLESV1ALPHA2NODETYPE_NOT OryKetoRelationTuplesV1alpha2NodeType = "not" +) + +func (v *OryKetoRelationTuplesV1alpha2NodeType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := OryKetoRelationTuplesV1alpha2NodeType(value) + for _, existing := range []OryKetoRelationTuplesV1alpha2NodeType{"unspecified", "union", "exclusion", "intersection", "leaf", "tuple_to_subject_set", "computed_subject_set", "not"} { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid OryKetoRelationTuplesV1alpha2NodeType", value) +} + +// Ptr returns reference to ory.keto.relation_tuples.v1alpha2.NodeType value +func (v OryKetoRelationTuplesV1alpha2NodeType) Ptr() *OryKetoRelationTuplesV1alpha2NodeType { + return &v +} + +type NullableOryKetoRelationTuplesV1alpha2NodeType struct { + value *OryKetoRelationTuplesV1alpha2NodeType + isSet bool +} + +func (v NullableOryKetoRelationTuplesV1alpha2NodeType) Get() *OryKetoRelationTuplesV1alpha2NodeType { + return v.value +} + +func (v *NullableOryKetoRelationTuplesV1alpha2NodeType) Set(val *OryKetoRelationTuplesV1alpha2NodeType) { + v.value = val + v.isSet = true +} + +func (v NullableOryKetoRelationTuplesV1alpha2NodeType) IsSet() bool { + return v.isSet +} + +func (v *NullableOryKetoRelationTuplesV1alpha2NodeType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOryKetoRelationTuplesV1alpha2NodeType(val *OryKetoRelationTuplesV1alpha2NodeType) *NullableOryKetoRelationTuplesV1alpha2NodeType { + return &NullableOryKetoRelationTuplesV1alpha2NodeType{value: val, isSet: true} +} + +func (v NullableOryKetoRelationTuplesV1alpha2NodeType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOryKetoRelationTuplesV1alpha2NodeType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_subject.go b/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_subject.go new file mode 100644 index 000000000..7a665f9e6 --- /dev/null +++ b/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_subject.go @@ -0,0 +1,151 @@ +/* + * Ory Keto API + * + * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. + * + * API version: 1.0.0 + * Contact: hi@ory.sh + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// OryKetoRelationTuplesV1alpha2Subject Subject is either a concrete subject id or a `SubjectSet` expanding to more Subjects. +type OryKetoRelationTuplesV1alpha2Subject struct { + // A concrete id of the subject. + Id *string `json:"id,omitempty"` + Set *SubjectSet `json:"set,omitempty"` +} + +// NewOryKetoRelationTuplesV1alpha2Subject instantiates a new OryKetoRelationTuplesV1alpha2Subject object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOryKetoRelationTuplesV1alpha2Subject() *OryKetoRelationTuplesV1alpha2Subject { + this := OryKetoRelationTuplesV1alpha2Subject{} + return &this +} + +// NewOryKetoRelationTuplesV1alpha2SubjectWithDefaults instantiates a new OryKetoRelationTuplesV1alpha2Subject object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOryKetoRelationTuplesV1alpha2SubjectWithDefaults() *OryKetoRelationTuplesV1alpha2Subject { + this := OryKetoRelationTuplesV1alpha2Subject{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *OryKetoRelationTuplesV1alpha2Subject) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OryKetoRelationTuplesV1alpha2Subject) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *OryKetoRelationTuplesV1alpha2Subject) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *OryKetoRelationTuplesV1alpha2Subject) SetId(v string) { + o.Id = &v +} + +// GetSet returns the Set field value if set, zero value otherwise. +func (o *OryKetoRelationTuplesV1alpha2Subject) GetSet() SubjectSet { + if o == nil || o.Set == nil { + var ret SubjectSet + return ret + } + return *o.Set +} + +// GetSetOk returns a tuple with the Set field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OryKetoRelationTuplesV1alpha2Subject) GetSetOk() (*SubjectSet, bool) { + if o == nil || o.Set == nil { + return nil, false + } + return o.Set, true +} + +// HasSet returns a boolean if a field has been set. +func (o *OryKetoRelationTuplesV1alpha2Subject) HasSet() bool { + if o != nil && o.Set != nil { + return true + } + + return false +} + +// SetSet gets a reference to the given SubjectSet and assigns it to the Set field. +func (o *OryKetoRelationTuplesV1alpha2Subject) SetSet(v SubjectSet) { + o.Set = &v +} + +func (o OryKetoRelationTuplesV1alpha2Subject) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Id != nil { + toSerialize["id"] = o.Id + } + if o.Set != nil { + toSerialize["set"] = o.Set + } + return json.Marshal(toSerialize) +} + +type NullableOryKetoRelationTuplesV1alpha2Subject struct { + value *OryKetoRelationTuplesV1alpha2Subject + isSet bool +} + +func (v NullableOryKetoRelationTuplesV1alpha2Subject) Get() *OryKetoRelationTuplesV1alpha2Subject { + return v.value +} + +func (v *NullableOryKetoRelationTuplesV1alpha2Subject) Set(val *OryKetoRelationTuplesV1alpha2Subject) { + v.value = val + v.isSet = true +} + +func (v NullableOryKetoRelationTuplesV1alpha2Subject) IsSet() bool { + return v.isSet +} + +func (v *NullableOryKetoRelationTuplesV1alpha2Subject) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOryKetoRelationTuplesV1alpha2Subject(val *OryKetoRelationTuplesV1alpha2Subject) *NullableOryKetoRelationTuplesV1alpha2Subject { + return &NullableOryKetoRelationTuplesV1alpha2Subject{value: val, isSet: true} +} + +func (v NullableOryKetoRelationTuplesV1alpha2Subject) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOryKetoRelationTuplesV1alpha2Subject) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/httpclient/model_post_check_permission_body.go b/internal/httpclient/model_post_check_permission_body.go index 95f75a40e..633847d99 100644 --- a/internal/httpclient/model_post_check_permission_body.go +++ b/internal/httpclient/model_post_check_permission_body.go @@ -15,17 +15,19 @@ import ( "encoding/json" ) -// PostCheckPermissionBody Check Permission using Post Request Body +// PostCheckPermissionBody The request for a CheckService.Check RPC. Checks whether a specific subject is related to an object. type PostCheckPermissionBody struct { - // Namespace to query + // The maximum depth to search for a relation. If the value is less than 1 or greater than the global max-depth then the global max-depth will be used instead. + MaxDepth *int32 `json:"max-depth,omitempty"` + // The namespace to evaluate the check. Note: If you use the expand-API and the check evaluates a RelationTuple specifying a SubjectSet as subject or due to a rewrite rule in a namespace config this check request may involve other namespaces automatically. Namespace *string `json:"namespace,omitempty"` - // Object to query + // The related object in this check. Object *string `json:"object,omitempty"` - // Relation to query + // The relation between the Object and the Subject. Relation *string `json:"relation,omitempty"` - // SubjectID to query Either SubjectSet or SubjectID can be provided. - SubjectId *string `json:"subject_id,omitempty"` - SubjectSet *SubjectSet `json:"subject_set,omitempty"` + // A concrete id of the subject. + SubjectId *string `json:"subject_id,omitempty"` + SubjectSet *SubjectSetQuery `json:"subject_set,omitempty"` } // NewPostCheckPermissionBody instantiates a new PostCheckPermissionBody object @@ -45,6 +47,38 @@ func NewPostCheckPermissionBodyWithDefaults() *PostCheckPermissionBody { return &this } +// GetMaxDepth returns the MaxDepth field value if set, zero value otherwise. +func (o *PostCheckPermissionBody) GetMaxDepth() int32 { + if o == nil || o.MaxDepth == nil { + var ret int32 + return ret + } + return *o.MaxDepth +} + +// GetMaxDepthOk returns a tuple with the MaxDepth field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PostCheckPermissionBody) GetMaxDepthOk() (*int32, bool) { + if o == nil || o.MaxDepth == nil { + return nil, false + } + return o.MaxDepth, true +} + +// HasMaxDepth returns a boolean if a field has been set. +func (o *PostCheckPermissionBody) HasMaxDepth() bool { + if o != nil && o.MaxDepth != nil { + return true + } + + return false +} + +// SetMaxDepth gets a reference to the given int32 and assigns it to the MaxDepth field. +func (o *PostCheckPermissionBody) SetMaxDepth(v int32) { + o.MaxDepth = &v +} + // GetNamespace returns the Namespace field value if set, zero value otherwise. func (o *PostCheckPermissionBody) GetNamespace() string { if o == nil || o.Namespace == nil { @@ -174,9 +208,9 @@ func (o *PostCheckPermissionBody) SetSubjectId(v string) { } // GetSubjectSet returns the SubjectSet field value if set, zero value otherwise. -func (o *PostCheckPermissionBody) GetSubjectSet() SubjectSet { +func (o *PostCheckPermissionBody) GetSubjectSet() SubjectSetQuery { if o == nil || o.SubjectSet == nil { - var ret SubjectSet + var ret SubjectSetQuery return ret } return *o.SubjectSet @@ -184,7 +218,7 @@ func (o *PostCheckPermissionBody) GetSubjectSet() SubjectSet { // GetSubjectSetOk returns a tuple with the SubjectSet field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PostCheckPermissionBody) GetSubjectSetOk() (*SubjectSet, bool) { +func (o *PostCheckPermissionBody) GetSubjectSetOk() (*SubjectSetQuery, bool) { if o == nil || o.SubjectSet == nil { return nil, false } @@ -200,13 +234,16 @@ func (o *PostCheckPermissionBody) HasSubjectSet() bool { return false } -// SetSubjectSet gets a reference to the given SubjectSet and assigns it to the SubjectSet field. -func (o *PostCheckPermissionBody) SetSubjectSet(v SubjectSet) { +// SetSubjectSet gets a reference to the given SubjectSetQuery and assigns it to the SubjectSet field. +func (o *PostCheckPermissionBody) SetSubjectSet(v SubjectSetQuery) { o.SubjectSet = &v } func (o PostCheckPermissionBody) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} + if o.MaxDepth != nil { + toSerialize["max-depth"] = o.MaxDepth + } if o.Namespace != nil { toSerialize["namespace"] = o.Namespace } diff --git a/internal/httpclient/model_post_check_permission_or_error_body.go b/internal/httpclient/model_post_check_permission_or_error_body.go deleted file mode 100644 index 4db64e541..000000000 --- a/internal/httpclient/model_post_check_permission_or_error_body.go +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Ory Keto API - * - * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. - * - * API version: 1.0.0 - * Contact: hi@ory.sh - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// PostCheckPermissionOrErrorBody Post Check Permission Or Error Body -type PostCheckPermissionOrErrorBody struct { - // Namespace to query - Namespace *string `json:"namespace,omitempty"` - // Object to query - Object *string `json:"object,omitempty"` - // Relation to query - Relation *string `json:"relation,omitempty"` - // SubjectID to query Either SubjectSet or SubjectID can be provided. - SubjectId *string `json:"subject_id,omitempty"` - SubjectSet *SubjectSet `json:"subject_set,omitempty"` -} - -// NewPostCheckPermissionOrErrorBody instantiates a new PostCheckPermissionOrErrorBody object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPostCheckPermissionOrErrorBody() *PostCheckPermissionOrErrorBody { - this := PostCheckPermissionOrErrorBody{} - return &this -} - -// NewPostCheckPermissionOrErrorBodyWithDefaults instantiates a new PostCheckPermissionOrErrorBody object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPostCheckPermissionOrErrorBodyWithDefaults() *PostCheckPermissionOrErrorBody { - this := PostCheckPermissionOrErrorBody{} - return &this -} - -// GetNamespace returns the Namespace field value if set, zero value otherwise. -func (o *PostCheckPermissionOrErrorBody) GetNamespace() string { - if o == nil || o.Namespace == nil { - var ret string - return ret - } - return *o.Namespace -} - -// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PostCheckPermissionOrErrorBody) GetNamespaceOk() (*string, bool) { - if o == nil || o.Namespace == nil { - return nil, false - } - return o.Namespace, true -} - -// HasNamespace returns a boolean if a field has been set. -func (o *PostCheckPermissionOrErrorBody) HasNamespace() bool { - if o != nil && o.Namespace != nil { - return true - } - - return false -} - -// SetNamespace gets a reference to the given string and assigns it to the Namespace field. -func (o *PostCheckPermissionOrErrorBody) SetNamespace(v string) { - o.Namespace = &v -} - -// GetObject returns the Object field value if set, zero value otherwise. -func (o *PostCheckPermissionOrErrorBody) GetObject() string { - if o == nil || o.Object == nil { - var ret string - return ret - } - return *o.Object -} - -// GetObjectOk returns a tuple with the Object field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PostCheckPermissionOrErrorBody) GetObjectOk() (*string, bool) { - if o == nil || o.Object == nil { - return nil, false - } - return o.Object, true -} - -// HasObject returns a boolean if a field has been set. -func (o *PostCheckPermissionOrErrorBody) HasObject() bool { - if o != nil && o.Object != nil { - return true - } - - return false -} - -// SetObject gets a reference to the given string and assigns it to the Object field. -func (o *PostCheckPermissionOrErrorBody) SetObject(v string) { - o.Object = &v -} - -// GetRelation returns the Relation field value if set, zero value otherwise. -func (o *PostCheckPermissionOrErrorBody) GetRelation() string { - if o == nil || o.Relation == nil { - var ret string - return ret - } - return *o.Relation -} - -// GetRelationOk returns a tuple with the Relation field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PostCheckPermissionOrErrorBody) GetRelationOk() (*string, bool) { - if o == nil || o.Relation == nil { - return nil, false - } - return o.Relation, true -} - -// HasRelation returns a boolean if a field has been set. -func (o *PostCheckPermissionOrErrorBody) HasRelation() bool { - if o != nil && o.Relation != nil { - return true - } - - return false -} - -// SetRelation gets a reference to the given string and assigns it to the Relation field. -func (o *PostCheckPermissionOrErrorBody) SetRelation(v string) { - o.Relation = &v -} - -// GetSubjectId returns the SubjectId field value if set, zero value otherwise. -func (o *PostCheckPermissionOrErrorBody) GetSubjectId() string { - if o == nil || o.SubjectId == nil { - var ret string - return ret - } - return *o.SubjectId -} - -// GetSubjectIdOk returns a tuple with the SubjectId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PostCheckPermissionOrErrorBody) GetSubjectIdOk() (*string, bool) { - if o == nil || o.SubjectId == nil { - return nil, false - } - return o.SubjectId, true -} - -// HasSubjectId returns a boolean if a field has been set. -func (o *PostCheckPermissionOrErrorBody) HasSubjectId() bool { - if o != nil && o.SubjectId != nil { - return true - } - - return false -} - -// SetSubjectId gets a reference to the given string and assigns it to the SubjectId field. -func (o *PostCheckPermissionOrErrorBody) SetSubjectId(v string) { - o.SubjectId = &v -} - -// GetSubjectSet returns the SubjectSet field value if set, zero value otherwise. -func (o *PostCheckPermissionOrErrorBody) GetSubjectSet() SubjectSet { - if o == nil || o.SubjectSet == nil { - var ret SubjectSet - return ret - } - return *o.SubjectSet -} - -// GetSubjectSetOk returns a tuple with the SubjectSet field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PostCheckPermissionOrErrorBody) GetSubjectSetOk() (*SubjectSet, bool) { - if o == nil || o.SubjectSet == nil { - return nil, false - } - return o.SubjectSet, true -} - -// HasSubjectSet returns a boolean if a field has been set. -func (o *PostCheckPermissionOrErrorBody) HasSubjectSet() bool { - if o != nil && o.SubjectSet != nil { - return true - } - - return false -} - -// SetSubjectSet gets a reference to the given SubjectSet and assigns it to the SubjectSet field. -func (o *PostCheckPermissionOrErrorBody) SetSubjectSet(v SubjectSet) { - o.SubjectSet = &v -} - -func (o PostCheckPermissionOrErrorBody) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Namespace != nil { - toSerialize["namespace"] = o.Namespace - } - if o.Object != nil { - toSerialize["object"] = o.Object - } - if o.Relation != nil { - toSerialize["relation"] = o.Relation - } - if o.SubjectId != nil { - toSerialize["subject_id"] = o.SubjectId - } - if o.SubjectSet != nil { - toSerialize["subject_set"] = o.SubjectSet - } - return json.Marshal(toSerialize) -} - -type NullablePostCheckPermissionOrErrorBody struct { - value *PostCheckPermissionOrErrorBody - isSet bool -} - -func (v NullablePostCheckPermissionOrErrorBody) Get() *PostCheckPermissionOrErrorBody { - return v.value -} - -func (v *NullablePostCheckPermissionOrErrorBody) Set(val *PostCheckPermissionOrErrorBody) { - v.value = val - v.isSet = true -} - -func (v NullablePostCheckPermissionOrErrorBody) IsSet() bool { - return v.isSet -} - -func (v *NullablePostCheckPermissionOrErrorBody) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePostCheckPermissionOrErrorBody(val *PostCheckPermissionOrErrorBody) *NullablePostCheckPermissionOrErrorBody { - return &NullablePostCheckPermissionOrErrorBody{value: val, isSet: true} -} - -func (v NullablePostCheckPermissionOrErrorBody) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePostCheckPermissionOrErrorBody) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/internal/httpclient/model_relation_query.go b/internal/httpclient/model_relation_query.go deleted file mode 100644 index 79c7aa36f..000000000 --- a/internal/httpclient/model_relation_query.go +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Ory Keto API - * - * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. - * - * API version: 1.0.0 - * Contact: hi@ory.sh - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// RelationQuery Relation Query -type RelationQuery struct { - // Namespace to query - Namespace *string `json:"namespace,omitempty"` - // Object to query - Object *string `json:"object,omitempty"` - // Relation to query - Relation *string `json:"relation,omitempty"` - // SubjectID to query Either SubjectSet or SubjectID can be provided. - SubjectId *string `json:"subject_id,omitempty"` - SubjectSet *SubjectSet `json:"subject_set,omitempty"` -} - -// NewRelationQuery instantiates a new RelationQuery object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRelationQuery() *RelationQuery { - this := RelationQuery{} - return &this -} - -// NewRelationQueryWithDefaults instantiates a new RelationQuery object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRelationQueryWithDefaults() *RelationQuery { - this := RelationQuery{} - return &this -} - -// GetNamespace returns the Namespace field value if set, zero value otherwise. -func (o *RelationQuery) GetNamespace() string { - if o == nil || o.Namespace == nil { - var ret string - return ret - } - return *o.Namespace -} - -// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RelationQuery) GetNamespaceOk() (*string, bool) { - if o == nil || o.Namespace == nil { - return nil, false - } - return o.Namespace, true -} - -// HasNamespace returns a boolean if a field has been set. -func (o *RelationQuery) HasNamespace() bool { - if o != nil && o.Namespace != nil { - return true - } - - return false -} - -// SetNamespace gets a reference to the given string and assigns it to the Namespace field. -func (o *RelationQuery) SetNamespace(v string) { - o.Namespace = &v -} - -// GetObject returns the Object field value if set, zero value otherwise. -func (o *RelationQuery) GetObject() string { - if o == nil || o.Object == nil { - var ret string - return ret - } - return *o.Object -} - -// GetObjectOk returns a tuple with the Object field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RelationQuery) GetObjectOk() (*string, bool) { - if o == nil || o.Object == nil { - return nil, false - } - return o.Object, true -} - -// HasObject returns a boolean if a field has been set. -func (o *RelationQuery) HasObject() bool { - if o != nil && o.Object != nil { - return true - } - - return false -} - -// SetObject gets a reference to the given string and assigns it to the Object field. -func (o *RelationQuery) SetObject(v string) { - o.Object = &v -} - -// GetRelation returns the Relation field value if set, zero value otherwise. -func (o *RelationQuery) GetRelation() string { - if o == nil || o.Relation == nil { - var ret string - return ret - } - return *o.Relation -} - -// GetRelationOk returns a tuple with the Relation field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RelationQuery) GetRelationOk() (*string, bool) { - if o == nil || o.Relation == nil { - return nil, false - } - return o.Relation, true -} - -// HasRelation returns a boolean if a field has been set. -func (o *RelationQuery) HasRelation() bool { - if o != nil && o.Relation != nil { - return true - } - - return false -} - -// SetRelation gets a reference to the given string and assigns it to the Relation field. -func (o *RelationQuery) SetRelation(v string) { - o.Relation = &v -} - -// GetSubjectId returns the SubjectId field value if set, zero value otherwise. -func (o *RelationQuery) GetSubjectId() string { - if o == nil || o.SubjectId == nil { - var ret string - return ret - } - return *o.SubjectId -} - -// GetSubjectIdOk returns a tuple with the SubjectId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RelationQuery) GetSubjectIdOk() (*string, bool) { - if o == nil || o.SubjectId == nil { - return nil, false - } - return o.SubjectId, true -} - -// HasSubjectId returns a boolean if a field has been set. -func (o *RelationQuery) HasSubjectId() bool { - if o != nil && o.SubjectId != nil { - return true - } - - return false -} - -// SetSubjectId gets a reference to the given string and assigns it to the SubjectId field. -func (o *RelationQuery) SetSubjectId(v string) { - o.SubjectId = &v -} - -// GetSubjectSet returns the SubjectSet field value if set, zero value otherwise. -func (o *RelationQuery) GetSubjectSet() SubjectSet { - if o == nil || o.SubjectSet == nil { - var ret SubjectSet - return ret - } - return *o.SubjectSet -} - -// GetSubjectSetOk returns a tuple with the SubjectSet field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RelationQuery) GetSubjectSetOk() (*SubjectSet, bool) { - if o == nil || o.SubjectSet == nil { - return nil, false - } - return o.SubjectSet, true -} - -// HasSubjectSet returns a boolean if a field has been set. -func (o *RelationQuery) HasSubjectSet() bool { - if o != nil && o.SubjectSet != nil { - return true - } - - return false -} - -// SetSubjectSet gets a reference to the given SubjectSet and assigns it to the SubjectSet field. -func (o *RelationQuery) SetSubjectSet(v SubjectSet) { - o.SubjectSet = &v -} - -func (o RelationQuery) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Namespace != nil { - toSerialize["namespace"] = o.Namespace - } - if o.Object != nil { - toSerialize["object"] = o.Object - } - if o.Relation != nil { - toSerialize["relation"] = o.Relation - } - if o.SubjectId != nil { - toSerialize["subject_id"] = o.SubjectId - } - if o.SubjectSet != nil { - toSerialize["subject_set"] = o.SubjectSet - } - return json.Marshal(toSerialize) -} - -type NullableRelationQuery struct { - value *RelationQuery - isSet bool -} - -func (v NullableRelationQuery) Get() *RelationQuery { - return v.value -} - -func (v *NullableRelationQuery) Set(val *RelationQuery) { - v.value = val - v.isSet = true -} - -func (v NullableRelationQuery) IsSet() bool { - return v.isSet -} - -func (v *NullableRelationQuery) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRelationQuery(val *RelationQuery) *NullableRelationQuery { - return &NullableRelationQuery{value: val, isSet: true} -} - -func (v NullableRelationQuery) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRelationQuery) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/internal/httpclient/model_relationship.go b/internal/httpclient/model_relationship.go index b34f88696..08672417b 100644 --- a/internal/httpclient/model_relationship.go +++ b/internal/httpclient/model_relationship.go @@ -15,15 +15,15 @@ import ( "encoding/json" ) -// Relationship Relationship +// Relationship RelationTuple defines a relation between an Object and a Subject. type Relationship struct { - // Namespace of the Relation Tuple + // The namespace this relation tuple lives in. Namespace string `json:"namespace"` - // Object of the Relation Tuple + // The object related by this tuple. It is an object in the namespace of the tuple. Object string `json:"object"` - // Relation of the Relation Tuple + // The relation between an Object and a Subject. Relation string `json:"relation"` - // SubjectID of the Relation Tuple Either SubjectSet or SubjectID can be provided. + // A concrete id of the subject. SubjectId *string `json:"subject_id,omitempty"` SubjectSet *SubjectSet `json:"subject_set,omitempty"` } diff --git a/internal/httpclient/model_relationship_patch.go b/internal/httpclient/model_relationship_delta.go similarity index 54% rename from internal/httpclient/model_relationship_patch.go rename to internal/httpclient/model_relationship_delta.go index a4d3db854..2863bf46a 100644 --- a/internal/httpclient/model_relationship_patch.go +++ b/internal/httpclient/model_relationship_delta.go @@ -15,33 +15,37 @@ import ( "encoding/json" ) -// RelationshipPatch Payload for patching a relationship -type RelationshipPatch struct { - Action *string `json:"action,omitempty"` - RelationTuple *Relationship `json:"relation_tuple,omitempty"` +// RelationshipDelta Write-delta for a TransactRelationTuplesRequest. +type RelationshipDelta struct { + Action *RelationshipDeltaAction `json:"action,omitempty"` + RelationTuple *Relationship `json:"relation_tuple,omitempty"` } -// NewRelationshipPatch instantiates a new RelationshipPatch object +// NewRelationshipDelta instantiates a new RelationshipDelta object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewRelationshipPatch() *RelationshipPatch { - this := RelationshipPatch{} +func NewRelationshipDelta() *RelationshipDelta { + this := RelationshipDelta{} + var action RelationshipDeltaAction = RELATIONSHIPDELTAACTION_ACTION_UNSPECIFIED + this.Action = &action return &this } -// NewRelationshipPatchWithDefaults instantiates a new RelationshipPatch object +// NewRelationshipDeltaWithDefaults instantiates a new RelationshipDelta object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewRelationshipPatchWithDefaults() *RelationshipPatch { - this := RelationshipPatch{} +func NewRelationshipDeltaWithDefaults() *RelationshipDelta { + this := RelationshipDelta{} + var action RelationshipDeltaAction = RELATIONSHIPDELTAACTION_ACTION_UNSPECIFIED + this.Action = &action return &this } // GetAction returns the Action field value if set, zero value otherwise. -func (o *RelationshipPatch) GetAction() string { +func (o *RelationshipDelta) GetAction() RelationshipDeltaAction { if o == nil || o.Action == nil { - var ret string + var ret RelationshipDeltaAction return ret } return *o.Action @@ -49,7 +53,7 @@ func (o *RelationshipPatch) GetAction() string { // GetActionOk returns a tuple with the Action field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RelationshipPatch) GetActionOk() (*string, bool) { +func (o *RelationshipDelta) GetActionOk() (*RelationshipDeltaAction, bool) { if o == nil || o.Action == nil { return nil, false } @@ -57,7 +61,7 @@ func (o *RelationshipPatch) GetActionOk() (*string, bool) { } // HasAction returns a boolean if a field has been set. -func (o *RelationshipPatch) HasAction() bool { +func (o *RelationshipDelta) HasAction() bool { if o != nil && o.Action != nil { return true } @@ -65,13 +69,13 @@ func (o *RelationshipPatch) HasAction() bool { return false } -// SetAction gets a reference to the given string and assigns it to the Action field. -func (o *RelationshipPatch) SetAction(v string) { +// SetAction gets a reference to the given RelationshipDeltaAction and assigns it to the Action field. +func (o *RelationshipDelta) SetAction(v RelationshipDeltaAction) { o.Action = &v } // GetRelationTuple returns the RelationTuple field value if set, zero value otherwise. -func (o *RelationshipPatch) GetRelationTuple() Relationship { +func (o *RelationshipDelta) GetRelationTuple() Relationship { if o == nil || o.RelationTuple == nil { var ret Relationship return ret @@ -81,7 +85,7 @@ func (o *RelationshipPatch) GetRelationTuple() Relationship { // GetRelationTupleOk returns a tuple with the RelationTuple field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RelationshipPatch) GetRelationTupleOk() (*Relationship, bool) { +func (o *RelationshipDelta) GetRelationTupleOk() (*Relationship, bool) { if o == nil || o.RelationTuple == nil { return nil, false } @@ -89,7 +93,7 @@ func (o *RelationshipPatch) GetRelationTupleOk() (*Relationship, bool) { } // HasRelationTuple returns a boolean if a field has been set. -func (o *RelationshipPatch) HasRelationTuple() bool { +func (o *RelationshipDelta) HasRelationTuple() bool { if o != nil && o.RelationTuple != nil { return true } @@ -98,11 +102,11 @@ func (o *RelationshipPatch) HasRelationTuple() bool { } // SetRelationTuple gets a reference to the given Relationship and assigns it to the RelationTuple field. -func (o *RelationshipPatch) SetRelationTuple(v Relationship) { +func (o *RelationshipDelta) SetRelationTuple(v Relationship) { o.RelationTuple = &v } -func (o RelationshipPatch) MarshalJSON() ([]byte, error) { +func (o RelationshipDelta) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Action != nil { toSerialize["action"] = o.Action @@ -113,38 +117,38 @@ func (o RelationshipPatch) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableRelationshipPatch struct { - value *RelationshipPatch +type NullableRelationshipDelta struct { + value *RelationshipDelta isSet bool } -func (v NullableRelationshipPatch) Get() *RelationshipPatch { +func (v NullableRelationshipDelta) Get() *RelationshipDelta { return v.value } -func (v *NullableRelationshipPatch) Set(val *RelationshipPatch) { +func (v *NullableRelationshipDelta) Set(val *RelationshipDelta) { v.value = val v.isSet = true } -func (v NullableRelationshipPatch) IsSet() bool { +func (v NullableRelationshipDelta) IsSet() bool { return v.isSet } -func (v *NullableRelationshipPatch) Unset() { +func (v *NullableRelationshipDelta) Unset() { v.value = nil v.isSet = false } -func NewNullableRelationshipPatch(val *RelationshipPatch) *NullableRelationshipPatch { - return &NullableRelationshipPatch{value: val, isSet: true} +func NewNullableRelationshipDelta(val *RelationshipDelta) *NullableRelationshipDelta { + return &NullableRelationshipDelta{value: val, isSet: true} } -func (v NullableRelationshipPatch) MarshalJSON() ([]byte, error) { +func (v NullableRelationshipDelta) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableRelationshipPatch) UnmarshalJSON(src []byte) error { +func (v *NullableRelationshipDelta) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/internal/httpclient/model_relationship_delta_action.go b/internal/httpclient/model_relationship_delta_action.go new file mode 100644 index 000000000..5b80dbf3a --- /dev/null +++ b/internal/httpclient/model_relationship_delta_action.go @@ -0,0 +1,85 @@ +/* + * Ory Keto API + * + * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. + * + * API version: 1.0.0 + * Contact: hi@ory.sh + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" + "fmt" +) + +// RelationshipDeltaAction - ACTION_UNSPECIFIED: Unspecified. The `TransactRelationTuples` RPC ignores this RelationTupleDelta if an action was unspecified. - insert: Insertion of a new RelationTuple. It is ignored if already existing. - delete: Deletion of the RelationTuple. It is ignored if it does not exist. +type RelationshipDeltaAction string + +// List of relationshipDelta.Action +const ( + RELATIONSHIPDELTAACTION_ACTION_UNSPECIFIED RelationshipDeltaAction = "ACTION_UNSPECIFIED" + RELATIONSHIPDELTAACTION_INSERT RelationshipDeltaAction = "insert" + RELATIONSHIPDELTAACTION_DELETE RelationshipDeltaAction = "delete" +) + +func (v *RelationshipDeltaAction) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := RelationshipDeltaAction(value) + for _, existing := range []RelationshipDeltaAction{"ACTION_UNSPECIFIED", "insert", "delete"} { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid RelationshipDeltaAction", value) +} + +// Ptr returns reference to relationshipDelta.Action value +func (v RelationshipDeltaAction) Ptr() *RelationshipDeltaAction { + return &v +} + +type NullableRelationshipDeltaAction struct { + value *RelationshipDeltaAction + isSet bool +} + +func (v NullableRelationshipDeltaAction) Get() *RelationshipDeltaAction { + return v.value +} + +func (v *NullableRelationshipDeltaAction) Set(val *RelationshipDeltaAction) { + v.value = val + v.isSet = true +} + +func (v NullableRelationshipDeltaAction) IsSet() bool { + return v.isSet +} + +func (v *NullableRelationshipDeltaAction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRelationshipDeltaAction(val *RelationshipDeltaAction) *NullableRelationshipDeltaAction { + return &NullableRelationshipDeltaAction{value: val, isSet: true} +} + +func (v NullableRelationshipDeltaAction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRelationshipDeltaAction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/httpclient/model_relationship_namespaces.go b/internal/httpclient/model_relationship_namespaces.go index 762388a09..b92cf2c82 100644 --- a/internal/httpclient/model_relationship_namespaces.go +++ b/internal/httpclient/model_relationship_namespaces.go @@ -15,9 +15,9 @@ import ( "encoding/json" ) -// RelationshipNamespaces Relationship Namespace List +// RelationshipNamespaces struct for RelationshipNamespaces type RelationshipNamespaces struct { - Namespaces []Namespace `json:"namespaces,omitempty"` + Namespaces []OryKetoRelationTuplesV1alpha2Namespace `json:"namespaces,omitempty"` } // NewRelationshipNamespaces instantiates a new RelationshipNamespaces object @@ -38,9 +38,9 @@ func NewRelationshipNamespacesWithDefaults() *RelationshipNamespaces { } // GetNamespaces returns the Namespaces field value if set, zero value otherwise. -func (o *RelationshipNamespaces) GetNamespaces() []Namespace { +func (o *RelationshipNamespaces) GetNamespaces() []OryKetoRelationTuplesV1alpha2Namespace { if o == nil || o.Namespaces == nil { - var ret []Namespace + var ret []OryKetoRelationTuplesV1alpha2Namespace return ret } return o.Namespaces @@ -48,7 +48,7 @@ func (o *RelationshipNamespaces) GetNamespaces() []Namespace { // GetNamespacesOk returns a tuple with the Namespaces field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *RelationshipNamespaces) GetNamespacesOk() ([]Namespace, bool) { +func (o *RelationshipNamespaces) GetNamespacesOk() ([]OryKetoRelationTuplesV1alpha2Namespace, bool) { if o == nil || o.Namespaces == nil { return nil, false } @@ -64,8 +64,8 @@ func (o *RelationshipNamespaces) HasNamespaces() bool { return false } -// SetNamespaces gets a reference to the given []Namespace and assigns it to the Namespaces field. -func (o *RelationshipNamespaces) SetNamespaces(v []Namespace) { +// SetNamespaces gets a reference to the given []OryKetoRelationTuplesV1alpha2Namespace and assigns it to the Namespaces field. +func (o *RelationshipNamespaces) SetNamespaces(v []OryKetoRelationTuplesV1alpha2Namespace) { o.Namespaces = v } diff --git a/internal/httpclient/model_relationships.go b/internal/httpclient/model_relationships.go index bfd972cfc..4b2bc813f 100644 --- a/internal/httpclient/model_relationships.go +++ b/internal/httpclient/model_relationships.go @@ -15,10 +15,11 @@ import ( "encoding/json" ) -// Relationships Paginated Relationship List +// Relationships The response of a ReadService.ListRelationTuples RPC. type Relationships struct { - // The opaque token to provide in a subsequent request to get the next page. It is the empty string iff this is the last page. - NextPageToken *string `json:"next_page_token,omitempty"` + // The token required to get the next page. If this is the last page, the token will be the empty string. + NextPageToken *string `json:"next_page_token,omitempty"` + // The relationships matching the list request. RelationTuples []Relationship `json:"relation_tuples,omitempty"` } diff --git a/internal/httpclient/model_subject_set.go b/internal/httpclient/model_subject_set.go index 734d8740a..8d502760e 100644 --- a/internal/httpclient/model_subject_set.go +++ b/internal/httpclient/model_subject_set.go @@ -15,13 +15,13 @@ import ( "encoding/json" ) -// SubjectSet struct for SubjectSet +// SubjectSet SubjectSet refers to all subjects who have the same `relation` on an `object`. type SubjectSet struct { - // Namespace of the Subject Set + // The namespace of the object and relation referenced in this subject set. Namespace string `json:"namespace"` - // Object of the Subject Set + // The object related by this subject set. Object string `json:"object"` - // Relation of the Subject Set + // The relation between the object and the subjects. Relation string `json:"relation"` } diff --git a/internal/httpclient/model_subject_set_query.go b/internal/httpclient/model_subject_set_query.go new file mode 100644 index 000000000..aaea97ca5 --- /dev/null +++ b/internal/httpclient/model_subject_set_query.go @@ -0,0 +1,189 @@ +/* + * Ory Keto API + * + * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. + * + * API version: 1.0.0 + * Contact: hi@ory.sh + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// SubjectSetQuery SubjectSetQuery refers to all subjects who have the same `relation` on an `object`. +type SubjectSetQuery struct { + // The namespace of the object and relation referenced in this subject set. + Namespace *string `json:"namespace,omitempty"` + // The object related by this subject set. + Object *string `json:"object,omitempty"` + // The relation between the object and the subjects. + Relation *string `json:"relation,omitempty"` +} + +// NewSubjectSetQuery instantiates a new SubjectSetQuery object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSubjectSetQuery() *SubjectSetQuery { + this := SubjectSetQuery{} + return &this +} + +// NewSubjectSetQueryWithDefaults instantiates a new SubjectSetQuery object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSubjectSetQueryWithDefaults() *SubjectSetQuery { + this := SubjectSetQuery{} + return &this +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *SubjectSetQuery) GetNamespace() string { + if o == nil || o.Namespace == nil { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SubjectSetQuery) GetNamespaceOk() (*string, bool) { + if o == nil || o.Namespace == nil { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *SubjectSetQuery) HasNamespace() bool { + if o != nil && o.Namespace != nil { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *SubjectSetQuery) SetNamespace(v string) { + o.Namespace = &v +} + +// GetObject returns the Object field value if set, zero value otherwise. +func (o *SubjectSetQuery) GetObject() string { + if o == nil || o.Object == nil { + var ret string + return ret + } + return *o.Object +} + +// GetObjectOk returns a tuple with the Object field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SubjectSetQuery) GetObjectOk() (*string, bool) { + if o == nil || o.Object == nil { + return nil, false + } + return o.Object, true +} + +// HasObject returns a boolean if a field has been set. +func (o *SubjectSetQuery) HasObject() bool { + if o != nil && o.Object != nil { + return true + } + + return false +} + +// SetObject gets a reference to the given string and assigns it to the Object field. +func (o *SubjectSetQuery) SetObject(v string) { + o.Object = &v +} + +// GetRelation returns the Relation field value if set, zero value otherwise. +func (o *SubjectSetQuery) GetRelation() string { + if o == nil || o.Relation == nil { + var ret string + return ret + } + return *o.Relation +} + +// GetRelationOk returns a tuple with the Relation field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SubjectSetQuery) GetRelationOk() (*string, bool) { + if o == nil || o.Relation == nil { + return nil, false + } + return o.Relation, true +} + +// HasRelation returns a boolean if a field has been set. +func (o *SubjectSetQuery) HasRelation() bool { + if o != nil && o.Relation != nil { + return true + } + + return false +} + +// SetRelation gets a reference to the given string and assigns it to the Relation field. +func (o *SubjectSetQuery) SetRelation(v string) { + o.Relation = &v +} + +func (o SubjectSetQuery) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Namespace != nil { + toSerialize["namespace"] = o.Namespace + } + if o.Object != nil { + toSerialize["object"] = o.Object + } + if o.Relation != nil { + toSerialize["relation"] = o.Relation + } + return json.Marshal(toSerialize) +} + +type NullableSubjectSetQuery struct { + value *SubjectSetQuery + isSet bool +} + +func (v NullableSubjectSetQuery) Get() *SubjectSetQuery { + return v.value +} + +func (v *NullableSubjectSetQuery) Set(val *SubjectSetQuery) { + v.value = val + v.isSet = true +} + +func (v NullableSubjectSetQuery) IsSet() bool { + return v.isSet +} + +func (v *NullableSubjectSetQuery) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSubjectSetQuery(val *SubjectSetQuery) *NullableSubjectSetQuery { + return &NullableSubjectSetQuery{value: val, isSet: true} +} + +func (v NullableSubjectSetQuery) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSubjectSetQuery) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/httpclient/model_version.go b/internal/httpclient/model_version.go deleted file mode 100644 index d26c45cc9..000000000 --- a/internal/httpclient/model_version.go +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Ory Keto API - * - * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. - * - * API version: 1.0.0 - * Contact: hi@ory.sh - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// Version struct for Version -type Version struct { - // Version is the service's version. - Version *string `json:"version,omitempty"` -} - -// NewVersion instantiates a new Version object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewVersion() *Version { - this := Version{} - return &this -} - -// NewVersionWithDefaults instantiates a new Version object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewVersionWithDefaults() *Version { - this := Version{} - return &this -} - -// GetVersion returns the Version field value if set, zero value otherwise. -func (o *Version) GetVersion() string { - if o == nil || o.Version == nil { - var ret string - return ret - } - return *o.Version -} - -// GetVersionOk returns a tuple with the Version field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *Version) GetVersionOk() (*string, bool) { - if o == nil || o.Version == nil { - return nil, false - } - return o.Version, true -} - -// HasVersion returns a boolean if a field has been set. -func (o *Version) HasVersion() bool { - if o != nil && o.Version != nil { - return true - } - - return false -} - -// SetVersion gets a reference to the given string and assigns it to the Version field. -func (o *Version) SetVersion(v string) { - o.Version = &v -} - -func (o Version) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Version != nil { - toSerialize["version"] = o.Version - } - return json.Marshal(toSerialize) -} - -type NullableVersion struct { - value *Version - isSet bool -} - -func (v NullableVersion) Get() *Version { - return v.value -} - -func (v *NullableVersion) Set(val *Version) { - v.value = val - v.isSet = true -} - -func (v NullableVersion) IsSet() bool { - return v.isSet -} - -func (v *NullableVersion) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVersion(val *Version) *NullableVersion { - return &NullableVersion{value: val, isSet: true} -} - -func (v NullableVersion) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVersion) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/internal/relationtuple/transact_server.go b/internal/relationtuple/transact_server.go index 9100db6ef..0398d09c1 100644 --- a/internal/relationtuple/transact_server.go +++ b/internal/relationtuple/transact_server.go @@ -64,6 +64,28 @@ func (h *handler) TransactRelationTuples(ctx context.Context, req *rts.TransactR }, nil } +func (h *handler) CreateRelationTuple(ctx context.Context, request *rts.CreateRelationTupleRequest) (*rts.CreateRelationTupleResponse, error) { + tuple, err := (&ketoapi.RelationTuple{}).FromDataProvider(request.RelationTuple) + if err != nil { + return nil, err + } + + if err := tuple.Validate(); err != nil { + return nil, err + } + + mapped, err := h.d.Mapper().FromTuple(ctx, tuple) + if err != nil { + return nil, err + } + + if err := h.d.RelationTupleManager().WriteRelationTuples(ctx, mapped...); err != nil { + return nil, err + } + + return &rts.CreateRelationTupleResponse{RelationTuple: tuple.ToProto()}, nil +} + func (h *handler) DeleteRelationTuples(ctx context.Context, req *rts.DeleteRelationTuplesRequest) (*rts.DeleteRelationTuplesResponse, error) { var q ketoapi.RelationQuery diff --git a/internal/schema/handler.go b/internal/schema/handler.go index bc155b03c..b60f41724 100644 --- a/internal/schema/handler.go +++ b/internal/schema/handler.go @@ -48,7 +48,7 @@ func (h *Handler) Check(_ context.Context, request *opl.CheckRequest) (*opl.Chec for i, e := range parseErrors { apiErrors[i] = e.ToProto() } - return &opl.CheckResponse{ParseErrors: apiErrors}, nil + return &opl.CheckResponse{Errors: apiErrors}, nil } // Check OPL Syntax Request Parameters diff --git a/ketoapi/enc_proto.go b/ketoapi/enc_proto.go index 97f7f9c38..45653531c 100644 --- a/ketoapi/enc_proto.go +++ b/ketoapi/enc_proto.go @@ -12,11 +12,20 @@ import ( type ( TupleData interface { - GetSubject() *rts.Subject GetObject() string GetNamespace() string GetRelation() string } + relationtupleSubjectData interface { + GetSubject() *rts.Subject + } + createRelationSubjectData interface { + GetSubject() interface { + GetSubjectId() string + GetSubjectSet() *rts.SubjectSet + } + } + queryData interface { GetSubject() *rts.Subject GetObject() *string @@ -26,17 +35,34 @@ type ( ) func (r *RelationTuple) FromDataProvider(d TupleData) (*RelationTuple, error) { - switch s := d.GetSubject().GetRef().(type) { - case nil: - return nil, errors.WithStack(ErrNilSubject) - case *rts.Subject_Set: - r.SubjectSet = &SubjectSet{ - Namespace: s.Set.Namespace, - Object: s.Set.Object, - Relation: s.Set.Relation, + if s, ok := d.(relationtupleSubjectData); ok { + switch s := s.GetSubject().GetRef().(type) { + case nil: + return nil, errors.WithStack(ErrNilSubject) + case *rts.Subject_Set: + r.SubjectSet = &SubjectSet{ + Namespace: s.Set.Namespace, + Object: s.Set.Object, + Relation: s.Set.Relation, + } + case *rts.Subject_Id: + r.SubjectID = pointerx.Ptr(s.Id) + default: + return nil, errors.WithStack(ErrNilSubject) + } + } else if s, ok := d.(createRelationSubjectData); ok { + switch s := any(s.GetSubject()).(type) { + case *rts.CreateRelationTupleRequest_Relationship_SubjectId: + r.SubjectID = pointerx.Ptr(s.SubjectId) + case *rts.CreateRelationTupleRequest_Relationship_SubjectSet: + r.SubjectSet = &SubjectSet{ + Namespace: s.SubjectSet.Namespace, + Object: s.SubjectSet.Object, + Relation: s.SubjectSet.Relation, + } + default: + return nil, errors.WithStack(ErrNilSubject) } - case *rts.Subject_Id: - r.SubjectID = pointerx.Ptr(s.Id) } r.Object = d.GetObject() diff --git a/proto/buf.md b/proto/buf.md index 5b3587be4..5ce54bb5f 100644 --- a/proto/buf.md +++ b/proto/buf.md @@ -17,7 +17,9 @@ - [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) - [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) - [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) + - [SubjectQuery](#ory-keto-relation_tuples-v1alpha2-SubjectQuery) - [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) + - [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) - [ory/keto/relation_tuples/v1alpha2/check_service.proto](#ory_keto_relation_tuples_v1alpha2_check_service-proto) - [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) @@ -43,6 +45,10 @@ - [NamespacesService](#ory-keto-relation_tuples-v1alpha2-NamespacesService) +- [ory/keto/relation_tuples/v1alpha2/openapi.proto](#ory_keto_relation_tuples_v1alpha2_openapi-proto) + - [ErrorObject](#ory-keto-relation_tuples-v1alpha2-ErrorObject) + - [ErrorObject.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorObject-DetailsEntry) + - [ErrorResponse](#ory-keto-relation_tuples-v1alpha2-ErrorResponse) - [ory/keto/relation_tuples/v1alpha2/read_service.proto](#ory_keto_relation_tuples_v1alpha2_read_service-proto) - [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) @@ -60,6 +66,9 @@ - [ory/keto/relation_tuples/v1alpha2/write_service.proto](#ory_keto_relation_tuples_v1alpha2_write_service-proto) + - [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) + - [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) + - [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) - [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) - [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) - [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) @@ -71,18 +80,6 @@ - [WriteService](#ory-keto-relation_tuples-v1alpha2-WriteService) -- [ory/keto/v1beta/relation_tuples.proto](#ory_keto_v1beta_relation_tuples-proto) - - [RelationQuery](#ory-keto-v1beta-RelationQuery) - - [RelationTuple](#ory-keto-v1beta-RelationTuple) - - [Subject](#ory-keto-v1beta-Subject) - - [SubjectSet](#ory-keto-v1beta-SubjectSet) -- [ory/keto/v1beta/check_service.proto](#ory_keto_v1beta_check_service-proto) - - - [CheckRequest](#ory-keto-v1beta-CheckRequest) - - [CheckResponse](#ory-keto-v1beta-CheckResponse) - - - [CheckService](#ory-keto-v1beta-CheckService) - - [Scalar Value Types](#scalar-value-types) @@ -103,9 +100,9 @@ ### CheckResponse -| Field | Type | Label | Description | -| ------------ | ----------------------------------------------- | -------- | ----------- | -| parse_errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | | +| Field | Type | Label | Description | +| ------ | ----------------------------------------------- | -------- | ----------- | +| errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | | @@ -174,12 +171,14 @@ Example use cases (namespace is always required): RelationTuple defines a relation between an Object and a Subject. -| Field | Type | Label | Description | -| --------- | ----------------------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------- | -| namespace | [string](#string) | | The namespace this relation tuple lives in. | -| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | | The relation between an Object and a Subject. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | +| Field | Type | Label | Description | +| ----------- | ----------------------------------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------- | +| namespace | [string](#string) | | The namespace this relation tuple lives in. | +| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | The relation between an Object and a Subject. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | +| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | +| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | @@ -193,6 +192,18 @@ Subjects. | id | [string](#string) | | A concrete id of the subject. | | set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + +### SubjectQuery + +SubjectQuery is either a concrete subject id or a `SubjectSet` expanding to more +Subjects. + +| Field | Type | Label | Description | +| ----- | --------------------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | +| id | [string](#string) | | A concrete id of the subject. | +| set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + ### SubjectSet @@ -205,6 +216,19 @@ SubjectSet refers to all subjects who have the same `relation` on an `object`. | object | [string](#string) | | The object related by this subject set. | | relation | [string](#string) | | The relation between the object and the subjects. | + + +### SubjectSetQuery + +SubjectSetQuery refers to all subjects who have the same `relation` on an +`object`. + +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ------------------------------------------------------------------------ | +| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | +| object | [string](#string) | | The object related by this subject set. | +| relation | [string](#string) | | The relation between the object and the subjects. | +

Top

@@ -229,7 +253,11 @@ config this check request may involve other namespaces automatically. | | object relation | [string](#string) | | **Deprecated.** The relation between the Object and the Subject. | | subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The -related subject in this check. | | tuple | +related subject in this check. | | subject_id | [string](#string) | | +**Deprecated.** A concrete id of the subject. | | subject_set | +[SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | +**Deprecated.** A subject set that expands to more Subjects. More information +are available under [concepts](../concepts/subjects.mdx). | | tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | | | latest | [bool](#bool) | | This field is not implemented yet and has no effect. <!-- Set this field to `true` in case your application needs to authorize depending @@ -330,7 +358,11 @@ if no snaptoken had been specified. If not specified the server tries to build the tree on the best snapshot version where it is very likely that ACLs had already been replicated to all -availability zones. --> | +availability zones. --> | | namespace | [string](#string) | | **Deprecated.** +The namespace of the object and relation referenced in this subject set. | | +object | [string](#string) | | **Deprecated.** The object related by this +subject set. | | relation | [string](#string) | | **Deprecated.** The relation +between the object and the subjects. | @@ -361,13 +393,24 @@ This is never set if `node_type` == `NODE_TYPE_LEAF`. | ### NodeType -| Name | Number | Description | -| ---------------------- | ------ | ---------------------------------------------------------------------------------------------------------- | -| NODE_TYPE_UNSPECIFIED | 0 | | -| NODE_TYPE_UNION | 1 | This node expands to a union of all children. | -| NODE_TYPE_EXCLUSION | 2 | Not implemented yet. | -| NODE_TYPE_INTERSECTION | 3 | Not implemented yet. | -| NODE_TYPE_LEAF | 4 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| Name | Number | Description | +| ------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------- | +| unspecified | 0 | | +| NODE_TYPE_UNSPECIFIED | 0 | | +| NODE_TYPE_UNION | 1 | This node expands to a union of all children. | +| union | 1 | | +| NODE_TYPE_EXCLUSION | 2 | Not implemented yet. | +| exclusion | 2 | | +| NODE_TYPE_INTERSECTION | 3 | Not implemented yet. | +| intersection | 3 | | +| NODE_TYPE_LEAF | 4 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| leaf | 4 | | +| NODE_TYPE_TUPLE_TO_SUBJECT_SET | 5 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| tuple_to_subject_set | 5 | | +| NODE_TYPE_COMPUTED_SUBJECT_SET | 6 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| computed_subject_set | 6 | | +| NODE_TYPE_NOT | 7 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| not | 7 | | @@ -422,6 +465,46 @@ This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). | -------------- | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---------------- | | ListNamespaces | [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) | [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) | Lists Namespaces | +Get all namespaces. | + + + +

Top

+ +## ory/keto/relation_tuples/v1alpha2/openapi.proto + + + +### ErrorObject + +| Field | Type | Label | Description | +| ------- | --------------------------------------------------------------------------------------- | -------- | ----------- | +| code | [int32](#int32) | | | +| message | [string](#string) | | | +| debug | [string](#string) | | | +| details | [ErrorObject.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorObject-DetailsEntry) | repeated | | +| id | [string](#string) | | | +| reason | [string](#string) | | | +| request | [string](#string) | | | +| status | [string](#string) | | | + + + +### ErrorObject.DetailsEntry + +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + +### ErrorResponse + +| Field | Type | Label | Description | +| ----- | ------------------------------------------------------------- | ----- | ----------- | +| error | [ErrorObject](#ory-keto-relation_tuples-v1alpha2-ErrorObject) | | | +

Top

@@ -461,7 +544,14 @@ pagination token returned from a previous call to `ListRelationTuples` that indicates where the page should start at. An empty token denotes the first page. All successive pages require the token -from the previous page. | +from the previous page. | | namespace | [string](#string) | | **Deprecated.** +The namespace | | object | [string](#string) | | **Deprecated.** The related +object in this check. | | relation | [string](#string) | | **Deprecated.** The +relation between the Object and the Subject. | | subject_id | [string](#string) +| | A concrete id of the subject. | | subject_set | +[SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A +subject set that expands to more Subjects. More information are available under +[concepts](../concepts/subjects.mdx). | @@ -547,20 +637,63 @@ and [write-APIs](../concepts/api-overview.mdx#write-apis). | ----------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------- | | GetVersion | [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) | [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) | Returns the version of the Ory Keto instance. | +This endpoint returns the service version typically notated using semantic +versioning. + +If the service supports TLS Edge Termination, this endpoint does not require the +X-Forwarded-Proto header to be set. | +

Top

## ory/keto/relation_tuples/v1alpha2/write_service.proto + + +### CreateRelationTupleRequest + +The request to create a new relationship. + +| Field | Type | Label | Description | +| -------------- | --------------------------------------------------------------------------------------------------------------------- | ----- | --------------------------- | +| relation_tuple | [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) | | The relationship to create. | + + + +### CreateRelationTupleRequest.Relationship + +| Field | Type | Label | Description | +| ----------- | ----------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | +| namespace | [string](#string) | | The namespace this relation tuple lives in. | +| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | The relation between an Object and a Subject. | +| subject_id | [string](#string) | | A concrete id of the subject. | +| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + +### CreateRelationTupleResponse + +The response from creating a new relationship. + +| Field | Type | Label | Description | +| -------------- | ----------------------------------------------------------------- | ----- | ------------------------- | +| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The created relationship. | + ### DeleteRelationTuplesRequest -| Field | Type | Label | Description | -| -------------- | --------------------------------------------------------------------------------------------------------- | ----- | --------------- | -| query | [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) | | **Deprecated.** | -| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | +| Field | Type | Label | Description | +| -------------- | --------------------------------------------------------------------------------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------- | +| query | [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) | | **Deprecated.** | +| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | +| namespace | [string](#string) | | **Deprecated.** The namespace this relation tuple lives in. | +| object | [string](#string) | | **Deprecated.** The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | **Deprecated.** The relation between an Object and a Subject. | +| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | +| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | @@ -621,7 +754,9 @@ index. --> | | ------------------ | ------ | ----------------------------------------------------------------------------------------------------------- | | ACTION_UNSPECIFIED | 0 | Unspecified. The `TransactRelationTuples` RPC ignores this RelationTupleDelta if an action was unspecified. | | ACTION_INSERT | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | +| insert | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | | ACTION_DELETE | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | +| delete | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | @@ -635,168 +770,9 @@ This service is part of the | Method Name | Request Type | Response Type | Description | | ---------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | | TransactRelationTuples | [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) | [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) | Writes one or more relationships in a single transaction. | +| CreateRelationTuple | [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) | [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) | Creates a relationship | | DeleteRelationTuples | [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) | [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) | Deletes relationships based on relation query | - - -

Top

- -## ory/keto/v1beta/relation_tuples.proto - - - -### RelationQuery - -The query for listing relation tuples. Clients can specify any optional field to -partially filter for specific relation tuples. - -Example use cases (namespace is always required): - -- object only: display a list of all permissions referring to a specific object -- relation only: get all groups that have members; get all directories that have - content -- object & relation: display all subjects that have a specific permission - relation -- subject & relation: display all groups a subject belongs to; display all - objects a subject has access to -- object & relation & subject: check whether the relation tuple already - exists - -| Field | Type | Label | Description | -| --------- | ----------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| namespace | [string](#string) | optional | The namespace this relation tuple lives in. | -| object | [string](#string) | optional | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | optional | The relation between an Object and a Subject. | -| subject | [Subject](#ory-keto-v1beta-Subject) | optional | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | - - - -### RelationTuple - -RelationTuple defines a relation between an Object and a Subject. - -| Field | Type | Label | Description | -| --------- | ----------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------- | -| namespace | [string](#string) | | The namespace this relation tuple lives in. | -| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | | The relation between an Object and a Subject. | -| subject | [Subject](#ory-keto-v1beta-Subject) | | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | - - - -### Subject - -Subject is either a concrete subject id or a `SubjectSet` expanding to more -Subjects. - -| Field | Type | Label | Description | -| ----- | ----------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | -| id | [string](#string) | | A concrete id of the subject. | -| set | [SubjectSet](#ory-keto-v1beta-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - - - -### SubjectSet - -SubjectSet refers to all subjects who have the same `relation` on an `object`. - -| Field | Type | Label | Description | -| --------- | ----------------- | ----- | ------------------------------------------------------------------------ | -| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | -| object | [string](#string) | | The object related by this subject set. | -| relation | [string](#string) | | The relation between the object and the subjects. | - - - -

Top

- -## ory/keto/v1beta/check_service.proto - - - -### CheckRequest - -The request for a CheckService.Check RPC. Checks whether a specific subject is -related to an object. - -| Field | Type | Label | Description | -| --------- | ----------------- | ----- | ---------------------------------------------------- | -| namespace | [string](#string) | | **Deprecated.** The namespace to evaluate the check. | - -Note: If you use the expand-API and the check evaluates a RelationTuple -specifying a SubjectSet as subject or due to a rewrite rule in a namespace -config this check request may involve other namespaces automatically. | | object -| [string](#string) | | **Deprecated.** The related object in this check. | | -relation | [string](#string) | | **Deprecated.** The relation between the Object -and the Subject. | | subject | [Subject](#ory-keto-v1beta-Subject) | | -**Deprecated.** The related subject in this check. | | tuple | -[RelationTuple](#ory-keto-v1beta-RelationTuple) | | | | latest | [bool](#bool) | -| This field is not implemented yet and has no effect. <!-- Set this field to -`true` in case your application needs to authorize depending on up to date ACLs, -also called a "content-change check". - -If set to `true` the `snaptoken` field is ignored, the check is evaluated at the -latest snapshot (globally consistent) and the response includes a snaptoken for -clients to store along with object contents that can be used for subsequent -checks of the same content version. - -Example use case: - You need to authorize a user to modify/delete some resource -and it is unacceptable that if the permission to do that had just been revoked -some seconds ago so that the change had not yet been fully replicated to all -availability zones. --> | | snaptoken | [string](#string) | | This field is -not implemented yet and has no effect. <!-- Optional. Like reads, a check is -always evaluated at a consistent snapshot no earlier than the given snaptoken. - -Leave this field blank if you want to evaluate the check based on eventually -consistent ACLs, benefiting from very low latency, but possibly slightly stale -results. - -If the specified token is too old and no longer known, the server falls back as -if no snaptoken had been specified. - -If not specified the server tries to evaluate the check on the best snapshot -version where it is very likely that ACLs had already been replicated to all -availability zones. --> | | max_depth | [int32](#int32) | | The maximum depth -to search for a relation. - -If the value is less than 1 or greater than the global max-depth then the global -max-depth will be used instead. | - - - -### CheckResponse - -The response for a CheckService.Check rpc. - -| Field | Type | Label | Description | -| ------- | ------------- | ----- | ---------------------------------------------------------------------- | -| allowed | [bool](#bool) | | Whether the specified subject (id) is related to the requested object. | - -It is false by default if no ACL matches. | | snaptoken | [string](#string) | | -This field is not implemented yet and has no effect. <!-- The last known -snapshot token ONLY specified if the request had not specified a snaptoken, -since this performed a "content-change request" and consistently fetched -the last known snapshot token. - -This field is not set if the request had specified a snaptoken! - -If set, clients should cache and use this token for subsequent requests to have -minimal latency, but allow slightly stale responses (only some milliseconds or -seconds). --> | - - - -### CheckService - -The service that performs authorization checks based on the stored Access -Control Lists. - -This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). - -| Method Name | Request Type | Response Type | Description | -| ----------- | --------------------------------------------- | ----------------------------------------------- | -------------------------------- | -| Check | [CheckRequest](#ory-keto-v1beta-CheckRequest) | [CheckResponse](#ory-keto-v1beta-CheckResponse) | Performs an authorization check. | - ## Scalar Value Types | .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | diff --git a/proto/buf.yaml b/proto/buf.yaml index 97e53a155..49f5d6437 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -5,6 +5,13 @@ build: lint: use: - DEFAULT + except: + # We need to relax the enum lints because we want to maintain compatibility with + # the plain enum values used in the REST API. + - ENUM_NO_ALLOW_ALIAS + - ENUM_VALUE_UPPER_SNAKE_CASE + - ENUM_VALUE_PREFIX + - ENUM_ZERO_VALUE_SUFFIX breaking: use: - FILE diff --git a/proto/openapiv2/gateway.swagger.json b/proto/openapiv2/gateway.swagger.json index 5b8f018c7..02d25f7fa 100644 --- a/proto/openapiv2/gateway.swagger.json +++ b/proto/openapiv2/gateway.swagger.json @@ -1,60 +1,261 @@ { "swagger": "2.0", "info": { - "title": "ory/keto/relation_tuples/v1alpha2/check_service.proto", - "version": "version not set" - }, - "tags": [ - { - "name": "CheckService" - }, - { - "name": "SyntaxService" - }, - { - "name": "ExpandService" - }, - { - "name": "NamespacesService" - }, - { - "name": "ReadService" - }, - { - "name": "VersionService" - }, - { - "name": "WriteService" - }, - { - "name": "CheckService" + "title": "ORY Keto", + "description": "Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.", + "version": "Latest", + "contact": { + "name": "ORY", + "url": "https://www.ory.sh", + "email": "hi@ory.sh" + }, + "license": { + "name": "Apache 2.0", + "url": "https://github.com/ory/keto/blob/master/LICENSE" } - ], + }, + "basePath": "/", + "schemes": ["http", "https"], "consumes": ["application/json"], "produces": ["application/json"], "paths": { - "/relation-tuples/check": { + "/admin/relation-tuples": { + "delete": { + "summary": "Deletes relationships based on relation query", + "operationId": "deleteRelationships", + "responses": { + "204": { + "description": "An empty response.", + "schema": {} + }, + "default": { + "description": "Generic error", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "The namespace this relation tuple lives in.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "object", + "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "relation", + "description": "The relation between an Object and a Subject.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "subject_id", + "description": "A concrete id of the subject.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "subject_set.namespace", + "description": "The namespace of the object and relation\nreferenced in this subject set.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "subject_set.object", + "description": "The object related by this subject set.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "subject_set.relation", + "description": "The relation between the object and the subjects.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": ["relationship"], + "consumes": ["application/x-www-form-urlencoded"] + }, + "put": { + "summary": "Creates a relationship", + "operationId": "createRelationship", + "responses": { + "201": { + "description": "The created relationship.", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" + } + }, + "default": { + "description": "Generic error", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + } + } + }, + "parameters": [ + { + "name": "relationTuple", + "description": "The relationship to create.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship" + } + } + ], + "tags": ["relationship"] + }, + "patch": { + "summary": "Writes one or more relationships in a single transaction.", + "operationId": "patchRelationships", + "responses": { + "204": { + "description": "An empty response.", + "schema": {}, + "examples": { + "application/json": {} + } + }, + "default": { + "description": "Generic error", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + } + } + }, + "parameters": [ + { + "name": "relationTupleDeltas", + "description": "The write delta for the relationships operated in one single transaction.\nEither all actions succeed or no change takes effect on error.", + "in": "body", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta" + } + } + } + ], + "tags": ["relationship"] + } + }, + "/namespaces": { "get": { - "summary": "Performs an authorization check.", - "operationId": "checkPermissionOrError", + "summary": "Lists Namespaces", + "description": "Get all namespaces.", + "operationId": "listRelationshipNamespaces", + "responses": { + "200": { + "description": "The list of namespaces.", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse" + }, + "examples": { + "application/json": { + "namespaces": [ + { + "name": "my namespace" + } + ] + } + } + }, + "default": { + "description": "Generic error", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + } + } + }, + "tags": ["relationship"], + "consumes": ["application/x-www-form-urlencoded"] + } + }, + "/opl/syntax/check": { + "post": { + "summary": "Performs a syntax check request.", + "operationId": "checkOplSyntax", + "responses": { + "200": { + "description": "The result of the syntax checker", + "schema": { + "$ref": "#/definitions/ory.keto.opl.v1alpha1.CheckResponse" + } + }, + "default": { + "description": "Generic error", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + } + } + }, + "parameters": [ + { + "name": "content", + "in": "body", + "required": true, + "schema": { + "type": "string", + "format": "byte" + } + } + ], + "tags": ["relationship"], + "consumes": ["text/plain"] + } + }, + "/relation-tuples": { + "get": { + "summary": "Lists ACL relationships.", + "operationId": "getRelationships", "responses": { "200": { - "description": "A successful response.", + "description": "The list of relationships.", "schema": { - "$ref": "#/definitions/v1alpha2.CheckResponse" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse" } }, "default": { - "description": "An unexpected error response.", + "description": "Generic error", "schema": { - "$ref": "#/definitions/Status" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, "parameters": [ + { + "name": "page_size", + "description": "Optional. The maximum number of\nRelationTuples to return in the response.\n\nDefault: 100", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "page_token", + "description": "Optional. An opaque pagination token returned from\na previous call to `ListRelationTuples` that\nindicates where the page should start at.\n\nAn empty token denotes the first page. All successive\npages require the token from the previous page.", + "in": "query", + "required": false, + "type": "string" + }, { "name": "namespace", - "description": "The namespace to evaluate the check.\n\nNote: If you use the expand-API and the check\nevaluates a RelationTuple specifying a SubjectSet as\nsubject or due to a rewrite rule in a namespace config\nthis check request may involve other namespaces automatically.", + "description": "The namespace", "in": "query", "required": false, "type": "string" @@ -74,92 +275,232 @@ "type": "string" }, { - "name": "subject.id", + "name": "subject_id", "description": "A concrete id of the subject.", "in": "query", "required": false, "type": "string" }, { - "name": "subject.set.namespace", + "name": "subject_set.namespace", "description": "The namespace of the object and relation\nreferenced in this subject set.", "in": "query", "required": false, "type": "string" }, { - "name": "subject.set.object", + "name": "subject_set.object", "description": "The object related by this subject set.", "in": "query", "required": false, "type": "string" }, { - "name": "subject.set.relation", + "name": "subject_set.relation", "description": "The relation between the object and the subjects.", "in": "query", "required": false, "type": "string" + } + ], + "tags": ["relationship"], + "consumes": ["application/x-www-form-urlencoded"] + } + }, + "/relation-tuples/check": { + "get": { + "summary": "Performs an authorization check.", + "operationId": "CheckService_Check", + "responses": { + "200": { + "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + } + }, + "403": { + "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + } }, + "default": { + "description": "Generic error", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + } + } + }, + "parameters": [ { - "name": "tuple.namespace", - "description": "The namespace this relation tuple lives in.", + "name": "namespace", + "description": "The namespace to evaluate the check.\n\nNote: If you use the expand-API and the check\nevaluates a RelationTuple specifying a SubjectSet as\nsubject or due to a rewrite rule in a namespace config\nthis check request may involve other namespaces automatically.", "in": "query", "required": false, "type": "string" }, { - "name": "tuple.object", - "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple.", + "name": "object", + "description": "The related object in this check.", "in": "query", "required": false, "type": "string" }, { - "name": "tuple.relation", - "description": "The relation between an Object and a Subject.", + "name": "relation", + "description": "The relation between the Object and the Subject.", "in": "query", "required": false, "type": "string" }, { - "name": "tuple.subject.id", + "name": "subject_id", "description": "A concrete id of the subject.", "in": "query", "required": false, "type": "string" }, { - "name": "tuple.subject.set.namespace", + "name": "subject_set.namespace", "description": "The namespace of the object and relation\nreferenced in this subject set.", "in": "query", "required": false, "type": "string" }, { - "name": "tuple.subject.set.object", + "name": "subject_set.object", "description": "The object related by this subject set.", "in": "query", "required": false, "type": "string" }, { - "name": "tuple.subject.set.relation", + "name": "subject_set.relation", "description": "The relation between the object and the subjects.", "in": "query", "required": false, "type": "string" }, { - "name": "latest", - "description": "This field is not implemented yet and has no effect.\n\u003c!--\nSet this field to `true` in case your application\nneeds to authorize depending on up to date ACLs,\nalso called a \"content-change check\".\n\nIf set to `true` the `snaptoken` field is ignored,\nthe check is evaluated at the latest snapshot\n(globally consistent) and the response includes a\nsnaptoken for clients to store along with object\ncontents that can be used for subsequent checks\nof the same content version.\n\nExample use case:\n - You need to authorize a user to modify/delete some resource\n and it is unacceptable that if the permission to do that had\n just been revoked some seconds ago so that the change had not\n yet been fully replicated to all availability zones.\n--\u003e", + "name": "max-depth", + "description": "The maximum depth to search for a relation.\n\nIf the value is less than 1 or greater than the global\nmax-depth then the global max-depth will be used instead.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded", "application/json"] + }, + "post": { + "summary": "Performs an authorization check.", + "operationId": "CheckService_Check3", + "responses": { + "200": { + "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + } + }, + "403": { + "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + } + }, + "default": { + "description": "Generic error", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" + } + } + ], + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded", "application/json"] + } + }, + "/relation-tuples/check/openapi": { + "get": { + "summary": "Performs an authorization check.", + "operationId": "CheckService_Check2", + "responses": { + "200": { + "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + } + }, + "403": { + "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + } + }, + "default": { + "description": "Generic error", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "The namespace to evaluate the check.\n\nNote: If you use the expand-API and the check\nevaluates a RelationTuple specifying a SubjectSet as\nsubject or due to a rewrite rule in a namespace config\nthis check request may involve other namespaces automatically.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "object", + "description": "The related object in this check.", "in": "query", "required": false, - "type": "boolean" + "type": "string" }, { - "name": "snaptoken", - "description": "This field is not implemented yet and has no effect.\n\u003c!--\nOptional. Like reads, a check is always evaluated at a\nconsistent snapshot no earlier than the given snaptoken.\n\nLeave this field blank if you want to evaluate the check\nbased on eventually consistent ACLs, benefiting from very\nlow latency, but possibly slightly stale results.\n\nIf the specified token is too old and no longer known,\nthe server falls back as if no snaptoken had been specified.\n\nIf not specified the server tries to evaluate the check\non the best snapshot version where it is very likely that\nACLs had already been replicated to all availability zones.\n--\u003e", + "name": "relation", + "description": "The relation between the Object and the Subject.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "subject_id", + "description": "A concrete id of the subject.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "subject_set.namespace", + "description": "The namespace of the object and relation\nreferenced in this subject set.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "subject_set.object", + "description": "The object related by this subject set.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "subject_set.relation", + "description": "The relation between the object and the subjects.", "in": "query", "required": false, "type": "string" @@ -174,263 +515,374 @@ } ], "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded", "application/json"] + }, + "post": { + "summary": "Performs an authorization check.", + "operationId": "CheckService_Check4", + "responses": { + "200": { + "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + } + }, + "403": { + "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + } + }, + "default": { + "description": "Generic error", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" + } + } + ], + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded", "application/json"] + } + }, + "/relation-tuples/expand": { + "get": { + "summary": "Expands the subject set into a tree of subjects.", + "operationId": "expandPermissions", + "responses": { + "200": { + "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" + } + }, + "default": { + "description": "Generic error", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + } + } + }, + "parameters": [ + { + "name": "max-depth", + "description": "The maximum depth of tree to build.\n\nIf the value is less than 1 or greater than the global\nmax-depth then the global max-depth will be used instead.\n\nIt is important to set this parameter to a meaningful\nvalue. Ponder how deep you really want to display this.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "namespace", + "description": "The namespace of the object and relation\nreferenced in this subject set.", + "in": "query", + "required": true, + "type": "string" + }, + { + "name": "object", + "description": "The object related by this subject set.", + "in": "query", + "required": true, + "type": "string" + }, + { + "name": "relation", + "description": "The relation between the object and the subjects.", + "in": "query", + "required": true, + "type": "string" + } + ], + "tags": ["permission"], "consumes": ["application/x-www-form-urlencoded"] } - } - }, - "definitions": { - "Action": { - "type": "string", - "enum": ["ACTION_UNSPECIFIED", "ACTION_INSERT", "ACTION_DELETE"], - "default": "ACTION_UNSPECIFIED", - "description": " - ACTION_UNSPECIFIED: Unspecified.\nThe `TransactRelationTuples` RPC ignores this\nRelationTupleDelta if an action was unspecified.\n - ACTION_INSERT: Insertion of a new RelationTuple.\nIt is ignored if already existing.\n - ACTION_DELETE: Deletion of the RelationTuple.\nIt is ignored if it does not exist." }, - "Any": { + "/version": { + "get": { + "summary": "Returns the version of the Ory Keto instance.", + "description": "This endpoint returns the service version typically notated using semantic versioning.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\nX-Forwarded-Proto header to be set.", + "operationId": "getVersion", + "responses": { + "200": { + "description": "The version of the instance.", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.GetVersionResponse" + } + }, + "default": { + "description": "Generic error", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + } + } + }, + "tags": ["version"] + } + } + }, + "definitions": { + "ory.keto.opl.v1alpha1.CheckResponse": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/definitions/ory.keto.opl.v1alpha1.ParseError" + } + } + } + }, + "ory.keto.opl.v1alpha1.ParseError": { "type": "object", "properties": { - "@type": { + "message": { "type": "string" + }, + "start": { + "$ref": "#/definitions/ory.keto.opl.v1alpha1.SourcePosition" + }, + "end": { + "$ref": "#/definitions/ory.keto.opl.v1alpha1.SourcePosition" } - }, - "additionalProperties": {} + } + }, + "ory.keto.opl.v1alpha1.SourcePosition": { + "type": "object", + "properties": { + "Line": { + "type": "integer", + "format": "int64" + }, + "column": { + "type": "integer", + "format": "int64" + } + } }, - "DeleteRelationTuplesRequest.Query": { + "ory.keto.relation_tuples.v1alpha2.CheckRequest": { "type": "object", "properties": { "namespace": { "type": "string", - "description": "Optional. The namespace to query." + "description": "The namespace to evaluate the check.\n\nNote: If you use the expand-API and the check\nevaluates a RelationTuple specifying a SubjectSet as\nsubject or due to a rewrite rule in a namespace config\nthis check request may involve other namespaces automatically." }, "object": { "type": "string", - "description": "Optional. The object to query for." + "description": "The related object in this check." }, "relation": { "type": "string", - "description": "Optional. The relation to query for." + "description": "The relation between the Object and the Subject." }, - "subject": { - "$ref": "#/definitions/v1alpha2.Subject", - "description": "Optional. The subject to query for." - } - }, - "title": "The query for deleting relationships" - }, - "DeleteRelationTuplesResponse": { - "type": "object" - }, - "ExpandResponse": { - "type": "object", - "properties": { - "tree": { - "$ref": "#/definitions/SubjectTree", - "description": "The tree the requested subject set expands to.\nThe requested subject set is the subject of the root.\n\nThis field can be nil in some circumstances." - } - }, - "description": "The response for a ExpandService.Expand RPC." - }, - "GetVersionResponse": { - "type": "object", - "properties": { - "version": { + "subject_id": { "type": "string", - "description": "The version string of the Ory Keto instance." + "description": "A concrete id of the subject." + }, + "subject_set": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSetQuery", + "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." + }, + "max-depth": { + "type": "integer", + "format": "int32", + "description": "The maximum depth to search for a relation.\n\nIf the value is less than 1 or greater than the global\nmax-depth then the global max-depth will be used instead." } }, - "description": "Response of the VersionService.GetVersion RPC." + "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object." }, - "ListNamespacesResponse": { + "ory.keto.relation_tuples.v1alpha2.CheckResponse": { "type": "object", "properties": { - "namespaces": { - "type": "array", - "items": { - "$ref": "#/definitions/Namespace" - } + "allowed": { + "type": "boolean", + "description": "Whether the specified subject (id)\nis related to the requested object.\n\nIt is false by default if no ACL matches." } - } + }, + "description": "The response for a CheckService.Check rpc." }, - "ListRelationTuplesRequest.Query": { + "ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship": { "type": "object", "properties": { "namespace": { "type": "string", - "description": "Required. The namespace to query." + "description": "The namespace this relation tuple lives in." }, "object": { "type": "string", - "description": "Optional. The object to query for." + "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple." }, "relation": { "type": "string", - "description": "Optional. The relation to query for." - }, - "subject": { - "$ref": "#/definitions/v1alpha2.Subject", - "description": "Optional. The subject to query for." - } - }, - "description": "The query for listing relationships.\nClients can specify any optional field to\npartially filter for specific relationships.\n\nExample use cases (namespace is always required):\n - object only: display a list of all permissions referring to a specific object\n - relation only: get all groups that have members; get all directories that have content\n - object \u0026 relation: display all subjects that have a specific permission relation\n - subject \u0026 relation: display all groups a subject belongs to; display all objects a subject has access to\n - object \u0026 relation \u0026 subject: check whether the relation tuple already exists" - }, - "ListRelationTuplesResponse": { - "type": "object", - "properties": { - "relationTuples": { - "type": "array", - "items": { - "$ref": "#/definitions/v1alpha2.RelationTuple" - }, - "description": "The relationships matching the list request." + "description": "The relation between an Object and a Subject." }, - "nextPageToken": { + "subject_id": { "type": "string", - "description": "The token required to get the next page.\nIf this is the last page, the token will be the empty string." + "description": "A concrete id of the subject." + }, + "subject_set": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", + "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } - }, - "description": "The response of a ReadService.ListRelationTuples RPC." + } }, - "Namespace": { + "ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse": { "type": "object", "properties": { - "name": { - "type": "string" + "relationTuple": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", + "description": "The created relationship." } - } + }, + "description": "The response from creating a new relationship." }, - "NodeType": { - "type": "string", - "enum": [ - "NODE_TYPE_UNSPECIFIED", - "NODE_TYPE_UNION", - "NODE_TYPE_EXCLUSION", - "NODE_TYPE_INTERSECTION", - "NODE_TYPE_LEAF" - ], - "default": "NODE_TYPE_UNSPECIFIED", - "description": " - NODE_TYPE_UNION: This node expands to a union of all children.\n - NODE_TYPE_EXCLUSION: Not implemented yet.\n - NODE_TYPE_INTERSECTION: Not implemented yet.\n - NODE_TYPE_LEAF: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached." + "ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse": { + "type": "object" }, - "ParseError": { + "ory.keto.relation_tuples.v1alpha2.ErrorObject": { "type": "object", "properties": { + "code": { + "type": "integer", + "format": "int64", + "example": 404, + "description": "The status code", + "title": "code", + "pattern": "^[0-9]$" + }, "message": { - "type": "string" + "type": "string", + "example": "The resource could not be found", + "description": "Response message", + "title": "message" }, - "start": { - "$ref": "#/definitions/SourcePosition" + "debug": { + "type": "string", + "example": "SQL field 'foo' is not a bool", + "description": "This field is often not exposed to protect against leaking\nsensitive information", + "title": "Debug information" }, - "end": { - "$ref": "#/definitions/SourcePosition" + "details": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Further error details" + }, + "id": { + "type": "string", + "description": "Useful when trying to identify various errors in application logic.", + "title": "The error ID" + }, + "reason": { + "type": "string", + "example": "User with ID 1234 does not exist.", + "description": "A human-readable reason for the error", + "title": "The reason for the failure" + }, + "request": { + "type": "string", + "example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6", + "description": "The request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.", + "title": "The request ID" + }, + "status": { + "type": "string", + "example": "Not Found", + "description": "The human-readable description of the code.", + "title": "The status description" } } }, - "RelationTupleDelta": { + "ory.keto.relation_tuples.v1alpha2.ErrorResponse": { "type": "object", "properties": { - "action": { - "$ref": "#/definitions/Action", - "description": "The action to do on the RelationTuple." - }, - "relationTuple": { - "$ref": "#/definitions/v1alpha2.RelationTuple", - "description": "The target RelationTuple." + "error": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorObject" } - }, - "description": "Write-delta for a TransactRelationTuplesRequest." + } }, - "SourcePosition": { + "ory.keto.relation_tuples.v1alpha2.ExpandResponse": { "type": "object", "properties": { - "line": { - "type": "integer", - "format": "int64" - }, - "column": { - "type": "integer", - "format": "int64" + "tree": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree", + "description": "The tree the requested subject set expands to.\nThe requested subject set is the subject of the root.\n\nThis field can be nil in some circumstances." } - } + }, + "description": "The response for a ExpandService.Expand RPC." }, - "Status": { + "ory.keto.relation_tuples.v1alpha2.GetVersionResponse": { "type": "object", "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/Any" - } + "version": { + "type": "string", + "description": "The version string of the Ory Keto instance." } - } + }, + "description": "Response of the VersionService.GetVersion RPC." }, - "SubjectTree": { + "ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse": { "type": "object", "properties": { - "nodeType": { - "$ref": "#/definitions/NodeType", - "description": "The type of the node." - }, - "subject": { - "$ref": "#/definitions/v1alpha2.Subject", - "description": "The subject this node represents.\nDeprecated: More information is now available in the tuple field." - }, - "tuple": { - "$ref": "#/definitions/v1alpha2.RelationTuple", - "description": "The relation tuple this node represents." - }, - "children": { + "namespaces": { "type": "array", "items": { - "$ref": "#/definitions/SubjectTree" - }, - "description": "The children of this node.\n\nThis is never set if `node_type` == `NODE_TYPE_LEAF`." + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.Namespace" + } } } }, - "TransactRelationTuplesResponse": { + "ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse": { "type": "object", "properties": { - "snaptokens": { + "relation_tuples": { "type": "array", "items": { - "type": "string" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" }, - "description": "This field is not implemented yet and has no effect.\n\u003c!--\nThe list of the new latest snapshot tokens of the affected RelationTuple,\nwith the same index as specified in the `relation_tuple_deltas` field of\nthe TransactRelationTuplesRequest request.\n\nIf the RelationTupleDelta_Action was DELETE\nthe snaptoken is empty at the same index.\n--\u003e" + "description": "The relationships matching the list request." + }, + "next_page_token": { + "type": "string", + "description": "The token required to get the next page.\nIf this is the last page, the token will be the empty string." } }, - "description": "The response of a WriteService.TransactRelationTuples rpc." + "description": "The response of a ReadService.ListRelationTuples RPC." }, - "v1alpha1.CheckResponse": { + "ory.keto.relation_tuples.v1alpha2.Namespace": { "type": "object", "properties": { - "parseErrors": { - "type": "array", - "items": { - "$ref": "#/definitions/ParseError" - } + "name": { + "type": "string" } } }, - "v1alpha2.CheckResponse": { - "type": "object", - "properties": { - "allowed": { - "type": "boolean", - "description": "Whether the specified subject (id)\nis related to the requested object.\n\nIt is false by default if no ACL matches." - }, - "snaptoken": { - "type": "string", - "description": "This field is not implemented yet and has no effect.\n\u003c!--\nThe last known snapshot token ONLY specified if\nthe request had not specified a snaptoken,\nsince this performed a \"content-change request\"\nand consistently fetched the last known snapshot token.\n\nThis field is not set if the request had specified a snaptoken!\n\nIf set, clients should cache and use this token\nfor subsequent requests to have minimal latency,\nbut allow slightly stale responses (only some milliseconds or seconds).\n--\u003e" - } - }, - "description": "The response for a CheckService.Check rpc." + "ory.keto.relation_tuples.v1alpha2.NodeType": { + "type": "string", + "enum": [ + "unspecified", + "union", + "exclusion", + "intersection", + "leaf", + "tuple_to_subject_set", + "computed_subject_set", + "not" + ], + "default": "unspecified" }, - "v1alpha2.RelationQuery": { + "ory.keto.relation_tuples.v1alpha2.RelationTuple": { "type": "object", "properties": { "namespace": { @@ -445,36 +897,39 @@ "type": "string", "description": "The relation between an Object and a Subject." }, - "subject": { - "$ref": "#/definitions/v1alpha2.Subject", - "description": "The subject related by this tuple.\nA Subject either represents a concrete subject id or\na `SubjectSet` that expands to more Subjects." + "subject_id": { + "type": "string", + "description": "A concrete id of the subject." + }, + "subject_set": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", + "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } }, - "description": "The query for listing relationships.\nClients can specify any optional field to\npartially filter for specific relationships.\n\nExample use cases (namespace is always required):\n - object only: display a list of all permissions referring to a specific object\n - relation only: get all groups that have members; get all directories that have content\n - object \u0026 relation: display all subjects that have a specific permission relation\n - subject \u0026 relation: display all groups a subject belongs to; display all objects a subject has access to\n - object \u0026 relation \u0026 subject: check whether the relation tuple already exists" + "description": "RelationTuple defines a relation between an Object and a Subject.", + "required": ["namespace", "object", "relation"] }, - "v1alpha2.RelationTuple": { + "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta": { "type": "object", "properties": { - "namespace": { - "type": "string", - "description": "The namespace this relation tuple lives in." - }, - "object": { - "type": "string", - "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple." - }, - "relation": { - "type": "string", - "description": "The relation between an Object and a Subject." + "action": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action", + "description": "The action to do on the RelationTuple." }, - "subject": { - "$ref": "#/definitions/v1alpha2.Subject", - "description": "The subject related by this tuple.\nA Subject either represents a concrete subject id or\na `SubjectSet` that expands to more Subjects." + "relation_tuple": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", + "description": "The target RelationTuple." } }, - "description": "RelationTuple defines a relation between an Object and a Subject." + "description": "Write-delta for a TransactRelationTuplesRequest." + }, + "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action": { + "type": "string", + "enum": ["ACTION_UNSPECIFIED", "insert", "delete"], + "default": "ACTION_UNSPECIFIED", + "description": " - ACTION_UNSPECIFIED: Unspecified.\nThe `TransactRelationTuples` RPC ignores this\nRelationTupleDelta if an action was unspecified.\n - insert: Insertion of a new RelationTuple.\nIt is ignored if already existing.\n - delete: Deletion of the RelationTuple.\nIt is ignored if it does not exist." }, - "v1alpha2.Subject": { + "ory.keto.relation_tuples.v1alpha2.Subject": { "type": "object", "properties": { "id": { @@ -482,13 +937,13 @@ "description": "A concrete id of the subject." }, "set": { - "$ref": "#/definitions/v1alpha2.SubjectSet", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } }, "description": "Subject is either a concrete subject id or\na `SubjectSet` expanding to more Subjects." }, - "v1alpha2.SubjectSet": { + "ory.keto.relation_tuples.v1alpha2.SubjectSet": { "type": "object", "properties": { "namespace": { @@ -504,75 +959,55 @@ "description": "The relation between the object and the subjects." } }, - "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`." - }, - "v1beta.CheckResponse": { - "type": "object", - "properties": { - "allowed": { - "type": "boolean", - "description": "Whether the specified subject (id)\nis related to the requested object.\n\nIt is false by default if no ACL matches." - }, - "snaptoken": { - "type": "string", - "description": "This field is not implemented yet and has no effect.\n\u003c!--\nThe last known snapshot token ONLY specified if\nthe request had not specified a snaptoken,\nsince this performed a \"content-change request\"\nand consistently fetched the last known snapshot token.\n\nThis field is not set if the request had specified a snaptoken!\n\nIf set, clients should cache and use this token\nfor subsequent requests to have minimal latency,\nbut allow slightly stale responses (only some milliseconds or seconds).\n--\u003e" - } - }, - "description": "The response for a CheckService.Check rpc." + "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`.", + "required": ["namespace", "object", "relation"] }, - "v1beta.RelationTuple": { + "ory.keto.relation_tuples.v1alpha2.SubjectSetQuery": { "type": "object", "properties": { "namespace": { "type": "string", - "description": "The namespace this relation tuple lives in." + "description": "The namespace of the object and relation\nreferenced in this subject set." }, "object": { "type": "string", - "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple." + "description": "The object related by this subject set." }, "relation": { "type": "string", - "description": "The relation between an Object and a Subject." - }, - "subject": { - "$ref": "#/definitions/v1beta.Subject", - "description": "The subject related by this tuple.\nA Subject either represents a concrete subject id or\na `SubjectSet` that expands to more Subjects." + "description": "The relation between the object and the subjects." } }, - "description": "RelationTuple defines a relation between an Object and a Subject." + "description": "SubjectSetQuery refers to all subjects who have\nthe same `relation` on an `object`." }, - "v1beta.Subject": { + "ory.keto.relation_tuples.v1alpha2.SubjectTree": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "A concrete id of the subject." + "type": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.NodeType", + "description": "The type of the node." }, - "set": { - "$ref": "#/definitions/v1beta.SubjectSet", - "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." - } - }, - "description": "Subject is either a concrete subject id or\na `SubjectSet` expanding to more Subjects." - }, - "v1beta.SubjectSet": { - "type": "object", - "properties": { - "namespace": { - "type": "string", - "description": "The namespace of the object and relation\nreferenced in this subject set." + "subject": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.Subject", + "description": "The subject this node represents.\nDeprecated: More information is now available in the tuple field." }, - "object": { - "type": "string", - "description": "The object related by this subject set." + "tuple": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", + "description": "The relation tuple this node represents." }, - "relation": { - "type": "string", - "description": "The relation between the object and the subjects." + "children": { + "type": "array", + "items": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" + }, + "description": "The children of this node.\n\nThis is never set if `node_type` == `NODE_TYPE_LEAF`." } }, - "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`." + "required": ["type"] + }, + "ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse": { + "type": "object", + "description": "The response of a WriteService.TransactRelationTuples rpc." } } } diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go index df6d97d76..e5900d8ac 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go @@ -7,6 +7,8 @@ package opl import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -72,7 +74,7 @@ type CheckResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ParseErrors []*ParseError `protobuf:"bytes,1,rep,name=parse_errors,json=parseErrors,proto3" json:"parse_errors,omitempty"` + Errors []*ParseError `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"` } func (x *CheckResponse) Reset() { @@ -107,9 +109,9 @@ func (*CheckResponse) Descriptor() ([]byte, []int) { return file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDescGZIP(), []int{1} } -func (x *CheckResponse) GetParseErrors() []*ParseError { +func (x *CheckResponse) GetErrors() []*ParseError { if x != nil { - return x.ParseErrors + return x.Errors } return nil } @@ -182,7 +184,7 @@ type SourcePosition struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Line uint32 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"` + Line uint32 `protobuf:"varint,1,opt,name=line,json=Line,proto3" json:"line,omitempty"` Column uint32 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"` } @@ -239,45 +241,60 @@ var file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDesc = []byte{ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x22, 0x28, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x55, 0x0a, - 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, - 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, - 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x73, 0x65, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3b, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, + 0x68, 0x61, 0x31, 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, 0x28, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x4a, 0x0a, 0x0d, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x37, 0x0a, 0x03, 0x65, 0x6e, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, - 0x65, 0x6e, 0x64, 0x22, 0x3c, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, - 0x6e, 0x32, 0x63, 0x0a, 0x0d, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x52, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x23, 0x2e, 0x6f, 0x72, - 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x24, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x73, + 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x37, 0x0a, + 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x3c, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x32, 0x8b, 0x02, 0x0a, 0x0d, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xf9, 0x01, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x12, 0x23, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x95, 0x01, 0x0a, 0x18, 0x73, 0x68, 0x2e, 0x6f, 0x72, - 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x42, 0x12, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x6f, 0x70, - 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6f, 0x70, 0x6c, 0xaa, 0x02, - 0x15, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x4f, 0x70, 0x6c, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, - 0x6f, 0x5c, 0x4f, 0x70, 0x6c, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa4, 0x01, 0x92, 0x41, + 0x7f, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, + 0x0e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x70, 0x6c, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x32, + 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x4a, 0x53, 0x0a, 0x03, 0x32, + 0x30, 0x30, 0x12, 0x4c, 0x0a, 0x20, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x26, 0x1a, 0x24, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, + 0x11, 0x2f, 0x6f, 0x70, 0x6c, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x42, 0x95, 0x01, 0x0a, 0x18, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, + 0x12, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x6f, 0x70, 0x6c, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6f, 0x70, 0x6c, 0xaa, 0x02, 0x15, 0x4f, 0x72, 0x79, + 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x4f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0xca, 0x02, 0x15, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x4f, 0x70, + 0x6c, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -300,7 +317,7 @@ var file_ory_keto_opl_v1alpha1_syntax_service_proto_goTypes = []interface{}{ (*SourcePosition)(nil), // 3: ory.keto.opl.v1alpha1.SourcePosition } var file_ory_keto_opl_v1alpha1_syntax_service_proto_depIdxs = []int32{ - 2, // 0: ory.keto.opl.v1alpha1.CheckResponse.parse_errors:type_name -> ory.keto.opl.v1alpha1.ParseError + 2, // 0: ory.keto.opl.v1alpha1.CheckResponse.errors:type_name -> ory.keto.opl.v1alpha1.ParseError 3, // 1: ory.keto.opl.v1alpha1.ParseError.start:type_name -> ory.keto.opl.v1alpha1.SourcePosition 3, // 2: ory.keto.opl.v1alpha1.ParseError.end:type_name -> ory.keto.opl.v1alpha1.SourcePosition 0, // 3: ory.keto.opl.v1alpha1.SyntaxService.Check:input_type -> ory.keto.opl.v1alpha1.CheckRequest diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.proto b/proto/ory/keto/opl/v1alpha1/syntax_service.proto index b2de76559..1c0d2f0c3 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.proto +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.proto @@ -1,5 +1,7 @@ syntax = "proto3"; +import "google/api/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; package ory.keto.opl.v1alpha1; option go_package = "github.com/ory/keto/proto/ory/keto/opl/v1alpha1;opl"; @@ -12,7 +14,28 @@ option php_namespace = "Ory\\Keto\\Opl\\v1alpha1"; // The service that checks the syntax of an OPL file. service SyntaxService { // Performs a syntax check request. - rpc Check(CheckRequest) returns (CheckResponse); + rpc Check(CheckRequest) returns (CheckResponse) { + option (google.api.http) = { + post: "/opl/syntax/check" + body: "content" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + consumes: "text/plain"; + tags: "relationship"; + operation_id: "checkOplSyntax"; + responses: { + key: "200" + value: { + description: "The result of the syntax checker" + schema:{ + json_schema: { + ref: ".ory.keto.opl.v1alpha1.CheckResponse"; + } + } + } + } + }; + }; } message CheckRequest { @@ -20,7 +43,7 @@ message CheckRequest { } message CheckResponse { - repeated ParseError parse_errors = 1; + repeated ParseError errors = 1; } message ParseError { @@ -30,6 +53,6 @@ message ParseError { } message SourcePosition { - uint32 line = 1; + uint32 line = 1 [json_name="Line"]; uint32 column = 2; } \ No newline at end of file diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_grpc_pb.d.ts b/proto/ory/keto/opl/v1alpha1/syntax_service_grpc_pb.d.ts index f08c2a90a..c691c00cc 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_grpc_pb.d.ts +++ b/proto/ory/keto/opl/v1alpha1/syntax_service_grpc_pb.d.ts @@ -6,6 +6,7 @@ import * as grpc from "grpc"; import * as ory_keto_opl_v1alpha1_syntax_service_pb from "../../../../ory/keto/opl/v1alpha1/syntax_service_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; interface ISyntaxServiceService extends grpc.ServiceDefinition { check: ISyntaxServiceService_ICheck; diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_grpc_pb.js b/proto/ory/keto/opl/v1alpha1/syntax_service_grpc_pb.js index b6fde4ad9..33fc6b66a 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_grpc_pb.js +++ b/proto/ory/keto/opl/v1alpha1/syntax_service_grpc_pb.js @@ -3,6 +3,8 @@ 'use strict'; var grpc = require('@grpc/grpc-js'); var ory_keto_opl_v1alpha1_syntax_service_pb = require('../../../../ory/keto/opl/v1alpha1/syntax_service_pb.js'); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); function serialize_ory_keto_opl_v1alpha1_CheckRequest(arg) { if (!(arg instanceof ory_keto_opl_v1alpha1_syntax_service_pb.CheckRequest)) { diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts index cdfc87d69..823e9f538 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts +++ b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts @@ -5,6 +5,7 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; export class CheckRequest extends jspb.Message { getContent(): Uint8Array | string; @@ -29,10 +30,10 @@ export namespace CheckRequest { } export class CheckResponse extends jspb.Message { - clearParseErrorsList(): void; - getParseErrorsList(): Array; - setParseErrorsList(value: Array): CheckResponse; - addParseErrors(value?: ParseError, index?: number): ParseError; + clearErrorsList(): void; + getErrorsList(): Array; + setErrorsList(value: Array): CheckResponse; + addErrors(value?: ParseError, index?: number): ParseError; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CheckResponse.AsObject; @@ -46,7 +47,7 @@ export class CheckResponse extends jspb.Message { export namespace CheckResponse { export type AsObject = { - parseErrorsList: Array, + errorsList: Array, } } diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js index d507711c2..17e6b99a7 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js +++ b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js @@ -15,6 +15,10 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); +goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); goog.exportSymbol('proto.ory.keto.opl.v1alpha1.CheckRequest', null, global); goog.exportSymbol('proto.ory.keto.opl.v1alpha1.CheckResponse', null, global); goog.exportSymbol('proto.ory.keto.opl.v1alpha1.ParseError', null, global); @@ -296,7 +300,7 @@ proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.toObject = function(opt_incl */ proto.ory.keto.opl.v1alpha1.CheckResponse.toObject = function(includeInstance, msg) { var f, obj = { - parseErrorsList: jspb.Message.toObjectList(msg.getParseErrorsList(), + errorsList: jspb.Message.toObjectList(msg.getErrorsList(), proto.ory.keto.opl.v1alpha1.ParseError.toObject, includeInstance) }; @@ -337,7 +341,7 @@ proto.ory.keto.opl.v1alpha1.CheckResponse.deserializeBinaryFromReader = function case 1: var value = new proto.ory.keto.opl.v1alpha1.ParseError; reader.readMessage(value,proto.ory.keto.opl.v1alpha1.ParseError.deserializeBinaryFromReader); - msg.addParseErrors(value); + msg.addErrors(value); break; default: reader.skipField(); @@ -368,7 +372,7 @@ proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.serializeBinary = function() */ proto.ory.keto.opl.v1alpha1.CheckResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getParseErrorsList(); + f = message.getErrorsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, @@ -380,10 +384,10 @@ proto.ory.keto.opl.v1alpha1.CheckResponse.serializeBinaryToWriter = function(mes /** - * repeated ParseError parse_errors = 1; + * repeated ParseError errors = 1; * @return {!Array} */ -proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.getParseErrorsList = function() { +proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.getErrorsList = function() { return /** @type{!Array} */ ( jspb.Message.getRepeatedWrapperField(this, proto.ory.keto.opl.v1alpha1.ParseError, 1)); }; @@ -393,7 +397,7 @@ proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.getParseErrorsList = functio * @param {!Array} value * @return {!proto.ory.keto.opl.v1alpha1.CheckResponse} returns this */ -proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.setParseErrorsList = function(value) { +proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.setErrorsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -403,7 +407,7 @@ proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.setParseErrorsList = functio * @param {number=} opt_index * @return {!proto.ory.keto.opl.v1alpha1.ParseError} */ -proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.addParseErrors = function(opt_value, opt_index) { +proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.addErrors = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ory.keto.opl.v1alpha1.ParseError, opt_index); }; @@ -412,8 +416,8 @@ proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.addParseErrors = function(op * Clears the list making it empty but non-null. * @return {!proto.ory.keto.opl.v1alpha1.CheckResponse} returns this */ -proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.clearParseErrorsList = function() { - return this.setParseErrorsList([]); +proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.clearErrorsList = function() { + return this.setErrorsList([]); }; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go index b36601802..887135d38 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go @@ -9,6 +9,7 @@ package rts import ( _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" + _ "google.golang.org/genproto/googleapis/api/visibility" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -49,8 +50,12 @@ type CheckRequest struct { // The related subject in this check. // // Deprecated: Do not use. - Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` - Tuple *RelationTuple `protobuf:"bytes,8,opt,name=tuple,proto3" json:"tuple,omitempty"` + Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` + // Types that are assignable to RestApiSubject: + // *CheckRequest_SubjectId + // *CheckRequest_SubjectSet + RestApiSubject isCheckRequest_RestApiSubject `protobuf_oneof:"rest_api_subject"` + Tuple *RelationTuple `protobuf:"bytes,8,opt,name=tuple,proto3" json:"tuple,omitempty"` // This field is not implemented yet and has no effect. // - bool latest = 5; + bool latest = 5 [(google.api.field_visibility).restriction = "NO_SWAGGER"]; // This field is not implemented yet and has no effect. // - string snaptoken = 6; + string snaptoken = 6 [(google.api.field_visibility).restriction = "NO_SWAGGER"]; // The maximum depth to search for a relation. // // If the value is less than 1 or greater than the global @@ -118,5 +156,5 @@ message CheckResponse { // for subsequent requests to have minimal latency, // but allow slightly stale responses (only some milliseconds or seconds). // --> - string snaptoken = 2; + string snaptoken = 2 [(google.api.field_visibility).restriction = "NO_SWAGGER"]; } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts index c79a3c34b..20a2d2e0d 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts @@ -6,8 +6,9 @@ import * as grpc from "grpc"; import * as ory_keto_relation_tuples_v1alpha2_check_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/check_service_pb"; -import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; +import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; +import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; interface ICheckServiceService extends grpc.ServiceDefinition { check: ICheckServiceService_ICheck; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js index 527ead315..3c77a8144 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js @@ -4,8 +4,9 @@ var grpc = require('@grpc/grpc-js'); var ory_keto_relation_tuples_v1alpha2_check_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/check_service_pb.js'); var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); -var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); +var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); +var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); function serialize_ory_keto_relation_tuples_v1alpha2_CheckRequest(arg) { if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest)) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts index a45f2b736..66545eadd 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts @@ -5,8 +5,9 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; +import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; +import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; export class CheckRequest extends jspb.Message { getNamespace(): string; @@ -21,6 +22,16 @@ export class CheckRequest extends jspb.Message { getSubject(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject | undefined; setSubject(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject): CheckRequest; + hasSubjectId(): boolean; + clearSubjectId(): void; + getSubjectId(): string; + setSubjectId(value: string): CheckRequest; + + hasSubjectSet(): boolean; + clearSubjectSet(): void; + getSubjectSet(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery | undefined; + setSubjectSet(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery): CheckRequest; + hasTuple(): boolean; clearTuple(): void; getTuple(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple | undefined; @@ -32,6 +43,8 @@ export class CheckRequest extends jspb.Message { getMaxDepth(): number; setMaxDepth(value: number): CheckRequest; + getRestApiSubjectCase(): CheckRequest.RestApiSubjectCase; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CheckRequest.AsObject; static toObject(includeInstance: boolean, msg: CheckRequest): CheckRequest.AsObject; @@ -48,11 +61,20 @@ export namespace CheckRequest { object: string, relation: string, subject?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.AsObject, + subjectId: string, + subjectSet?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.AsObject, tuple?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.AsObject, latest: boolean, snaptoken: string, maxDepth: number, } + + export enum RestApiSubjectCase { + REST_API_SUBJECT_NOT_SET = 0, + SUBJECT_ID = 9, + SUBJECT_SET = 10, + } + } export class CheckResponse extends jspb.Message { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js index abcc9d523..fbaa67ae3 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js @@ -17,11 +17,14 @@ var global = (function() { return this || window || global || self || Function(' var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); -var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); -goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); +var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); +goog.object.extend(proto, google_api_visibility_pb); var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); +var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); +goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CheckRequest', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.RestApiSubjectCase', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CheckResponse', null, global); /** * Generated by JsPbCodeGenerator. @@ -34,7 +37,7 @@ goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CheckResponse', null, * @constructor */ proto.ory.keto.relation_tuples.v1alpha2.CheckRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.oneofGroups_); }; goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.CheckRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -66,6 +69,32 @@ if (goog.DEBUG && !COMPILED) { proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.CheckResponse'; } +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.oneofGroups_ = [[9,10]]; + +/** + * @enum {number} + */ +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.RestApiSubjectCase = { + REST_API_SUBJECT_NOT_SET: 0, + SUBJECT_ID: 9, + SUBJECT_SET: 10 +}; + +/** + * @return {proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.RestApiSubjectCase} + */ +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getRestApiSubjectCase = function() { + return /** @type {proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.RestApiSubjectCase} */(jspb.Message.computeOneofCase(this, proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -101,6 +130,8 @@ proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.toObject = function(include object: jspb.Message.getFieldWithDefault(msg, 2, ""), relation: jspb.Message.getFieldWithDefault(msg, 3, ""), subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f), + subjectId: jspb.Message.getFieldWithDefault(msg, 9, ""), + subjectSet: (f = msg.getSubjectSet()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.toObject(includeInstance, f), tuple: (f = msg.getTuple()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.toObject(includeInstance, f), latest: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), snaptoken: jspb.Message.getFieldWithDefault(msg, 6, ""), @@ -158,6 +189,15 @@ proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.deserializeBinaryFromReader reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.deserializeBinaryFromReader); msg.setSubject(value); break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setSubjectId(value); + break; + case 10: + var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery; + reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.deserializeBinaryFromReader); + msg.setSubjectSet(value); + break; case 8: var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple; reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.deserializeBinaryFromReader); @@ -233,6 +273,21 @@ proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.serializeBinaryToWriter = f ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.serializeBinaryToWriter ); } + f = /** @type {string} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeString( + 9, + f + ); + } + f = message.getSubjectSet(); + if (f != null) { + writer.writeMessage( + 10, + f, + ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.serializeBinaryToWriter + ); + } f = message.getTuple(); if (f != null) { writer.writeMessage( @@ -356,6 +411,79 @@ proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.hasSubject = func }; +/** + * optional string subject_id = 9; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getSubjectId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.setSubjectId = function(value) { + return jspb.Message.setOneofField(this, 9, proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.clearSubjectId = function() { + return jspb.Message.setOneofField(this, 9, proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.hasSubjectId = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional SubjectSetQuery subject_set = 10; + * @return {?proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery} + */ +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.getSubjectSet = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery} */ ( + jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery, 10)); +}; + + +/** + * @param {?proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this +*/ +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.setSubjectSet = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CheckRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.clearSubjectSet = function() { + return this.setSubjectSet(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.hasSubjectSet = function() { + return jspb.Message.getField(this, 10) != null; +}; + + /** * optional RelationTuple tuple = 8; * @return {?proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go index 7a2afc10b..06c34df0b 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go @@ -7,6 +7,9 @@ package rts import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + _ "google.golang.org/genproto/googleapis/api/visibility" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -23,33 +26,72 @@ const ( type NodeType int32 const ( + NodeType_unspecified NodeType = 0 NodeType_NODE_TYPE_UNSPECIFIED NodeType = 0 // This node expands to a union of all children. NodeType_NODE_TYPE_UNION NodeType = 1 + NodeType_union NodeType = 1 // Not implemented yet. NodeType_NODE_TYPE_EXCLUSION NodeType = 2 + NodeType_exclusion NodeType = 2 // Not implemented yet. NodeType_NODE_TYPE_INTERSECTION NodeType = 3 + NodeType_intersection NodeType = 3 // This node is a leaf and contains no children. // Its subject is a `SubjectID` unless `max_depth` was reached. NodeType_NODE_TYPE_LEAF NodeType = 4 + NodeType_leaf NodeType = 4 + // This node is a leaf and contains no children. + // Its subject is a `SubjectID` unless `max_depth` was reached. + NodeType_NODE_TYPE_TUPLE_TO_SUBJECT_SET NodeType = 5 + NodeType_tuple_to_subject_set NodeType = 5 + // This node is a leaf and contains no children. + // Its subject is a `SubjectID` unless `max_depth` was reached. + NodeType_NODE_TYPE_COMPUTED_SUBJECT_SET NodeType = 6 + NodeType_computed_subject_set NodeType = 6 + // This node is a leaf and contains no children. + // Its subject is a `SubjectID` unless `max_depth` was reached. + NodeType_NODE_TYPE_NOT NodeType = 7 + NodeType_not NodeType = 7 ) // Enum value maps for NodeType. var ( NodeType_name = map[int32]string{ - 0: "NODE_TYPE_UNSPECIFIED", + 0: "unspecified", + // Duplicate value: 0: "NODE_TYPE_UNSPECIFIED", 1: "NODE_TYPE_UNION", + // Duplicate value: 1: "union", 2: "NODE_TYPE_EXCLUSION", + // Duplicate value: 2: "exclusion", 3: "NODE_TYPE_INTERSECTION", + // Duplicate value: 3: "intersection", 4: "NODE_TYPE_LEAF", + // Duplicate value: 4: "leaf", + 5: "NODE_TYPE_TUPLE_TO_SUBJECT_SET", + // Duplicate value: 5: "tuple_to_subject_set", + 6: "NODE_TYPE_COMPUTED_SUBJECT_SET", + // Duplicate value: 6: "computed_subject_set", + 7: "NODE_TYPE_NOT", + // Duplicate value: 7: "not", } NodeType_value = map[string]int32{ - "NODE_TYPE_UNSPECIFIED": 0, - "NODE_TYPE_UNION": 1, - "NODE_TYPE_EXCLUSION": 2, - "NODE_TYPE_INTERSECTION": 3, - "NODE_TYPE_LEAF": 4, + "unspecified": 0, + "NODE_TYPE_UNSPECIFIED": 0, + "NODE_TYPE_UNION": 1, + "union": 1, + "NODE_TYPE_EXCLUSION": 2, + "exclusion": 2, + "NODE_TYPE_INTERSECTION": 3, + "intersection": 3, + "NODE_TYPE_LEAF": 4, + "leaf": 4, + "NODE_TYPE_TUPLE_TO_SUBJECT_SET": 5, + "tuple_to_subject_set": 5, + "NODE_TYPE_COMPUTED_SUBJECT_SET": 6, + "computed_subject_set": 6, + "NODE_TYPE_NOT": 7, + "not": 7, } ) @@ -96,7 +138,7 @@ type ExpandRequest struct { // // It is important to set this parameter to a meaningful // value. Ponder how deep you really want to display this. - MaxDepth int32 `protobuf:"varint,2,opt,name=max_depth,json=maxDepth,proto3" json:"max_depth,omitempty"` + MaxDepth int32 `protobuf:"varint,2,opt,name=max_depth,json=max-depth,proto3" json:"max_depth,omitempty"` // This field is not implemented yet and has no effect. // Snaptoken string `protobuf:"bytes,3,opt,name=snaptoken,proto3" json:"snaptoken,omitempty"` + // The namespace of the object and relation + // referenced in this subject set. + // + // Deprecated: Do not use. + Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"` + // The object related by this subject set. + // + // Deprecated: Do not use. + Object string `protobuf:"bytes,5,opt,name=object,proto3" json:"object,omitempty"` + // The relation between the object and the subjects. + // + // Deprecated: Do not use. + Relation string `protobuf:"bytes,6,opt,name=relation,proto3" json:"relation,omitempty"` } func (x *ExpandRequest) Reset() { @@ -169,6 +224,30 @@ func (x *ExpandRequest) GetSnaptoken() string { return "" } +// Deprecated: Do not use. +func (x *ExpandRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +// Deprecated: Do not use. +func (x *ExpandRequest) GetObject() string { + if x != nil { + return x.Object + } + return "" +} + +// Deprecated: Do not use. +func (x *ExpandRequest) GetRelation() string { + if x != nil { + return x.Relation + } + return "" +} + // The response for a ExpandService.Expand RPC. type ExpandResponse struct { state protoimpl.MessageState @@ -227,7 +306,7 @@ type SubjectTree struct { unknownFields protoimpl.UnknownFields // The type of the node. - NodeType NodeType `protobuf:"varint,1,opt,name=node_type,json=nodeType,proto3,enum=ory.keto.relation_tuples.v1alpha2.NodeType" json:"node_type,omitempty"` + NodeType NodeType `protobuf:"varint,1,opt,name=node_type,json=type,proto3,enum=ory.keto.relation_tuples.v1alpha2.NodeType" json:"node_type,omitempty"` // The subject this node represents. // Deprecated: More information is now available in the tuple field. // @@ -277,7 +356,7 @@ func (x *SubjectTree) GetNodeType() NodeType { if x != nil { return x.NodeType } - return NodeType_NODE_TYPE_UNSPECIFIED + return NodeType_unspecified } // Deprecated: Do not use. @@ -310,74 +389,135 @@ var file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDesc = []byte 0x68, 0x61, 0x32, 0x2f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x1a, 0x37, 0x6f, 0x72, 0x79, - 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1b, 0x0a, 0x09, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 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, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 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, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, + 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xa0, 0x02, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x58, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, + 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, + 0x47, 0x45, 0x52, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x08, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x74, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6e, 0x61, - 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6e, - 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x54, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x61, 0x6e, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x72, 0x65, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x52, 0x04, 0x74, 0x72, 0x65, 0x65, 0x22, 0xb5, 0x02, - 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x12, 0x48, 0x0a, - 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x2b, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x6e, - 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, + 0x09, 0x6d, 0x61, 0x78, 0x2d, 0x64, 0x65, 0x70, 0x74, 0x68, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x6e, + 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0xfa, + 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, + 0x52, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x05, 0x18, 0x01, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x1d, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x05, 0x18, 0x01, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x12, 0x21, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x05, 0x18, 0x01, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x54, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x72, 0x65, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, + 0x72, 0x65, 0x65, 0x52, 0x04, 0x74, 0x72, 0x65, 0x65, 0x22, 0xb6, 0x02, 0x0a, 0x0b, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x12, 0x49, 0x0a, 0x09, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, + 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x46, + 0x0a, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, + 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, + 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x4a, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, + 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x46, 0x0a, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x52, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x4a, 0x0a, 0x08, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x72, - 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, - 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x2a, 0x83, 0x01, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, - 0x0f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x4f, 0x4e, - 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x4e, - 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x45, - 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x45, 0x41, 0x46, 0x10, 0x04, 0x32, 0x7e, 0x0a, 0x0d, 0x45, - 0x78, 0x70, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x06, - 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, - 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, 0x78, 0x70, 0x61, 0x6e, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, + 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, + 0x65, 0x6e, 0x2a, 0x86, 0x04, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x2d, 0x0a, 0x15, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, + 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, + 0x27, 0x0a, 0x0f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, + 0x4f, 0x4e, 0x10, 0x01, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, + 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x09, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, + 0x6e, 0x10, 0x01, 0x12, 0x2b, 0x0a, 0x13, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x1a, 0x12, 0xfa, 0xd2, + 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, + 0x12, 0x0d, 0x0a, 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x02, 0x12, + 0x2e, 0x0a, 0x16, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, + 0x45, 0x52, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, + 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, + 0x10, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, + 0x03, 0x12, 0x26, 0x0a, 0x0e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, + 0x45, 0x41, 0x46, 0x10, 0x04, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, + 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x65, 0x61, + 0x66, 0x10, 0x04, 0x12, 0x36, 0x0a, 0x1e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x54, 0x55, 0x50, 0x4c, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, + 0x54, 0x5f, 0x53, 0x45, 0x54, 0x10, 0x05, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, + 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x18, 0x0a, 0x14, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x73, 0x65, 0x74, 0x10, 0x05, 0x12, 0x36, 0x0a, 0x1e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x42, 0x4a, + 0x45, 0x43, 0x54, 0x5f, 0x53, 0x45, 0x54, 0x10, 0x06, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, + 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x18, 0x0a, + 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x06, 0x12, 0x25, 0x0a, 0x0d, 0x4e, 0x4f, 0x44, 0x45, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x10, 0x07, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, + 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x07, + 0x0a, 0x03, 0x6e, 0x6f, 0x74, 0x10, 0x07, 0x1a, 0x02, 0x10, 0x01, 0x32, 0xa7, 0x03, 0x0a, 0x0d, + 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x95, 0x03, + 0x0a, 0x06, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, 0x78, 0x70, - 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xc3, 0x01, 0x0a, 0x24, - 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, + 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa5, 0x02, + 0x92, 0x41, 0xfc, 0x01, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x2a, 0x11, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x32, 0x21, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x75, 0x72, 0x6c, 0x65, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x4a, 0xb7, 0x01, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0xaf, + 0x01, 0x0a, 0x79, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x63, 0x61, 0x73, 0x65, + 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x2e, 0x20, + 0x46, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x60, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x60, 0x20, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x73, + 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x32, 0x30, 0x30, 0x2e, 0x12, 0x32, 0x0a, 0x30, + 0x1a, 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0x42, 0x12, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, - 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, - 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x62, 0x04, 0x74, 0x72, 0x65, 0x65, 0x12, 0x17, 0x2f, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x65, + 0x78, 0x70, 0x61, 0x6e, 0x64, 0x42, 0xc3, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x12, + 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, + 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, + 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.proto index e0c776bf5..1ef8d5641 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.proto @@ -2,6 +2,10 @@ syntax = "proto3"; package ory.keto.relation_tuples.v1alpha2; +import "google/api/annotations.proto"; +import "google/api/visibility.proto"; +import "google/api/field_behavior.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; import "ory/keto/relation_tuples/v1alpha2/relation_tuples.proto"; option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; @@ -17,14 +21,36 @@ option php_namespace = "Ory\\Keto\\RelationTuples\\v1alpha2"; // This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). service ExpandService { // Expands the subject set into a tree of subjects. - rpc Expand(ExpandRequest) returns (ExpandResponse); + rpc Expand(ExpandRequest) returns (ExpandResponse) { + option (google.api.http) = { + get: "/relation-tuples/expand" + response_body: "tree" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + consumes: "application/x-www-form-urlencoded"; + tags: "permission"; + operation_id: "expandPermissions"; + responses: { + key: "200" + value: { + description: "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200." + schema: { + json_schema: { + ref: ".ory.keto.relation_tuples.v1alpha2.SubjectTree"; + } + } + } + } + }; + }; } // The request for an ExpandService.Expand RPC. // Expands the given subject set. message ExpandRequest { // The subject to expand. - Subject subject = 1; + Subject subject = 1 [(google.api.field_visibility).restriction = "NO_SWAGGER"]; + // The maximum depth of tree to build. // // If the value is less than 1 or greater than the global @@ -32,7 +58,8 @@ message ExpandRequest { // // It is important to set this parameter to a meaningful // value. Ponder how deep you really want to display this. - int32 max_depth = 2; + int32 max_depth = 2 [json_name = "max-depth"]; + // This field is not implemented yet and has no effect. // - string snaptoken = 3; + string snaptoken = 3 [(google.api.field_visibility).restriction = "NO_SWAGGER"]; + + // The following fields are added for compatibility with the existing REST API. + + // The namespace of the object and relation + // referenced in this subject set. + string namespace = 4 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + // The object related by this subject set. + string object = 5 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + // The relation between the object and the subjects. + string relation = 6 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + } // The response for a ExpandService.Expand RPC. @@ -62,21 +100,47 @@ message ExpandResponse { } enum NodeType { - NODE_TYPE_UNSPECIFIED = 0; + option allow_alias = true; + + unspecified = 0; + NODE_TYPE_UNSPECIFIED = 0 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; + // This node expands to a union of all children. - NODE_TYPE_UNION = 1; + NODE_TYPE_UNION = 1 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; + union = 1; + // Not implemented yet. - NODE_TYPE_EXCLUSION = 2; + NODE_TYPE_EXCLUSION = 2 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; + exclusion = 2; + // Not implemented yet. - NODE_TYPE_INTERSECTION = 3; + NODE_TYPE_INTERSECTION = 3 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; + intersection = 3; + + // This node is a leaf and contains no children. + // Its subject is a `SubjectID` unless `max_depth` was reached. + NODE_TYPE_LEAF = 4 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; + leaf = 4; + + // This node is a leaf and contains no children. + // Its subject is a `SubjectID` unless `max_depth` was reached. + NODE_TYPE_TUPLE_TO_SUBJECT_SET = 5 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; + tuple_to_subject_set = 5; + + // This node is a leaf and contains no children. + // Its subject is a `SubjectID` unless `max_depth` was reached. + NODE_TYPE_COMPUTED_SUBJECT_SET = 6 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; + computed_subject_set = 6; + // This node is a leaf and contains no children. // Its subject is a `SubjectID` unless `max_depth` was reached. - NODE_TYPE_LEAF = 4; + NODE_TYPE_NOT = 7 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; + not = 7; } message SubjectTree { // The type of the node. - NodeType node_type = 1; + NodeType node_type = 1 [json_name = "type", (google.api.field_behavior) = REQUIRED]; // The subject this node represents. // Deprecated: More information is now available in the tuple field. diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.d.ts index 456049012..0b351ba10 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.d.ts @@ -6,6 +6,9 @@ import * as grpc from "grpc"; import * as ory_keto_relation_tuples_v1alpha2_expand_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/expand_service_pb"; +import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; +import * as google_api_field_behavior_pb from "../../../../google/api/field_behavior_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; interface IExpandServiceService extends grpc.ServiceDefinition { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.js index ab89c4b40..b68774a1d 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.js @@ -3,6 +3,10 @@ 'use strict'; var grpc = require('@grpc/grpc-js'); var ory_keto_relation_tuples_v1alpha2_expand_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/expand_service_pb.js'); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); +var google_api_field_behavior_pb = require('../../../../google/api/field_behavior_pb.js'); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); function serialize_ory_keto_relation_tuples_v1alpha2_ExpandRequest(arg) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts index bbc463a9d..c5a8d924e 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts @@ -5,6 +5,9 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; +import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; +import * as google_api_field_behavior_pb from "../../../../google/api/field_behavior_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; export class ExpandRequest extends jspb.Message { @@ -17,6 +20,12 @@ export class ExpandRequest extends jspb.Message { setMaxDepth(value: number): ExpandRequest; getSnaptoken(): string; setSnaptoken(value: string): ExpandRequest; + getNamespace(): string; + setNamespace(value: string): ExpandRequest; + getObject(): string; + setObject(value: string): ExpandRequest; + getRelation(): string; + setRelation(value: string): ExpandRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ExpandRequest.AsObject; @@ -33,6 +42,9 @@ export namespace ExpandRequest { subject?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.AsObject, maxDepth: number, snaptoken: string, + namespace: string, + object: string, + relation: string, } } @@ -97,9 +109,20 @@ export namespace SubjectTree { } export enum NodeType { + UNSPECIFIED = 0, NODE_TYPE_UNSPECIFIED = 0, NODE_TYPE_UNION = 1, + UNION = 1, NODE_TYPE_EXCLUSION = 2, + EXCLUSION = 2, NODE_TYPE_INTERSECTION = 3, + INTERSECTION = 3, NODE_TYPE_LEAF = 4, + LEAF = 4, + NODE_TYPE_TUPLE_TO_SUBJECT_SET = 5, + TUPLE_TO_SUBJECT_SET = 5, + NODE_TYPE_COMPUTED_SUBJECT_SET = 6, + COMPUTED_SUBJECT_SET = 6, + NODE_TYPE_NOT = 7, + NOT = 7, } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js index 795001f25..f25325c17 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js @@ -15,6 +15,14 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); +goog.object.extend(proto, google_api_visibility_pb); +var google_api_field_behavior_pb = require('../../../../google/api/field_behavior_pb.js'); +goog.object.extend(proto, google_api_field_behavior_pb); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); +goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest', null, global); @@ -118,7 +126,10 @@ proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.toObject = function(includ var f, obj = { subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f), maxDepth: jspb.Message.getFieldWithDefault(msg, 2, 0), - snaptoken: jspb.Message.getFieldWithDefault(msg, 3, "") + snaptoken: jspb.Message.getFieldWithDefault(msg, 3, ""), + namespace: jspb.Message.getFieldWithDefault(msg, 4, ""), + object: jspb.Message.getFieldWithDefault(msg, 5, ""), + relation: jspb.Message.getFieldWithDefault(msg, 6, "") }; if (includeInstance) { @@ -168,6 +179,18 @@ proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.deserializeBinaryFromReade var value = /** @type {string} */ (reader.readString()); msg.setSnaptoken(value); break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setNamespace(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setObject(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setRelation(value); + break; default: reader.skipField(); break; @@ -219,6 +242,27 @@ proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.serializeBinaryToWriter = f ); } + f = message.getNamespace(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getObject(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getRelation(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } }; @@ -295,6 +339,60 @@ proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.setSnaptoken = f }; +/** + * optional string namespace = 4; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.getNamespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.setNamespace = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string object = 5; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.getObject = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.setObject = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string relation = 6; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.getRelation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.setRelation = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + @@ -742,11 +840,22 @@ proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.clearChildrenList * @enum {number} */ proto.ory.keto.relation_tuples.v1alpha2.NodeType = { + UNSPECIFIED: 0, NODE_TYPE_UNSPECIFIED: 0, NODE_TYPE_UNION: 1, + UNION: 1, NODE_TYPE_EXCLUSION: 2, + EXCLUSION: 2, NODE_TYPE_INTERSECTION: 3, - NODE_TYPE_LEAF: 4 + INTERSECTION: 3, + NODE_TYPE_LEAF: 4, + LEAF: 4, + NODE_TYPE_TUPLE_TO_SUBJECT_SET: 5, + TUPLE_TO_SUBJECT_SET: 5, + NODE_TYPE_COMPUTED_SUBJECT_SET: 6, + COMPUTED_SUBJECT_SET: 6, + NODE_TYPE_NOT: 7, + NOT: 7 }; goog.object.extend(exports, proto.ory.keto.relation_tuples.v1alpha2); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go index fb7244686..25702d579 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go @@ -7,6 +7,8 @@ package rts import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -161,41 +163,62 @@ var file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_rawDesc = [] 0x68, 0x61, 0x32, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x22, - 0x17, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x66, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, - 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x22, 0x1f, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x32, 0x9b, 0x01, 0x0a, 0x11, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x38, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 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, 0x17, 0x0a, + 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x66, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4c, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0xc7, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x16, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, - 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, - 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, - 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, - 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x1f, + 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, + 0xab, 0x03, 0x0a, 0x11, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x95, 0x03, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x38, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, + 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8d, 0x02, + 0x92, 0x41, 0xf6, 0x01, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, + 0x69, 0x70, 0x2a, 0x1a, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x68, 0x69, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x32, 0x21, + 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x77, + 0x77, 0x2d, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x75, 0x72, 0x6c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, + 0x64, 0x4a, 0xa6, 0x01, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x9e, 0x01, 0x0a, 0x17, 0x54, 0x68, + 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x73, 0x2e, 0x12, 0x3d, 0x0a, 0x3b, 0x1a, 0x39, 0x2e, 0x6f, 0x72, 0x79, 0x2e, + 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x12, 0x30, 0x7b, 0x20, 0x22, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x3a, 0x20, 0x5b, 0x20, 0x7b, 0x20, 0x22, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x6d, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x22, 0x20, 0x7d, 0x20, 0x5d, 0x20, 0x7d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, + 0x12, 0x0b, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x42, 0xc7, 0x01, + 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x16, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, + 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, + 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, + 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.proto index 441d905e9..5e4535044 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.proto @@ -1,5 +1,7 @@ syntax = "proto3"; +import "google/api/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; package ory.keto.relation_tuples.v1alpha2; option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; @@ -14,7 +16,33 @@ option php_namespace = "Ory\\Keto\\RelationTuples\\v1alpha2"; // This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). service NamespacesService { // Lists Namespaces - rpc ListNamespaces(ListNamespacesRequest) returns (ListNamespacesResponse); + // + // Get all namespaces. + rpc ListNamespaces(ListNamespacesRequest) returns (ListNamespacesResponse) { + option (google.api.http) = { + get: "/namespaces" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + consumes: "application/x-www-form-urlencoded"; + tags: "relationship"; + operation_id: "listRelationshipNamespaces"; + responses: { + key: "200" + value: { + description: "The list of namespaces." + examples: { + key: "application/json" + value: "{ \"namespaces\": [ { \"name\": \"my namespace\" } ] }" + } + schema:{ + json_schema: { + ref: ".ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse"; + } + } + } + } + }; + }; } // Request for ReadService.ListNamespaces RPC. diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc.pb.go index 26c9818df..f3c6f7016 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc.pb.go @@ -23,6 +23,8 @@ 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 NamespacesServiceClient interface { // Lists Namespaces + // + // Get all namespaces. ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) } @@ -48,6 +50,8 @@ func (c *namespacesServiceClient) ListNamespaces(ctx context.Context, in *ListNa // for forward compatibility type NamespacesServiceServer interface { // Lists Namespaces + // + // Get all namespaces. ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc_pb.d.ts index 8573542bf..40c569d2a 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc_pb.d.ts @@ -6,6 +6,7 @@ import * as grpc from "grpc"; import * as ory_keto_relation_tuples_v1alpha2_namespaces_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/namespaces_service_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; interface INamespacesServiceService extends grpc.ServiceDefinition { listNamespaces: INamespacesServiceService_IListNamespaces; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc_pb.js index 8ca080c8e..bb9fb52e3 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc_pb.js @@ -3,6 +3,8 @@ 'use strict'; var grpc = require('@grpc/grpc-js'); var ory_keto_relation_tuples_v1alpha2_namespaces_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js'); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); function serialize_ory_keto_relation_tuples_v1alpha2_ListNamespacesRequest(arg) { if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_namespaces_service_pb.ListNamespacesRequest)) { @@ -32,6 +34,8 @@ function deserialize_ory_keto_relation_tuples_v1alpha2_ListNamespacesResponse(bu // This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). var NamespacesServiceService = exports.NamespacesServiceService = { // Lists Namespaces +// +// Get all namespaces. listNamespaces: { path: '/ory.keto.relation_tuples.v1alpha2.NamespacesService/ListNamespaces', requestStream: false, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.d.ts index 8183431f9..6660b6c47 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.d.ts @@ -5,6 +5,7 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; export class ListNamespacesRequest extends jspb.Message { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js index 33de4127e..9ccecd5e4 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js @@ -15,6 +15,10 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); +goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.Namespace', null, global); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go index 941b8d9eb..6cca3ce4c 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go @@ -7,6 +7,9 @@ package rts import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + _ "google.golang.org/genproto/googleapis/api/visibility" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" @@ -58,14 +61,30 @@ type ListRelationTuplesRequest struct { // RelationTuples to return in the response. // // Default: 100 - PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageSize int32 `protobuf:"varint,4,opt,name=page_size,proto3" json:"page_size,omitempty"` // Optional. An opaque pagination token returned from // a previous call to `ListRelationTuples` that // indicates where the page should start at. // // An empty token denotes the first page. All successive // pages require the token from the previous page. - PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + PageToken string `protobuf:"bytes,5,opt,name=page_token,proto3" json:"page_token,omitempty"` + // The namespace + // + // Deprecated: Do not use. + Namespace string `protobuf:"bytes,7,opt,name=namespace,proto3" json:"namespace,omitempty"` + // The related object in this check. + // + // Deprecated: Do not use. + Object string `protobuf:"bytes,8,opt,name=object,proto3" json:"object,omitempty"` + // The relation between the Object and the Subject. + // + // Deprecated: Do not use. + Relation string `protobuf:"bytes,9,opt,name=relation,proto3" json:"relation,omitempty"` + // Types that are assignable to RestApiSubject: + // *ListRelationTuplesRequest_SubjectId + // *ListRelationTuplesRequest_SubjectSet + RestApiSubject isListRelationTuplesRequest_RestApiSubject `protobuf_oneof:"rest_api_subject"` } func (x *ListRelationTuplesRequest) Reset() { @@ -143,6 +162,70 @@ func (x *ListRelationTuplesRequest) GetPageToken() string { return "" } +// Deprecated: Do not use. +func (x *ListRelationTuplesRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +// Deprecated: Do not use. +func (x *ListRelationTuplesRequest) GetObject() string { + if x != nil { + return x.Object + } + return "" +} + +// Deprecated: Do not use. +func (x *ListRelationTuplesRequest) GetRelation() string { + if x != nil { + return x.Relation + } + return "" +} + +func (m *ListRelationTuplesRequest) GetRestApiSubject() isListRelationTuplesRequest_RestApiSubject { + if m != nil { + return m.RestApiSubject + } + return nil +} + +func (x *ListRelationTuplesRequest) GetSubjectId() string { + if x, ok := x.GetRestApiSubject().(*ListRelationTuplesRequest_SubjectId); ok { + return x.SubjectId + } + return "" +} + +func (x *ListRelationTuplesRequest) GetSubjectSet() *SubjectSetQuery { + if x, ok := x.GetRestApiSubject().(*ListRelationTuplesRequest_SubjectSet); ok { + return x.SubjectSet + } + return nil +} + +type isListRelationTuplesRequest_RestApiSubject interface { + isListRelationTuplesRequest_RestApiSubject() +} + +type ListRelationTuplesRequest_SubjectId struct { + // A concrete id of the subject. + SubjectId string `protobuf:"bytes,10,opt,name=subject_id,proto3,oneof"` +} + +type ListRelationTuplesRequest_SubjectSet struct { + // A subject set that expands to more Subjects. + // More information are available under [concepts](../concepts/subjects.mdx). + SubjectSet *SubjectSetQuery `protobuf:"bytes,11,opt,name=subject_set,proto3,oneof"` +} + +func (*ListRelationTuplesRequest_SubjectId) isListRelationTuplesRequest_RestApiSubject() {} + +func (*ListRelationTuplesRequest_SubjectSet) isListRelationTuplesRequest_RestApiSubject() {} + // The response of a ReadService.ListRelationTuples RPC. type ListRelationTuplesResponse struct { state protoimpl.MessageState @@ -150,10 +233,10 @@ type ListRelationTuplesResponse struct { unknownFields protoimpl.UnknownFields // The relationships matching the list request. - RelationTuples []*RelationTuple `protobuf:"bytes,1,rep,name=relation_tuples,json=relationTuples,proto3" json:"relation_tuples,omitempty"` + RelationTuples []*RelationTuple `protobuf:"bytes,1,rep,name=relation_tuples,proto3" json:"relation_tuples,omitempty"` // The token required to get the next page. // If this is the last page, the token will be the empty string. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,proto3" json:"next_page_token,omitempty"` } func (x *ListRelationTuplesResponse) Reset() { @@ -296,79 +379,118 @@ var file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDesc = []byte{ 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, 0x6b, - 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8b, 0x04, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x5c, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x42, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x12, 0x57, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, - 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x3b, 0x0a, 0x0b, 0x65, 0x78, 0x70, - 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x61, - 0x6e, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, - 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x1a, 0x9f, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x07, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x22, 0x9f, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x59, 0x0a, 0x0f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x0e, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, - 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xa1, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x91, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x3c, 0x2e, 0x6f, 0x72, - 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, - 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, 0x69, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 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, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 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, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, + 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xc7, 0x06, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x6e, 0x0a, + 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x6f, + 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x42, 0x14, 0x18, 0x01, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, + 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, + 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, + 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x0d, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x4f, 0x0a, 0x0b, 0x65, 0x78, + 0x70, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x12, 0xfa, 0xd2, 0xe4, + 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, + 0x0a, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x30, 0x0a, 0x09, 0x73, + 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, + 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, + 0x45, 0x52, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, + 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, + 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, + 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, + 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0a, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x56, 0x0a, 0x0b, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x32, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x73, 0x65, 0x74, 0x1a, 0x9f, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, + 0x69, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xa2, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xc1, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, - 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x32, 0x42, 0x10, 0x52, 0x65, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, - 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, - 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0f, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, + 0x70, 0x6c, 0x65, 0x52, 0x0f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xeb, + 0x02, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xdb, + 0x02, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x3c, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xc7, 0x01, 0x92, 0x41, 0xab, 0x01, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x10, 0x67, 0x65, 0x74, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x32, 0x21, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, 0x72, + 0x6d, 0x2d, 0x75, 0x72, 0x6c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x4a, 0x66, 0x0a, 0x03, + 0x32, 0x30, 0x30, 0x12, 0x5f, 0x0a, 0x1a, 0x54, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, + 0x6f, 0x66, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, + 0x2e, 0x12, 0x41, 0x0a, 0x3f, 0x1a, 0x3d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x42, 0xc1, 0x01, 0x0a, + 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x10, 0x52, 0x65, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, + 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, + 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -390,22 +512,24 @@ var file_ory_keto_relation_tuples_v1alpha2_read_service_proto_goTypes = []interf (*ListRelationTuplesRequest_Query)(nil), // 2: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query (*RelationQuery)(nil), // 3: ory.keto.relation_tuples.v1alpha2.RelationQuery (*fieldmaskpb.FieldMask)(nil), // 4: google.protobuf.FieldMask - (*RelationTuple)(nil), // 5: ory.keto.relation_tuples.v1alpha2.RelationTuple - (*Subject)(nil), // 6: ory.keto.relation_tuples.v1alpha2.Subject + (*SubjectSetQuery)(nil), // 5: ory.keto.relation_tuples.v1alpha2.SubjectSetQuery + (*RelationTuple)(nil), // 6: ory.keto.relation_tuples.v1alpha2.RelationTuple + (*Subject)(nil), // 7: ory.keto.relation_tuples.v1alpha2.Subject } var file_ory_keto_relation_tuples_v1alpha2_read_service_proto_depIdxs = []int32{ 2, // 0: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.query:type_name -> ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query 3, // 1: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.relation_query:type_name -> ory.keto.relation_tuples.v1alpha2.RelationQuery 4, // 2: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.expand_mask:type_name -> google.protobuf.FieldMask - 5, // 3: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.relation_tuples:type_name -> ory.keto.relation_tuples.v1alpha2.RelationTuple - 6, // 4: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject - 0, // 5: ory.keto.relation_tuples.v1alpha2.ReadService.ListRelationTuples:input_type -> ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest - 1, // 6: ory.keto.relation_tuples.v1alpha2.ReadService.ListRelationTuples:output_type -> ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse - 6, // [6:7] is the sub-list for method output_type - 5, // [5:6] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 5, // 3: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.subject_set:type_name -> ory.keto.relation_tuples.v1alpha2.SubjectSetQuery + 6, // 4: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.relation_tuples:type_name -> ory.keto.relation_tuples.v1alpha2.RelationTuple + 7, // 5: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject + 0, // 6: ory.keto.relation_tuples.v1alpha2.ReadService.ListRelationTuples:input_type -> ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest + 1, // 7: ory.keto.relation_tuples.v1alpha2.ReadService.ListRelationTuples:output_type -> ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse + 7, // [7:8] is the sub-list for method output_type + 6, // [6:7] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_ory_keto_relation_tuples_v1alpha2_read_service_proto_init() } @@ -452,6 +576,10 @@ func file_ory_keto_relation_tuples_v1alpha2_read_service_proto_init() { } } } + file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*ListRelationTuplesRequest_SubjectId)(nil), + (*ListRelationTuplesRequest_SubjectSet)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/read_service.proto index 55380299d..7062394c2 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.proto @@ -2,8 +2,11 @@ syntax = "proto3"; package ory.keto.relation_tuples.v1alpha2; -import "ory/keto/relation_tuples/v1alpha2/relation_tuples.proto"; +import "google/api/annotations.proto"; +import "google/api/visibility.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; import "google/protobuf/field_mask.proto"; +import "ory/keto/relation_tuples/v1alpha2/relation_tuples.proto"; option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; @@ -17,7 +20,27 @@ option php_namespace = "Ory\\Keto\\RelationTuples\\v1alpha2"; // This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). service ReadService { // Lists ACL relationships. - rpc ListRelationTuples(ListRelationTuplesRequest) returns (ListRelationTuplesResponse); + rpc ListRelationTuples(ListRelationTuplesRequest) returns (ListRelationTuplesResponse) { + option (google.api.http) = { + get: "/relation-tuples" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + consumes: "application/x-www-form-urlencoded"; + tags: "relationship"; + operation_id: "getRelationships"; + responses: { + key: "200" + value: { + description: "The list of relationships." + schema:{ + json_schema: { + ref: ".ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse"; + } + } + } + } + }; + }; } // Request for ReadService.ListRelationTuples RPC. @@ -44,14 +67,15 @@ message ListRelationTuplesRequest { // Optional. The subject to query for. Subject subject = 4; } + // All query constraints are concatenated // with a logical AND operator. // // The RelationTuple list from ListRelationTuplesResponse // is ordered from the newest RelationTuple to the oldest. - Query query = 1 [deprecated = true]; + Query query = 1 [deprecated = true, (google.api.field_visibility).restriction = "NO_SWAGGER"]; - RelationQuery relation_query = 6; + RelationQuery relation_query = 6 [(google.api.field_visibility).restriction = "NO_SWAGGER"]; // This field is not implemented yet and has no effect. // - google.protobuf.FieldMask expand_mask = 2; + google.protobuf.FieldMask expand_mask = 2 [(google.api.field_visibility).restriction = "NO_SWAGGER"]; + // This field is not implemented yet and has no effect. // - string snaptoken = 3; + string snaptoken = 3 [(google.api.field_visibility).restriction = "NO_SWAGGER"]; + // Optional. The maximum number of // RelationTuples to return in the response. // // Default: 100 - int32 page_size = 4; + int32 page_size = 4 [json_name="page_size"]; + // Optional. An opaque pagination token returned from // a previous call to `ListRelationTuples` that // indicates where the page should start at. // // An empty token denotes the first page. All successive // pages require the token from the previous page. - string page_token = 5; + string page_token = 5 [json_name="page_token"]; + + // The namespace + string namespace = 7 [deprecated = true]; + // The related object in this check. + string object = 8 [deprecated = true]; + // The relation between the Object and the Subject. + string relation = 9 [deprecated = true]; + + oneof rest_api_subject { + // A concrete id of the subject. + string subject_id = 10 [json_name="subject_id"]; + // A subject set that expands to more Subjects. + // More information are available under [concepts](../concepts/subjects.mdx). + SubjectSetQuery subject_set = 11 [json_name="subject_set"]; + } } // The response of a ReadService.ListRelationTuples RPC. message ListRelationTuplesResponse { // The relationships matching the list request. - repeated RelationTuple relation_tuples = 1; + repeated RelationTuple relation_tuples = 1 [json_name="relation_tuples"]; // The token required to get the next page. // If this is the last page, the token will be the empty string. - string next_page_token = 2; + string next_page_token = 2 [json_name="next_page_token"]; } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.d.ts index 4622b75af..82bdcccc9 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.d.ts @@ -6,8 +6,10 @@ import * as grpc from "grpc"; import * as ory_keto_relation_tuples_v1alpha2_read_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/read_service_pb"; -import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; +import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; import * as google_protobuf_field_mask_pb from "google-protobuf/google/protobuf/field_mask_pb"; +import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; interface IReadServiceService extends grpc.ServiceDefinition { listRelationTuples: IReadServiceService_IListRelationTuples; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js index b7f6ffdba..00f9b2c6e 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js @@ -3,8 +3,11 @@ 'use strict'; var grpc = require('@grpc/grpc-js'); var ory_keto_relation_tuples_v1alpha2_read_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/read_service_pb.js'); -var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); var google_protobuf_field_mask_pb = require('google-protobuf/google/protobuf/field_mask_pb.js'); +var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); function serialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesRequest(arg) { if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest)) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.d.ts index 9ab8fee58..681749238 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.d.ts @@ -5,8 +5,10 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; +import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; import * as google_protobuf_field_mask_pb from "google-protobuf/google/protobuf/field_mask_pb"; +import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; export class ListRelationTuplesRequest extends jspb.Message { @@ -30,6 +32,24 @@ export class ListRelationTuplesRequest extends jspb.Message { setPageSize(value: number): ListRelationTuplesRequest; getPageToken(): string; setPageToken(value: string): ListRelationTuplesRequest; + getNamespace(): string; + setNamespace(value: string): ListRelationTuplesRequest; + getObject(): string; + setObject(value: string): ListRelationTuplesRequest; + getRelation(): string; + setRelation(value: string): ListRelationTuplesRequest; + + hasSubjectId(): boolean; + clearSubjectId(): void; + getSubjectId(): string; + setSubjectId(value: string): ListRelationTuplesRequest; + + hasSubjectSet(): boolean; + clearSubjectSet(): void; + getSubjectSet(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery | undefined; + setSubjectSet(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery): ListRelationTuplesRequest; + + getRestApiSubjectCase(): ListRelationTuplesRequest.RestApiSubjectCase; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListRelationTuplesRequest.AsObject; @@ -49,6 +69,11 @@ export namespace ListRelationTuplesRequest { snaptoken: string, pageSize: number, pageToken: string, + namespace: string, + object: string, + relation: string, + subjectId: string, + subjectSet?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.AsObject, } @@ -84,6 +109,13 @@ export namespace ListRelationTuplesRequest { } } + + export enum RestApiSubjectCase { + REST_API_SUBJECT_NOT_SET = 0, + SUBJECT_ID = 10, + SUBJECT_SET = 11, + } + } export class ListRelationTuplesResponse extends jspb.Message { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js index 170aeb9c6..24ba51e93 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js @@ -15,12 +15,19 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); -var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); -goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); +goog.object.extend(proto, google_api_visibility_pb); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); +goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); var google_protobuf_field_mask_pb = require('google-protobuf/google/protobuf/field_mask_pb.js'); goog.object.extend(proto, google_protobuf_field_mask_pb); +var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); +goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.RestApiSubjectCase', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse', null, global); /** * Generated by JsPbCodeGenerator. @@ -33,7 +40,7 @@ goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRes * @constructor */ proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.oneofGroups_); }; goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -86,6 +93,32 @@ if (goog.DEBUG && !COMPILED) { proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse'; } +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.oneofGroups_ = [[10,11]]; + +/** + * @enum {number} + */ +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.RestApiSubjectCase = { + REST_API_SUBJECT_NOT_SET: 0, + SUBJECT_ID: 10, + SUBJECT_SET: 11 +}; + +/** + * @return {proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.RestApiSubjectCase} + */ +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.getRestApiSubjectCase = function() { + return /** @type {proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.RestApiSubjectCase} */(jspb.Message.computeOneofCase(this, proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -122,7 +155,12 @@ proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.toObject = fun expandMask: (f = msg.getExpandMask()) && google_protobuf_field_mask_pb.FieldMask.toObject(includeInstance, f), snaptoken: jspb.Message.getFieldWithDefault(msg, 3, ""), pageSize: jspb.Message.getFieldWithDefault(msg, 4, 0), - pageToken: jspb.Message.getFieldWithDefault(msg, 5, "") + pageToken: jspb.Message.getFieldWithDefault(msg, 5, ""), + namespace: jspb.Message.getFieldWithDefault(msg, 7, ""), + object: jspb.Message.getFieldWithDefault(msg, 8, ""), + relation: jspb.Message.getFieldWithDefault(msg, 9, ""), + subjectId: jspb.Message.getFieldWithDefault(msg, 10, ""), + subjectSet: (f = msg.getSubjectSet()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.toObject(includeInstance, f) }; if (includeInstance) { @@ -186,6 +224,27 @@ proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.deserializeBin var value = /** @type {string} */ (reader.readString()); msg.setPageToken(value); break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setNamespace(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setObject(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setRelation(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setSubjectId(value); + break; + case 11: + var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery; + reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.deserializeBinaryFromReader); + msg.setSubjectSet(value); + break; default: reader.skipField(); break; @@ -260,6 +319,42 @@ proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.serializeBinar f ); } + f = message.getNamespace(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getObject(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getRelation(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeString( + 10, + f + ); + } + f = message.getSubjectSet(); + if (f != null) { + writer.writeMessage( + 11, + f, + ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.serializeBinaryToWriter + ); + } }; @@ -669,6 +764,133 @@ proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.setP }; +/** + * optional string namespace = 7; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.getNamespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.setNamespace = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string object = 8; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.getObject = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.setObject = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string relation = 9; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.getRelation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.setRelation = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional string subject_id = 10; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.getSubjectId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.setSubjectId = function(value) { + return jspb.Message.setOneofField(this, 10, proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.clearSubjectId = function() { + return jspb.Message.setOneofField(this, 10, proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.hasSubjectId = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional SubjectSetQuery subject_set = 11; + * @return {?proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery} + */ +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.getSubjectSet = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery} */ ( + jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery, 11)); +}; + + +/** + * @param {?proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this +*/ +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.setSubjectSet = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.clearSubjectSet = function() { + return this.setSubjectSet(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.hasSubjectSet = function() { + return jspb.Message.getField(this, 11) != null; +}; + + /** * List of repeated fields within this message type. diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go index 54c95be85..9892747e7 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go @@ -7,6 +7,8 @@ package rts import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + _ "google.golang.org/genproto/googleapis/api/visibility" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -37,6 +39,10 @@ type RelationTuple struct { // A Subject either represents a concrete subject id or // a `SubjectSet` that expands to more Subjects. Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` + // Types that are assignable to RestApiSubject: + // *RelationTuple_SubjectId + // *RelationTuple_SubjectSet + RestApiSubject isRelationTuple_RestApiSubject `protobuf_oneof:"rest_api_subject"` } func (x *RelationTuple) Reset() { @@ -99,6 +105,52 @@ func (x *RelationTuple) GetSubject() *Subject { return nil } +func (m *RelationTuple) GetRestApiSubject() isRelationTuple_RestApiSubject { + if m != nil { + return m.RestApiSubject + } + return nil +} + +// Deprecated: Do not use. +func (x *RelationTuple) GetSubjectId() string { + if x, ok := x.GetRestApiSubject().(*RelationTuple_SubjectId); ok { + return x.SubjectId + } + return "" +} + +// Deprecated: Do not use. +func (x *RelationTuple) GetSubjectSet() *SubjectSet { + if x, ok := x.GetRestApiSubject().(*RelationTuple_SubjectSet); ok { + return x.SubjectSet + } + return nil +} + +type isRelationTuple_RestApiSubject interface { + isRelationTuple_RestApiSubject() +} + +type RelationTuple_SubjectId struct { + // A concrete id of the subject. + // + // Deprecated: Do not use. + SubjectId string `protobuf:"bytes,5,opt,name=subject_id,proto3,oneof"` +} + +type RelationTuple_SubjectSet struct { + // A subject set that expands to more Subjects. + // More information are available under [concepts](../concepts/subjects.mdx). + // + // Deprecated: Do not use. + SubjectSet *SubjectSet `protobuf:"bytes,6,opt,name=subject_set,proto3,oneof"` +} + +func (*RelationTuple_SubjectId) isRelationTuple_RestApiSubject() {} + +func (*RelationTuple_SubjectSet) isRelationTuple_RestApiSubject() {} + // The query for listing relationships. // Clients can specify any optional field to // partially filter for specific relationships. @@ -343,6 +395,162 @@ func (x *SubjectSet) GetRelation() string { return "" } +// SubjectQuery is either a concrete subject id or +// a `SubjectSet` expanding to more Subjects. +type SubjectQuery struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The reference of this abstract subject. + // + // Types that are assignable to Ref: + // *SubjectQuery_Id + // *SubjectQuery_Set + Ref isSubjectQuery_Ref `protobuf_oneof:"ref"` +} + +func (x *SubjectQuery) Reset() { + *x = SubjectQuery{} + if protoimpl.UnsafeEnabled { + mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubjectQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubjectQuery) ProtoMessage() {} + +func (x *SubjectQuery) ProtoReflect() protoreflect.Message { + mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubjectQuery.ProtoReflect.Descriptor instead. +func (*SubjectQuery) Descriptor() ([]byte, []int) { + return file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescGZIP(), []int{4} +} + +func (m *SubjectQuery) GetRef() isSubjectQuery_Ref { + if m != nil { + return m.Ref + } + return nil +} + +func (x *SubjectQuery) GetId() string { + if x, ok := x.GetRef().(*SubjectQuery_Id); ok { + return x.Id + } + return "" +} + +func (x *SubjectQuery) GetSet() *SubjectSetQuery { + if x, ok := x.GetRef().(*SubjectQuery_Set); ok { + return x.Set + } + return nil +} + +type isSubjectQuery_Ref interface { + isSubjectQuery_Ref() +} + +type SubjectQuery_Id struct { + // A concrete id of the subject. + Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` +} + +type SubjectQuery_Set struct { + // A subject set that expands to more Subjects. + // More information are available under [concepts](../concepts/subjects.mdx). + Set *SubjectSetQuery `protobuf:"bytes,2,opt,name=set,proto3,oneof"` +} + +func (*SubjectQuery_Id) isSubjectQuery_Ref() {} + +func (*SubjectQuery_Set) isSubjectQuery_Ref() {} + +// SubjectSetQuery refers to all subjects who have +// the same `relation` on an `object`. +type SubjectSetQuery struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The namespace of the object and relation + // referenced in this subject set. + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + // The object related by this subject set. + Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"` + // The relation between the object and the subjects. + Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` +} + +func (x *SubjectSetQuery) Reset() { + *x = SubjectSetQuery{} + if protoimpl.UnsafeEnabled { + mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubjectSetQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubjectSetQuery) ProtoMessage() {} + +func (x *SubjectSetQuery) ProtoReflect() protoreflect.Message { + mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubjectSetQuery.ProtoReflect.Descriptor instead. +func (*SubjectSetQuery) Descriptor() ([]byte, []int) { + return file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescGZIP(), []int{5} +} + +func (x *SubjectSetQuery) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *SubjectSetQuery) GetObject() string { + if x != nil { + return x.Object + } + return "" +} + +func (x *SubjectSetQuery) GetRelation() string { + if x != nil { + return x.Relation + } + return "" +} + var File_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto protoreflect.FileDescriptor var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDesc = []byte{ @@ -351,58 +559,89 @@ var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDesc = []byt 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x22, 0xa7, 0x01, 0x0a, - 0x0d, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x1c, - 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xed, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x08, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x49, 0x0a, 0x07, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x03, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x0b, 0x0a, - 0x09, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x65, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x41, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x48, - 0x00, 0x52, 0x03, 0x73, 0x65, 0x74, 0x42, 0x05, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x22, 0x5e, 0x0a, - 0x0a, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xc4, 0x01, - 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x1a, 0x1b, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x02, 0x0a, 0x0d, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1f, 0x0a, 0x08, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, + 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, + 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x07, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, + 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x55, 0x0a, + 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, + 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x73, 0x65, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, 0x69, + 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xed, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x08, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x49, 0x0a, 0x07, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, + 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x03, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, + 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, + 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x65, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x41, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x13, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, - 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, - 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, - 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, + 0x74, 0x48, 0x00, 0x52, 0x03, 0x73, 0x65, 0x74, 0x42, 0x05, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x22, + 0x6d, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x12, 0x21, 0x0a, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1f, 0x0a, + 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6f, + 0x0a, 0x0c, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x46, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, + 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x48, 0x00, 0x52, 0x03, 0x73, 0x65, 0x74, 0x42, 0x05, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x22, + 0x72, 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x12, 0x21, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0xc4, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, + 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x13, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, + 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, + 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -417,22 +656,26 @@ func file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescGZIP() return file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescData } -var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_goTypes = []interface{}{ - (*RelationTuple)(nil), // 0: ory.keto.relation_tuples.v1alpha2.RelationTuple - (*RelationQuery)(nil), // 1: ory.keto.relation_tuples.v1alpha2.RelationQuery - (*Subject)(nil), // 2: ory.keto.relation_tuples.v1alpha2.Subject - (*SubjectSet)(nil), // 3: ory.keto.relation_tuples.v1alpha2.SubjectSet + (*RelationTuple)(nil), // 0: ory.keto.relation_tuples.v1alpha2.RelationTuple + (*RelationQuery)(nil), // 1: ory.keto.relation_tuples.v1alpha2.RelationQuery + (*Subject)(nil), // 2: ory.keto.relation_tuples.v1alpha2.Subject + (*SubjectSet)(nil), // 3: ory.keto.relation_tuples.v1alpha2.SubjectSet + (*SubjectQuery)(nil), // 4: ory.keto.relation_tuples.v1alpha2.SubjectQuery + (*SubjectSetQuery)(nil), // 5: ory.keto.relation_tuples.v1alpha2.SubjectSetQuery } var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_depIdxs = []int32{ 2, // 0: ory.keto.relation_tuples.v1alpha2.RelationTuple.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject - 2, // 1: ory.keto.relation_tuples.v1alpha2.RelationQuery.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject - 3, // 2: ory.keto.relation_tuples.v1alpha2.Subject.set:type_name -> ory.keto.relation_tuples.v1alpha2.SubjectSet - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 3, // 1: ory.keto.relation_tuples.v1alpha2.RelationTuple.subject_set:type_name -> ory.keto.relation_tuples.v1alpha2.SubjectSet + 2, // 2: ory.keto.relation_tuples.v1alpha2.RelationQuery.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject + 3, // 3: ory.keto.relation_tuples.v1alpha2.Subject.set:type_name -> ory.keto.relation_tuples.v1alpha2.SubjectSet + 5, // 4: ory.keto.relation_tuples.v1alpha2.SubjectQuery.set:type_name -> ory.keto.relation_tuples.v1alpha2.SubjectSetQuery + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() } @@ -489,19 +732,51 @@ func file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() { return nil } } + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubjectQuery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubjectSetQuery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*RelationTuple_SubjectId)(nil), + (*RelationTuple_SubjectSet)(nil), } file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[1].OneofWrappers = []interface{}{} file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[2].OneofWrappers = []interface{}{ (*Subject_Id)(nil), (*Subject_Set)(nil), } + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*SubjectQuery_Id)(nil), + (*SubjectQuery_Set)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.proto b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.proto index 7cd1d17e0..4b2dc0dfb 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.proto @@ -1,5 +1,7 @@ syntax = "proto3"; +import "google/api/visibility.proto"; +import "google/api/field_behavior.proto"; package ory.keto.relation_tuples.v1alpha2; option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; @@ -12,16 +14,27 @@ option php_namespace = "Ory\\Keto\\RelationTuples\\v1alpha2"; // RelationTuple defines a relation between an Object and a Subject. message RelationTuple { // The namespace this relation tuple lives in. - string namespace = 1; + string namespace = 1 [(google.api.field_behavior) = REQUIRED]; + // The object related by this tuple. // It is an object in the namespace of the tuple. - string object = 2; + string object = 2 [(google.api.field_behavior) = REQUIRED] ; + // The relation between an Object and a Subject. - string relation = 3; + string relation = 3 [(google.api.field_behavior) = REQUIRED]; + // The subject related by this tuple. // A Subject either represents a concrete subject id or // a `SubjectSet` that expands to more Subjects. - Subject subject = 4; + Subject subject = 4 [(google.api.field_visibility).restriction = "NO_SWAGGER"]; + + oneof rest_api_subject { + // A concrete id of the subject. + string subject_id = 5 [deprecated=true, json_name="subject_id"]; + // A subject set that expands to more Subjects. + // More information are available under [concepts](../concepts/subjects.mdx). + SubjectSet subject_set = 6 [deprecated=true, json_name="subject_set"]; + } } // The query for listing relationships. @@ -66,9 +79,34 @@ message Subject { message SubjectSet { // The namespace of the object and relation // referenced in this subject set. - string namespace = 1; + string namespace = 1 [(google.api.field_behavior) = REQUIRED]; // The object related by this subject set. - string object = 2; + string object = 2 [(google.api.field_behavior) = REQUIRED]; // The relation between the object and the subjects. - string relation = 3; + string relation = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// SubjectQuery is either a concrete subject id or +// a `SubjectSet` expanding to more Subjects. +message SubjectQuery { + // The reference of this abstract subject. + oneof ref { + // A concrete id of the subject. + string id = 1; + // A subject set that expands to more Subjects. + // More information are available under [concepts](../concepts/subjects.mdx). + SubjectSetQuery set = 2; + } } + +// SubjectSetQuery refers to all subjects who have +// the same `relation` on an `object`. +message SubjectSetQuery { + // The namespace of the object and relation + // referenced in this subject set. + string namespace = 1 [(google.api.field_behavior) = OPTIONAL]; + // The object related by this subject set. + string object = 2 [(google.api.field_behavior) = OPTIONAL]; + // The relation between the object and the subjects. + string relation = 3 [(google.api.field_behavior) = OPTIONAL]; +} \ No newline at end of file diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.d.ts index 82bfeb6f7..7cb8824bf 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.d.ts @@ -5,6 +5,8 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; +import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; +import * as google_api_field_behavior_pb from "../../../../google/api/field_behavior_pb"; export class RelationTuple extends jspb.Message { getNamespace(): string; @@ -19,6 +21,18 @@ export class RelationTuple extends jspb.Message { getSubject(): Subject | undefined; setSubject(value?: Subject): RelationTuple; + hasSubjectId(): boolean; + clearSubjectId(): void; + getSubjectId(): string; + setSubjectId(value: string): RelationTuple; + + hasSubjectSet(): boolean; + clearSubjectSet(): void; + getSubjectSet(): SubjectSet | undefined; + setSubjectSet(value?: SubjectSet): RelationTuple; + + getRestApiSubjectCase(): RelationTuple.RestApiSubjectCase; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): RelationTuple.AsObject; static toObject(includeInstance: boolean, msg: RelationTuple): RelationTuple.AsObject; @@ -35,7 +49,16 @@ export namespace RelationTuple { object: string, relation: string, subject?: Subject.AsObject, + subjectId: string, + subjectSet?: SubjectSet.AsObject, } + + export enum RestApiSubjectCase { + REST_API_SUBJECT_NOT_SET = 0, + SUBJECT_ID = 5, + SUBJECT_SET = 6, + } + } export class RelationQuery extends jspb.Message { @@ -142,3 +165,67 @@ export namespace SubjectSet { relation: string, } } + +export class SubjectQuery extends jspb.Message { + + hasId(): boolean; + clearId(): void; + getId(): string; + setId(value: string): SubjectQuery; + + hasSet(): boolean; + clearSet(): void; + getSet(): SubjectSetQuery | undefined; + setSet(value?: SubjectSetQuery): SubjectQuery; + + getRefCase(): SubjectQuery.RefCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SubjectQuery.AsObject; + static toObject(includeInstance: boolean, msg: SubjectQuery): SubjectQuery.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SubjectQuery, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SubjectQuery; + static deserializeBinaryFromReader(message: SubjectQuery, reader: jspb.BinaryReader): SubjectQuery; +} + +export namespace SubjectQuery { + export type AsObject = { + id: string, + set?: SubjectSetQuery.AsObject, + } + + export enum RefCase { + REF_NOT_SET = 0, + ID = 1, + SET = 2, + } + +} + +export class SubjectSetQuery extends jspb.Message { + getNamespace(): string; + setNamespace(value: string): SubjectSetQuery; + getObject(): string; + setObject(value: string): SubjectSetQuery; + getRelation(): string; + setRelation(value: string): SubjectSetQuery; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SubjectSetQuery.AsObject; + static toObject(includeInstance: boolean, msg: SubjectSetQuery): SubjectSetQuery.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SubjectSetQuery, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SubjectSetQuery; + static deserializeBinaryFromReader(message: SubjectSetQuery, reader: jspb.BinaryReader): SubjectSetQuery; +} + +export namespace SubjectSetQuery { + export type AsObject = { + namespace: string, + object: string, + relation: string, + } +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js index f05a0ef12..c356922e5 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js @@ -15,11 +15,19 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); +goog.object.extend(proto, google_api_visibility_pb); +var google_api_field_behavior_pb = require('../../../../google/api/field_behavior_pb.js'); +goog.object.extend(proto, google_api_field_behavior_pb); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.RelationQuery', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.RelationTuple', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.RestApiSubjectCase', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.Subject', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.Subject.RefCase', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.RefCase', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.SubjectSet', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -31,7 +39,7 @@ goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.SubjectSet', null, gl * @constructor */ proto.ory.keto.relation_tuples.v1alpha2.RelationTuple = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.oneofGroups_); }; goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.RelationTuple, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -104,6 +112,74 @@ if (goog.DEBUG && !COMPILED) { */ proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.SubjectSet'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.oneofGroups_); +}; +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery'; +} + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.oneofGroups_ = [[5,6]]; + +/** + * @enum {number} + */ +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.RestApiSubjectCase = { + REST_API_SUBJECT_NOT_SET: 0, + SUBJECT_ID: 5, + SUBJECT_SET: 6 +}; + +/** + * @return {proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.RestApiSubjectCase} + */ +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.getRestApiSubjectCase = function() { + return /** @type {proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.RestApiSubjectCase} */(jspb.Message.computeOneofCase(this, proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.oneofGroups_[0])); +}; @@ -139,7 +215,9 @@ proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.toObject = function(includ namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), object: jspb.Message.getFieldWithDefault(msg, 2, ""), relation: jspb.Message.getFieldWithDefault(msg, 3, ""), - subject: (f = msg.getSubject()) && proto.ory.keto.relation_tuples.v1alpha2.Subject.toObject(includeInstance, f) + subject: (f = msg.getSubject()) && proto.ory.keto.relation_tuples.v1alpha2.Subject.toObject(includeInstance, f), + subjectId: jspb.Message.getFieldWithDefault(msg, 5, ""), + subjectSet: (f = msg.getSubjectSet()) && proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.toObject(includeInstance, f) }; if (includeInstance) { @@ -193,6 +271,15 @@ proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.deserializeBinaryFromReade reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.Subject.deserializeBinaryFromReader); msg.setSubject(value); break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSubjectId(value); + break; + case 6: + var value = new proto.ory.keto.relation_tuples.v1alpha2.SubjectSet; + reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.deserializeBinaryFromReader); + msg.setSubjectSet(value); + break; default: reader.skipField(); break; @@ -251,6 +338,21 @@ proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.serializeBinaryToWriter = proto.ory.keto.relation_tuples.v1alpha2.Subject.serializeBinaryToWriter ); } + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeString( + 5, + f + ); + } + f = message.getSubjectSet(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.serializeBinaryToWriter + ); + } }; @@ -345,6 +447,79 @@ proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.hasSubject = fun }; +/** + * optional string subject_id = 5; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.getSubjectId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.setSubjectId = function(value) { + return jspb.Message.setOneofField(this, 5, proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.clearSubjectId = function() { + return jspb.Message.setOneofField(this, 5, proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.hasSubjectId = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional SubjectSet subject_set = 6; + * @return {?proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} + */ +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.getSubjectSet = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} */ ( + jspb.Message.getWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.SubjectSet, 6)); +}; + + +/** + * @param {?proto.ory.keto.relation_tuples.v1alpha2.SubjectSet|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} returns this +*/ +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.setSubjectSet = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.clearSubjectSet = function() { + return this.setSubjectSet(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.hasSubjectSet = function() { + return jspb.Message.getField(this, 6) != null; +}; + + @@ -1055,4 +1230,419 @@ proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.setRelation = funct }; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.RefCase = { + REF_NOT_SET: 0, + ID: 1, + SET: 2 +}; + +/** + * @return {proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.RefCase} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.prototype.getRefCase = function() { + return /** @type {proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.RefCase} */(jspb.Message.computeOneofCase(this, proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + set: (f = msg.getSet()) && proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery; + return proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = new proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery; + reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.deserializeBinaryFromReader); + msg.setSet(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getSet(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.prototype.setId = function(value) { + return jspb.Message.setOneofField(this, 1, proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.prototype.clearId = function() { + return jspb.Message.setOneofField(this, 1, proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.prototype.hasId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional SubjectSetQuery set = 2; + * @return {?proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.prototype.getSet = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery} */ ( + jspb.Message.getWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery, 2)); +}; + + +/** + * @param {?proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery} returns this +*/ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.prototype.setSet = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.prototype.clearSet = function() { + return this.setSet(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.prototype.hasSet = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.toObject = function(includeInstance, msg) { + var f, obj = { + namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), + object: jspb.Message.getFieldWithDefault(msg, 2, ""), + relation: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery; + return proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setNamespace(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setObject(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRelation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNamespace(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getObject(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRelation(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string namespace = 1; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.prototype.getNamespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.prototype.setNamespace = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string object = 2; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.prototype.getObject = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.prototype.setObject = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string relation = 3; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.prototype.getRelation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.prototype.setRelation = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + goog.object.extend(exports, proto.ory.keto.relation_tuples.v1alpha2); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/utils.go b/proto/ory/keto/relation_tuples/v1alpha2/utils.go index 75cf85ecd..b7ad63aa0 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/utils.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/utils.go @@ -5,9 +5,10 @@ package rts // WriteServiceClient.TransactRelationTuples operation. // // Example: -// c.TransactRelationTuples(context.Background(), &rts.TransactRelationTuplesRequest{ -// RelationTupleDeltas: append(rts.RelationTupleToDeltas(insertTuples, rts.RelationTupleDelta_INSERT), rts.RelationTupleToDeltas(deleteTuples, rts.RelationTupleDelta_DELETE)...), -// }) +// +// c.TransactRelationTuples(context.Background(), &rts.TransactRelationTuplesRequest{ +// RelationTupleDeltas: append(rts.RelationTupleToDeltas(insertTuples, rts.RelationTupleDelta_INSERT), rts.RelationTupleToDeltas(deleteTuples, rts.RelationTupleDelta_DELETE)...), +// }) func RelationTupleToDeltas(rs []*RelationTuple, action RelationTupleDelta_Action) []*RelationTupleDelta { deltas := make([]*RelationTupleDelta, len(rs)) for i := range rs { @@ -32,3 +33,17 @@ func NewSubjectSet(namespace, object, relation string) *Subject { func NewSubjectID(id string) *Subject { return &Subject{Ref: &Subject_Id{Id: id}} } + +// NewSubjectQueryFromSet returns a subject query with a SubjectSet ref. +func NewSubjectQueryFromSet(namespace, object, relation string) *SubjectQuery { + return &SubjectQuery{Ref: &SubjectQuery_Set{Set: &SubjectSetQuery{ + Namespace: namespace, + Object: object, + Relation: relation, + }}} +} + +// NewSubjectQueryFromID returns a subject query with a subject ID ref. +func NewSubjectQueryFromID(id string) *SubjectQuery { + return &SubjectQuery{Ref: &SubjectQuery_Id{Id: id}} +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go index f8ebdb16d..983dddc82 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go @@ -7,6 +7,8 @@ package rts import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -116,33 +118,47 @@ var file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDesc = []byte{ 0x68, 0x61, 0x32, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0x22, 0x13, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2e, 0x0a, 0x12, 0x47, 0x65, 0x74, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x8b, 0x01, 0x0a, 0x0e, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x79, 0x0a, 0x0a, - 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x47, - 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x35, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xc4, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, + 0x70, 0x68, 0x61, 0x32, 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, 0x13, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2e, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x99, 0x02, 0x0a, 0x0e, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x86, 0x02, 0x0a, 0x0a, 0x47, + 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x6f, 0x72, 0x79, 0x2e, + 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x47, 0x65, + 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x35, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8a, 0x01, 0x92, 0x41, 0x77, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x0a, 0x67, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x4a, 0x60, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x59, 0x0a, 0x1c, 0x54, 0x68, 0x65, 0x20, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x12, 0x39, 0x0a, 0x37, 0x1a, 0x35, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, - 0x42, 0x13, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, - 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, - 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x42, 0xc4, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, + 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x13, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, + 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, + 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version.proto b/proto/ory/keto/relation_tuples/v1alpha2/version.proto index 5afa45d9b..dde27f037 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/version.proto @@ -1,5 +1,7 @@ syntax = "proto3"; +import "google/api/annotations.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; package ory.keto.relation_tuples.v1alpha2; option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; @@ -14,7 +16,31 @@ option php_namespace = "Ory\\Keto\\RelationTuples\\v1alpha2"; // This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis) and [write-APIs](../concepts/api-overview.mdx#write-apis). service VersionService { // Returns the version of the Ory Keto instance. - rpc GetVersion(GetVersionRequest) returns (GetVersionResponse); + // + // This endpoint returns the service version typically notated using semantic versioning. + // + // If the service supports TLS Edge Termination, this endpoint does not require the + // X-Forwarded-Proto header to be set. + rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) { + option (google.api.http) = { + get: "/version" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "version"; + operation_id: "getVersion"; + responses: { + key: "200" + value: { + description: "The version of the instance." + schema:{ + json_schema: { + ref: ".ory.keto.relation_tuples.v1alpha2.GetVersionResponse"; + } + } + } + } + }; + }; } // Request for the VersionService.GetVersion RPC. diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc.pb.go index 7af9c2933..2e2a5aa46 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc.pb.go @@ -23,6 +23,11 @@ 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 VersionServiceClient interface { // Returns the version of the Ory Keto instance. + // + // This endpoint returns the service version typically notated using semantic versioning. + // + // If the service supports TLS Edge Termination, this endpoint does not require the + // X-Forwarded-Proto header to be set. GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error) } @@ -48,6 +53,11 @@ func (c *versionServiceClient) GetVersion(ctx context.Context, in *GetVersionReq // for forward compatibility type VersionServiceServer interface { // Returns the version of the Ory Keto instance. + // + // This endpoint returns the service version typically notated using semantic versioning. + // + // If the service supports TLS Edge Termination, this endpoint does not require the + // X-Forwarded-Proto header to be set. GetVersion(context.Context, *GetVersionRequest) (*GetVersionResponse, error) } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.d.ts index e99b28cc7..32f21f9d9 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.d.ts @@ -6,6 +6,7 @@ import * as grpc from "grpc"; import * as ory_keto_relation_tuples_v1alpha2_version_pb from "../../../../ory/keto/relation_tuples/v1alpha2/version_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; interface IVersionServiceService extends grpc.ServiceDefinition { getVersion: IVersionServiceService_IGetVersion; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.js index 8099d1e7e..d91482ada 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc_pb.js @@ -3,6 +3,8 @@ 'use strict'; var grpc = require('@grpc/grpc-js'); var ory_keto_relation_tuples_v1alpha2_version_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/version_pb.js'); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); function serialize_ory_keto_relation_tuples_v1alpha2_GetVersionRequest(arg) { if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_version_pb.GetVersionRequest)) { @@ -32,6 +34,11 @@ function deserialize_ory_keto_relation_tuples_v1alpha2_GetVersionResponse(buffer // This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis) and [write-APIs](../concepts/api-overview.mdx#write-apis). var VersionServiceService = exports.VersionServiceService = { // Returns the version of the Ory Keto instance. +// +// This endpoint returns the service version typically notated using semantic versioning. +// +// If the service supports TLS Edge Termination, this endpoint does not require the +// X-Forwarded-Proto header to be set. getVersion: { path: '/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion', requestStream: false, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/version_pb.d.ts index bf91795fe..271ee15bd 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/version_pb.d.ts @@ -5,6 +5,7 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; export class GetVersionRequest extends jspb.Message { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js index 340497c68..12b1e4aa8 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js @@ -15,6 +15,10 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); +goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.GetVersionRequest', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse', null, global); /** diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go index 53ca4e238..e52559ce5 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go @@ -7,6 +7,9 @@ package rts import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + _ "google.golang.org/genproto/googleapis/api/visibility" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -30,9 +33,15 @@ const ( // Insertion of a new RelationTuple. // It is ignored if already existing. RelationTupleDelta_ACTION_INSERT RelationTupleDelta_Action = 1 + // Insertion of a new RelationTuple. + // It is ignored if already existing. + RelationTupleDelta_insert RelationTupleDelta_Action = 1 // Deletion of the RelationTuple. // It is ignored if it does not exist. RelationTupleDelta_ACTION_DELETE RelationTupleDelta_Action = 2 + // Deletion of the RelationTuple. + // It is ignored if it does not exist. + RelationTupleDelta_delete RelationTupleDelta_Action = 2 ) // Enum value maps for RelationTupleDelta_Action. @@ -40,12 +49,16 @@ var ( RelationTupleDelta_Action_name = map[int32]string{ 0: "ACTION_UNSPECIFIED", 1: "ACTION_INSERT", + // Duplicate value: 1: "insert", 2: "ACTION_DELETE", + // Duplicate value: 2: "delete", } RelationTupleDelta_Action_value = map[string]int32{ "ACTION_UNSPECIFIED": 0, "ACTION_INSERT": 1, + "insert": 1, "ACTION_DELETE": 2, + "delete": 2, } ) @@ -135,7 +148,7 @@ type RelationTupleDelta struct { // The action to do on the RelationTuple. Action RelationTupleDelta_Action `protobuf:"varint,1,opt,name=action,proto3,enum=ory.keto.relation_tuples.v1alpha2.RelationTupleDelta_Action" json:"action,omitempty"` // The target RelationTuple. - RelationTuple *RelationTuple `protobuf:"bytes,2,opt,name=relation_tuple,json=relationTuple,proto3" json:"relation_tuple,omitempty"` + RelationTuple *RelationTuple `protobuf:"bytes,2,opt,name=relation_tuple,proto3" json:"relation_tuple,omitempty"` } func (x *RelationTupleDelta) Reset() { @@ -241,6 +254,104 @@ func (x *TransactRelationTuplesResponse) GetSnaptokens() []string { return nil } +// The request to create a new relationship. +type CreateRelationTupleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The relationship to create. + RelationTuple *CreateRelationTupleRequest_Relationship `protobuf:"bytes,1,opt,name=relation_tuple,json=relationTuple,proto3" json:"relation_tuple,omitempty"` +} + +func (x *CreateRelationTupleRequest) Reset() { + *x = CreateRelationTupleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateRelationTupleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRelationTupleRequest) ProtoMessage() {} + +func (x *CreateRelationTupleRequest) ProtoReflect() protoreflect.Message { + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateRelationTupleRequest.ProtoReflect.Descriptor instead. +func (*CreateRelationTupleRequest) Descriptor() ([]byte, []int) { + return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{3} +} + +func (x *CreateRelationTupleRequest) GetRelationTuple() *CreateRelationTupleRequest_Relationship { + if x != nil { + return x.RelationTuple + } + return nil +} + +// The response from creating a new relationship. +type CreateRelationTupleResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The created relationship. + RelationTuple *RelationTuple `protobuf:"bytes,1,opt,name=relation_tuple,json=relationTuple,proto3" json:"relation_tuple,omitempty"` +} + +func (x *CreateRelationTupleResponse) Reset() { + *x = CreateRelationTupleResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateRelationTupleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRelationTupleResponse) ProtoMessage() {} + +func (x *CreateRelationTupleResponse) ProtoReflect() protoreflect.Message { + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateRelationTupleResponse.ProtoReflect.Descriptor instead. +func (*CreateRelationTupleResponse) Descriptor() ([]byte, []int) { + return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateRelationTupleResponse) GetRelationTuple() *RelationTuple { + if x != nil { + return x.RelationTuple + } + return nil +} + type DeleteRelationTuplesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -249,12 +360,29 @@ type DeleteRelationTuplesRequest struct { // Deprecated: Do not use. Query *DeleteRelationTuplesRequest_Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` RelationQuery *RelationQuery `protobuf:"bytes,2,opt,name=relation_query,json=relationQuery,proto3" json:"relation_query,omitempty"` + // The namespace this relation tuple lives in. + // + // Deprecated: Do not use. + Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` + // The object related by this tuple. + // It is an object in the namespace of the tuple. + // + // Deprecated: Do not use. + Object string `protobuf:"bytes,4,opt,name=object,proto3" json:"object,omitempty"` + // The relation between an Object and a Subject. + // + // Deprecated: Do not use. + Relation string `protobuf:"bytes,5,opt,name=relation,proto3" json:"relation,omitempty"` + // Types that are assignable to RestApiSubject: + // *DeleteRelationTuplesRequest_SubjectId + // *DeleteRelationTuplesRequest_SubjectSet + RestApiSubject isDeleteRelationTuplesRequest_RestApiSubject `protobuf_oneof:"rest_api_subject"` } func (x *DeleteRelationTuplesRequest) Reset() { *x = DeleteRelationTuplesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[3] + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -267,7 +395,7 @@ func (x *DeleteRelationTuplesRequest) String() string { func (*DeleteRelationTuplesRequest) ProtoMessage() {} func (x *DeleteRelationTuplesRequest) ProtoReflect() protoreflect.Message { - mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[3] + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -280,7 +408,7 @@ func (x *DeleteRelationTuplesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteRelationTuplesRequest.ProtoReflect.Descriptor instead. func (*DeleteRelationTuplesRequest) Descriptor() ([]byte, []int) { - return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{3} + return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{5} } // Deprecated: Do not use. @@ -298,6 +426,76 @@ func (x *DeleteRelationTuplesRequest) GetRelationQuery() *RelationQuery { return nil } +// Deprecated: Do not use. +func (x *DeleteRelationTuplesRequest) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +// Deprecated: Do not use. +func (x *DeleteRelationTuplesRequest) GetObject() string { + if x != nil { + return x.Object + } + return "" +} + +// Deprecated: Do not use. +func (x *DeleteRelationTuplesRequest) GetRelation() string { + if x != nil { + return x.Relation + } + return "" +} + +func (m *DeleteRelationTuplesRequest) GetRestApiSubject() isDeleteRelationTuplesRequest_RestApiSubject { + if m != nil { + return m.RestApiSubject + } + return nil +} + +// Deprecated: Do not use. +func (x *DeleteRelationTuplesRequest) GetSubjectId() string { + if x, ok := x.GetRestApiSubject().(*DeleteRelationTuplesRequest_SubjectId); ok { + return x.SubjectId + } + return "" +} + +// Deprecated: Do not use. +func (x *DeleteRelationTuplesRequest) GetSubjectSet() *SubjectSetQuery { + if x, ok := x.GetRestApiSubject().(*DeleteRelationTuplesRequest_SubjectSet); ok { + return x.SubjectSet + } + return nil +} + +type isDeleteRelationTuplesRequest_RestApiSubject interface { + isDeleteRelationTuplesRequest_RestApiSubject() +} + +type DeleteRelationTuplesRequest_SubjectId struct { + // A concrete id of the subject. + // + // Deprecated: Do not use. + SubjectId string `protobuf:"bytes,6,opt,name=subject_id,proto3,oneof"` +} + +type DeleteRelationTuplesRequest_SubjectSet struct { + // A subject set that expands to more Subjects. + // More information are available under [concepts](../concepts/subjects.mdx). + // + // Deprecated: Do not use. + SubjectSet *SubjectSetQuery `protobuf:"bytes,7,opt,name=subject_set,proto3,oneof"` +} + +func (*DeleteRelationTuplesRequest_SubjectId) isDeleteRelationTuplesRequest_RestApiSubject() {} + +func (*DeleteRelationTuplesRequest_SubjectSet) isDeleteRelationTuplesRequest_RestApiSubject() {} + type DeleteRelationTuplesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -307,7 +505,7 @@ type DeleteRelationTuplesResponse struct { func (x *DeleteRelationTuplesResponse) Reset() { *x = DeleteRelationTuplesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[4] + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -320,7 +518,7 @@ func (x *DeleteRelationTuplesResponse) String() string { func (*DeleteRelationTuplesResponse) ProtoMessage() {} func (x *DeleteRelationTuplesResponse) ProtoReflect() protoreflect.Message { - mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[4] + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -333,7 +531,120 @@ func (x *DeleteRelationTuplesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteRelationTuplesResponse.ProtoReflect.Descriptor instead. func (*DeleteRelationTuplesResponse) Descriptor() ([]byte, []int) { - return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{4} + return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{6} +} + +type CreateRelationTupleRequest_Relationship struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The namespace this relation tuple lives in. + Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + // The object related by this tuple. + // It is an object in the namespace of the tuple. + Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"` + // The relation between an Object and a Subject. + Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` + // Types that are assignable to Subject: + // *CreateRelationTupleRequest_Relationship_SubjectId + // *CreateRelationTupleRequest_Relationship_SubjectSet + Subject isCreateRelationTupleRequest_Relationship_Subject `protobuf_oneof:"subject"` +} + +func (x *CreateRelationTupleRequest_Relationship) Reset() { + *x = CreateRelationTupleRequest_Relationship{} + if protoimpl.UnsafeEnabled { + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateRelationTupleRequest_Relationship) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRelationTupleRequest_Relationship) ProtoMessage() {} + +func (x *CreateRelationTupleRequest_Relationship) ProtoReflect() protoreflect.Message { + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateRelationTupleRequest_Relationship.ProtoReflect.Descriptor instead. +func (*CreateRelationTupleRequest_Relationship) Descriptor() ([]byte, []int) { + return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *CreateRelationTupleRequest_Relationship) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *CreateRelationTupleRequest_Relationship) GetObject() string { + if x != nil { + return x.Object + } + return "" +} + +func (x *CreateRelationTupleRequest_Relationship) GetRelation() string { + if x != nil { + return x.Relation + } + return "" +} + +func (m *CreateRelationTupleRequest_Relationship) GetSubject() isCreateRelationTupleRequest_Relationship_Subject { + if m != nil { + return m.Subject + } + return nil +} + +func (x *CreateRelationTupleRequest_Relationship) GetSubjectId() string { + if x, ok := x.GetSubject().(*CreateRelationTupleRequest_Relationship_SubjectId); ok { + return x.SubjectId + } + return "" +} + +func (x *CreateRelationTupleRequest_Relationship) GetSubjectSet() *SubjectSet { + if x, ok := x.GetSubject().(*CreateRelationTupleRequest_Relationship_SubjectSet); ok { + return x.SubjectSet + } + return nil +} + +type isCreateRelationTupleRequest_Relationship_Subject interface { + isCreateRelationTupleRequest_Relationship_Subject() +} + +type CreateRelationTupleRequest_Relationship_SubjectId struct { + // A concrete id of the subject. + SubjectId string `protobuf:"bytes,5,opt,name=subject_id,proto3,oneof"` +} + +type CreateRelationTupleRequest_Relationship_SubjectSet struct { + // A subject set that expands to more Subjects. + // More information are available under [concepts](../concepts/subjects.mdx). + SubjectSet *SubjectSet `protobuf:"bytes,6,opt,name=subject_set,proto3,oneof"` +} + +func (*CreateRelationTupleRequest_Relationship_SubjectId) isCreateRelationTupleRequest_Relationship_Subject() { +} + +func (*CreateRelationTupleRequest_Relationship_SubjectSet) isCreateRelationTupleRequest_Relationship_Subject() { } // The query for deleting relationships @@ -355,7 +666,7 @@ type DeleteRelationTuplesRequest_Query struct { func (x *DeleteRelationTuplesRequest_Query) Reset() { *x = DeleteRelationTuplesRequest_Query{} if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5] + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -368,7 +679,7 @@ func (x *DeleteRelationTuplesRequest_Query) String() string { func (*DeleteRelationTuplesRequest_Query) ProtoMessage() {} func (x *DeleteRelationTuplesRequest_Query) ProtoReflect() protoreflect.Message { - mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5] + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -381,7 +692,7 @@ func (x *DeleteRelationTuplesRequest_Query) ProtoReflect() protoreflect.Message // Deprecated: Use DeleteRelationTuplesRequest_Query.ProtoReflect.Descriptor instead. func (*DeleteRelationTuplesRequest_Query) Descriptor() ([]byte, []int) { - return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{3, 0} + return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{5, 0} } func (x *DeleteRelationTuplesRequest_Query) GetNamespace() string { @@ -420,100 +731,199 @@ var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDesc = []byte{ 0x68, 0x61, 0x32, 0x2f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, - 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x8a, 0x01, 0x0a, 0x1d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x69, 0x0a, 0x15, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x13, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x73, - 0x22, 0x8b, 0x02, 0x0a, 0x12, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x54, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x2e, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, - 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, - 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x22, 0x46, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x43, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x41, - 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x02, 0x22, 0x40, - 0x0a, 0x1e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, - 0x22, 0xf8, 0x02, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 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, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 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, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8a, + 0x01, 0x0a, 0x1d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x5e, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x44, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x12, 0x69, 0x0a, 0x15, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x35, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x12, 0x57, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, - 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x1a, 0x9f, 0x01, 0x0a, 0x05, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, - 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x1e, 0x0a, 0x1c, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc8, 0x02, 0x0a, 0x0c, - 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9d, 0x01, 0x0a, - 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x40, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x6f, 0x72, 0x79, 0x2e, - 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x97, 0x01, 0x0a, - 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x3e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, - 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, + 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x13, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x22, 0xd1, 0x02, 0x0a, 0x12, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, + 0x74, 0x61, 0x12, 0x54, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x52, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, + 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x25, 0x0a, 0x0d, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x10, 0x01, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, + 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x0a, 0x0a, 0x06, + 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x10, 0x01, 0x12, 0x25, 0x0a, 0x0d, 0x41, 0x43, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x02, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, + 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, + 0x0a, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x02, 0x1a, 0x02, 0x10, 0x01, 0x22, + 0x54, 0x0a, 0x1e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, + 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0xf2, 0x02, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x71, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x6f, + 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x1a, 0xe0, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0a, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x51, 0x0a, 0x0b, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, + 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x42, + 0x09, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x76, 0x0a, 0x1b, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, + 0x70, 0x6c, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x22, 0x92, 0x05, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x70, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x44, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x14, 0x18, 0x01, 0xfa, 0xd2, 0xe4, 0x93, 0x02, + 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x05, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, + 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x12, + 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, + 0x45, 0x52, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x24, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x5a, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x02, + 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, + 0x74, 0x1a, 0x9f, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, + 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x1e, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb8, 0x07, 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xaf, 0x02, 0x0a, 0x16, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x12, 0x40, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xc2, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, - 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, - 0x11, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, - 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, - 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8f, 0x01, 0x92, 0x41, 0x57, 0x0a, 0x0c, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x12, 0x70, 0x61, + 0x74, 0x63, 0x68, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, + 0x4a, 0x33, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x2c, 0x0a, 0x12, 0x41, 0x6e, 0x20, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x22, 0x16, 0x0a, + 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, + 0x6e, 0x12, 0x02, 0x7b, 0x7d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x15, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, + 0x61, 0x73, 0x32, 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0xd4, 0x02, 0x0a, 0x13, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x12, 0x3d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x3e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0xbd, 0x01, 0x92, 0x41, 0x7c, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x4a, 0x58, 0x0a, 0x03, 0x32, 0x30, 0x31, + 0x12, 0x51, 0x0a, 0x19, 0x54, 0x68, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x12, 0x34, 0x0a, + 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, + 0x70, 0x6c, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x3a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x62, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x1a, 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x12, 0x9e, 0x02, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x3e, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x84, 0x01, 0x92, 0x41, + 0x63, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, + 0x13, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x68, 0x69, 0x70, 0x73, 0x32, 0x21, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x75, 0x72, 0x6c, + 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x4a, 0x1b, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x14, + 0x0a, 0x12, 0x41, 0x6e, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x42, 0xc2, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x11, 0x57, 0x72, 0x69, + 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, + 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, + 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, + 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -529,35 +939,46 @@ func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP() [] } var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_goTypes = []interface{}{ - (RelationTupleDelta_Action)(0), // 0: ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action - (*TransactRelationTuplesRequest)(nil), // 1: ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest - (*RelationTupleDelta)(nil), // 2: ory.keto.relation_tuples.v1alpha2.RelationTupleDelta - (*TransactRelationTuplesResponse)(nil), // 3: ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse - (*DeleteRelationTuplesRequest)(nil), // 4: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest - (*DeleteRelationTuplesResponse)(nil), // 5: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse - (*DeleteRelationTuplesRequest_Query)(nil), // 6: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query - (*RelationTuple)(nil), // 7: ory.keto.relation_tuples.v1alpha2.RelationTuple - (*RelationQuery)(nil), // 8: ory.keto.relation_tuples.v1alpha2.RelationQuery - (*Subject)(nil), // 9: ory.keto.relation_tuples.v1alpha2.Subject + (RelationTupleDelta_Action)(0), // 0: ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action + (*TransactRelationTuplesRequest)(nil), // 1: ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest + (*RelationTupleDelta)(nil), // 2: ory.keto.relation_tuples.v1alpha2.RelationTupleDelta + (*TransactRelationTuplesResponse)(nil), // 3: ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse + (*CreateRelationTupleRequest)(nil), // 4: ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest + (*CreateRelationTupleResponse)(nil), // 5: ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse + (*DeleteRelationTuplesRequest)(nil), // 6: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest + (*DeleteRelationTuplesResponse)(nil), // 7: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse + (*CreateRelationTupleRequest_Relationship)(nil), // 8: ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship + (*DeleteRelationTuplesRequest_Query)(nil), // 9: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query + (*RelationTuple)(nil), // 10: ory.keto.relation_tuples.v1alpha2.RelationTuple + (*RelationQuery)(nil), // 11: ory.keto.relation_tuples.v1alpha2.RelationQuery + (*SubjectSetQuery)(nil), // 12: ory.keto.relation_tuples.v1alpha2.SubjectSetQuery + (*SubjectSet)(nil), // 13: ory.keto.relation_tuples.v1alpha2.SubjectSet + (*Subject)(nil), // 14: ory.keto.relation_tuples.v1alpha2.Subject } var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_depIdxs = []int32{ - 2, // 0: ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.relation_tuple_deltas:type_name -> ory.keto.relation_tuples.v1alpha2.RelationTupleDelta - 0, // 1: ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.action:type_name -> ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action - 7, // 2: ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.relation_tuple:type_name -> ory.keto.relation_tuples.v1alpha2.RelationTuple - 6, // 3: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.query:type_name -> ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query - 8, // 4: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.relation_query:type_name -> ory.keto.relation_tuples.v1alpha2.RelationQuery - 9, // 5: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject - 1, // 6: ory.keto.relation_tuples.v1alpha2.WriteService.TransactRelationTuples:input_type -> ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest - 4, // 7: ory.keto.relation_tuples.v1alpha2.WriteService.DeleteRelationTuples:input_type -> ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest - 3, // 8: ory.keto.relation_tuples.v1alpha2.WriteService.TransactRelationTuples:output_type -> ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse - 5, // 9: ory.keto.relation_tuples.v1alpha2.WriteService.DeleteRelationTuples:output_type -> ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse - 8, // [8:10] is the sub-list for method output_type - 6, // [6:8] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 2, // 0: ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.relation_tuple_deltas:type_name -> ory.keto.relation_tuples.v1alpha2.RelationTupleDelta + 0, // 1: ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.action:type_name -> ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action + 10, // 2: ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.relation_tuple:type_name -> ory.keto.relation_tuples.v1alpha2.RelationTuple + 8, // 3: ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.relation_tuple:type_name -> ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship + 10, // 4: ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse.relation_tuple:type_name -> ory.keto.relation_tuples.v1alpha2.RelationTuple + 9, // 5: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.query:type_name -> ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query + 11, // 6: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.relation_query:type_name -> ory.keto.relation_tuples.v1alpha2.RelationQuery + 12, // 7: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.subject_set:type_name -> ory.keto.relation_tuples.v1alpha2.SubjectSetQuery + 13, // 8: ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.subject_set:type_name -> ory.keto.relation_tuples.v1alpha2.SubjectSet + 14, // 9: ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.subject:type_name -> ory.keto.relation_tuples.v1alpha2.Subject + 1, // 10: ory.keto.relation_tuples.v1alpha2.WriteService.TransactRelationTuples:input_type -> ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest + 4, // 11: ory.keto.relation_tuples.v1alpha2.WriteService.CreateRelationTuple:input_type -> ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest + 6, // 12: ory.keto.relation_tuples.v1alpha2.WriteService.DeleteRelationTuples:input_type -> ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest + 3, // 13: ory.keto.relation_tuples.v1alpha2.WriteService.TransactRelationTuples:output_type -> ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse + 5, // 14: ory.keto.relation_tuples.v1alpha2.WriteService.CreateRelationTuple:output_type -> ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse + 7, // 15: ory.keto.relation_tuples.v1alpha2.WriteService.DeleteRelationTuples:output_type -> ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse + 13, // [13:16] is the sub-list for method output_type + 10, // [10:13] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() } @@ -604,7 +1025,7 @@ func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() { } } file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRelationTuplesRequest); i { + switch v := v.(*CreateRelationTupleRequest); i { case 0: return &v.state case 1: @@ -616,7 +1037,7 @@ func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() { } } file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRelationTuplesResponse); i { + switch v := v.(*CreateRelationTupleResponse); i { case 0: return &v.state case 1: @@ -628,6 +1049,42 @@ func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() { } } file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRelationTuplesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteRelationTuplesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateRelationTupleRequest_Relationship); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteRelationTuplesRequest_Query); i { case 0: return &v.state @@ -640,13 +1097,21 @@ func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() { } } } + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5].OneofWrappers = []interface{}{ + (*DeleteRelationTuplesRequest_SubjectId)(nil), + (*DeleteRelationTuplesRequest_SubjectSet)(nil), + } + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[7].OneofWrappers = []interface{}{ + (*CreateRelationTupleRequest_Relationship_SubjectId)(nil), + (*CreateRelationTupleRequest_Relationship_SubjectSet)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDesc, NumEnums: 1, - NumMessages: 6, + NumMessages: 9, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto index f29e94937..0ae726850 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto @@ -2,6 +2,9 @@ syntax = "proto3"; package ory.keto.relation_tuples.v1alpha2; +import "google/api/annotations.proto"; +import "google/api/visibility.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; import "ory/keto/relation_tuples/v1alpha2/relation_tuples.proto"; option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; @@ -16,9 +19,68 @@ option php_namespace = "Ory\\Keto\\RelationTuples\\v1alpha2"; // This service is part of the [write-APIs](../concepts/api-overview.mdx#write-apis). service WriteService { // Writes one or more relationships in a single transaction. - rpc TransactRelationTuples(TransactRelationTuplesRequest) returns (TransactRelationTuplesResponse); + rpc TransactRelationTuples(TransactRelationTuplesRequest) returns (TransactRelationTuplesResponse) { + option (google.api.http) = { + patch: "/admin/relation-tuples" + body: "relation_tuple_deltas" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "relationship"; + operation_id: "patchRelationships"; + responses: { + key: "204" + value: { + description: "An empty response." + examples: { + key: "application/json" + value: "{}" + } + } + } + }; + }; + + // Creates a relationship + rpc CreateRelationTuple(CreateRelationTupleRequest) returns (CreateRelationTupleResponse) { + option (google.api.http) = { + put: "/admin/relation-tuples" + body: "relation_tuple" + response_body: "relation_tuple" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "relationship"; + operation_id: "createRelationship"; + responses: { + key: "201" + value: { + description: "The created relationship." + schema: { + json_schema: { + ref: ".ory.keto.relation_tuples.v1alpha2.RelationTuple"; + } + } + } + } + }; + }; + // Deletes relationships based on relation query - rpc DeleteRelationTuples(DeleteRelationTuplesRequest) returns (DeleteRelationTuplesResponse); + rpc DeleteRelationTuples(DeleteRelationTuplesRequest) returns (DeleteRelationTuplesResponse) { + option (google.api.http) = { + delete: "/admin/relation-tuples" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + consumes: "application/x-www-form-urlencoded"; + tags: "relationship"; + operation_id: "deleteRelationships"; + responses: { + key: "204" + value: { + description: "An empty response." + } + } + }; + }; } // The request of a WriteService.TransactRelationTuples RPC. @@ -31,6 +93,8 @@ message TransactRelationTuplesRequest { // Write-delta for a TransactRelationTuplesRequest. message RelationTupleDelta { enum Action { + option allow_alias = true; + // Unspecified. // The `TransactRelationTuples` RPC ignores this // RelationTupleDelta if an action was unspecified. @@ -38,16 +102,25 @@ message RelationTupleDelta { // Insertion of a new RelationTuple. // It is ignored if already existing. - ACTION_INSERT = 1; + ACTION_INSERT = 1 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; + + // Insertion of a new RelationTuple. + // It is ignored if already existing. + insert = 1; + + // Deletion of the RelationTuple. + // It is ignored if it does not exist. + ACTION_DELETE = 2 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; // Deletion of the RelationTuple. // It is ignored if it does not exist. - ACTION_DELETE = 2; + delete = 2; } // The action to do on the RelationTuple. Action action = 1; + // The target RelationTuple. - RelationTuple relation_tuple = 2; + RelationTuple relation_tuple = 2 [json_name = "relation_tuple"]; } // The response of a WriteService.TransactRelationTuples rpc. @@ -61,7 +134,38 @@ message TransactRelationTuplesResponse { // If the RelationTupleDelta_Action was DELETE // the snaptoken is empty at the same index. // --> - repeated string snaptokens = 1; + repeated string snaptokens = 1 [(google.api.field_visibility).restriction = "NO_SWAGGER"]; +} + +// The request to create a new relationship. +message CreateRelationTupleRequest { + message Relationship { + // The namespace this relation tuple lives in. + string namespace = 1; + + // The object related by this tuple. + // It is an object in the namespace of the tuple. + string object = 2; + + // The relation between an Object and a Subject. + string relation = 3; + + oneof subject { + // A concrete id of the subject. + string subject_id = 5 [json_name="subject_id"]; + // A subject set that expands to more Subjects. + // More information are available under [concepts](../concepts/subjects.mdx). + SubjectSet subject_set = 6 [json_name="subject_set"]; + } + } + // The relationship to create. + Relationship relation_tuple = 1; +} + +// The response from creating a new relationship. +message CreateRelationTupleResponse { + // The created relationship. + RelationTuple relation_tuple = 1; } message DeleteRelationTuplesRequest { @@ -77,9 +181,28 @@ message DeleteRelationTuplesRequest { Subject subject = 4; } - Query query = 1 [deprecated = true]; + Query query = 1 [deprecated=true, (google.api.field_visibility).restriction="NO_SWAGGER"]; + + RelationQuery relation_query = 2 [(google.api.field_visibility).restriction="NO_SWAGGER"]; + + // The namespace this relation tuple lives in. + string namespace = 3 [deprecated=true]; + + // The object related by this tuple. + // It is an object in the namespace of the tuple. + string object = 4 [deprecated=true]; + + // The relation between an Object and a Subject. + string relation = 5 [deprecated=true]; + + oneof rest_api_subject { + // A concrete id of the subject. + string subject_id = 6 [deprecated=true, json_name="subject_id"]; + // A subject set that expands to more Subjects. + // More information are available under [concepts](../concepts/subjects.mdx). + SubjectSetQuery subject_set = 7 [deprecated=true, json_name="subject_set"]; + } - RelationQuery relation_query = 2; } message DeleteRelationTuplesResponse { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go index 23b67cf9c..8e01bd944 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go @@ -24,6 +24,8 @@ const _ = grpc.SupportPackageIsVersion7 type WriteServiceClient interface { // Writes one or more relationships in a single transaction. TransactRelationTuples(ctx context.Context, in *TransactRelationTuplesRequest, opts ...grpc.CallOption) (*TransactRelationTuplesResponse, error) + // Creates a relationship + CreateRelationTuple(ctx context.Context, in *CreateRelationTupleRequest, opts ...grpc.CallOption) (*CreateRelationTupleResponse, error) // Deletes relationships based on relation query DeleteRelationTuples(ctx context.Context, in *DeleteRelationTuplesRequest, opts ...grpc.CallOption) (*DeleteRelationTuplesResponse, error) } @@ -45,6 +47,15 @@ func (c *writeServiceClient) TransactRelationTuples(ctx context.Context, in *Tra return out, nil } +func (c *writeServiceClient) CreateRelationTuple(ctx context.Context, in *CreateRelationTupleRequest, opts ...grpc.CallOption) (*CreateRelationTupleResponse, error) { + out := new(CreateRelationTupleResponse) + err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.WriteService/CreateRelationTuple", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *writeServiceClient) DeleteRelationTuples(ctx context.Context, in *DeleteRelationTuplesRequest, opts ...grpc.CallOption) (*DeleteRelationTuplesResponse, error) { out := new(DeleteRelationTuplesResponse) err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples", in, out, opts...) @@ -60,6 +71,8 @@ func (c *writeServiceClient) DeleteRelationTuples(ctx context.Context, in *Delet type WriteServiceServer interface { // Writes one or more relationships in a single transaction. TransactRelationTuples(context.Context, *TransactRelationTuplesRequest) (*TransactRelationTuplesResponse, error) + // Creates a relationship + CreateRelationTuple(context.Context, *CreateRelationTupleRequest) (*CreateRelationTupleResponse, error) // Deletes relationships based on relation query DeleteRelationTuples(context.Context, *DeleteRelationTuplesRequest) (*DeleteRelationTuplesResponse, error) } @@ -71,6 +84,9 @@ type UnimplementedWriteServiceServer struct { func (UnimplementedWriteServiceServer) TransactRelationTuples(context.Context, *TransactRelationTuplesRequest) (*TransactRelationTuplesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TransactRelationTuples not implemented") } +func (UnimplementedWriteServiceServer) CreateRelationTuple(context.Context, *CreateRelationTupleRequest) (*CreateRelationTupleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateRelationTuple not implemented") +} func (UnimplementedWriteServiceServer) DeleteRelationTuples(context.Context, *DeleteRelationTuplesRequest) (*DeleteRelationTuplesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteRelationTuples not implemented") } @@ -104,6 +120,24 @@ func _WriteService_TransactRelationTuples_Handler(srv interface{}, ctx context.C return interceptor(ctx, in, info, handler) } +func _WriteService_CreateRelationTuple_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRelationTupleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WriteServiceServer).CreateRelationTuple(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ory.keto.relation_tuples.v1alpha2.WriteService/CreateRelationTuple", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WriteServiceServer).CreateRelationTuple(ctx, req.(*CreateRelationTupleRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _WriteService_DeleteRelationTuples_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteRelationTuplesRequest) if err := dec(in); err != nil { @@ -133,6 +167,10 @@ var WriteService_ServiceDesc = grpc.ServiceDesc{ MethodName: "TransactRelationTuples", Handler: _WriteService_TransactRelationTuples_Handler, }, + { + MethodName: "CreateRelationTuple", + Handler: _WriteService_CreateRelationTuple_Handler, + }, { MethodName: "DeleteRelationTuples", Handler: _WriteService_DeleteRelationTuples_Handler, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts index 4e9f29615..651ba756d 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts @@ -6,10 +6,13 @@ import * as grpc from "grpc"; import * as ory_keto_relation_tuples_v1alpha2_write_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/write_service_pb"; +import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; interface IWriteServiceService extends grpc.ServiceDefinition { transactRelationTuples: IWriteServiceService_ITransactRelationTuples; + createRelationTuple: IWriteServiceService_ICreateRelationTuple; deleteRelationTuples: IWriteServiceService_IDeleteRelationTuples; } @@ -22,6 +25,15 @@ interface IWriteServiceService_ITransactRelationTuples extends grpc.MethodDefini responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } +interface IWriteServiceService_ICreateRelationTuple extends grpc.MethodDefinition { + path: "/ory.keto.relation_tuples.v1alpha2.WriteService/CreateRelationTuple"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} interface IWriteServiceService_IDeleteRelationTuples extends grpc.MethodDefinition { path: "/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples"; requestStream: false; @@ -36,6 +48,7 @@ export const WriteServiceService: IWriteServiceService; export interface IWriteServiceServer { transactRelationTuples: grpc.handleUnaryCall; + createRelationTuple: grpc.handleUnaryCall; deleteRelationTuples: grpc.handleUnaryCall; } @@ -43,6 +56,9 @@ export interface IWriteServiceClient { transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; + createRelationTuple(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleResponse) => void): grpc.ClientUnaryCall; + createRelationTuple(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleResponse) => void): grpc.ClientUnaryCall; + createRelationTuple(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleResponse) => void): grpc.ClientUnaryCall; deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; @@ -53,6 +69,9 @@ export class WriteServiceClient extends grpc.Client implements IWriteServiceClie public transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; public transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; public transactRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.TransactRelationTuplesResponse) => void): grpc.ClientUnaryCall; + public createRelationTuple(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleResponse) => void): grpc.ClientUnaryCall; + public createRelationTuple(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleResponse) => void): grpc.ClientUnaryCall; + public createRelationTuple(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleResponse) => void): grpc.ClientUnaryCall; public deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; public deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; public deleteRelationTuples(request: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesResponse) => void): grpc.ClientUnaryCall; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js index 7fe0972b5..5a7e51c60 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js @@ -3,8 +3,33 @@ 'use strict'; var grpc = require('@grpc/grpc-js'); var ory_keto_relation_tuples_v1alpha2_write_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/write_service_pb.js'); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); +function serialize_ory_keto_relation_tuples_v1alpha2_CreateRelationTupleRequest(arg) { + if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleRequest)) { + throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_ory_keto_relation_tuples_v1alpha2_CreateRelationTupleRequest(buffer_arg) { + return ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_ory_keto_relation_tuples_v1alpha2_CreateRelationTupleResponse(arg) { + if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleResponse)) { + throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_ory_keto_relation_tuples_v1alpha2_CreateRelationTupleResponse(buffer_arg) { + return ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_ory_keto_relation_tuples_v1alpha2_DeleteRelationTuplesRequest(arg) { if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_write_service_pb.DeleteRelationTuplesRequest)) { throw new Error('Expected argument of type ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest'); @@ -66,6 +91,18 @@ transactRelationTuples: { responseSerialize: serialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesResponse, responseDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_TransactRelationTuplesResponse, }, + // Creates a relationship +createRelationTuple: { + path: '/ory.keto.relation_tuples.v1alpha2.WriteService/CreateRelationTuple', + requestStream: false, + responseStream: false, + requestType: ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleRequest, + responseType: ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleResponse, + requestSerialize: serialize_ory_keto_relation_tuples_v1alpha2_CreateRelationTupleRequest, + requestDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_CreateRelationTupleRequest, + responseSerialize: serialize_ory_keto_relation_tuples_v1alpha2_CreateRelationTupleResponse, + responseDeserialize: deserialize_ory_keto_relation_tuples_v1alpha2_CreateRelationTupleResponse, + }, // Deletes relationships based on relation query deleteRelationTuples: { path: '/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples', diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts index f633c84ca..7f4fd2254 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts @@ -5,6 +5,8 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; +import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; export class TransactRelationTuplesRequest extends jspb.Message { @@ -57,7 +59,9 @@ export namespace RelationTupleDelta { export enum Action { ACTION_UNSPECIFIED = 0, ACTION_INSERT = 1, + INSERT = 1, ACTION_DELETE = 2, + DELETE = 2, } } @@ -84,6 +88,101 @@ export namespace TransactRelationTuplesResponse { } } +export class CreateRelationTupleRequest extends jspb.Message { + + hasRelationTuple(): boolean; + clearRelationTuple(): void; + getRelationTuple(): CreateRelationTupleRequest.Relationship | undefined; + setRelationTuple(value?: CreateRelationTupleRequest.Relationship): CreateRelationTupleRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateRelationTupleRequest.AsObject; + static toObject(includeInstance: boolean, msg: CreateRelationTupleRequest): CreateRelationTupleRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateRelationTupleRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateRelationTupleRequest; + static deserializeBinaryFromReader(message: CreateRelationTupleRequest, reader: jspb.BinaryReader): CreateRelationTupleRequest; +} + +export namespace CreateRelationTupleRequest { + export type AsObject = { + relationTuple?: CreateRelationTupleRequest.Relationship.AsObject, + } + + + export class Relationship extends jspb.Message { + getNamespace(): string; + setNamespace(value: string): Relationship; + getObject(): string; + setObject(value: string): Relationship; + getRelation(): string; + setRelation(value: string): Relationship; + + hasSubjectId(): boolean; + clearSubjectId(): void; + getSubjectId(): string; + setSubjectId(value: string): Relationship; + + hasSubjectSet(): boolean; + clearSubjectSet(): void; + getSubjectSet(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSet | undefined; + setSubjectSet(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSet): Relationship; + + getSubjectCase(): Relationship.SubjectCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Relationship.AsObject; + static toObject(includeInstance: boolean, msg: Relationship): Relationship.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Relationship, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Relationship; + static deserializeBinaryFromReader(message: Relationship, reader: jspb.BinaryReader): Relationship; + } + + export namespace Relationship { + export type AsObject = { + namespace: string, + object: string, + relation: string, + subjectId: string, + subjectSet?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSet.AsObject, + } + + export enum SubjectCase { + SUBJECT_NOT_SET = 0, + SUBJECT_ID = 5, + SUBJECT_SET = 6, + } + + } + +} + +export class CreateRelationTupleResponse extends jspb.Message { + + hasRelationTuple(): boolean; + clearRelationTuple(): void; + getRelationTuple(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple | undefined; + setRelationTuple(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple): CreateRelationTupleResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateRelationTupleResponse.AsObject; + static toObject(includeInstance: boolean, msg: CreateRelationTupleResponse): CreateRelationTupleResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateRelationTupleResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateRelationTupleResponse; + static deserializeBinaryFromReader(message: CreateRelationTupleResponse, reader: jspb.BinaryReader): CreateRelationTupleResponse; +} + +export namespace CreateRelationTupleResponse { + export type AsObject = { + relationTuple?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.AsObject, + } +} + export class DeleteRelationTuplesRequest extends jspb.Message { hasQuery(): boolean; @@ -95,6 +194,24 @@ export class DeleteRelationTuplesRequest extends jspb.Message { clearRelationQuery(): void; getRelationQuery(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery | undefined; setRelationQuery(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery): DeleteRelationTuplesRequest; + getNamespace(): string; + setNamespace(value: string): DeleteRelationTuplesRequest; + getObject(): string; + setObject(value: string): DeleteRelationTuplesRequest; + getRelation(): string; + setRelation(value: string): DeleteRelationTuplesRequest; + + hasSubjectId(): boolean; + clearSubjectId(): void; + getSubjectId(): string; + setSubjectId(value: string): DeleteRelationTuplesRequest; + + hasSubjectSet(): boolean; + clearSubjectSet(): void; + getSubjectSet(): ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery | undefined; + setSubjectSet(value?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery): DeleteRelationTuplesRequest; + + getRestApiSubjectCase(): DeleteRelationTuplesRequest.RestApiSubjectCase; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): DeleteRelationTuplesRequest.AsObject; @@ -110,6 +227,11 @@ export namespace DeleteRelationTuplesRequest { export type AsObject = { query?: DeleteRelationTuplesRequest.Query.AsObject, relationQuery?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.AsObject, + namespace: string, + object: string, + relation: string, + subjectId: string, + subjectSet?: ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.AsObject, } @@ -145,6 +267,13 @@ export namespace DeleteRelationTuplesRequest { } } + + export enum RestApiSubjectCase { + REST_API_SUBJECT_NOT_SET = 0, + SUBJECT_ID = 6, + SUBJECT_SET = 7, + } + } export class DeleteRelationTuplesResponse extends jspb.Message { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js index f41cbb2ea..9a9f53a55 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js @@ -15,10 +15,21 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); +goog.object.extend(proto, google_api_visibility_pb); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); +goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.SubjectCase', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.RestApiSubjectCase', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action', null, global); @@ -97,9 +108,72 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest = function(opt_data) { +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.oneofGroups_); +}; +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.oneofGroups_); +}; goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** @@ -442,7 +516,9 @@ proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.serializeBinaryToWrit proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action = { ACTION_UNSPECIFIED: 0, ACTION_INSERT: 1, - ACTION_DELETE: 2 + INSERT: 1, + ACTION_DELETE: 2, + DELETE: 2 }; /** @@ -672,8 +748,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.toObject(opt_includeInstance, this); }; @@ -682,14 +758,13 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.to * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.toObject = function(includeInstance, msg) { var f, obj = { - query: (f = msg.getQuery()) && proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.toObject(includeInstance, f), - relationQuery: (f = msg.getRelationQuery()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.toObject(includeInstance, f) + relationTuple: (f = msg.getRelationTuple()) && proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.toObject(includeInstance, f) }; if (includeInstance) { @@ -703,23 +778,23 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.toObject = f /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest} */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest; - return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest; + return proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest} */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -727,14 +802,9 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.deserializeB var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query; - reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deserializeBinaryFromReader); - msg.setQuery(value); - break; - case 2: - var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery; - reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.deserializeBinaryFromReader); - msg.setRelationQuery(value); + var value = new proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship; + reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.deserializeBinaryFromReader); + msg.setRelationTuple(value); break; default: reader.skipField(); @@ -749,9 +819,9 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.deserializeB * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -759,32 +829,50 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.se /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getQuery(); + f = message.getRelationTuple(); if (f != null) { writer.writeMessage( 1, f, - proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.serializeBinaryToWriter - ); - } - f = message.getRelationQuery(); - if (f != null) { - writer.writeMessage( - 2, - f, - ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.serializeBinaryToWriter + proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.serializeBinaryToWriter ); } }; +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.oneofGroups_ = [[5,6]]; + +/** + * @enum {number} + */ +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.SubjectCase = { + SUBJECT_NOT_SET: 0, + SUBJECT_ID: 5, + SUBJECT_SET: 6 +}; + +/** + * @return {proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.SubjectCase} + */ +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.prototype.getSubjectCase = function() { + return /** @type {proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.SubjectCase} */(jspb.Message.computeOneofCase(this, proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -800,8 +888,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.toObject = function(opt_includeInstance) { - return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.toObject(opt_includeInstance, this); +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.toObject(opt_includeInstance, this); }; @@ -810,16 +898,17 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.protot * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} msg The msg instance to transform. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.toObject = function(includeInstance, msg) { +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.toObject = function(includeInstance, msg) { var f, obj = { namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), object: jspb.Message.getFieldWithDefault(msg, 2, ""), relation: jspb.Message.getFieldWithDefault(msg, 3, ""), - subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f) + subjectId: jspb.Message.getFieldWithDefault(msg, 5, ""), + subjectSet: (f = msg.getSubjectSet()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSet.toObject(includeInstance, f) }; if (includeInstance) { @@ -833,23 +922,23 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.toObje /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship} */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deserializeBinary = function(bytes) { +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query; - return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deserializeBinaryFromReader(msg, reader); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship; + return proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} msg The message object to deserialize into. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship} */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deserializeBinaryFromReader = function(msg, reader) { +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -868,10 +957,14 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deseri var value = /** @type {string} */ (reader.readString()); msg.setRelation(value); break; - case 4: - var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject; - reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.deserializeBinaryFromReader); - msg.setSubject(value); + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSubjectId(value); + break; + case 6: + var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSet; + reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSet.deserializeBinaryFromReader); + msg.setSubjectSet(value); break; default: reader.skipField(); @@ -886,9 +979,9 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deseri * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.serializeBinary = function() { +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.serializeBinaryToWriter(this, writer); + proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -896,11 +989,11 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.protot /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} message + * @param {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.serializeBinaryToWriter = function(message, writer) { +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getNamespace(); if (f.length > 0) { @@ -923,12 +1016,19 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.serial f ); } - f = message.getSubject(); + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeString( + 5, + f + ); + } + f = message.getSubjectSet(); if (f != null) { writer.writeMessage( - 4, + 6, f, - ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.serializeBinaryToWriter + ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSet.serializeBinaryToWriter ); } }; @@ -938,16 +1038,16 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.serial * optional string namespace = 1; * @return {string} */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.getNamespace = function() { +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.prototype.getNamespace = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship} returns this */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.setNamespace = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.prototype.setNamespace = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -956,16 +1056,16 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.protot * optional string object = 2; * @return {string} */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.getObject = function() { +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.prototype.getObject = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship} returns this */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.setObject = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.prototype.setObject = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -974,45 +1074,44 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.protot * optional string relation = 3; * @return {string} */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.getRelation = function() { +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.prototype.getRelation = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship} returns this */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.setRelation = function(value) { +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.prototype.setRelation = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** - * optional Subject subject = 4; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.Subject} + * optional string subject_id = 5; + * @return {string} */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.getSubject = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ ( - jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject, 4)); +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.prototype.getSubjectId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.Subject|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this -*/ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.setSubject = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.prototype.setSubjectId = function(value) { + return jspb.Message.setOneofField(this, 5, proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.oneofGroups_[0], value); }; /** - * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this + * Clears the field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship} returns this */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.clearSubject = function() { - return this.setSubject(undefined); +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.prototype.clearSubjectId = function() { + return jspb.Message.setOneofField(this, 5, proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.oneofGroups_[0], undefined); }; @@ -1020,36 +1119,36 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.protot * Returns whether this field is set. * @return {boolean} */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.hasSubject = function() { - return jspb.Message.getField(this, 4) != null; +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.prototype.hasSubjectId = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * optional Query query = 1; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} + * optional SubjectSet subject_set = 6; + * @return {?proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.getQuery = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} */ ( - jspb.Message.getWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query, 1)); +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.prototype.getSubjectSet = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.SubjectSet} */ ( + jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSet, 6)); }; /** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this + * @param {?proto.ory.keto.relation_tuples.v1alpha2.SubjectSet|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship} returns this */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.setQuery = function(value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.prototype.setSubjectSet = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship} returns this */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.clearQuery = function() { - return this.setQuery(undefined); +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.prototype.clearSubjectSet = function() { + return this.setSubjectSet(undefined); }; @@ -1057,36 +1156,36 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.cl * Returns whether this field is set. * @return {boolean} */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.hasQuery = function() { - return jspb.Message.getField(this, 1) != null; +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.prototype.hasSubjectSet = function() { + return jspb.Message.getField(this, 6) != null; }; /** - * optional RelationQuery relation_query = 2; - * @return {?proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} + * optional Relationship relation_tuple = 1; + * @return {?proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship} */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.getRelationQuery = function() { - return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} */ ( - jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery, 2)); +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.prototype.getRelationTuple = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship} */ ( + jspb.Message.getWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship, 1)); }; /** - * @param {?proto.ory.keto.relation_tuples.v1alpha2.RelationQuery|undefined} value - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this + * @param {?proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest} returns this */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.setRelationQuery = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.prototype.setRelationTuple = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest} returns this */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.clearRelationQuery = function() { - return this.setRelationQuery(undefined); +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.prototype.clearRelationTuple = function() { + return this.setRelationTuple(undefined); }; @@ -1094,8 +1193,817 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.cl * Returns whether this field is set. * @return {boolean} */ -proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.hasRelationQuery = function() { - return jspb.Message.getField(this, 2) != null; +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.prototype.hasRelationTuple = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse.toObject = function(includeInstance, msg) { + var f, obj = { + relationTuple: (f = msg.getRelationTuple()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse} + */ +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse; + return proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse} + */ +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple; + reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.deserializeBinaryFromReader); + msg.setRelationTuple(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRelationTuple(); + if (f != null) { + writer.writeMessage( + 1, + f, + ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.serializeBinaryToWriter + ); + } +}; + + +/** + * optional RelationTuple relation_tuple = 1; + * @return {?proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} + */ +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse.prototype.getRelationTuple = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.RelationTuple} */ ( + jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple, 1)); +}; + + +/** + * @param {?proto.ory.keto.relation_tuples.v1alpha2.RelationTuple|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse} returns this +*/ +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse.prototype.setRelationTuple = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse.prototype.clearRelationTuple = function() { + return this.setRelationTuple(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse.prototype.hasRelationTuple = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.oneofGroups_ = [[6,7]]; + +/** + * @enum {number} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.RestApiSubjectCase = { + REST_API_SUBJECT_NOT_SET: 0, + SUBJECT_ID: 6, + SUBJECT_SET: 7 +}; + +/** + * @return {proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.RestApiSubjectCase} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.getRestApiSubjectCase = function() { + return /** @type {proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.RestApiSubjectCase} */(jspb.Message.computeOneofCase(this, proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + query: (f = msg.getQuery()) && proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.toObject(includeInstance, f), + relationQuery: (f = msg.getRelationQuery()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.toObject(includeInstance, f), + namespace: jspb.Message.getFieldWithDefault(msg, 3, ""), + object: jspb.Message.getFieldWithDefault(msg, 4, ""), + relation: jspb.Message.getFieldWithDefault(msg, 5, ""), + subjectId: jspb.Message.getFieldWithDefault(msg, 6, ""), + subjectSet: (f = msg.getSubjectSet()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest; + return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query; + reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deserializeBinaryFromReader); + msg.setQuery(value); + break; + case 2: + var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery; + reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.deserializeBinaryFromReader); + msg.setRelationQuery(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setNamespace(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setObject(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setRelation(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setSubjectId(value); + break; + case 7: + var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery; + reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.deserializeBinaryFromReader); + msg.setSubjectSet(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getQuery(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.serializeBinaryToWriter + ); + } + f = message.getRelationQuery(); + if (f != null) { + writer.writeMessage( + 2, + f, + ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.serializeBinaryToWriter + ); + } + f = message.getNamespace(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getObject(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRelation(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = message.getSubjectSet(); + if (f != null) { + writer.writeMessage( + 7, + f, + ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.toObject = function(includeInstance, msg) { + var f, obj = { + namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), + object: jspb.Message.getFieldWithDefault(msg, 2, ""), + relation: jspb.Message.getFieldWithDefault(msg, 3, ""), + subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query; + return proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setNamespace(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setObject(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRelation(value); + break; + case 4: + var value = new ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject; + reader.readMessage(value,ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.deserializeBinaryFromReader); + msg.setSubject(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNamespace(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getObject(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRelation(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSubject(); + if (f != null) { + writer.writeMessage( + 4, + f, + ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string namespace = 1; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.getNamespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.setNamespace = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string object = 2; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.getObject = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.setObject = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string relation = 3; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.getRelation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.setRelation = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional Subject subject = 4; + * @return {?proto.ory.keto.relation_tuples.v1alpha2.Subject} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.getSubject = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.Subject} */ ( + jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject, 4)); +}; + + +/** + * @param {?proto.ory.keto.relation_tuples.v1alpha2.Subject|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this +*/ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.setSubject = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.clearSubject = function() { + return this.setSubject(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.prototype.hasSubject = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Query query = 1; + * @return {?proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.getQuery = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query} */ ( + jspb.Message.getWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query, 1)); +}; + + +/** + * @param {?proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this +*/ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.setQuery = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.clearQuery = function() { + return this.setQuery(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.hasQuery = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional RelationQuery relation_query = 2; + * @return {?proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.getRelationQuery = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.RelationQuery} */ ( + jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery, 2)); +}; + + +/** + * @param {?proto.ory.keto.relation_tuples.v1alpha2.RelationQuery|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this +*/ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.setRelationQuery = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.clearRelationQuery = function() { + return this.setRelationQuery(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.hasRelationQuery = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string namespace = 3; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.getNamespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.setNamespace = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string object = 4; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.getObject = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.setObject = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string relation = 5; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.getRelation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.setRelation = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string subject_id = 6; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.getSubjectId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.setSubjectId = function(value) { + return jspb.Message.setOneofField(this, 6, proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.clearSubjectId = function() { + return jspb.Message.setOneofField(this, 6, proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.hasSubjectId = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional SubjectSetQuery subject_set = 7; + * @return {?proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.getSubjectSet = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery} */ ( + jspb.Message.getWrapperField(this, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery, 7)); +}; + + +/** + * @param {?proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this +*/ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.setSubjectSet = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.clearSubjectSet = function() { + return this.setSubjectSet(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.hasSubjectSet = function() { + return jspb.Message.getField(this, 7) != null; }; diff --git a/spec/api.json b/spec/api.json index 61167c4db..369e5ee60 100755 --- a/spec/api.json +++ b/spec/api.json @@ -1,88 +1,47 @@ { "components": { - "responses": { - "emptyResponse": { - "description": "Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201." - } - }, "schemas": { - "ParseError": { - "properties": { - "end": { - "$ref": "#/components/schemas/SourcePosition" - }, - "message": { - "type": "string" - }, - "start": { - "$ref": "#/components/schemas/SourcePosition" - } - }, - "type": "object" - }, - "SourcePosition": { - "properties": { - "Line": { - "format": "int64", - "type": "integer" - }, - "column": { - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, "UUID": { "format": "uuid4", "type": "string" }, - "checkOplSyntaxBody": { - "description": "Ory Permission Language Document", - "type": "string" - }, "checkOplSyntaxResult": { "properties": { "errors": { - "description": "The list of syntax errors", "items": { - "$ref": "#/components/schemas/ParseError" + "$ref": "#/components/schemas/ory.keto.opl.v1alpha1.ParseError" }, "type": "array" } }, - "title": "CheckOPLSyntaxResponse represents the response for an OPL syntax check request.", "type": "object" }, "checkPermissionResult": { - "description": "The content of the allowed field is mirrored in the HTTP status code.", + "description": "The response for a CheckService.Check rpc.", "properties": { "allowed": { - "description": "whether the relation tuple is allowed", + "description": "Whether the specified subject (id)\nis related to the requested object.\n\nIt is false by default if no ACL matches.", "type": "boolean" } }, - "required": ["allowed"], - "title": "Check Permission Result", "type": "object" }, "createRelationshipBody": { - "description": "Create Relationship Request Body", "properties": { "namespace": { - "description": "Namespace to query", + "description": "The namespace this relation tuple lives in.", "type": "string" }, "object": { - "description": "Object to query", + "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple.", "type": "string" }, "relation": { - "description": "Relation to query", + "description": "The relation between an Object and a Subject.", "type": "string" }, "subject_id": { - "description": "SubjectID to query\n\nEither SubjectSet or SubjectID can be provided.", + "description": "A concrete id of the subject.", "type": "string" }, "subject_set": { @@ -92,258 +51,281 @@ "type": "object" }, "errorGeneric": { - "description": "The standard Ory JSON API error format.", "properties": { "error": { - "$ref": "#/components/schemas/genericError" + "$ref": "#/components/schemas/ory.keto.relation_tuples.v1alpha2.ErrorObject" } }, - "required": ["error"], - "title": "JSON API Error Response", "type": "object" }, "expandedPermissionTree": { "properties": { "children": { - "description": "The children of the node, possibly none.", + "description": "The children of this node.\n\nThis is never set if `node_type` == `NODE_TYPE_LEAF`.", "items": { "$ref": "#/components/schemas/expandedPermissionTree" }, "type": "array" }, + "subject": { + "$ref": "#/components/schemas/ory.keto.relation_tuples.v1alpha2.Subject" + }, "tuple": { "$ref": "#/components/schemas/relationship" }, "type": { - "description": "The type of the node.\nunion TreeNodeUnion\nexclusion TreeNodeExclusion\nintersection TreeNodeIntersection\nleaf TreeNodeLeaf\ntuple_to_subject_set TreeNodeTupleToSubjectSet\ncomputed_subject_set TreeNodeComputedSubjectSet\nnot TreeNodeNot\nunspecified TreeNodeUnspecified", - "enum": [ - "union", - "exclusion", - "intersection", - "leaf", - "tuple_to_subject_set", - "computed_subject_set", - "not", - "unspecified" - ], - "type": "string", - "x-go-enum-desc": "union TreeNodeUnion\nexclusion TreeNodeExclusion\nintersection TreeNodeIntersection\nleaf TreeNodeLeaf\ntuple_to_subject_set TreeNodeTupleToSubjectSet\ncomputed_subject_set TreeNodeComputedSubjectSet\nnot TreeNodeNot\nunspecified TreeNodeUnspecified" + "$ref": "#/components/schemas/ory.keto.relation_tuples.v1alpha2.NodeType" } }, "required": ["type"], "type": "object" }, - "genericError": { + "ory.keto.opl.v1alpha1.ParseError": { + "properties": { + "end": { + "$ref": "#/components/schemas/ory.keto.opl.v1alpha1.SourcePosition" + }, + "message": { + "type": "string" + }, + "start": { + "$ref": "#/components/schemas/ory.keto.opl.v1alpha1.SourcePosition" + } + }, + "type": "object" + }, + "ory.keto.opl.v1alpha1.SourcePosition": { + "properties": { + "Line": { + "format": "int64", + "type": "integer" + }, + "column": { + "format": "int64", + "type": "integer" + } + }, + "type": "object" + }, + "ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse": { + "description": "The response from creating a new relationship.", + "properties": { + "relationTuple": { + "$ref": "#/components/schemas/relationship" + } + }, + "type": "object" + }, + "ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse": { + "type": "object" + }, + "ory.keto.relation_tuples.v1alpha2.ErrorObject": { "properties": { "code": { "description": "The status code", "example": 404, "format": "int64", + "pattern": "^[0-9]$", + "title": "code", "type": "integer" }, "debug": { - "description": "Debug information\n\nThis field is often not exposed to protect against leaking\nsensitive information.", - "example": "SQL field \"foo\" is not a bool.", + "description": "This field is often not exposed to protect against leaking\nsensitive information", + "example": "SQL field 'foo' is not a bool", + "title": "Debug information", "type": "string" }, "details": { - "additionalProperties": {}, - "description": "Further error details", + "additionalProperties": { + "type": "string" + }, + "title": "Further error details", "type": "object" }, "id": { - "description": "The error ID\n\nUseful when trying to identify various errors in application logic.", + "description": "Useful when trying to identify various errors in application logic.", + "title": "The error ID", "type": "string" }, "message": { - "description": "Error message\n\nThe error's message.", + "description": "Response message", "example": "The resource could not be found", + "title": "message", "type": "string" }, "reason": { "description": "A human-readable reason for the error", "example": "User with ID 1234 does not exist.", + "title": "The reason for the failure", "type": "string" }, "request": { - "description": "The request ID\n\nThe request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.", + "description": "The request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.", "example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6", + "title": "The request ID", "type": "string" }, "status": { - "description": "The status description", + "description": "The human-readable description of the code.", "example": "Not Found", + "title": "The status description", "type": "string" } }, - "required": ["message"], "type": "object" }, - "healthNotReadyStatus": { + "ory.keto.relation_tuples.v1alpha2.ExpandResponse": { + "description": "The response for a ExpandService.Expand RPC.", "properties": { - "errors": { - "additionalProperties": { - "type": "string" - }, - "description": "Errors contains a list of errors that caused the not ready status.", - "type": "object" + "tree": { + "$ref": "#/components/schemas/expandedPermissionTree" } }, "type": "object" }, - "healthStatus": { + "ory.keto.relation_tuples.v1alpha2.GetVersionResponse": { + "description": "Response of the VersionService.GetVersion RPC.", "properties": { - "status": { - "description": "Status always contains \"ok\".", + "version": { + "description": "The version string of the Ory Keto instance.", "type": "string" } }, "type": "object" }, - "namespace": { + "ory.keto.relation_tuples.v1alpha2.Namespace": { "properties": { "name": { - "description": "Name of the namespace.", "type": "string" } }, "type": "object" }, - "postCheckPermissionBody": { - "description": "Check Permission using Post Request Body", + "ory.keto.relation_tuples.v1alpha2.NodeType": { + "default": "unspecified", + "enum": [ + "unspecified", + "union", + "exclusion", + "intersection", + "leaf", + "tuple_to_subject_set", + "computed_subject_set", + "not" + ], + "type": "string" + }, + "ory.keto.relation_tuples.v1alpha2.Subject": { + "description": "Subject is either a concrete subject id or\na `SubjectSet` expanding to more Subjects.", "properties": { - "namespace": { - "description": "Namespace to query", - "type": "string" - }, - "object": { - "description": "Object to query", - "type": "string" - }, - "relation": { - "description": "Relation to query", - "type": "string" - }, - "subject_id": { - "description": "SubjectID to query\n\nEither SubjectSet or SubjectID can be provided.", + "id": { + "description": "A concrete id of the subject.", "type": "string" }, - "subject_set": { + "set": { "$ref": "#/components/schemas/subjectSet" } }, "type": "object" }, - "postCheckPermissionOrErrorBody": { - "description": "Post Check Permission Or Error Body", + "ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse": { + "description": "The response of a WriteService.TransactRelationTuples rpc.", + "type": "object" + }, + "postCheckPermissionBody": { + "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object.", "properties": { + "max-depth": { + "description": "The maximum depth to search for a relation.\n\nIf the value is less than 1 or greater than the global\nmax-depth then the global max-depth will be used instead.", + "format": "int32", + "type": "integer" + }, "namespace": { - "description": "Namespace to query", + "description": "The namespace to evaluate the check.\n\nNote: If you use the expand-API and the check\nevaluates a RelationTuple specifying a SubjectSet as\nsubject or due to a rewrite rule in a namespace config\nthis check request may involve other namespaces automatically.", "type": "string" }, "object": { - "description": "Object to query", + "description": "The related object in this check.", "type": "string" }, "relation": { - "description": "Relation to query", + "description": "The relation between the Object and the Subject.", "type": "string" }, "subject_id": { - "description": "SubjectID to query\n\nEither SubjectSet or SubjectID can be provided.", + "description": "A concrete id of the subject.", "type": "string" }, "subject_set": { - "$ref": "#/components/schemas/subjectSet" + "$ref": "#/components/schemas/subjectSetQuery" } }, "type": "object" }, - "relationQuery": { - "description": "Relation Query", + "relationship": { + "description": "RelationTuple defines a relation between an Object and a Subject.", "properties": { "namespace": { - "description": "Namespace to query", + "description": "The namespace this relation tuple lives in.", "type": "string" }, "object": { - "description": "Object to query", + "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple.", "type": "string" }, "relation": { - "description": "Relation to query", + "description": "The relation between an Object and a Subject.", "type": "string" }, "subject_id": { - "description": "SubjectID to query\n\nEither SubjectSet or SubjectID can be provided.", + "description": "A concrete id of the subject.", "type": "string" }, "subject_set": { "$ref": "#/components/schemas/subjectSet" } }, + "required": ["namespace", "object", "relation"], "type": "object" }, - "relationship": { - "description": "Relationship", + "relationshipDelta": { + "description": "Write-delta for a TransactRelationTuplesRequest.", "properties": { - "namespace": { - "description": "Namespace of the Relation Tuple", - "type": "string" - }, - "object": { - "description": "Object of the Relation Tuple", - "type": "string" - }, - "relation": { - "description": "Relation of the Relation Tuple", - "type": "string" - }, - "subject_id": { - "description": "SubjectID of the Relation Tuple\n\nEither SubjectSet or SubjectID can be provided.", - "type": "string" + "action": { + "$ref": "#/components/schemas/relationshipDelta.Action" }, - "subject_set": { - "$ref": "#/components/schemas/subjectSet" + "relation_tuple": { + "$ref": "#/components/schemas/relationship" } }, - "required": ["namespace", "object", "relation"], "type": "object" }, + "relationshipDelta.Action": { + "default": "ACTION_UNSPECIFIED", + "description": " - ACTION_UNSPECIFIED: Unspecified.\nThe `TransactRelationTuples` RPC ignores this\nRelationTupleDelta if an action was unspecified.\n - insert: Insertion of a new RelationTuple.\nIt is ignored if already existing.\n - delete: Deletion of the RelationTuple.\nIt is ignored if it does not exist.", + "enum": ["ACTION_UNSPECIFIED", "insert", "delete"], + "type": "string" + }, "relationshipNamespaces": { - "description": "Relationship Namespace List", "properties": { "namespaces": { "items": { - "$ref": "#/components/schemas/namespace" + "$ref": "#/components/schemas/ory.keto.relation_tuples.v1alpha2.Namespace" }, "type": "array" } }, "type": "object" }, - "relationshipPatch": { - "description": "Payload for patching a relationship", - "properties": { - "action": { - "enum": ["insert", "delete"], - "type": "string", - "x-go-enum-desc": "insert ActionInsert\ndelete ActionDelete" - }, - "relation_tuple": { - "$ref": "#/components/schemas/relationship" - } - }, - "type": "object" - }, "relationships": { - "description": "Paginated Relationship List", + "description": "The response of a ReadService.ListRelationTuples RPC.", "properties": { "next_page_token": { - "description": "The opaque token to provide in a subsequent request\nto get the next page. It is the empty string iff this is\nthe last page.", + "description": "The token required to get the next page.\nIf this is the last page, the token will be the empty string.", "type": "string" }, "relation_tuples": { + "description": "The relationships matching the list request.", "items": { "$ref": "#/components/schemas/relationship" }, @@ -353,27 +335,37 @@ "type": "object" }, "subjectSet": { + "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`.", "properties": { "namespace": { - "description": "Namespace of the Subject Set", + "description": "The namespace of the object and relation\nreferenced in this subject set.", "type": "string" }, "object": { - "description": "Object of the Subject Set", + "description": "The object related by this subject set.", "type": "string" }, "relation": { - "description": "Relation of the Subject Set", + "description": "The relation between the object and the subjects.", "type": "string" } }, "required": ["namespace", "object", "relation"], "type": "object" }, - "version": { + "subjectSetQuery": { + "description": "SubjectSetQuery refers to all subjects who have\nthe same `relation` on an `object`.", "properties": { - "version": { - "description": "Version is the service's version.", + "namespace": { + "description": "The namespace of the object and relation\nreferenced in this subject set.", + "type": "string" + }, + "object": { + "description": "The object related by this subject set.", + "type": "string" + }, + "relation": { + "description": "The relation between the object and the subjects.", "type": "string" } }, @@ -396,11 +388,10 @@ "paths": { "/admin/relation-tuples": { "delete": { - "description": "Use this endpoint to delete relationships", "operationId": "deleteRelationships", "parameters": [ { - "description": "Namespace of the Relationship", + "description": "The namespace this relation tuple lives in.", "in": "query", "name": "namespace", "schema": { @@ -408,7 +399,7 @@ } }, { - "description": "Object of the Relationship", + "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple.", "in": "query", "name": "object", "schema": { @@ -416,7 +407,7 @@ } }, { - "description": "Relation of the Relationship", + "description": "The relation between an Object and a Subject.", "in": "query", "name": "relation", "schema": { @@ -424,7 +415,7 @@ } }, { - "description": "SubjectID of the Relationship", + "description": "A concrete id of the subject.", "in": "query", "name": "subject_id", "schema": { @@ -432,7 +423,7 @@ } }, { - "description": "Namespace of the Subject Set", + "description": "The namespace of the object and relation\nreferenced in this subject set.", "in": "query", "name": "subject_set.namespace", "schema": { @@ -440,7 +431,7 @@ } }, { - "description": "Object of the Subject Set", + "description": "The object related by this subject set.", "in": "query", "name": "subject_set.object", "schema": { @@ -448,7 +439,7 @@ } }, { - "description": "Relation of the Subject Set", + "description": "The relation between the object and the subjects.", "in": "query", "name": "subject_set.relation", "schema": { @@ -458,17 +449,7 @@ ], "responses": { "204": { - "$ref": "#/components/responses/emptyResponse" - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "errorGeneric" + "description": "An empty response." }, "default": { "content": { @@ -478,51 +459,32 @@ } } }, - "description": "errorGeneric" + "description": "Generic error" } }, - "summary": "Delete Relationships", + "summary": "Deletes relationships based on relation query", "tags": ["relationship"] }, "patch": { - "description": "Use this endpoint to patch one or more relationships.", "operationId": "patchRelationships", "requestBody": { "content": { "application/json": { "schema": { "items": { - "$ref": "#/components/schemas/relationshipPatch" + "$ref": "#/components/schemas/relationshipDelta" }, "type": "array" } } }, - "x-originalParamName": "Body" + "description": "The write delta for the relationships operated in one single transaction.\nEither all actions succeed or no change takes effect on error.", + "required": true, + "x-originalParamName": "relationTupleDeltas" }, "responses": { "204": { - "$ref": "#/components/responses/emptyResponse" - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "errorGeneric" - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "errorGeneric" + "description": "An empty response." }, "default": { "content": { @@ -532,14 +494,13 @@ } } }, - "description": "errorGeneric" + "description": "Generic error" } }, - "summary": "Patch Multiple Relationships", + "summary": "Writes one or more relationships in a single transaction.", "tags": ["relationship"] }, "put": { - "description": "Use this endpoint to create a relationship.", "operationId": "createRelationship", "requestBody": { "content": { @@ -549,7 +510,9 @@ } } }, - "x-originalParamName": "Body" + "description": "The relationship to create.", + "required": true, + "x-originalParamName": "relationTuple" }, "responses": { "201": { @@ -560,17 +523,7 @@ } } }, - "description": "relationship" - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "errorGeneric" + "description": "The created relationship." }, "default": { "content": { @@ -580,10 +533,10 @@ } } }, - "description": "errorGeneric" + "description": "Generic error" } }, - "summary": "Create a Relationship", + "summary": "Creates a relationship", "tags": ["relationship"] } }, @@ -613,7 +566,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/genericError" + "$ref": "#/definitions/errorGeneric" } } }, @@ -673,7 +626,7 @@ }, "/namespaces": { "get": { - "description": "Get all namespaces", + "description": "Get all namespaces.", "operationId": "listRelationshipNamespaces", "responses": { "200": { @@ -684,7 +637,7 @@ } } }, - "description": "relationshipNamespaces" + "description": "The list of namespaces." }, "default": { "content": { @@ -694,26 +647,27 @@ } } }, - "description": "errorGeneric" + "description": "Generic error" } }, - "summary": "Query namespaces", + "summary": "Lists Namespaces", "tags": ["relationship"] } }, "/opl/syntax/check": { "post": { - "description": "The OPL file is expected in the body of the request.", "operationId": "checkOplSyntax", "requestBody": { "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/checkOplSyntaxBody" + "format": "byte", + "type": "string" } } }, - "x-originalParamName": "Body" + "required": true, + "x-originalParamName": "content" }, "responses": { "200": { @@ -724,17 +678,7 @@ } } }, - "description": "checkOplSyntaxResult" - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "errorGeneric" + "description": "The result of the syntax checker" }, "default": { "content": { @@ -744,35 +688,36 @@ } } }, - "description": "errorGeneric" + "description": "Generic error" } }, - "summary": "Check the syntax of an OPL file", + "summary": "Performs a syntax check request.", "tags": ["relationship"] } }, "/relation-tuples": { "get": { - "description": "Get all relationships that match the query. Only the namespace field is required.", "operationId": "getRelationships", "parameters": [ { + "description": "Optional. The maximum number of\nRelationTuples to return in the response.\n\nDefault: 100", "in": "query", - "name": "page_token", + "name": "page_size", "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { + "description": "Optional. An opaque pagination token returned from\na previous call to `ListRelationTuples` that\nindicates where the page should start at.\n\nAn empty token denotes the first page. All successive\npages require the token from the previous page.", "in": "query", - "name": "page_size", + "name": "page_token", "schema": { - "format": "int64", - "type": "integer" + "type": "string" } }, { - "description": "Namespace of the Relationship", + "description": "The namespace", "in": "query", "name": "namespace", "schema": { @@ -780,7 +725,7 @@ } }, { - "description": "Object of the Relationship", + "description": "The related object in this check.", "in": "query", "name": "object", "schema": { @@ -788,7 +733,7 @@ } }, { - "description": "Relation of the Relationship", + "description": "The relation between the Object and the Subject.", "in": "query", "name": "relation", "schema": { @@ -796,7 +741,7 @@ } }, { - "description": "SubjectID of the Relationship", + "description": "A concrete id of the subject.", "in": "query", "name": "subject_id", "schema": { @@ -804,7 +749,7 @@ } }, { - "description": "Namespace of the Subject Set", + "description": "The namespace of the object and relation\nreferenced in this subject set.", "in": "query", "name": "subject_set.namespace", "schema": { @@ -812,7 +757,7 @@ } }, { - "description": "Object of the Subject Set", + "description": "The object related by this subject set.", "in": "query", "name": "subject_set.object", "schema": { @@ -820,7 +765,7 @@ } }, { - "description": "Relation of the Subject Set", + "description": "The relation between the object and the subjects.", "in": "query", "name": "subject_set.relation", "schema": { @@ -837,17 +782,7 @@ } } }, - "description": "relationships" - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "errorGeneric" + "description": "The list of relationships." }, "default": { "content": { @@ -857,20 +792,19 @@ } } }, - "description": "errorGeneric" + "description": "Generic error" } }, - "summary": "Query relationships", + "summary": "Lists ACL relationships.", "tags": ["relationship"] } }, "/relation-tuples/check": { "get": { - "description": "To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).", "operationId": "checkPermissionOrError", "parameters": [ { - "description": "Namespace of the Relationship", + "description": "The namespace to evaluate the check.\n\nNote: If you use the expand-API and the check\nevaluates a RelationTuple specifying a SubjectSet as\nsubject or due to a rewrite rule in a namespace config\nthis check request may involve other namespaces automatically.", "in": "query", "name": "namespace", "schema": { @@ -878,7 +812,7 @@ } }, { - "description": "Object of the Relationship", + "description": "The related object in this check.", "in": "query", "name": "object", "schema": { @@ -886,7 +820,7 @@ } }, { - "description": "Relation of the Relationship", + "description": "The relation between the Object and the Subject.", "in": "query", "name": "relation", "schema": { @@ -894,7 +828,7 @@ } }, { - "description": "SubjectID of the Relationship", + "description": "A concrete id of the subject.", "in": "query", "name": "subject_id", "schema": { @@ -902,7 +836,7 @@ } }, { - "description": "Namespace of the Subject Set", + "description": "The namespace of the object and relation\nreferenced in this subject set.", "in": "query", "name": "subject_set.namespace", "schema": { @@ -910,7 +844,7 @@ } }, { - "description": "Object of the Subject Set", + "description": "The object related by this subject set.", "in": "query", "name": "subject_set.object", "schema": { @@ -918,7 +852,7 @@ } }, { - "description": "Relation of the Subject Set", + "description": "The relation between the object and the subjects.", "in": "query", "name": "subject_set.relation", "schema": { @@ -926,10 +860,11 @@ } }, { + "description": "The maximum depth to search for a relation.\n\nIf the value is less than 1 or greater than the global\nmax-depth then the global max-depth will be used instead.", "in": "query", "name": "max-depth", "schema": { - "format": "int64", + "format": "int32", "type": "integer" } } @@ -943,17 +878,7 @@ } } }, - "description": "checkPermissionResult" - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "errorGeneric" + "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200." }, "403": { "content": { @@ -963,7 +888,7 @@ } } }, - "description": "checkPermissionResult" + "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200." }, "default": { "content": { @@ -973,34 +898,30 @@ } } }, - "description": "errorGeneric" + "description": "Generic error" } }, - "summary": "Check a permission", + "summary": "Performs an authorization check.", "tags": ["permission"] }, "post": { - "description": "To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).", "operationId": "postCheckPermissionOrError", - "parameters": [ - { - "in": "query", - "name": "max-depth", - "schema": { - "format": "int64", - "type": "integer" - } - } - ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/postCheckPermissionOrErrorBody" + "$ref": "#/components/schemas/postCheckPermissionBody" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/postCheckPermissionBody" } } }, - "x-originalParamName": "Body" + "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object.", + "required": true, + "x-originalParamName": "body" }, "responses": { "200": { @@ -1011,17 +932,7 @@ } } }, - "description": "checkPermissionResult" - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "errorGeneric" + "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200." }, "403": { "content": { @@ -1031,7 +942,7 @@ } } }, - "description": "checkPermissionResult" + "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200." }, "default": { "content": { @@ -1041,20 +952,19 @@ } } }, - "description": "errorGeneric" + "description": "Generic error" } }, - "summary": "Check a permission", + "summary": "Performs an authorization check.", "tags": ["permission"] } }, "/relation-tuples/check/openapi": { "get": { - "description": "To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).", "operationId": "checkPermission", "parameters": [ { - "description": "Namespace of the Relationship", + "description": "The namespace to evaluate the check.\n\nNote: If you use the expand-API and the check\nevaluates a RelationTuple specifying a SubjectSet as\nsubject or due to a rewrite rule in a namespace config\nthis check request may involve other namespaces automatically.", "in": "query", "name": "namespace", "schema": { @@ -1062,7 +972,7 @@ } }, { - "description": "Object of the Relationship", + "description": "The related object in this check.", "in": "query", "name": "object", "schema": { @@ -1070,7 +980,7 @@ } }, { - "description": "Relation of the Relationship", + "description": "The relation between the Object and the Subject.", "in": "query", "name": "relation", "schema": { @@ -1078,7 +988,7 @@ } }, { - "description": "SubjectID of the Relationship", + "description": "A concrete id of the subject.", "in": "query", "name": "subject_id", "schema": { @@ -1086,7 +996,7 @@ } }, { - "description": "Namespace of the Subject Set", + "description": "The namespace of the object and relation\nreferenced in this subject set.", "in": "query", "name": "subject_set.namespace", "schema": { @@ -1094,7 +1004,7 @@ } }, { - "description": "Object of the Subject Set", + "description": "The object related by this subject set.", "in": "query", "name": "subject_set.object", "schema": { @@ -1102,7 +1012,7 @@ } }, { - "description": "Relation of the Subject Set", + "description": "The relation between the object and the subjects.", "in": "query", "name": "subject_set.relation", "schema": { @@ -1110,10 +1020,11 @@ } }, { + "description": "The maximum depth to search for a relation.\n\nIf the value is less than 1 or greater than the global\nmax-depth then the global max-depth will be used instead.", "in": "query", "name": "max-depth", "schema": { - "format": "int64", + "format": "int32", "type": "integer" } } @@ -1127,17 +1038,17 @@ } } }, - "description": "checkPermissionResult" + "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200." }, - "400": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/errorGeneric" + "$ref": "#/components/schemas/checkPermissionResult" } } }, - "description": "errorGeneric" + "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200." }, "default": { "content": { @@ -1147,34 +1058,30 @@ } } }, - "description": "errorGeneric" + "description": "Generic error" } }, - "summary": "Check a permission", + "summary": "Performs an authorization check.", "tags": ["permission"] }, "post": { - "description": "To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).", "operationId": "postCheckPermission", - "parameters": [ - { - "in": "query", - "name": "max-depth", - "schema": { - "format": "int64", - "type": "integer" - } - } - ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/postCheckPermissionBody" } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/postCheckPermissionBody" + } } }, - "x-originalParamName": "Payload" + "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object.", + "required": true, + "x-originalParamName": "body" }, "responses": { "200": { @@ -1185,17 +1092,17 @@ } } }, - "description": "checkPermissionResult" + "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200." }, - "400": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/errorGeneric" + "$ref": "#/components/schemas/checkPermissionResult" } } }, - "description": "errorGeneric" + "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200." }, "default": { "content": { @@ -1205,51 +1112,51 @@ } } }, - "description": "errorGeneric" + "description": "Generic error" } }, - "summary": "Check a permission", + "summary": "Performs an authorization check.", "tags": ["permission"] } }, "/relation-tuples/expand": { "get": { - "description": "Use this endpoint to expand a relationship tuple into permissions.", "operationId": "expandPermissions", "parameters": [ { - "description": "Namespace of the Subject Set", + "description": "The maximum depth of tree to build.\n\nIf the value is less than 1 or greater than the global\nmax-depth then the global max-depth will be used instead.\n\nIt is important to set this parameter to a meaningful\nvalue. Ponder how deep you really want to display this.", "in": "query", - "name": "namespace", - "required": true, + "name": "max-depth", "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { - "description": "Object of the Subject Set", + "description": "The namespace of the object and relation\nreferenced in this subject set.", "in": "query", - "name": "object", + "name": "namespace", "required": true, "schema": { "type": "string" } }, { - "description": "Relation of the Subject Set", + "description": "The object related by this subject set.", "in": "query", - "name": "relation", + "name": "object", "required": true, "schema": { "type": "string" } }, { + "description": "The relation between the object and the subjects.", "in": "query", - "name": "max-depth", + "name": "relation", + "required": true, "schema": { - "format": "int64", - "type": "integer" + "type": "string" } } ], @@ -1262,27 +1169,7 @@ } } }, - "description": "expandedPermissionTree" - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "errorGeneric" - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "errorGeneric" + "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200." }, "default": { "content": { @@ -1292,10 +1179,10 @@ } } }, - "description": "errorGeneric" + "description": "Generic error" } }, - "summary": "Expand a Relationship into permissions.", + "summary": "Expands the subject set into a tree of subjects.", "tags": ["permission"] } }, diff --git a/spec/goswagger.swagger.json b/spec/goswagger.swagger.json new file mode 100755 index 000000000..dbbdae47e --- /dev/null +++ b/spec/goswagger.swagger.json @@ -0,0 +1,1095 @@ +{ + "consumes": ["application/json"], + "produces": ["application/json"], + "schemes": ["http", "https"], + "swagger": "2.0", + "info": { + "description": "Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.", + "title": "ORY Keto", + "contact": { + "name": "ORY", + "url": "https://www.ory.sh", + "email": "hi@ory.sh" + }, + "license": { + "name": "Apache 2.0", + "url": "https://github.com/ory/keto/blob/master/LICENSE" + }, + "version": "Latest" + }, + "basePath": "/", + "paths": { + "/admin/relation-tuples": { + "put": { + "description": "Use this endpoint to create a relationship.", + "consumes": ["application/json"], + "produces": ["application/json"], + "schemes": ["http", "https"], + "tags": ["relationship"], + "summary": "Create a Relationship", + "operationId": "createRelationship", + "parameters": [ + { + "name": "Body", + "in": "body", + "schema": { + "$ref": "#/definitions/createRelationshipBody" + } + } + ], + "responses": { + "201": { + "description": "relationship", + "schema": { + "$ref": "#/definitions/relationship" + } + }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + }, + "default": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + } + } + }, + "delete": { + "description": "Use this endpoint to delete relationships", + "consumes": ["application/x-www-form-urlencoded"], + "produces": ["application/json"], + "schemes": ["http", "https"], + "tags": ["relationship"], + "summary": "Delete Relationships", + "operationId": "deleteRelationships", + "parameters": [ + { + "type": "string", + "description": "Namespace of the Relationship", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "description": "Object of the Relationship", + "name": "object", + "in": "query" + }, + { + "type": "string", + "description": "Relation of the Relationship", + "name": "relation", + "in": "query" + }, + { + "type": "string", + "description": "SubjectID of the Relationship", + "name": "subject_id", + "in": "query" + }, + { + "type": "string", + "description": "Namespace of the Subject Set", + "name": "subject_set.namespace", + "in": "query" + }, + { + "type": "string", + "description": "Object of the Subject Set", + "name": "subject_set.object", + "in": "query" + }, + { + "type": "string", + "description": "Relation of the Subject Set", + "name": "subject_set.relation", + "in": "query" + } + ], + "responses": { + "204": { + "$ref": "#/responses/emptyResponse" + }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + }, + "default": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + } + } + }, + "patch": { + "description": "Use this endpoint to patch one or more relationships.", + "consumes": ["application/json"], + "produces": ["application/json"], + "schemes": ["http", "https"], + "tags": ["relationship"], + "summary": "Patch Multiple Relationships", + "operationId": "patchRelationships", + "parameters": [ + { + "name": "Body", + "in": "body", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/relationshipPatch" + } + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/emptyResponse" + }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + }, + "404": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + }, + "default": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + } + } + } + }, + "/health/alive": { + "get": { + "description": "This endpoint returns a 200 status code when the HTTP server is up running.\nThis status does currently not include checks whether the database connection is working.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.", + "produces": ["application/json"], + "tags": ["health"], + "summary": "Check alive status", + "operationId": "isInstanceAlive", + "responses": { + "200": { + "description": "healthStatus", + "schema": { + "$ref": "#/definitions/healthStatus" + } + }, + "500": { + "description": "genericError", + "schema": { + "$ref": "#/definitions/genericError" + } + } + } + } + }, + "/health/ready": { + "get": { + "description": "This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g.\nthe database) are responsive as well.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.", + "produces": ["application/json"], + "tags": ["health"], + "summary": "Check readiness status", + "operationId": "isInstanceReady", + "responses": { + "200": { + "description": "healthStatus", + "schema": { + "$ref": "#/definitions/healthStatus" + } + }, + "503": { + "description": "healthNotReadyStatus", + "schema": { + "$ref": "#/definitions/healthNotReadyStatus" + } + } + } + } + }, + "/namespaces": { + "get": { + "description": "Get all namespaces", + "produces": ["application/json"], + "schemes": ["http", "https"], + "tags": ["relationship"], + "summary": "Query namespaces", + "operationId": "listRelationshipNamespaces", + "responses": { + "200": { + "description": "relationshipNamespaces", + "schema": { + "$ref": "#/definitions/relationshipNamespaces" + } + }, + "default": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + } + } + } + }, + "/opl/syntax/check": { + "post": { + "description": "The OPL file is expected in the body of the request.", + "consumes": ["text/plain"], + "produces": ["application/json"], + "schemes": ["http", "https"], + "tags": ["relationship"], + "summary": "Check the syntax of an OPL file", + "operationId": "checkOplSyntax", + "parameters": [ + { + "name": "Body", + "in": "body", + "schema": { + "$ref": "#/definitions/checkOplSyntaxBody" + } + } + ], + "responses": { + "200": { + "description": "checkOplSyntaxResult", + "schema": { + "$ref": "#/definitions/checkOplSyntaxResult" + } + }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + }, + "default": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + } + } + } + }, + "/relation-tuples": { + "get": { + "description": "Get all relationships that match the query. Only the namespace field is required.", + "consumes": ["application/x-www-form-urlencoded"], + "produces": ["application/json"], + "schemes": ["http", "https"], + "tags": ["relationship"], + "summary": "Query relationships", + "operationId": "getRelationships", + "parameters": [ + { + "type": "string", + "name": "page_token", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "name": "page_size", + "in": "query" + }, + { + "type": "string", + "description": "Namespace of the Relationship", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "description": "Object of the Relationship", + "name": "object", + "in": "query" + }, + { + "type": "string", + "description": "Relation of the Relationship", + "name": "relation", + "in": "query" + }, + { + "type": "string", + "description": "SubjectID of the Relationship", + "name": "subject_id", + "in": "query" + }, + { + "type": "string", + "description": "Namespace of the Subject Set", + "name": "subject_set.namespace", + "in": "query" + }, + { + "type": "string", + "description": "Object of the Subject Set", + "name": "subject_set.object", + "in": "query" + }, + { + "type": "string", + "description": "Relation of the Subject Set", + "name": "subject_set.relation", + "in": "query" + } + ], + "responses": { + "200": { + "description": "relationships", + "schema": { + "$ref": "#/definitions/relationships" + } + }, + "404": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + }, + "default": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + } + } + } + }, + "/relation-tuples/check": { + "get": { + "description": "To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).", + "consumes": ["application/x-www-form-urlencoded"], + "produces": ["application/json"], + "schemes": ["http", "https"], + "tags": ["permission"], + "summary": "Check a permission", + "operationId": "checkPermissionOrError", + "parameters": [ + { + "type": "string", + "description": "Namespace of the Relationship", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "description": "Object of the Relationship", + "name": "object", + "in": "query" + }, + { + "type": "string", + "description": "Relation of the Relationship", + "name": "relation", + "in": "query" + }, + { + "type": "string", + "description": "SubjectID of the Relationship", + "name": "subject_id", + "in": "query" + }, + { + "type": "string", + "description": "Namespace of the Subject Set", + "name": "subject_set.namespace", + "in": "query" + }, + { + "type": "string", + "description": "Object of the Subject Set", + "name": "subject_set.object", + "in": "query" + }, + { + "type": "string", + "description": "Relation of the Subject Set", + "name": "subject_set.relation", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "name": "max-depth", + "in": "query" + } + ], + "responses": { + "200": { + "description": "checkPermissionResult", + "schema": { + "$ref": "#/definitions/checkPermissionResult" + } + }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + }, + "403": { + "description": "checkPermissionResult", + "schema": { + "$ref": "#/definitions/checkPermissionResult" + } + }, + "default": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + } + } + }, + "post": { + "description": "To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).", + "consumes": ["application/json"], + "produces": ["application/json"], + "schemes": ["http", "https"], + "tags": ["permission"], + "summary": "Check a permission", + "operationId": "postCheckPermissionOrError", + "parameters": [ + { + "type": "integer", + "format": "int64", + "name": "max-depth", + "in": "query" + }, + { + "name": "Body", + "in": "body", + "schema": { + "$ref": "#/definitions/postCheckPermissionOrErrorBody" + } + } + ], + "responses": { + "200": { + "description": "checkPermissionResult", + "schema": { + "$ref": "#/definitions/checkPermissionResult" + } + }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + }, + "403": { + "description": "checkPermissionResult", + "schema": { + "$ref": "#/definitions/checkPermissionResult" + } + }, + "default": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + } + } + } + }, + "/relation-tuples/check/openapi": { + "get": { + "description": "To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).", + "consumes": ["application/x-www-form-urlencoded"], + "produces": ["application/json"], + "schemes": ["http", "https"], + "tags": ["permission"], + "summary": "Check a permission", + "operationId": "checkPermission", + "parameters": [ + { + "type": "string", + "description": "Namespace of the Relationship", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "description": "Object of the Relationship", + "name": "object", + "in": "query" + }, + { + "type": "string", + "description": "Relation of the Relationship", + "name": "relation", + "in": "query" + }, + { + "type": "string", + "description": "SubjectID of the Relationship", + "name": "subject_id", + "in": "query" + }, + { + "type": "string", + "description": "Namespace of the Subject Set", + "name": "subject_set.namespace", + "in": "query" + }, + { + "type": "string", + "description": "Object of the Subject Set", + "name": "subject_set.object", + "in": "query" + }, + { + "type": "string", + "description": "Relation of the Subject Set", + "name": "subject_set.relation", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "name": "max-depth", + "in": "query" + } + ], + "responses": { + "200": { + "description": "checkPermissionResult", + "schema": { + "$ref": "#/definitions/checkPermissionResult" + } + }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + }, + "default": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + } + } + }, + "post": { + "description": "To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).", + "consumes": ["application/json"], + "produces": ["application/json"], + "schemes": ["http", "https"], + "tags": ["permission"], + "summary": "Check a permission", + "operationId": "postCheckPermission", + "parameters": [ + { + "type": "integer", + "format": "int64", + "name": "max-depth", + "in": "query" + }, + { + "name": "Payload", + "in": "body", + "schema": { + "$ref": "#/definitions/postCheckPermissionBody" + } + } + ], + "responses": { + "200": { + "description": "checkPermissionResult", + "schema": { + "$ref": "#/definitions/checkPermissionResult" + } + }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + }, + "default": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + } + } + } + }, + "/relation-tuples/expand": { + "get": { + "description": "Use this endpoint to expand a relationship tuple into permissions.", + "consumes": ["application/x-www-form-urlencoded"], + "produces": ["application/json"], + "schemes": ["http", "https"], + "tags": ["permission"], + "summary": "Expand a Relationship into permissions.", + "operationId": "expandPermissions", + "parameters": [ + { + "type": "string", + "description": "Namespace of the Subject Set", + "name": "namespace", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Object of the Subject Set", + "name": "object", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Relation of the Subject Set", + "name": "relation", + "in": "query", + "required": true + }, + { + "type": "integer", + "format": "int64", + "name": "max-depth", + "in": "query" + } + ], + "responses": { + "200": { + "description": "expandedPermissionTree", + "schema": { + "$ref": "#/definitions/expandedPermissionTree" + } + }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + }, + "404": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + }, + "default": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + } + } + } + }, + "/version": { + "get": { + "description": "This endpoint returns the service version typically notated using semantic versioning.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.", + "produces": ["application/json"], + "tags": ["version"], + "summary": "Get service version", + "operationId": "getVersion", + "responses": { + "200": { + "description": "version", + "schema": { + "$ref": "#/definitions/version" + } + } + } + } + } + }, + "definitions": { + "ParseError": { + "type": "object", + "properties": { + "end": { + "$ref": "#/definitions/SourcePosition" + }, + "message": { + "type": "string" + }, + "start": { + "$ref": "#/definitions/SourcePosition" + } + } + }, + "SourcePosition": { + "type": "object", + "properties": { + "Line": { + "type": "integer", + "format": "int64" + }, + "column": { + "type": "integer", + "format": "int64" + } + } + }, + "checkOplSyntaxBody": { + "description": "Ory Permission Language Document", + "type": "string" + }, + "checkOplSyntaxResult": { + "type": "object", + "title": "CheckOPLSyntaxResponse represents the response for an OPL syntax check request.", + "properties": { + "errors": { + "description": "The list of syntax errors", + "type": "array", + "items": { + "$ref": "#/definitions/ParseError" + } + } + } + }, + "checkPermissionResult": { + "description": "The content of the allowed field is mirrored in the HTTP status code.", + "type": "object", + "title": "Check Permission Result", + "required": ["allowed"], + "properties": { + "allowed": { + "description": "whether the relation tuple is allowed", + "type": "boolean" + } + } + }, + "createRelationshipBody": { + "description": "Create Relationship Request Body", + "type": "object", + "properties": { + "namespace": { + "description": "Namespace to query", + "type": "string" + }, + "object": { + "description": "Object to query", + "type": "string" + }, + "relation": { + "description": "Relation to query", + "type": "string" + }, + "subject_id": { + "description": "SubjectID to query\n\nEither SubjectSet or SubjectID can be provided.", + "type": "string" + }, + "subject_set": { + "$ref": "#/definitions/subjectSet" + } + } + }, + "errorGeneric": { + "description": "The standard Ory JSON API error format.", + "type": "object", + "title": "JSON API Error Response", + "required": ["error"], + "properties": { + "error": { + "$ref": "#/definitions/genericError" + } + } + }, + "expandedPermissionTree": { + "type": "object", + "required": ["type"], + "properties": { + "children": { + "description": "The children of the node, possibly none.", + "type": "array", + "items": { + "$ref": "#/definitions/expandedPermissionTree" + } + }, + "tuple": { + "$ref": "#/definitions/relationship" + }, + "type": { + "description": "The type of the node.\nunion TreeNodeUnion\nexclusion TreeNodeExclusion\nintersection TreeNodeIntersection\nleaf TreeNodeLeaf\ntuple_to_subject_set TreeNodeTupleToSubjectSet\ncomputed_subject_set TreeNodeComputedSubjectSet\nnot TreeNodeNot\nunspecified TreeNodeUnspecified", + "type": "string", + "enum": [ + "union", + "exclusion", + "intersection", + "leaf", + "tuple_to_subject_set", + "computed_subject_set", + "not", + "unspecified" + ], + "x-go-enum-desc": "union TreeNodeUnion\nexclusion TreeNodeExclusion\nintersection TreeNodeIntersection\nleaf TreeNodeLeaf\ntuple_to_subject_set TreeNodeTupleToSubjectSet\ncomputed_subject_set TreeNodeComputedSubjectSet\nnot TreeNodeNot\nunspecified TreeNodeUnspecified" + } + } + }, + "genericError": { + "type": "object", + "required": ["message"], + "properties": { + "code": { + "description": "The status code", + "type": "integer", + "format": "int64", + "example": 404 + }, + "debug": { + "description": "Debug information\n\nThis field is often not exposed to protect against leaking\nsensitive information.", + "type": "string", + "example": "SQL field \"foo\" is not a bool." + }, + "details": { + "description": "Further error details", + "type": "object", + "additionalProperties": {} + }, + "id": { + "description": "The error ID\n\nUseful when trying to identify various errors in application logic.", + "type": "string" + }, + "message": { + "description": "Error message\n\nThe error's message.", + "type": "string", + "example": "The resource could not be found" + }, + "reason": { + "description": "A human-readable reason for the error", + "type": "string", + "example": "User with ID 1234 does not exist." + }, + "request": { + "description": "The request ID\n\nThe request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.", + "type": "string", + "example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6" + }, + "status": { + "description": "The status description", + "type": "string", + "example": "Not Found" + } + } + }, + "healthNotReadyStatus": { + "type": "object", + "properties": { + "errors": { + "description": "Errors contains a list of errors that caused the not ready status.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "healthStatus": { + "type": "object", + "properties": { + "status": { + "description": "Status always contains \"ok\".", + "type": "string" + } + } + }, + "namespace": { + "type": "object", + "properties": { + "name": { + "description": "Name of the namespace.", + "type": "string" + } + } + }, + "postCheckPermissionBody": { + "description": "Check Permission using Post Request Body", + "type": "object", + "properties": { + "namespace": { + "description": "Namespace to query", + "type": "string" + }, + "object": { + "description": "Object to query", + "type": "string" + }, + "relation": { + "description": "Relation to query", + "type": "string" + }, + "subject_id": { + "description": "SubjectID to query\n\nEither SubjectSet or SubjectID can be provided.", + "type": "string" + }, + "subject_set": { + "$ref": "#/definitions/subjectSet" + } + } + }, + "postCheckPermissionOrErrorBody": { + "description": "Post Check Permission Or Error Body", + "type": "object", + "properties": { + "namespace": { + "description": "Namespace to query", + "type": "string" + }, + "object": { + "description": "Object to query", + "type": "string" + }, + "relation": { + "description": "Relation to query", + "type": "string" + }, + "subject_id": { + "description": "SubjectID to query\n\nEither SubjectSet or SubjectID can be provided.", + "type": "string" + }, + "subject_set": { + "$ref": "#/definitions/subjectSet" + } + } + }, + "relationQuery": { + "description": "Relation Query", + "type": "object", + "properties": { + "namespace": { + "description": "Namespace to query", + "type": "string" + }, + "object": { + "description": "Object to query", + "type": "string" + }, + "relation": { + "description": "Relation to query", + "type": "string" + }, + "subject_id": { + "description": "SubjectID to query\n\nEither SubjectSet or SubjectID can be provided.", + "type": "string" + }, + "subject_set": { + "$ref": "#/definitions/subjectSet" + } + } + }, + "relationship": { + "description": "Relationship", + "type": "object", + "required": ["namespace", "object", "relation"], + "properties": { + "namespace": { + "description": "Namespace of the Relation Tuple", + "type": "string" + }, + "object": { + "description": "Object of the Relation Tuple", + "type": "string" + }, + "relation": { + "description": "Relation of the Relation Tuple", + "type": "string" + }, + "subject_id": { + "description": "SubjectID of the Relation Tuple\n\nEither SubjectSet or SubjectID can be provided.", + "type": "string" + }, + "subject_set": { + "$ref": "#/definitions/subjectSet" + } + } + }, + "relationshipNamespaces": { + "description": "Relationship Namespace List", + "type": "object", + "properties": { + "namespaces": { + "type": "array", + "items": { + "$ref": "#/definitions/namespace" + } + } + } + }, + "relationshipPatch": { + "description": "Payload for patching a relationship", + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": ["insert", "delete"], + "x-go-enum-desc": "insert ActionInsert\ndelete ActionDelete" + }, + "relation_tuple": { + "$ref": "#/definitions/relationship" + } + } + }, + "relationships": { + "description": "Paginated Relationship List", + "type": "object", + "properties": { + "next_page_token": { + "description": "The opaque token to provide in a subsequent request\nto get the next page. It is the empty string iff this is\nthe last page.", + "type": "string" + }, + "relation_tuples": { + "type": "array", + "items": { + "$ref": "#/definitions/relationship" + } + } + } + }, + "subjectSet": { + "type": "object", + "required": ["namespace", "object", "relation"], + "properties": { + "namespace": { + "description": "Namespace of the Subject Set", + "type": "string" + }, + "object": { + "description": "Object of the Subject Set", + "type": "string" + }, + "relation": { + "description": "Relation of the Subject Set", + "type": "string" + } + } + }, + "version": { + "type": "object", + "properties": { + "version": { + "description": "Version is the service's version.", + "type": "string" + } + } + }, + "UUID": { "type": "string", "format": "uuid4" } + }, + "responses": { + "emptyResponse": { + "description": "Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201." + } + } +} diff --git a/spec/swagger.json b/spec/swagger.json index dbbdae47e..c01101c46 100755 --- a/spec/swagger.json +++ b/spec/swagger.json @@ -1,11 +1,9 @@ { - "consumes": ["application/json"], - "produces": ["application/json"], - "schemes": ["http", "https"], "swagger": "2.0", "info": { - "description": "Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.", "title": "ORY Keto", + "description": "Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.", + "version": "Latest", "contact": { "name": "ORY", "url": "https://www.ory.sh", @@ -14,723 +12,652 @@ "license": { "name": "Apache 2.0", "url": "https://github.com/ory/keto/blob/master/LICENSE" - }, - "version": "Latest" + } }, "basePath": "/", + "schemes": ["http", "https"], + "consumes": ["application/json"], + "produces": ["application/json"], "paths": { "/admin/relation-tuples": { - "put": { - "description": "Use this endpoint to create a relationship.", - "consumes": ["application/json"], - "produces": ["application/json"], - "schemes": ["http", "https"], - "tags": ["relationship"], - "summary": "Create a Relationship", - "operationId": "createRelationship", - "parameters": [ - { - "name": "Body", - "in": "body", - "schema": { - "$ref": "#/definitions/createRelationshipBody" - } - } - ], + "delete": { + "summary": "Deletes relationships based on relation query", + "operationId": "deleteRelationships", "responses": { - "201": { - "description": "relationship", - "schema": { - "$ref": "#/definitions/relationship" - } - }, - "400": { - "description": "errorGeneric", - "schema": { - "$ref": "#/definitions/errorGeneric" - } + "204": { + "description": "An empty response.", + "schema": {} }, "default": { - "description": "errorGeneric", + "description": "Generic error", "schema": { "$ref": "#/definitions/errorGeneric" } } - } - }, - "delete": { - "description": "Use this endpoint to delete relationships", - "consumes": ["application/x-www-form-urlencoded"], - "produces": ["application/json"], - "schemes": ["http", "https"], - "tags": ["relationship"], - "summary": "Delete Relationships", - "operationId": "deleteRelationships", + }, "parameters": [ { - "type": "string", - "description": "Namespace of the Relationship", "name": "namespace", - "in": "query" + "description": "The namespace this relation tuple lives in.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Object of the Relationship", "name": "object", - "in": "query" + "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Relation of the Relationship", "name": "relation", - "in": "query" + "description": "The relation between an Object and a Subject.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "SubjectID of the Relationship", "name": "subject_id", - "in": "query" + "description": "A concrete id of the subject.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Namespace of the Subject Set", "name": "subject_set.namespace", - "in": "query" + "description": "The namespace of the object and relation\nreferenced in this subject set.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Object of the Subject Set", "name": "subject_set.object", - "in": "query" + "description": "The object related by this subject set.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Relation of the Subject Set", "name": "subject_set.relation", - "in": "query" + "description": "The relation between the object and the subjects.", + "in": "query", + "required": false, + "type": "string" } ], + "tags": ["relationship"], + "consumes": ["application/x-www-form-urlencoded"] + }, + "put": { + "summary": "Creates a relationship", + "operationId": "createRelationship", "responses": { - "204": { - "$ref": "#/responses/emptyResponse" - }, - "400": { - "description": "errorGeneric", + "201": { + "description": "The created relationship.", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/relationship" } }, "default": { - "description": "errorGeneric", + "description": "Generic error", "schema": { "$ref": "#/definitions/errorGeneric" } } - } - }, - "patch": { - "description": "Use this endpoint to patch one or more relationships.", - "consumes": ["application/json"], - "produces": ["application/json"], - "schemes": ["http", "https"], - "tags": ["relationship"], - "summary": "Patch Multiple Relationships", - "operationId": "patchRelationships", + }, "parameters": [ { - "name": "Body", + "name": "relationTuple", + "description": "The relationship to create.", "in": "body", + "required": true, "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/relationshipPatch" - } + "$ref": "#/definitions/createRelationshipBody" } } ], + "tags": ["relationship"] + }, + "patch": { + "summary": "Writes one or more relationships in a single transaction.", + "operationId": "patchRelationships", "responses": { "204": { - "$ref": "#/responses/emptyResponse" - }, - "400": { - "description": "errorGeneric", - "schema": { - "$ref": "#/definitions/errorGeneric" - } - }, - "404": { - "description": "errorGeneric", - "schema": { - "$ref": "#/definitions/errorGeneric" + "description": "An empty response.", + "schema": {}, + "examples": { + "application/json": {} } }, "default": { - "description": "errorGeneric", + "description": "Generic error", "schema": { "$ref": "#/definitions/errorGeneric" } } - } - } - }, - "/health/alive": { - "get": { - "description": "This endpoint returns a 200 status code when the HTTP server is up running.\nThis status does currently not include checks whether the database connection is working.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.", - "produces": ["application/json"], - "tags": ["health"], - "summary": "Check alive status", - "operationId": "isInstanceAlive", - "responses": { - "200": { - "description": "healthStatus", - "schema": { - "$ref": "#/definitions/healthStatus" - } - }, - "500": { - "description": "genericError", + }, + "parameters": [ + { + "name": "relationTupleDeltas", + "description": "The write delta for the relationships operated in one single transaction.\nEither all actions succeed or no change takes effect on error.", + "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/genericError" + "type": "array", + "items": { + "$ref": "#/definitions/relationshipDelta" + } } } - } + ], + "tags": ["relationship"] } }, - "/health/ready": { + "/namespaces": { "get": { - "description": "This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g.\nthe database) are responsive as well.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.", - "produces": ["application/json"], - "tags": ["health"], - "summary": "Check readiness status", - "operationId": "isInstanceReady", + "summary": "Lists Namespaces", + "description": "Get all namespaces.", + "operationId": "listRelationshipNamespaces", "responses": { "200": { - "description": "healthStatus", + "description": "The list of namespaces.", "schema": { - "$ref": "#/definitions/healthStatus" + "$ref": "#/definitions/relationshipNamespaces" + }, + "examples": { + "application/json": { + "namespaces": [ + { + "name": "my namespace" + } + ] + } } }, - "503": { - "description": "healthNotReadyStatus", + "default": { + "description": "Generic error", "schema": { - "$ref": "#/definitions/healthNotReadyStatus" + "$ref": "#/definitions/errorGeneric" } } - } + }, + "tags": ["relationship"], + "consumes": ["application/x-www-form-urlencoded"] } }, - "/namespaces": { - "get": { - "description": "Get all namespaces", - "produces": ["application/json"], - "schemes": ["http", "https"], - "tags": ["relationship"], - "summary": "Query namespaces", - "operationId": "listRelationshipNamespaces", + "/opl/syntax/check": { + "post": { + "summary": "Performs a syntax check request.", + "operationId": "checkOplSyntax", "responses": { "200": { - "description": "relationshipNamespaces", + "description": "The result of the syntax checker", "schema": { - "$ref": "#/definitions/relationshipNamespaces" + "$ref": "#/definitions/checkOplSyntaxResult" } }, "default": { - "description": "errorGeneric", + "description": "Generic error", "schema": { "$ref": "#/definitions/errorGeneric" } } - } - } - }, - "/opl/syntax/check": { - "post": { - "description": "The OPL file is expected in the body of the request.", - "consumes": ["text/plain"], - "produces": ["application/json"], - "schemes": ["http", "https"], - "tags": ["relationship"], - "summary": "Check the syntax of an OPL file", - "operationId": "checkOplSyntax", + }, "parameters": [ { - "name": "Body", + "name": "content", "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/checkOplSyntaxBody" + "type": "string", + "format": "byte" } } ], + "tags": ["relationship"], + "consumes": ["text/plain"] + } + }, + "/relation-tuples": { + "get": { + "summary": "Lists ACL relationships.", + "operationId": "getRelationships", "responses": { "200": { - "description": "checkOplSyntaxResult", - "schema": { - "$ref": "#/definitions/checkOplSyntaxResult" - } - }, - "400": { - "description": "errorGeneric", + "description": "The list of relationships.", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/relationships" } }, "default": { - "description": "errorGeneric", + "description": "Generic error", "schema": { "$ref": "#/definitions/errorGeneric" } } - } - } - }, - "/relation-tuples": { - "get": { - "description": "Get all relationships that match the query. Only the namespace field is required.", - "consumes": ["application/x-www-form-urlencoded"], - "produces": ["application/json"], - "schemes": ["http", "https"], - "tags": ["relationship"], - "summary": "Query relationships", - "operationId": "getRelationships", + }, "parameters": [ { - "type": "string", - "name": "page_token", - "in": "query" + "name": "page_size", + "description": "Optional. The maximum number of\nRelationTuples to return in the response.\n\nDefault: 100", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" }, { - "type": "integer", - "format": "int64", - "name": "page_size", - "in": "query" + "name": "page_token", + "description": "Optional. An opaque pagination token returned from\na previous call to `ListRelationTuples` that\nindicates where the page should start at.\n\nAn empty token denotes the first page. All successive\npages require the token from the previous page.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Namespace of the Relationship", "name": "namespace", - "in": "query" + "description": "The namespace", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Object of the Relationship", "name": "object", - "in": "query" + "description": "The related object in this check.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Relation of the Relationship", "name": "relation", - "in": "query" + "description": "The relation between the Object and the Subject.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "SubjectID of the Relationship", "name": "subject_id", - "in": "query" + "description": "A concrete id of the subject.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Namespace of the Subject Set", "name": "subject_set.namespace", - "in": "query" + "description": "The namespace of the object and relation\nreferenced in this subject set.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Object of the Subject Set", "name": "subject_set.object", - "in": "query" + "description": "The object related by this subject set.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Relation of the Subject Set", "name": "subject_set.relation", - "in": "query" + "description": "The relation between the object and the subjects.", + "in": "query", + "required": false, + "type": "string" } ], + "tags": ["relationship"], + "consumes": ["application/x-www-form-urlencoded"] + } + }, + "/relation-tuples/check": { + "get": { + "summary": "Performs an authorization check.", + "operationId": "CheckService_Check", "responses": { "200": { - "description": "relationships", + "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/relationships" + "$ref": "#/definitions/checkPermissionResult" } }, - "404": { - "description": "errorGeneric", + "403": { + "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/checkPermissionResult" } }, "default": { - "description": "errorGeneric", + "description": "Generic error", "schema": { "$ref": "#/definitions/errorGeneric" } } - } - } - }, - "/relation-tuples/check": { - "get": { - "description": "To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).", - "consumes": ["application/x-www-form-urlencoded"], - "produces": ["application/json"], - "schemes": ["http", "https"], - "tags": ["permission"], - "summary": "Check a permission", - "operationId": "checkPermissionOrError", + }, "parameters": [ { - "type": "string", - "description": "Namespace of the Relationship", "name": "namespace", - "in": "query" + "description": "The namespace to evaluate the check.\n\nNote: If you use the expand-API and the check\nevaluates a RelationTuple specifying a SubjectSet as\nsubject or due to a rewrite rule in a namespace config\nthis check request may involve other namespaces automatically.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Object of the Relationship", "name": "object", - "in": "query" + "description": "The related object in this check.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Relation of the Relationship", "name": "relation", - "in": "query" + "description": "The relation between the Object and the Subject.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "SubjectID of the Relationship", "name": "subject_id", - "in": "query" + "description": "A concrete id of the subject.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Namespace of the Subject Set", "name": "subject_set.namespace", - "in": "query" + "description": "The namespace of the object and relation\nreferenced in this subject set.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Object of the Subject Set", "name": "subject_set.object", - "in": "query" + "description": "The object related by this subject set.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Relation of the Subject Set", "name": "subject_set.relation", - "in": "query" + "description": "The relation between the object and the subjects.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "integer", - "format": "int64", "name": "max-depth", - "in": "query" + "description": "The maximum depth to search for a relation.\n\nIf the value is less than 1 or greater than the global\nmax-depth then the global max-depth will be used instead.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" } ], + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded", "application/json"] + }, + "post": { + "summary": "Performs an authorization check.", + "operationId": "CheckService_Check3", "responses": { "200": { - "description": "checkPermissionResult", + "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { "$ref": "#/definitions/checkPermissionResult" } }, - "400": { - "description": "errorGeneric", - "schema": { - "$ref": "#/definitions/errorGeneric" - } - }, "403": { - "description": "checkPermissionResult", + "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { "$ref": "#/definitions/checkPermissionResult" } }, "default": { - "description": "errorGeneric", + "description": "Generic error", "schema": { "$ref": "#/definitions/errorGeneric" } } - } - }, - "post": { - "description": "To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).", - "consumes": ["application/json"], - "produces": ["application/json"], - "schemes": ["http", "https"], - "tags": ["permission"], - "summary": "Check a permission", - "operationId": "postCheckPermissionOrError", + }, "parameters": [ { - "type": "integer", - "format": "int64", - "name": "max-depth", - "in": "query" - }, - { - "name": "Body", + "name": "body", + "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object.", "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/postCheckPermissionOrErrorBody" + "$ref": "#/definitions/postCheckPermissionBody" } } ], + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded", "application/json"] + } + }, + "/relation-tuples/check/openapi": { + "get": { + "summary": "Performs an authorization check.", + "operationId": "CheckService_Check2", "responses": { "200": { - "description": "checkPermissionResult", + "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { "$ref": "#/definitions/checkPermissionResult" } }, - "400": { - "description": "errorGeneric", - "schema": { - "$ref": "#/definitions/errorGeneric" - } - }, "403": { - "description": "checkPermissionResult", + "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { "$ref": "#/definitions/checkPermissionResult" } }, "default": { - "description": "errorGeneric", + "description": "Generic error", "schema": { "$ref": "#/definitions/errorGeneric" } } - } - } - }, - "/relation-tuples/check/openapi": { - "get": { - "description": "To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).", - "consumes": ["application/x-www-form-urlencoded"], - "produces": ["application/json"], - "schemes": ["http", "https"], - "tags": ["permission"], - "summary": "Check a permission", - "operationId": "checkPermission", + }, "parameters": [ { - "type": "string", - "description": "Namespace of the Relationship", "name": "namespace", - "in": "query" + "description": "The namespace to evaluate the check.\n\nNote: If you use the expand-API and the check\nevaluates a RelationTuple specifying a SubjectSet as\nsubject or due to a rewrite rule in a namespace config\nthis check request may involve other namespaces automatically.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Object of the Relationship", "name": "object", - "in": "query" + "description": "The related object in this check.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Relation of the Relationship", "name": "relation", - "in": "query" + "description": "The relation between the Object and the Subject.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "SubjectID of the Relationship", "name": "subject_id", - "in": "query" + "description": "A concrete id of the subject.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Namespace of the Subject Set", "name": "subject_set.namespace", - "in": "query" + "description": "The namespace of the object and relation\nreferenced in this subject set.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Object of the Subject Set", "name": "subject_set.object", - "in": "query" + "description": "The object related by this subject set.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "string", - "description": "Relation of the Subject Set", "name": "subject_set.relation", - "in": "query" + "description": "The relation between the object and the subjects.", + "in": "query", + "required": false, + "type": "string" }, { - "type": "integer", - "format": "int64", "name": "max-depth", - "in": "query" + "description": "The maximum depth to search for a relation.\n\nIf the value is less than 1 or greater than the global\nmax-depth then the global max-depth will be used instead.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" } ], + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded", "application/json"] + }, + "post": { + "summary": "Performs an authorization check.", + "operationId": "CheckService_Check4", "responses": { "200": { - "description": "checkPermissionResult", + "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { "$ref": "#/definitions/checkPermissionResult" } }, - "400": { - "description": "errorGeneric", + "403": { + "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/checkPermissionResult" } }, "default": { - "description": "errorGeneric", + "description": "Generic error", "schema": { "$ref": "#/definitions/errorGeneric" } } - } - }, - "post": { - "description": "To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).", - "consumes": ["application/json"], - "produces": ["application/json"], - "schemes": ["http", "https"], - "tags": ["permission"], - "summary": "Check a permission", - "operationId": "postCheckPermission", + }, "parameters": [ { - "type": "integer", - "format": "int64", - "name": "max-depth", - "in": "query" - }, - { - "name": "Payload", + "name": "body", + "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object.", "in": "body", + "required": true, "schema": { "$ref": "#/definitions/postCheckPermissionBody" } } ], + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded", "application/json"] + } + }, + "/relation-tuples/expand": { + "get": { + "summary": "Expands the subject set into a tree of subjects.", + "operationId": "expandPermissions", "responses": { "200": { - "description": "checkPermissionResult", + "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" - } - }, - "400": { - "description": "errorGeneric", - "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/expandedPermissionTree" } }, "default": { - "description": "errorGeneric", + "description": "Generic error", "schema": { "$ref": "#/definitions/errorGeneric" } } - } - } - }, - "/relation-tuples/expand": { - "get": { - "description": "Use this endpoint to expand a relationship tuple into permissions.", - "consumes": ["application/x-www-form-urlencoded"], - "produces": ["application/json"], - "schemes": ["http", "https"], - "tags": ["permission"], - "summary": "Expand a Relationship into permissions.", - "operationId": "expandPermissions", + }, "parameters": [ { - "type": "string", - "description": "Namespace of the Subject Set", + "name": "max-depth", + "description": "The maximum depth of tree to build.\n\nIf the value is less than 1 or greater than the global\nmax-depth then the global max-depth will be used instead.\n\nIt is important to set this parameter to a meaningful\nvalue. Ponder how deep you really want to display this.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { "name": "namespace", + "description": "The namespace of the object and relation\nreferenced in this subject set.", "in": "query", - "required": true + "required": true, + "type": "string" }, { - "type": "string", - "description": "Object of the Subject Set", "name": "object", + "description": "The object related by this subject set.", "in": "query", - "required": true + "required": true, + "type": "string" }, { - "type": "string", - "description": "Relation of the Subject Set", "name": "relation", + "description": "The relation between the object and the subjects.", "in": "query", - "required": true - }, - { - "type": "integer", - "format": "int64", - "name": "max-depth", - "in": "query" + "required": true, + "type": "string" } ], - "responses": { - "200": { - "description": "expandedPermissionTree", - "schema": { - "$ref": "#/definitions/expandedPermissionTree" - } - }, - "400": { - "description": "errorGeneric", - "schema": { - "$ref": "#/definitions/errorGeneric" - } - }, - "404": { - "description": "errorGeneric", - "schema": { - "$ref": "#/definitions/errorGeneric" - } - }, - "default": { - "description": "errorGeneric", - "schema": { - "$ref": "#/definitions/errorGeneric" - } - } - } + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded"] } }, "/version": { "get": { - "description": "This endpoint returns the service version typically notated using semantic versioning.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\n`X-Forwarded-Proto` header to be set.\n\nBe aware that if you are running multiple nodes of this service, the health status will never\nrefer to the cluster state, only to a single instance.", - "produces": ["application/json"], - "tags": ["version"], - "summary": "Get service version", + "summary": "Returns the version of the Ory Keto instance.", + "description": "This endpoint returns the service version typically notated using semantic versioning.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\nX-Forwarded-Proto header to be set.", "operationId": "getVersion", "responses": { "200": { - "description": "version", + "description": "The version of the instance.", + "schema": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.GetVersionResponse" + } + }, + "default": { + "description": "Generic error", "schema": { - "$ref": "#/definitions/version" + "$ref": "#/definitions/errorGeneric" } } - } + }, + "tags": ["version"] } } }, "definitions": { - "ParseError": { + "checkOplSyntaxResult": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/definitions/ory.keto.opl.v1alpha1.ParseError" + } + } + } + }, + "ory.keto.opl.v1alpha1.ParseError": { "type": "object", "properties": { - "end": { - "$ref": "#/definitions/SourcePosition" - }, "message": { "type": "string" }, "start": { - "$ref": "#/definitions/SourcePosition" + "$ref": "#/definitions/ory.keto.opl.v1alpha1.SourcePosition" + }, + "end": { + "$ref": "#/definitions/ory.keto.opl.v1alpha1.SourcePosition" } } }, - "SourcePosition": { + "ory.keto.opl.v1alpha1.SourcePosition": { "type": "object", "properties": { "Line": { @@ -743,353 +670,345 @@ } } }, - "checkOplSyntaxBody": { - "description": "Ory Permission Language Document", - "type": "string" - }, - "checkOplSyntaxResult": { + "postCheckPermissionBody": { "type": "object", - "title": "CheckOPLSyntaxResponse represents the response for an OPL syntax check request.", "properties": { - "errors": { - "description": "The list of syntax errors", - "type": "array", - "items": { - "$ref": "#/definitions/ParseError" - } + "namespace": { + "type": "string", + "description": "The namespace to evaluate the check.\n\nNote: If you use the expand-API and the check\nevaluates a RelationTuple specifying a SubjectSet as\nsubject or due to a rewrite rule in a namespace config\nthis check request may involve other namespaces automatically." + }, + "object": { + "type": "string", + "description": "The related object in this check." + }, + "relation": { + "type": "string", + "description": "The relation between the Object and the Subject." + }, + "subject_id": { + "type": "string", + "description": "A concrete id of the subject." + }, + "subject_set": { + "$ref": "#/definitions/subjectSetQuery", + "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." + }, + "max-depth": { + "type": "integer", + "format": "int32", + "description": "The maximum depth to search for a relation.\n\nIf the value is less than 1 or greater than the global\nmax-depth then the global max-depth will be used instead." } - } + }, + "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object." }, "checkPermissionResult": { - "description": "The content of the allowed field is mirrored in the HTTP status code.", "type": "object", - "title": "Check Permission Result", - "required": ["allowed"], "properties": { "allowed": { - "description": "whether the relation tuple is allowed", - "type": "boolean" + "type": "boolean", + "description": "Whether the specified subject (id)\nis related to the requested object.\n\nIt is false by default if no ACL matches." } - } + }, + "description": "The response for a CheckService.Check rpc." }, "createRelationshipBody": { - "description": "Create Relationship Request Body", "type": "object", "properties": { "namespace": { - "description": "Namespace to query", - "type": "string" + "type": "string", + "description": "The namespace this relation tuple lives in." }, "object": { - "description": "Object to query", - "type": "string" + "type": "string", + "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple." }, "relation": { - "description": "Relation to query", - "type": "string" + "type": "string", + "description": "The relation between an Object and a Subject." }, "subject_id": { - "description": "SubjectID to query\n\nEither SubjectSet or SubjectID can be provided.", - "type": "string" + "type": "string", + "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/subjectSet" + "$ref": "#/definitions/subjectSet", + "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } } }, - "errorGeneric": { - "description": "The standard Ory JSON API error format.", + "ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse": { "type": "object", - "title": "JSON API Error Response", - "required": ["error"], "properties": { - "error": { - "$ref": "#/definitions/genericError" + "relationTuple": { + "$ref": "#/definitions/relationship", + "description": "The created relationship." } - } + }, + "description": "The response from creating a new relationship." }, - "expandedPermissionTree": { - "type": "object", - "required": ["type"], - "properties": { - "children": { - "description": "The children of the node, possibly none.", - "type": "array", - "items": { - "$ref": "#/definitions/expandedPermissionTree" - } - }, - "tuple": { - "$ref": "#/definitions/relationship" - }, - "type": { - "description": "The type of the node.\nunion TreeNodeUnion\nexclusion TreeNodeExclusion\nintersection TreeNodeIntersection\nleaf TreeNodeLeaf\ntuple_to_subject_set TreeNodeTupleToSubjectSet\ncomputed_subject_set TreeNodeComputedSubjectSet\nnot TreeNodeNot\nunspecified TreeNodeUnspecified", - "type": "string", - "enum": [ - "union", - "exclusion", - "intersection", - "leaf", - "tuple_to_subject_set", - "computed_subject_set", - "not", - "unspecified" - ], - "x-go-enum-desc": "union TreeNodeUnion\nexclusion TreeNodeExclusion\nintersection TreeNodeIntersection\nleaf TreeNodeLeaf\ntuple_to_subject_set TreeNodeTupleToSubjectSet\ncomputed_subject_set TreeNodeComputedSubjectSet\nnot TreeNodeNot\nunspecified TreeNodeUnspecified" - } - } + "ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse": { + "type": "object" }, - "genericError": { + "ory.keto.relation_tuples.v1alpha2.ErrorObject": { "type": "object", - "required": ["message"], "properties": { "code": { - "description": "The status code", "type": "integer", "format": "int64", - "example": 404 + "example": 404, + "description": "The status code", + "title": "code", + "pattern": "^[0-9]$" + }, + "message": { + "type": "string", + "example": "The resource could not be found", + "description": "Response message", + "title": "message" }, "debug": { - "description": "Debug information\n\nThis field is often not exposed to protect against leaking\nsensitive information.", "type": "string", - "example": "SQL field \"foo\" is not a bool." + "example": "SQL field 'foo' is not a bool", + "description": "This field is often not exposed to protect against leaking\nsensitive information", + "title": "Debug information" }, "details": { - "description": "Further error details", "type": "object", - "additionalProperties": {} + "additionalProperties": { + "type": "string" + }, + "title": "Further error details" }, "id": { - "description": "The error ID\n\nUseful when trying to identify various errors in application logic.", - "type": "string" - }, - "message": { - "description": "Error message\n\nThe error's message.", "type": "string", - "example": "The resource could not be found" + "description": "Useful when trying to identify various errors in application logic.", + "title": "The error ID" }, "reason": { - "description": "A human-readable reason for the error", "type": "string", - "example": "User with ID 1234 does not exist." + "example": "User with ID 1234 does not exist.", + "description": "A human-readable reason for the error", + "title": "The reason for the failure" }, "request": { - "description": "The request ID\n\nThe request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.", "type": "string", - "example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6" + "example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6", + "description": "The request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.", + "title": "The request ID" }, "status": { - "description": "The status description", "type": "string", - "example": "Not Found" + "example": "Not Found", + "description": "The human-readable description of the code.", + "title": "The status description" } } }, - "healthNotReadyStatus": { + "errorGeneric": { "type": "object", "properties": { - "errors": { - "description": "Errors contains a list of errors that caused the not ready status.", - "type": "object", - "additionalProperties": { - "type": "string" - } + "error": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorObject" } } }, - "healthStatus": { + "ory.keto.relation_tuples.v1alpha2.ExpandResponse": { "type": "object", "properties": { - "status": { - "description": "Status always contains \"ok\".", - "type": "string" + "tree": { + "$ref": "#/definitions/expandedPermissionTree", + "description": "The tree the requested subject set expands to.\nThe requested subject set is the subject of the root.\n\nThis field can be nil in some circumstances." } - } + }, + "description": "The response for a ExpandService.Expand RPC." }, - "namespace": { + "ory.keto.relation_tuples.v1alpha2.GetVersionResponse": { "type": "object", "properties": { - "name": { - "description": "Name of the namespace.", - "type": "string" + "version": { + "type": "string", + "description": "The version string of the Ory Keto instance." } - } + }, + "description": "Response of the VersionService.GetVersion RPC." }, - "postCheckPermissionBody": { - "description": "Check Permission using Post Request Body", + "relationshipNamespaces": { "type": "object", "properties": { - "namespace": { - "description": "Namespace to query", - "type": "string" - }, - "object": { - "description": "Object to query", - "type": "string" - }, - "relation": { - "description": "Relation to query", - "type": "string" - }, - "subject_id": { - "description": "SubjectID to query\n\nEither SubjectSet or SubjectID can be provided.", - "type": "string" - }, - "subject_set": { - "$ref": "#/definitions/subjectSet" + "namespaces": { + "type": "array", + "items": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.Namespace" + } } } }, - "postCheckPermissionOrErrorBody": { - "description": "Post Check Permission Or Error Body", + "relationships": { "type": "object", "properties": { - "namespace": { - "description": "Namespace to query", - "type": "string" - }, - "object": { - "description": "Object to query", - "type": "string" - }, - "relation": { - "description": "Relation to query", - "type": "string" - }, - "subject_id": { - "description": "SubjectID to query\n\nEither SubjectSet or SubjectID can be provided.", - "type": "string" + "relation_tuples": { + "type": "array", + "items": { + "$ref": "#/definitions/relationship" + }, + "description": "The relationships matching the list request." }, - "subject_set": { - "$ref": "#/definitions/subjectSet" + "next_page_token": { + "type": "string", + "description": "The token required to get the next page.\nIf this is the last page, the token will be the empty string." } - } + }, + "description": "The response of a ReadService.ListRelationTuples RPC." }, - "relationQuery": { - "description": "Relation Query", + "ory.keto.relation_tuples.v1alpha2.Namespace": { "type": "object", "properties": { - "namespace": { - "description": "Namespace to query", - "type": "string" - }, - "object": { - "description": "Object to query", - "type": "string" - }, - "relation": { - "description": "Relation to query", - "type": "string" - }, - "subject_id": { - "description": "SubjectID to query\n\nEither SubjectSet or SubjectID can be provided.", + "name": { "type": "string" - }, - "subject_set": { - "$ref": "#/definitions/subjectSet" } } }, + "ory.keto.relation_tuples.v1alpha2.NodeType": { + "type": "string", + "enum": [ + "unspecified", + "union", + "exclusion", + "intersection", + "leaf", + "tuple_to_subject_set", + "computed_subject_set", + "not" + ], + "default": "unspecified" + }, "relationship": { - "description": "Relationship", "type": "object", - "required": ["namespace", "object", "relation"], "properties": { "namespace": { - "description": "Namespace of the Relation Tuple", - "type": "string" + "type": "string", + "description": "The namespace this relation tuple lives in." }, "object": { - "description": "Object of the Relation Tuple", - "type": "string" + "type": "string", + "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple." }, "relation": { - "description": "Relation of the Relation Tuple", - "type": "string" + "type": "string", + "description": "The relation between an Object and a Subject." }, "subject_id": { - "description": "SubjectID of the Relation Tuple\n\nEither SubjectSet or SubjectID can be provided.", - "type": "string" + "type": "string", + "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/subjectSet" + "$ref": "#/definitions/subjectSet", + "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } - } + }, + "description": "RelationTuple defines a relation between an Object and a Subject.", + "required": ["namespace", "object", "relation"] }, - "relationshipNamespaces": { - "description": "Relationship Namespace List", + "relationshipDelta": { "type": "object", "properties": { - "namespaces": { - "type": "array", - "items": { - "$ref": "#/definitions/namespace" - } + "action": { + "$ref": "#/definitions/relationshipDelta.Action", + "description": "The action to do on the RelationTuple." + }, + "relation_tuple": { + "$ref": "#/definitions/relationship", + "description": "The target RelationTuple." } - } + }, + "description": "Write-delta for a TransactRelationTuplesRequest." + }, + "relationshipDelta.Action": { + "type": "string", + "enum": ["ACTION_UNSPECIFIED", "insert", "delete"], + "default": "ACTION_UNSPECIFIED", + "description": " - ACTION_UNSPECIFIED: Unspecified.\nThe `TransactRelationTuples` RPC ignores this\nRelationTupleDelta if an action was unspecified.\n - insert: Insertion of a new RelationTuple.\nIt is ignored if already existing.\n - delete: Deletion of the RelationTuple.\nIt is ignored if it does not exist." }, - "relationshipPatch": { - "description": "Payload for patching a relationship", + "ory.keto.relation_tuples.v1alpha2.Subject": { "type": "object", "properties": { - "action": { + "id": { "type": "string", - "enum": ["insert", "delete"], - "x-go-enum-desc": "insert ActionInsert\ndelete ActionDelete" + "description": "A concrete id of the subject." }, - "relation_tuple": { - "$ref": "#/definitions/relationship" + "set": { + "$ref": "#/definitions/subjectSet", + "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } - } + }, + "description": "Subject is either a concrete subject id or\na `SubjectSet` expanding to more Subjects." }, - "relationships": { - "description": "Paginated Relationship List", + "subjectSet": { "type": "object", "properties": { - "next_page_token": { - "description": "The opaque token to provide in a subsequent request\nto get the next page. It is the empty string iff this is\nthe last page.", - "type": "string" + "namespace": { + "type": "string", + "description": "The namespace of the object and relation\nreferenced in this subject set." }, - "relation_tuples": { - "type": "array", - "items": { - "$ref": "#/definitions/relationship" - } + "object": { + "type": "string", + "description": "The object related by this subject set." + }, + "relation": { + "type": "string", + "description": "The relation between the object and the subjects." } - } + }, + "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`.", + "required": ["namespace", "object", "relation"] }, - "subjectSet": { + "subjectSetQuery": { "type": "object", - "required": ["namespace", "object", "relation"], "properties": { "namespace": { - "description": "Namespace of the Subject Set", - "type": "string" + "type": "string", + "description": "The namespace of the object and relation\nreferenced in this subject set." }, "object": { - "description": "Object of the Subject Set", - "type": "string" + "type": "string", + "description": "The object related by this subject set." }, "relation": { - "description": "Relation of the Subject Set", - "type": "string" + "type": "string", + "description": "The relation between the object and the subjects." } - } + }, + "description": "SubjectSetQuery refers to all subjects who have\nthe same `relation` on an `object`." }, - "version": { + "expandedPermissionTree": { "type": "object", "properties": { - "version": { - "description": "Version is the service's version.", - "type": "string" + "type": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.NodeType", + "description": "The type of the node." + }, + "subject": { + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.Subject", + "description": "The subject this node represents.\nDeprecated: More information is now available in the tuple field." + }, + "tuple": { + "$ref": "#/definitions/relationship", + "description": "The relation tuple this node represents." + }, + "children": { + "type": "array", + "items": { + "$ref": "#/definitions/expandedPermissionTree" + }, + "description": "The children of this node.\n\nThis is never set if `node_type` == `NODE_TYPE_LEAF`." } - } + }, + "required": ["type"] + }, + "ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse": { + "type": "object", + "description": "The response of a WriteService.TransactRelationTuples rpc." }, "UUID": { "type": "string", "format": "uuid4" } - }, - "responses": { - "emptyResponse": { - "description": "Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201." - } } } From 79a45a1b8c6e063dd3728add53a89c2f74c83c69 Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Tue, 6 Dec 2022 15:24:35 +0100 Subject: [PATCH 03/42] WIP --- buf.gen.yaml | 2 +- internal/check/handler.go | 5 +++++ internal/driver/daemon.go | 10 ++++++++++ internal/driver/registry_default.go | 4 ++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/buf.gen.yaml b/buf.gen.yaml index a0b868234..d7dd54acb 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -10,7 +10,7 @@ plugins: opt: paths=source_relative,require_unimplemented_servers=false - remote: buf.build/grpc-ecosystem/plugins/grpc-gateway:v2.14.0-1 - out: gen/go + out: proto opt: paths=source_relative - remote: buf.build/grpc-ecosystem/plugins/openapiv2:v2.14.0-1 diff --git a/internal/check/handler.go b/internal/check/handler.go index 928d7e890..10fb70067 100644 --- a/internal/check/handler.go +++ b/internal/check/handler.go @@ -10,6 +10,7 @@ import ( "net/http" "net/url" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/pkg/errors" "github.com/ory/herodot" @@ -62,6 +63,10 @@ func (h *Handler) RegisterReadGRPC(s *grpc.Server) { rts.RegisterCheckServiceServer(s, h) } +func (h *Handler) RegisterReadGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error { + return rts.RegisterCheckServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) +} + // Check Permission Result // // The content of the allowed field is mirrored in the HTTP status code. diff --git a/internal/driver/daemon.go b/internal/driver/daemon.go index 2a35d2581..ca49d7881 100644 --- a/internal/driver/daemon.go +++ b/internal/driver/daemon.go @@ -14,6 +14,7 @@ import ( "syscall" grpcRecovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -325,6 +326,15 @@ func (r *RegistryDefault) ReadRouter(ctx context.Context) http.Handler { } n.Use(reqlog.NewMiddlewareFromLogger(r.l, "read#Ory Keto").ExcludePaths(healthx.AliveCheckPath, healthx.ReadyCheckPath)) + mux := runtime.NewServeMux() + for _, h := range r.allHandlers() { + if h, ok := h.(ReadHandler); ok { + if err := h.RegisterReadGRPCGateway(ctx, mux, r.Config(ctx).ReadAPIListenOn()); err != nil { + panic(err) + } + } + } + br := &x.ReadRouter{Router: httprouter.New()} r.PrometheusManager().RegisterRouter(br.Router) r.MetricsHandler().SetRoutes(br.Router) diff --git a/internal/driver/registry_default.go b/internal/driver/registry_default.go index 48b1d0bc7..a0b819e7e 100644 --- a/internal/driver/registry_default.go +++ b/internal/driver/registry_default.go @@ -9,6 +9,7 @@ import ( "sync" "github.com/gobuffalo/pop/v6" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/ory/herodot" "github.com/ory/x/dbal" "github.com/ory/x/fsx" @@ -78,14 +79,17 @@ type ( ReadHandler interface { RegisterReadRoutes(r *x.ReadRouter) RegisterReadGRPC(s *grpc.Server) + RegisterReadGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error } WriteHandler interface { RegisterWriteRoutes(r *x.WriteRouter) RegisterWriteGRPC(s *grpc.Server) + RegisterWriteGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error } OPLSyntaxHandler interface { RegisterSyntaxRoutes(r *x.OPLSyntaxRouter) RegisterSyntaxGRPC(s *grpc.Server) + RegisterSyntaxGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error } Handler interface{} ) From a86c9108f78607abaf249dc172be25a0517e0c98 Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Mon, 2 Jan 2023 09:24:10 +0100 Subject: [PATCH 04/42] WIP: grpc gateway --- buf.gen.yaml | 4 +- internal/check/handler.go | 3 + internal/driver/daemon.go | 50 +- internal/driver/registry_default.go | 3 + internal/e2e/grpc_client_test.go | 2 +- internal/expand/handler.go | 9 + internal/httpclient/api/openapi.yaml | 1 - internal/httpclient/docs/RelationshipApi.md | 2 +- .../namespace/namespacehandler/handler.go | 9 +- internal/relationtuple/handler.go | 18 + internal/relationtuple/read_server.go | 56 +- internal/relationtuple/read_server_test.go | 35 +- internal/relationtuple/transact_server.go | 43 +- .../relationtuple/transact_server_test.go | 28 +- internal/schema/handler.go | 8 + internal/schema/handler_test.go | 44 +- internal/x/test_endpoints.go | 123 ++ ketoapi/enc_proto.go | 85 +- proto/buf.md | 1129 ++++++++++------- proto/buf.yaml | 1 + proto/openapiv2/gateway.swagger.json | 126 +- .../keto/opl/v1alpha1/syntax_service.pb.go | 8 +- .../keto/opl/v1alpha1/syntax_service.proto | 2 +- .../keto/opl/v1alpha1/syntax_service_pb.d.ts | 8 +- .../keto/opl/v1alpha1/syntax_service_pb.js | 42 +- .../v1alpha2/check_service.pb.go | 10 +- .../v1alpha2/check_service_grpc.pb.go | 105 -- .../v1alpha2/read_service.pb.go | 12 +- .../v1alpha2/relation_tuples.pb.go | 13 +- .../v1alpha2/write_service.pb.go | 2 + spec/api.json | 1 - spec/swagger.json | 3 +- 32 files changed, 1177 insertions(+), 808 deletions(-) create mode 100644 internal/x/test_endpoints.go delete mode 100644 proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go diff --git a/buf.gen.yaml b/buf.gen.yaml index d7dd54acb..93d62f89f 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,11 +1,11 @@ version: v1 plugins: - - remote: buf.build/protocolbuffers/plugins/go:v1.28.1-1 + - plugin: buf.build/protocolbuffers/go out: proto opt: paths=source_relative - - remote: buf.build/grpc/plugins/go:v1.2.0-1 + - plugin: buf.build/grpc/go out: proto opt: paths=source_relative,require_unimplemented_servers=false diff --git a/internal/check/handler.go b/internal/check/handler.go index 10fb70067..622ea793c 100644 --- a/internal/check/handler.go +++ b/internal/check/handler.go @@ -66,6 +66,9 @@ func (h *Handler) RegisterReadGRPC(s *grpc.Server) { func (h *Handler) RegisterReadGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error { return rts.RegisterCheckServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) } +func (h *Handler) RegisterReadGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return rts.RegisterReadServiceHandler(ctx, mux, conn) +} // Check Permission Result // diff --git a/internal/driver/daemon.go b/internal/driver/daemon.go index ca49d7881..3b2df1991 100644 --- a/internal/driver/daemon.go +++ b/internal/driver/daemon.go @@ -16,6 +16,7 @@ import ( grpcRecovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "google.golang.org/grpc/codes" + "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/status" "github.com/ory/keto/internal/namespace/namespacehandler" @@ -319,6 +320,19 @@ func (r *RegistryDefault) allHandlers() []Handler { return r.handlers } +type RouterOrGatewayHandler struct { + Router *httprouter.Router + ServeMux *runtime.ServeMux +} + +func (h *RouterOrGatewayHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + if handle, params, _ := h.Router.Lookup(r.Method, r.URL.Path); handle != nil { + handle(rw, r, params) + return + } + h.ServeMux.ServeHTTP(rw, r) +} + func (r *RegistryDefault) ReadRouter(ctx context.Context) http.Handler { n := negroni.New() for _, f := range r.defaultHttpMiddlewares { @@ -326,10 +340,10 @@ func (r *RegistryDefault) ReadRouter(ctx context.Context) http.Handler { } n.Use(reqlog.NewMiddlewareFromLogger(r.l, "read#Ory Keto").ExcludePaths(healthx.AliveCheckPath, healthx.ReadyCheckPath)) - mux := runtime.NewServeMux() + mux := runtime.NewServeMux(runtime.WithForwardResponseOption(x.HttpResponseModifier)) for _, h := range r.allHandlers() { if h, ok := h.(ReadHandler); ok { - if err := h.RegisterReadGRPCGateway(ctx, mux, r.Config(ctx).ReadAPIListenOn()); err != nil { + if err := h.RegisterReadGRPCGateway(ctx, mux, r.Config(ctx).ReadAPIListenOn(), grpc.WithTransportCredentials(insecure.NewCredentials())); err != nil { panic(err) } } @@ -342,13 +356,7 @@ func (r *RegistryDefault) ReadRouter(ctx context.Context) http.Handler { r.HealthHandler().SetHealthRoutes(br.Router, false) r.HealthHandler().SetVersionRoutes(br.Router) - for _, h := range r.allHandlers() { - if h, ok := h.(ReadHandler); ok { - h.RegisterReadRoutes(br) - } - } - - n.UseHandler(br) + n.UseHandler(&RouterOrGatewayHandler{Router: br.Router, ServeMux: mux}) n.Use(r.PrometheusManager()) if r.sqaService != nil { @@ -371,6 +379,15 @@ func (r *RegistryDefault) WriteRouter(ctx context.Context) http.Handler { } n.Use(reqlog.NewMiddlewareFromLogger(r.l, "write#Ory Keto").ExcludePaths(healthx.AliveCheckPath, healthx.ReadyCheckPath)) + mux := runtime.NewServeMux(runtime.WithForwardResponseOption(x.HttpResponseModifier)) + for _, h := range r.allHandlers() { + if h, ok := h.(WriteHandler); ok { + if err := h.RegisterWriteGRPCGateway(ctx, mux, r.Config(ctx).WriteAPIListenOn(), grpc.WithTransportCredentials(insecure.NewCredentials())); err != nil { + panic(err) + } + } + } + pr := &x.WriteRouter{Router: httprouter.New()} r.PrometheusManager().RegisterRouter(pr.Router) r.MetricsHandler().SetRoutes(pr.Router) @@ -378,13 +395,7 @@ func (r *RegistryDefault) WriteRouter(ctx context.Context) http.Handler { r.HealthHandler().SetHealthRoutes(pr.Router, false) r.HealthHandler().SetVersionRoutes(pr.Router) - for _, h := range r.allHandlers() { - if h, ok := h.(WriteHandler); ok { - h.RegisterWriteRoutes(pr) - } - } - - n.UseHandler(pr) + n.UseHandler(&RouterOrGatewayHandler{Router: pr.Router, ServeMux: mux}) n.Use(r.PrometheusManager()) if r.sqaService != nil { @@ -414,13 +425,16 @@ func (r *RegistryDefault) OPLSyntaxRouter(ctx context.Context) http.Handler { r.HealthHandler().SetHealthRoutes(pr.Router, false) r.HealthHandler().SetVersionRoutes(pr.Router) + mux := runtime.NewServeMux(runtime.WithForwardResponseOption(x.HttpResponseModifier)) for _, h := range r.allHandlers() { if h, ok := h.(OPLSyntaxHandler); ok { - h.RegisterSyntaxRoutes(pr) + if err := h.RegisterSyntaxGRPCGateway(ctx, mux, r.Config(ctx).OPLSyntaxAPIListenOn(), grpc.WithTransportCredentials(insecure.NewCredentials())); err != nil { + panic(err) + } } } - n.UseHandler(pr) + n.UseHandler(&RouterOrGatewayHandler{Router: pr.Router, ServeMux: mux}) n.Use(r.PrometheusManager()) if r.sqaService != nil { diff --git a/internal/driver/registry_default.go b/internal/driver/registry_default.go index a0b819e7e..76c578cae 100644 --- a/internal/driver/registry_default.go +++ b/internal/driver/registry_default.go @@ -80,16 +80,19 @@ type ( RegisterReadRoutes(r *x.ReadRouter) RegisterReadGRPC(s *grpc.Server) RegisterReadGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error + RegisterReadGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error } WriteHandler interface { RegisterWriteRoutes(r *x.WriteRouter) RegisterWriteGRPC(s *grpc.Server) RegisterWriteGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error + RegisterWriteGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error } OPLSyntaxHandler interface { RegisterSyntaxRoutes(r *x.OPLSyntaxRouter) RegisterSyntaxGRPC(s *grpc.Server) RegisterSyntaxGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error + RegisterSyntaxGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error } Handler interface{} ) diff --git a/internal/e2e/grpc_client_test.go b/internal/e2e/grpc_client_test.go index 0244b6a25..9921d5978 100644 --- a/internal/e2e/grpc_client_test.go +++ b/internal/e2e/grpc_client_test.go @@ -237,7 +237,7 @@ func (g *grpcClient) transactTuples(t require.TestingT, ins []*ketoapi.RelationT func (g *grpcClient) oplCheckSyntax(t require.TestingT, content []byte) (parseErrors []*ketoapi.ParseError) { c := opl.NewSyntaxServiceClient(g.oplSyntaxConn(t)) - res, err := c.Check(g.ctx, &opl.CheckRequest{Content: content}) + res, err := c.Check(g.ctx, &opl.CheckRequest{Content: string(content)}) require.NoError(t, err) raw, err := json.Marshal(res.Errors) diff --git a/internal/expand/handler.go b/internal/expand/handler.go index e0f801434..fa921a070 100644 --- a/internal/expand/handler.go +++ b/internal/expand/handler.go @@ -7,6 +7,8 @@ import ( "context" "net/http" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/ory/keto/ketoapi" "github.com/julienschmidt/httprouter" @@ -50,6 +52,13 @@ func (h *handler) RegisterReadGRPC(s *grpc.Server) { rts.RegisterExpandServiceServer(s, h) } +func (h *handler) RegisterReadGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error { + return rts.RegisterExpandServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) +} +func (h *handler) RegisterReadGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return rts.RegisterReadServiceHandler(ctx, mux, conn) +} + // Expand Permissions Request Parameters // // swagger:parameters expandPermissions diff --git a/internal/httpclient/api/openapi.yaml b/internal/httpclient/api/openapi.yaml index 8948ba987..df0f76a73 100644 --- a/internal/httpclient/api/openapi.yaml +++ b/internal/httpclient/api/openapi.yaml @@ -221,7 +221,6 @@ paths: content: text/plain: schema: - format: byte type: string required: true x-originalParamName: content diff --git a/internal/httpclient/docs/RelationshipApi.md b/internal/httpclient/docs/RelationshipApi.md index 045665af7..182bc2223 100644 --- a/internal/httpclient/docs/RelationshipApi.md +++ b/internal/httpclient/docs/RelationshipApi.md @@ -32,7 +32,7 @@ import ( ) func main() { - body := string(BYTE_ARRAY_DATA_HERE) // string | + body := "body_example" // string | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) diff --git a/internal/namespace/namespacehandler/handler.go b/internal/namespace/namespacehandler/handler.go index 66e1adabb..53a77879f 100644 --- a/internal/namespace/namespacehandler/handler.go +++ b/internal/namespace/namespacehandler/handler.go @@ -7,6 +7,7 @@ import ( "context" "net/http" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/julienschmidt/httprouter" "github.com/ory/herodot" "google.golang.org/grpc" @@ -43,8 +44,12 @@ func (h *handler) RegisterReadGRPC(s *grpc.Server) { rts.RegisterNamespacesServiceServer(s, h) } -func (h *handler) RegisterWriteRoutes(r *x.WriteRouter) {} -func (h *handler) RegisterWriteGRPC(s *grpc.Server) {} +func (h *handler) RegisterReadGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error { + return rts.RegisterNamespacesServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) +} +func (h *handler) RegisterReadGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return rts.RegisterReadServiceHandler(ctx, mux, conn) +} func (h *handler) ListNamespaces(ctx context.Context, _ *rts.ListNamespacesRequest) (*rts.ListNamespacesResponse, error) { m, err := h.Config(ctx).NamespaceManager() diff --git a/internal/relationtuple/handler.go b/internal/relationtuple/handler.go index 0e38b8dae..8938af056 100644 --- a/internal/relationtuple/handler.go +++ b/internal/relationtuple/handler.go @@ -4,6 +4,9 @@ package relationtuple import ( + "context" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "google.golang.org/grpc" rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" @@ -51,3 +54,18 @@ func (h *handler) RegisterReadGRPC(s *grpc.Server) { func (h *handler) RegisterWriteGRPC(s *grpc.Server) { rts.RegisterWriteServiceServer(s, h) } + +func (h *handler) RegisterReadGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error { + return rts.RegisterReadServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) +} + +func (h *handler) RegisterReadGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return rts.RegisterReadServiceHandler(ctx, mux, conn) +} + +func (h *handler) RegisterWriteGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error { + return rts.RegisterWriteServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) +} +func (h *handler) RegisterWriteGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return rts.RegisterWriteServiceHandler(ctx, mux, conn) +} diff --git a/internal/relationtuple/read_server.go b/internal/relationtuple/read_server.go index bb4e3b915..d17a744a0 100644 --- a/internal/relationtuple/read_server.go +++ b/internal/relationtuple/read_server.go @@ -32,39 +32,45 @@ type ( deprecatedQueryWrapper struct { *rts.ListRelationTuplesRequest_Query } + openAPIQueryWrapper struct { + wrapped interface { + GetObject() string + GetRelation() string + GetNamespace() string + GetSubjectSet() *rts.SubjectSetQuery + GetSubjectId() string + } + } ) -func (q *queryWrapper) GetObject() *string { - return q.Object +func stringPtr(s string) *string { + if s == "" { + return nil + } + return pointerx.Ptr(s) } -func (q *queryWrapper) GetNamespace() *string { - return q.Namespace -} +func (q *queryWrapper) GetObject() *string { return q.Object } +func (q *queryWrapper) GetNamespace() *string { return q.Namespace } +func (q *queryWrapper) GetRelation() *string { return q.Relation } -func (q *queryWrapper) GetRelation() *string { - return q.Relation -} +func (q *deprecatedQueryWrapper) GetObject() *string { return stringPtr(q.Object) } +func (q *deprecatedQueryWrapper) GetNamespace() *string { return stringPtr(q.Namespace) } +func (q *deprecatedQueryWrapper) GetRelation() *string { return stringPtr(q.Relation) } -func (q *deprecatedQueryWrapper) GetObject() *string { - if q.Object == "" { - return nil - } - return pointerx.Ptr(q.Object) +func (q *openAPIQueryWrapper) GetObject() *string { return stringPtr(q.wrapped.GetObject()) } +func (q *openAPIQueryWrapper) GetNamespace() *string { + return stringPtr(q.wrapped.GetNamespace()) } - -func (q *deprecatedQueryWrapper) GetNamespace() *string { - if q.Namespace == "" { - return nil +func (q *openAPIQueryWrapper) GetRelation() *string { return stringPtr(q.wrapped.GetRelation()) } +func (q *openAPIQueryWrapper) GetSubject() *rts.Subject { + if set := q.wrapped.GetSubjectSet(); set != nil { + return rts.NewSubjectSet(set.Namespace, set.Object, set.Relation) } - return pointerx.Ptr(q.Namespace) -} - -func (q *deprecatedQueryWrapper) GetRelation() *string { - if q.Relation == "" { - return nil + if sID := q.wrapped.GetSubjectId(); sID != "" { + return rts.NewSubjectID(q.wrapped.GetSubjectId()) } - return pointerx.Ptr(q.Relation) + return nil } func (h *handler) ListRelationTuples(ctx context.Context, req *rts.ListRelationTuplesRequest) (*rts.ListRelationTuplesResponse, error) { @@ -76,7 +82,7 @@ func (h *handler) ListRelationTuples(ctx context.Context, req *rts.ListRelationT case req.Query != nil: // nolint q.FromDataProvider(&deprecatedQueryWrapper{req.Query}) // nolint default: - return nil, herodot.ErrBadRequest.WithError("you must provide a query") + q.FromDataProvider(&openAPIQueryWrapper{req}) } iq, err := h.d.Mapper().FromQuery(ctx, &q) diff --git a/internal/relationtuple/read_server_test.go b/internal/relationtuple/read_server_test.go index b6acf6d1c..62c5a1a0a 100644 --- a/internal/relationtuple/read_server_test.go +++ b/internal/relationtuple/read_server_test.go @@ -8,15 +8,10 @@ import ( "encoding/json" "fmt" "io" - "net" "net/http" - "net/http/httptest" "net/url" "testing" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - "github.com/ory/x/pointerx" rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" @@ -28,7 +23,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/tidwall/gjson" - "github.com/julienschmidt/httprouter" "github.com/stretchr/testify/require" "github.com/ory/keto/internal/driver" @@ -39,12 +33,11 @@ import ( func TestReadHandlers(t *testing.T) { ctx := context.Background() - r := &x.ReadRouter{Router: httprouter.New()} reg := driver.NewSqliteTestRegistry(t, false) - h := relationtuple.NewHandler(reg) - h.RegisterReadRoutes(r) - ts := httptest.NewServer(r) - t.Cleanup(ts.Close) + + endpoints := x.NewTestEndpoints(t, relationtuple.NewHandler(reg)) + + ts := endpoints.HTTP var newNamespace func(*testing.T) *namespace.Namespace { @@ -64,11 +57,12 @@ func TestReadHandlers(t *testing.T) { "namespace": {nspace.Name}, }.Encode()) require.NoError(t, err) - require.Equal(t, http.StatusOK, resp.StatusCode) body, err := io.ReadAll(resp.Body) require.NoError(t, err) + require.Equal(t, http.StatusOK, resp.StatusCode, "code=%d body=%s", resp.StatusCode, body) + assert.Equal(t, "[]", gjson.GetBytes(body, "relation_tuples").Raw) var respMsg ketoapi.GetResponse @@ -135,8 +129,10 @@ func TestReadHandlers(t *testing.T) { require.NoError(t, err) assert.Equal(t, resp.StatusCode, http.StatusOK) + body, err := io.ReadAll(resp.Body) + require.NoError(t, err) var respMsg ketoapi.GetResponse - require.NoError(t, json.NewDecoder(resp.Body).Decode(&respMsg)) + require.NoError(t, json.Unmarshal(body, &respMsg)) assert.Equal(t, 1, len(respMsg.RelationTuples)) assert.Containsf(t, tuples, respMsg.RelationTuples[0], "expected to find %q in %q", respMsg.RelationTuples[0].String(), tuples) assert.Equal(t, "", respMsg.NextPageToken) @@ -144,7 +140,7 @@ func TestReadHandlers(t *testing.T) { t.Run("case=returns bad request on malformed subject", func(t *testing.T) { resp, err := ts.Client().Get(ts.URL + relationtuple.ReadRouteBase + "?" + url.Values{ - "subject": {"not#a valid subject"}, + "subject_set": {"not a valid subject"}, }.Encode()) require.NoError(t, err) @@ -243,18 +239,9 @@ func TestReadHandlers(t *testing.T) { } return actual } - soc, err := net.Listen("tcp", ":0") // nolint - require.NoError(t, err) - srv := grpc.NewServer() - h.RegisterReadGRPC(srv) - go srv.Serve(soc) // nolint - t.Cleanup(srv.Stop) - - con, err := grpc.Dial(soc.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials())) - require.NoError(t, err) t.Run("method=list", func(t *testing.T) { - client := rts.NewReadServiceClient(con) + client := rts.NewReadServiceClient(endpoints.GRPC) for key, enhancer := range map[string]requestEnhancer{"relation query": withRelationQuery, "deprecated query": withDeprecatedQuery} { t.Run("enhancer="+key, func(t *testing.T) { diff --git a/internal/relationtuple/transact_server.go b/internal/relationtuple/transact_server.go index 0398d09c1..aec82c196 100644 --- a/internal/relationtuple/transact_server.go +++ b/internal/relationtuple/transact_server.go @@ -8,6 +8,9 @@ import ( "encoding/json" "net/http" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "github.com/ory/keto/ketoapi" rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" @@ -24,7 +27,7 @@ var ( func protoTuplesWithAction(deltas []*rts.RelationTupleDelta, action rts.RelationTupleDelta_Action) (filtered []*ketoapi.RelationTuple, err error) { for _, d := range deltas { if d.Action == action { - it, err := (&ketoapi.RelationTuple{}).FromDataProvider(d.RelationTuple) + it, err := (&ketoapi.RelationTuple{}).FromDataProvider(&openAPITupleWrapper{d.RelationTuple}) if err != nil { return nil, err } @@ -55,6 +58,7 @@ func (h *handler) TransactRelationTuples(ctx context.Context, req *rts.TransactR return nil, err } + _ = grpc.SetHeader(ctx, metadata.Pairs("x-http-code", "204")) snaptokens := make([]string, len(insertTuples)) for i := range insertTuples { snaptokens[i] = "not yet implemented" @@ -64,8 +68,37 @@ func (h *handler) TransactRelationTuples(ctx context.Context, req *rts.TransactR }, nil } +type openAPITupleWrapper struct { + wrapped interface { + GetObject() string + GetRelation() string + GetNamespace() string + GetSubjectSet() *rts.SubjectSet + GetSubjectId() string + } +} + +func (q *openAPITupleWrapper) GetObject() string { return q.wrapped.GetObject() } +func (q *openAPITupleWrapper) GetNamespace() string { return q.wrapped.GetNamespace() } +func (q *openAPITupleWrapper) GetRelation() string { return q.wrapped.GetRelation() } +func (q *openAPITupleWrapper) GetSubject() *rts.Subject { + if sub, ok := q.wrapped.(interface{ GetSubject() *rts.Subject }); ok && sub.GetSubject() != nil { + return sub.GetSubject() + } + if set := q.wrapped.GetSubjectSet(); set != nil { + return rts.NewSubjectSet(set.Namespace, set.Object, set.Relation) + } + if sID := q.wrapped.GetSubjectId(); sID != "" { + return rts.NewSubjectID(q.wrapped.GetSubjectId()) + } + return nil +} + func (h *handler) CreateRelationTuple(ctx context.Context, request *rts.CreateRelationTupleRequest) (*rts.CreateRelationTupleResponse, error) { - tuple, err := (&ketoapi.RelationTuple{}).FromDataProvider(request.RelationTuple) + if request.RelationTuple == nil { + return nil, errors.WithStack(herodot.ErrBadRequest.WithReason("invalid request: missing relation_tuple")) + } + tuple, err := (&ketoapi.RelationTuple{}).FromDataProvider(&openAPITupleWrapper{request.RelationTuple}) if err != nil { return nil, err } @@ -83,6 +116,9 @@ func (h *handler) CreateRelationTuple(ctx context.Context, request *rts.CreateRe return nil, err } + _ = grpc.SetHeader(ctx, metadata.Pairs("x-http-code", "201")) + _ = grpc.SetHeader(ctx, metadata.Pairs("x-http-location", ReadRouteBase+"?"+tuple.ToURLQuery().Encode())) + return &rts.CreateRelationTupleResponse{RelationTuple: tuple.ToProto()}, nil } @@ -95,7 +131,7 @@ func (h *handler) DeleteRelationTuples(ctx context.Context, req *rts.DeleteRelat case req.Query != nil: // nolint q.FromDataProvider(&deprecatedQueryWrapper{(*rts.ListRelationTuplesRequest_Query)(req.Query)}) // nolint default: - return nil, errors.WithStack(herodot.ErrBadRequest.WithReason("invalid request")) + q.FromDataProvider(&openAPIQueryWrapper{req}) } iq, err := h.d.Mapper().FromQuery(ctx, &q) @@ -106,6 +142,7 @@ func (h *handler) DeleteRelationTuples(ctx context.Context, req *rts.DeleteRelat return nil, errors.WithStack(herodot.ErrInternalServerError.WithError(err.Error())) } + _ = grpc.SetHeader(ctx, metadata.Pairs("x-http-code", "204")) return &rts.DeleteRelationTuplesResponse{}, nil } diff --git a/internal/relationtuple/transact_server_test.go b/internal/relationtuple/transact_server_test.go index 379952fcc..613384458 100644 --- a/internal/relationtuple/transact_server_test.go +++ b/internal/relationtuple/transact_server_test.go @@ -9,21 +9,17 @@ import ( "encoding/json" "io" "net/http" - "net/http/httptest" "net/url" "testing" "github.com/ory/x/pointerx" - "github.com/ory/keto/ketoapi" - "github.com/ory/keto/internal/driver/config" + "github.com/ory/keto/ketoapi" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/julienschmidt/httprouter" - "github.com/ory/keto/internal/driver" "github.com/ory/keto/internal/namespace" "github.com/ory/keto/internal/relationtuple" @@ -32,9 +28,6 @@ import ( func TestWriteHandlers(t *testing.T) { ctx := context.Background() - r := httprouter.New() - wr := &x.WriteRouter{Router: r} - rr := &x.ReadRouter{Router: r} reg := driver.NewSqliteTestRegistry(t, false) var nspaces []*namespace.Namespace @@ -49,11 +42,8 @@ func TestWriteHandlers(t *testing.T) { return n } - h := relationtuple.NewHandler(reg) - h.RegisterWriteRoutes(wr) - h.RegisterReadRoutes(rr) - ts := httptest.NewServer(r) - defer ts.Close() + endpoints := x.NewTestEndpoints(t, relationtuple.NewHandler(reg)) + ts := endpoints.HTTP t.Run("method=create", func(t *testing.T) { doCreate := func(raw []byte) *http.Response { @@ -83,8 +73,10 @@ func TestWriteHandlers(t *testing.T) { body, err := io.ReadAll(resp.Body) require.NoError(t, err) + var responseRT ketoapi.RelationTuple + require.NoError(t, json.Unmarshal(body, &responseRT)) - assert.JSONEq(t, string(payload), string(body)) + assert.Equal(t, rt, &responseRT) t.Run("check=is contained in the manager", func(t *testing.T) { mapped, err := reg.Mapper().FromTuple(ctx, rt) @@ -94,7 +86,7 @@ func TestWriteHandlers(t *testing.T) { require.NoError(t, err) actual, err := reg.Mapper().ToTuple(ctx, actualRTs...) require.NoError(t, err) - assert.Equalf(t, []*ketoapi.RelationTuple{rt}, actual, "want: %s\ngot: %s", rt.String(), actual[0].String()) + assert.Equalf(t, []*ketoapi.RelationTuple{rt}, actual, "want: %s\ngot: %+v", rt.String(), actual) }) t.Run("check=is gettable with the returned URL", func(t *testing.T) { @@ -170,7 +162,9 @@ func TestWriteHandlers(t *testing.T) { require.NoError(t, err) resp, err := ts.Client().Do(req) require.NoError(t, err) - assert.Equal(t, http.StatusNoContent, resp.StatusCode) + body, err := io.ReadAll(resp.Body) + require.NoError(t, err) + assert.Equal(t, http.StatusNoContent, resp.StatusCode, string(body)) // set a size > 1 just to make sure it gets all actualRTs, _, err := reg.RelationTupleManager().GetRelationTuples(ctx, &relationtuple.RelationQuery{Namespace: &nspace.Name}, x.WithSize(10)) @@ -385,7 +379,7 @@ func TestWriteHandlers(t *testing.T) { defer resp.Body.Close() errContent, err := io.ReadAll(resp.Body) require.NoError(t, err) - assert.Contains(t, string(errContent), "relation_tuple is missing") + assert.Contains(t, string(errContent), "subject is not allowed to be nil") }) t.Run("case=unknown action", func(t *testing.T) { diff --git a/internal/schema/handler.go b/internal/schema/handler.go index b60f41724..54f40abfd 100644 --- a/internal/schema/handler.go +++ b/internal/schema/handler.go @@ -8,6 +8,7 @@ import ( "io" "net/http" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/julienschmidt/httprouter" "github.com/ory/herodot" "github.com/pkg/errors" @@ -42,6 +43,13 @@ func (h *Handler) RegisterSyntaxGRPC(s *grpc.Server) { opl.RegisterSyntaxServiceServer(s, h) } +func (h *Handler) RegisterSyntaxGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error { + return opl.RegisterSyntaxServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) +} +func (h *Handler) RegisterSyntaxGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return opl.RegisterSyntaxServiceHandler(ctx, mux, conn) +} + func (h *Handler) Check(_ context.Context, request *opl.CheckRequest) (*opl.CheckResponse, error) { _, parseErrors := Parse(string(request.GetContent())) apiErrors := make([]*opl.ParseError, len(parseErrors)) diff --git a/internal/schema/handler_test.go b/internal/schema/handler_test.go index cad979437..eb6630423 100644 --- a/internal/schema/handler_test.go +++ b/internal/schema/handler_test.go @@ -7,18 +7,12 @@ import ( "bytes" "context" "io" - "net" "net/http" - "net/http/httptest" "testing" - "github.com/julienschmidt/httprouter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - "google.golang.org/grpc/test/bufconn" "github.com/ory/keto/internal/driver" "github.com/ory/keto/internal/schema" @@ -28,54 +22,34 @@ import ( func TestNewHandler(t *testing.T) { ctx := context.Background() - - r := &x.OPLSyntaxRouter{Router: httprouter.New()} reg := driver.NewSqliteTestRegistry(t, false) - h := schema.NewHandler(reg) - h.RegisterSyntaxRoutes(r) - ts := httptest.NewServer(r) - t.Cleanup(ts.Close) + + endpoints := x.NewTestEndpoints(t, schema.NewHandler(reg)) t.Run("proto=REST", func(t *testing.T) { t.Run("method=POST /opl/syntax/check", func(t *testing.T) { - response, err := ts.Client().Post( - ts.URL+"/opl/syntax/check", + response, err := endpoints.HTTP.Client().Post( + endpoints.HTTP.URL+"/opl/syntax/check", "text/plain", - bytes.NewBufferString("/* comment???")) + bytes.NewBufferString(`"/* comment???"`)) require.NoError(t, err) - require.Equal(t, http.StatusOK, response.StatusCode) body, err := io.ReadAll(response.Body) require.NoError(t, err) t.Log(string(body)) + require.Equal(t, http.StatusOK, response.StatusCode) assert.Contains(t, gjson.GetBytes(body, "errors.0.message").String(), "unclosed comment") }) }) t.Run("proto=gRPC", func(t *testing.T) { - l := bufconn.Listen(1024 * 1024) - s := grpc.NewServer() - h.RegisterSyntaxGRPC(s) - go func() { - if err := s.Serve(l); err != nil { - t.Logf("Server exited with error: %v", err) - } - }() - t.Cleanup(s.Stop) - - conn, err := grpc.Dial("bufnet", - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { return l.Dial() }), - ) - require.NoError(t, err) - - client := opl.NewSyntaxServiceClient(conn) + client := opl.NewSyntaxServiceClient(endpoints.GRPC) t.Run("method=Syntax.Check", func(t *testing.T) { response, err := client.Check(ctx, &opl.CheckRequest{ - Content: []byte("/* comment???"), + Content: "/* comment???", }) require.NoError(t, err) - assert.Contains(t, response.ParseErrors[0].Message, "unclosed comment") + assert.Contains(t, response.Errors[0].Message, "unclosed comment") }) }) } diff --git a/internal/x/test_endpoints.go b/internal/x/test_endpoints.go new file mode 100644 index 000000000..109e1397a --- /dev/null +++ b/internal/x/test_endpoints.go @@ -0,0 +1,123 @@ +package x + +import ( + "context" + "net" + "net/http" + "net/http/httptest" + "strconv" + "testing" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/ory/herodot" + "github.com/stretchr/testify/require" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/test/bufconn" + "google.golang.org/protobuf/proto" +) + +type ( + TestEndpoints struct { + GRPC *grpc.ClientConn + HTTP *httptest.Server + } + readHandler interface { + RegisterReadGRPC(s *grpc.Server) + RegisterReadGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error + } + writeHandler interface { + RegisterWriteGRPC(s *grpc.Server) + RegisterWriteGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error + } + oplSyntaxHandler interface { + RegisterSyntaxGRPC(s *grpc.Server) + RegisterSyntaxGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error + } +) + +func HttpResponseModifier(ctx context.Context, w http.ResponseWriter, p proto.Message) error { + md, ok := runtime.ServerMetadataFromContext(ctx) + if !ok { + return nil + } + + delete(w.Header(), "Grpc-Metadata-Content-Type") + + if vals := md.HeaderMD.Get("x-http-location"); len(vals) > 0 { + w.Header().Add("location", vals[0]) + } + + // set http status code + if vals := md.HeaderMD.Get("x-http-code"); len(vals) > 0 { + code, err := strconv.Atoi(vals[0]) + if err != nil { + return err + } + // delete the headers to not expose any grpc-metadata in http response + delete(md.HeaderMD, "x-http-code") + delete(w.Header(), "Grpc-Metadata-X-Http-Code") + w.WriteHeader(code) + } + + return nil +} + +func NewTestEndpoints( + t *testing.T, + handler any, +) *TestEndpoints { + ctx, cancel := context.WithCancel(context.Background()) + t.Cleanup(cancel) + + l := bufconn.Listen(1024 * 1024) + s := grpc.NewServer( + grpc.ChainUnaryInterceptor(herodot.UnaryErrorUnwrapInterceptor), + ) + + if h, ok := handler.(readHandler); ok { + h.RegisterReadGRPC(s) + } + if h, ok := handler.(writeHandler); ok { + h.RegisterWriteGRPC(s) + } + if h, ok := handler.(oplSyntaxHandler); ok { + h.RegisterSyntaxGRPC(s) + } + + go func() { + if err := s.Serve(l); err != nil { + t.Logf("Server exited with error: %v", err) + } + }() + t.Cleanup(s.Stop) + + conn, err := grpc.Dial("bufnet", + grpc.WithTransportCredentials(insecure.NewCredentials()), + grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { return l.Dial() }), + ) + require.NoError(t, err) + + mux := runtime.NewServeMux( + runtime.WithForwardResponseOption(HttpResponseModifier), + runtime.WithErrorHandler(func(ctx context.Context, mux *runtime.ServeMux, marshaler runtime.Marshaler, writer http.ResponseWriter, request *http.Request, err error) { + runtime.DefaultHTTPErrorHandler(ctx, mux, marshaler, writer, request, err) + }), + ) + if h, ok := handler.(readHandler); ok { + require.NoError(t, h.RegisterReadGRPCGatewayConn(ctx, mux, conn)) + } + if h, ok := handler.(writeHandler); ok { + require.NoError(t, h.RegisterWriteGRPCGatewayConn(ctx, mux, conn)) + } + if h, ok := handler.(oplSyntaxHandler); ok { + require.NoError(t, h.RegisterSyntaxGRPCGatewayConn(ctx, mux, conn)) + } + ts := httptest.NewServer(mux) + t.Cleanup(ts.Close) + + return &TestEndpoints{ + HTTP: ts, + GRPC: conn, + } +} diff --git a/ketoapi/enc_proto.go b/ketoapi/enc_proto.go index 45653531c..2454f08d8 100644 --- a/ketoapi/enc_proto.go +++ b/ketoapi/enc_proto.go @@ -15,16 +15,8 @@ type ( GetObject() string GetNamespace() string GetRelation() string - } - relationtupleSubjectData interface { GetSubject() *rts.Subject } - createRelationSubjectData interface { - GetSubject() interface { - GetSubjectId() string - GetSubjectSet() *rts.SubjectSet - } - } queryData interface { GetSubject() *rts.Subject @@ -32,37 +24,52 @@ type ( GetNamespace() *string GetRelation() *string } + + openAPIFields interface { + GetObject() string + GetNamespace() string + GetRelation() string + GetSubject() interface { + GetSubjectId() string + GetSubjectSet() *rts.SubjectSet + } + } ) -func (r *RelationTuple) FromDataProvider(d TupleData) (*RelationTuple, error) { - if s, ok := d.(relationtupleSubjectData); ok { - switch s := s.GetSubject().GetRef().(type) { - case nil: - return nil, errors.WithStack(ErrNilSubject) - case *rts.Subject_Set: - r.SubjectSet = &SubjectSet{ - Namespace: s.Set.Namespace, - Object: s.Set.Object, - Relation: s.Set.Relation, - } - case *rts.Subject_Id: - r.SubjectID = pointerx.Ptr(s.Id) - default: - return nil, errors.WithStack(ErrNilSubject) +func (r *RelationTuple) FromOpenAPIFields(f openAPIFields) (*RelationTuple, error) { + subject := f.GetSubject() + if subject == nil { + return nil, errors.WithStack(ErrNilSubject) + } + if subjectSet := subject.GetSubjectSet(); subjectSet != nil { + r.SubjectSet = &SubjectSet{ + Namespace: subjectSet.Namespace, + Object: subjectSet.Object, + Relation: subjectSet.Relation, } - } else if s, ok := d.(createRelationSubjectData); ok { - switch s := any(s.GetSubject()).(type) { - case *rts.CreateRelationTupleRequest_Relationship_SubjectId: - r.SubjectID = pointerx.Ptr(s.SubjectId) - case *rts.CreateRelationTupleRequest_Relationship_SubjectSet: - r.SubjectSet = &SubjectSet{ - Namespace: s.SubjectSet.Namespace, - Object: s.SubjectSet.Object, - Relation: s.SubjectSet.Relation, - } - default: - return nil, errors.WithStack(ErrNilSubject) + } else { + r.SubjectID = pointerx.Ptr(subject.GetSubjectId()) + } + + r.Object = f.GetObject() + r.Namespace = f.GetNamespace() + r.Relation = f.GetRelation() + + return r, nil +} + +func (r *RelationTuple) FromDataProvider(d TupleData) (*RelationTuple, error) { + switch s := d.GetSubject().GetRef().(type) { + case *rts.Subject_Set: + r.SubjectSet = &SubjectSet{ + Namespace: s.Set.Namespace, + Object: s.Set.Object, + Relation: s.Set.Relation, } + case *rts.Subject_Id: + r.SubjectID = pointerx.Ptr(s.Id) + default: + return nil, errors.WithStack(ErrNilSubject) } r.Object = d.GetObject() @@ -80,8 +87,16 @@ func (r *RelationTuple) ToProto() *rts.RelationTuple { } if r.SubjectID != nil { res.Subject = rts.NewSubjectID(*r.SubjectID) + res.RestApiSubject = &rts.RelationTuple_SubjectId{SubjectId: *r.SubjectID} } else { res.Subject = rts.NewSubjectSet(r.SubjectSet.Namespace, r.SubjectSet.Object, r.SubjectSet.Relation) + res.RestApiSubject = &rts.RelationTuple_SubjectSet{ + SubjectSet: &rts.SubjectSet{ + Namespace: r.SubjectSet.Namespace, + Object: r.SubjectSet.Object, + Relation: r.SubjectSet.Relation, + }, + } } return res } diff --git a/proto/buf.md b/proto/buf.md index 5ce54bb5f..6cb500aa4 100644 --- a/proto/buf.md +++ b/proto/buf.md @@ -1,794 +1,1027 @@ # Protocol Documentation - ## Table of Contents - [ory/keto/opl/v1alpha1/syntax_service.proto](#ory_keto_opl_v1alpha1_syntax_service-proto) + - [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) + - [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) + - [ParseError](#ory-keto-opl-v1alpha1-ParseError) + - [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) + + - [SyntaxService](#ory-keto-opl-v1alpha1-SyntaxService) + +- [ory/keto/relation_tuples/v1alpha2/relation_tuples.proto](#ory_keto_relation_tuples_v1alpha2_relation_tuples-proto) + - [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) + - [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) + - [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) + - [SubjectQuery](#ory-keto-relation_tuples-v1alpha2-SubjectQuery) + - [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) + - [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) + +- [ory/keto/relation_tuples/v1alpha2/check_service.proto](#ory_keto_relation_tuples_v1alpha2_check_service-proto) + - [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) + - [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) + + - [CheckService](#ory-keto-relation_tuples-v1alpha2-CheckService) + +- [ory/keto/relation_tuples/v1alpha2/expand_service.proto](#ory_keto_relation_tuples_v1alpha2_expand_service-proto) + - [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) + - [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) + - [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) + + - [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) + + - [ExpandService](#ory-keto-relation_tuples-v1alpha2-ExpandService) + +- [ory/keto/relation_tuples/v1alpha2/namespaces_service.proto](#ory_keto_relation_tuples_v1alpha2_namespaces_service-proto) + - [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) + - [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) + - [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) + + - [NamespacesService](#ory-keto-relation_tuples-v1alpha2-NamespacesService) + +- [ory/keto/relation_tuples/v1alpha2/openapi.proto](#ory_keto_relation_tuples_v1alpha2_openapi-proto) + - [ErrorObject](#ory-keto-relation_tuples-v1alpha2-ErrorObject) + - [ErrorObject.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorObject-DetailsEntry) + - [ErrorResponse](#ory-keto-relation_tuples-v1alpha2-ErrorResponse) + +- [ory/keto/relation_tuples/v1alpha2/read_service.proto](#ory_keto_relation_tuples_v1alpha2_read_service-proto) + - [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) + - [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) + - [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) + + - [ReadService](#ory-keto-relation_tuples-v1alpha2-ReadService) + +- [ory/keto/relation_tuples/v1alpha2/version.proto](#ory_keto_relation_tuples_v1alpha2_version-proto) + - [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) + - [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) + + - [VersionService](#ory-keto-relation_tuples-v1alpha2-VersionService) + +- [ory/keto/relation_tuples/v1alpha2/write_service.proto](#ory_keto_relation_tuples_v1alpha2_write_service-proto) + - [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) + - [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) + - [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) + - [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) + - [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) + - [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) + - [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) + - [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) + - [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) + + - [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) + + - [WriteService](#ory-keto-relation_tuples-v1alpha2-WriteService) + +- [Scalar Value Types](#scalar-value-types) - - [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) - - [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) - - [ParseError](#ory-keto-opl-v1alpha1-ParseError) - - [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) - - [SyntaxService](#ory-keto-opl-v1alpha1-SyntaxService) -- [ory/keto/relation_tuples/v1alpha2/relation_tuples.proto](#ory_keto_relation_tuples_v1alpha2_relation_tuples-proto) - - [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) - - [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) - - [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) - - [SubjectQuery](#ory-keto-relation_tuples-v1alpha2-SubjectQuery) - - [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) - - [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) -- [ory/keto/relation_tuples/v1alpha2/check_service.proto](#ory_keto_relation_tuples_v1alpha2_check_service-proto) + +

Top

- - [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) - - [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) +## ory/keto/opl/v1alpha1/syntax_service.proto - - [CheckService](#ory-keto-relation_tuples-v1alpha2-CheckService) -- [ory/keto/relation_tuples/v1alpha2/expand_service.proto](#ory_keto_relation_tuples_v1alpha2_expand_service-proto) - - [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) - - [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) - - [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) + - - [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) +### CheckRequest - - [ExpandService](#ory-keto-relation_tuples-v1alpha2-ExpandService) -- [ory/keto/relation_tuples/v1alpha2/namespaces_service.proto](#ory_keto_relation_tuples_v1alpha2_namespaces_service-proto) - - [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) - - [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) - - [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| content | [string](#string) | | | - - [NamespacesService](#ory-keto-relation_tuples-v1alpha2-NamespacesService) -- [ory/keto/relation_tuples/v1alpha2/openapi.proto](#ory_keto_relation_tuples_v1alpha2_openapi-proto) - - [ErrorObject](#ory-keto-relation_tuples-v1alpha2-ErrorObject) - - [ErrorObject.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorObject-DetailsEntry) - - [ErrorResponse](#ory-keto-relation_tuples-v1alpha2-ErrorResponse) -- [ory/keto/relation_tuples/v1alpha2/read_service.proto](#ory_keto_relation_tuples_v1alpha2_read_service-proto) - - [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) - - [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) - - [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) - - [ReadService](#ory-keto-relation_tuples-v1alpha2-ReadService) -- [ory/keto/relation_tuples/v1alpha2/version.proto](#ory_keto_relation_tuples_v1alpha2_version-proto) - - [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) - - [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) + - - [VersionService](#ory-keto-relation_tuples-v1alpha2-VersionService) +### CheckResponse -- [ory/keto/relation_tuples/v1alpha2/write_service.proto](#ory_keto_relation_tuples_v1alpha2_write_service-proto) - - [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) - - [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) - - [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) - - [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) - - [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) - - [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) - - [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) - - [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) - - [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) - - [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | | - - [WriteService](#ory-keto-relation_tuples-v1alpha2-WriteService) -- [Scalar Value Types](#scalar-value-types) - -

Top

-## ory/keto/opl/v1alpha1/syntax_service.proto - + -### CheckRequest +### ParseError -| Field | Type | Label | Description | -| ------- | --------------- | ----- | ----------- | -| content | [bytes](#bytes) | | | - -### CheckResponse +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| message | [string](#string) | | | +| start | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | +| end | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | + -| Field | Type | Label | Description | -| ------ | ----------------------------------------------- | -------- | ----------- | -| errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | | - -### ParseError -| Field | Type | Label | Description | -| ------- | ------------------------------------------------------- | ----- | ----------- | -| message | [string](#string) | | | -| start | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | -| end | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | ### SourcePosition -| Field | Type | Label | Description | -| ------ | ----------------- | ----- | ----------- | -| line | [uint32](#uint32) | | | -| column | [uint32](#uint32) | | | + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| line | [uint32](#uint32) | | | +| column | [uint32](#uint32) | | | + + + + + + + + + + + ### SyntaxService - The service that checks the syntax of an OPL file. -| Method Name | Request Type | Response Type | Description | -| ----------- | --------------------------------------------------- | ----------------------------------------------------- | -------------------------------- | -| Check | [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) | [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) | Performs a syntax check request. | +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| Check | [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) | [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) | Performs a syntax check request. | - + + + +

Top

## ory/keto/relation_tuples/v1alpha2/relation_tuples.proto + + ### RelationQuery - -The query for listing relationships. Clients can specify any optional field to +The query for listing relationships. +Clients can specify any optional field to partially filter for specific relationships. Example use cases (namespace is always required): + - object only: display a list of all permissions referring to a specific object + - relation only: get all groups that have members; get all directories that have content + - object & relation: display all subjects that have a specific permission relation + - subject & relation: display all groups a subject belongs to; display all objects a subject has access to + - object & relation & subject: check whether the relation tuple already exists + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | optional | The namespace this relation tuple lives in. | +| object | [string](#string) | optional | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | optional | The relation between an Object and a Subject. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | optional | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | + + + + -- object only: display a list of all permissions referring to a specific object -- relation only: get all groups that have members; get all directories that have - content -- object & relation: display all subjects that have a specific permission - relation -- subject & relation: display all groups a subject belongs to; display all - objects a subject has access to -- object & relation & subject: check whether the relation tuple already - exists - -| Field | Type | Label | Description | -| --------- | ----------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| namespace | [string](#string) | optional | The namespace this relation tuple lives in. | -| object | [string](#string) | optional | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | optional | The relation between an Object and a Subject. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | optional | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | ### RelationTuple - RelationTuple defines a relation between an Object and a Subject. -| Field | Type | Label | Description | -| ----------- | ----------------------------------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------- | -| namespace | [string](#string) | | The namespace this relation tuple lives in. | -| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | | The relation between an Object and a Subject. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | -| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | -| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | The namespace this relation tuple lives in. | +| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | The relation between an Object and a Subject. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | +| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | +| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + + + ### Subject +Subject is either a concrete subject id or +a `SubjectSet` expanding to more Subjects. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | A concrete id of the subject. | +| set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + -Subject is either a concrete subject id or a `SubjectSet` expanding to more -Subjects. -| Field | Type | Label | Description | -| ----- | ----------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | -| id | [string](#string) | | A concrete id of the subject. | -| set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | ### SubjectQuery +SubjectQuery is either a concrete subject id or +a `SubjectSet` expanding to more Subjects. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | A concrete id of the subject. | +| set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + -SubjectQuery is either a concrete subject id or a `SubjectSet` expanding to more -Subjects. -| Field | Type | Label | Description | -| ----- | --------------------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | -| id | [string](#string) | | A concrete id of the subject. | -| set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | ### SubjectSet +SubjectSet refers to all subjects who have +the same `relation` on an `object`. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | +| object | [string](#string) | | The object related by this subject set. | +| relation | [string](#string) | | The relation between the object and the subjects. | + + + -SubjectSet refers to all subjects who have the same `relation` on an `object`. -| Field | Type | Label | Description | -| --------- | ----------------- | ----- | ------------------------------------------------------------------------ | -| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | -| object | [string](#string) | | The object related by this subject set. | -| relation | [string](#string) | | The relation between the object and the subjects. | ### SubjectSetQuery +SubjectSetQuery refers to all subjects who have +the same `relation` on an `object`. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | +| object | [string](#string) | | The object related by this subject set. | +| relation | [string](#string) | | The relation between the object and the subjects. | -SubjectSetQuery refers to all subjects who have the same `relation` on an -`object`. -| Field | Type | Label | Description | -| --------- | ----------------- | ----- | ------------------------------------------------------------------------ | -| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | -| object | [string](#string) | | The object related by this subject set. | -| relation | [string](#string) | | The relation between the object and the subjects. | - + + + + + + + + + + + +

Top

## ory/keto/relation_tuples/v1alpha2/check_service.proto + + ### CheckRequest +The request for a CheckService.Check RPC. +Checks whether a specific subject is related to an object. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | **Deprecated.** The namespace to evaluate the check. + +Note: If you use the expand-API and the check evaluates a RelationTuple specifying a SubjectSet as subject or due to a rewrite rule in a namespace config this check request may involve other namespaces automatically. | +| object | [string](#string) | | **Deprecated.** The related object in this check. | +| relation | [string](#string) | | **Deprecated.** The relation between the Object and the Subject. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The related subject in this check. | +| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | +| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | +| tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | | +| latest | [bool](#bool) | | This field is not implemented yet and has no effect. <!-- Set this field to `true` in case your application needs to authorize depending on up to date ACLs, also called a "content-change check". + +If set to `true` the `snaptoken` field is ignored, the check is evaluated at the latest snapshot (globally consistent) and the response includes a snaptoken for clients to store along with object contents that can be used for subsequent checks of the same content version. + +Example use case: - You need to authorize a user to modify/delete some resource and it is unacceptable that if the permission to do that had just been revoked some seconds ago so that the change had not yet been fully replicated to all availability zones. --> | +| snaptoken | [string](#string) | | This field is not implemented yet and has no effect. <!-- Optional. Like reads, a check is always evaluated at a consistent snapshot no earlier than the given snaptoken. + +Leave this field blank if you want to evaluate the check based on eventually consistent ACLs, benefiting from very low latency, but possibly slightly stale results. + +If the specified token is too old and no longer known, the server falls back as if no snaptoken had been specified. + +If not specified the server tries to evaluate the check on the best snapshot version where it is very likely that ACLs had already been replicated to all availability zones. --> | +| max_depth | [int32](#int32) | | The maximum depth to search for a relation. + +If the value is less than 1 or greater than the global max-depth then the global max-depth will be used instead. | + + + + -The request for a CheckService.Check RPC. Checks whether a specific subject is -related to an object. - -| Field | Type | Label | Description | -| --------- | ----------------- | ----- | ---------------------------------------------------- | -| namespace | [string](#string) | | **Deprecated.** The namespace to evaluate the check. | - -Note: If you use the expand-API and the check evaluates a RelationTuple -specifying a SubjectSet as subject or due to a rewrite rule in a namespace -config this check request may involve other namespaces automatically. | | object -| [string](#string) | | **Deprecated.** The related object in this check. | | -relation | [string](#string) | | **Deprecated.** The relation between the Object -and the Subject. | | subject | -[Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The -related subject in this check. | | subject_id | [string](#string) | | -**Deprecated.** A concrete id of the subject. | | subject_set | -[SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | -**Deprecated.** A subject set that expands to more Subjects. More information -are available under [concepts](../concepts/subjects.mdx). | | tuple | -[RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | | | latest -| [bool](#bool) | | This field is not implemented yet and has no effect. <!-- -Set this field to `true` in case your application needs to authorize depending -on up to date ACLs, also called a "content-change check". - -If set to `true` the `snaptoken` field is ignored, the check is evaluated at the -latest snapshot (globally consistent) and the response includes a snaptoken for -clients to store along with object contents that can be used for subsequent -checks of the same content version. - -Example use case: - You need to authorize a user to modify/delete some resource -and it is unacceptable that if the permission to do that had just been revoked -some seconds ago so that the change had not yet been fully replicated to all -availability zones. --> | | snaptoken | [string](#string) | | This field is -not implemented yet and has no effect. <!-- Optional. Like reads, a check is -always evaluated at a consistent snapshot no earlier than the given snaptoken. - -Leave this field blank if you want to evaluate the check based on eventually -consistent ACLs, benefiting from very low latency, but possibly slightly stale -results. - -If the specified token is too old and no longer known, the server falls back as -if no snaptoken had been specified. - -If not specified the server tries to evaluate the check on the best snapshot -version where it is very likely that ACLs had already been replicated to all -availability zones. --> | | max_depth | [int32](#int32) | | The maximum depth -to search for a relation. - -If the value is less than 1 or greater than the global max-depth then the global -max-depth will be used instead. | ### CheckResponse - The response for a CheckService.Check rpc. -| Field | Type | Label | Description | -| ------- | ------------- | ----- | ---------------------------------------------------------------------- | -| allowed | [bool](#bool) | | Whether the specified subject (id) is related to the requested object. | -It is false by default if no ACL matches. | | snaptoken | [string](#string) | | -This field is not implemented yet and has no effect. <!-- The last known -snapshot token ONLY specified if the request had not specified a snaptoken, -since this performed a "content-change request" and consistently fetched -the last known snapshot token. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| allowed | [bool](#bool) | | Whether the specified subject (id) is related to the requested object. + +It is false by default if no ACL matches. | +| snaptoken | [string](#string) | | This field is not implemented yet and has no effect. <!-- The last known snapshot token ONLY specified if the request had not specified a snaptoken, since this performed a "content-change request" and consistently fetched the last known snapshot token. This field is not set if the request had specified a snaptoken! -If set, clients should cache and use this token for subsequent requests to have -minimal latency, but allow slightly stale responses (only some milliseconds or -seconds). --> | +If set, clients should cache and use this token for subsequent requests to have minimal latency, but allow slightly stale responses (only some milliseconds or seconds). --> | + + + + + + + + + + + ### CheckService - -The service that performs authorization checks based on the stored Access -Control Lists. +The service that performs authorization checks +based on the stored Access Control Lists. This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). -| Method Name | Request Type | Response Type | Description | -| ----------- | --------------------------------------------------------------- | ----------------------------------------------------------------- | -------------------------------- | -| Check | [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) | [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) | Performs an authorization check. | +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| Check | [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) | [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) | Performs an authorization check. | + + - + +

Top

## ory/keto/relation_tuples/v1alpha2/expand_service.proto + + ### ExpandRequest +The request for an ExpandService.Expand RPC. +Expands the given subject set. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject to expand. | +| max_depth | [int32](#int32) | | The maximum depth of tree to build. + +If the value is less than 1 or greater than the global max-depth then the global max-depth will be used instead. + +It is important to set this parameter to a meaningful value. Ponder how deep you really want to display this. | +| snaptoken | [string](#string) | | This field is not implemented yet and has no effect. <!-- Optional. Like reads, a expand is always evaluated at a consistent snapshot no earlier than the given snaptoken. -The request for an ExpandService.Expand RPC. Expands the given subject set. +Leave this field blank if you want to expand based on eventually consistent ACLs, benefiting from very low latency, but possibly slightly stale results. -| Field | Type | Label | Description | -| --------- | ----------------------------------------------------- | ----- | ----------------------------------- | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject to expand. | -| max_depth | [int32](#int32) | | The maximum depth of tree to build. | +If the specified token is too old and no longer known, the server falls back as if no snaptoken had been specified. + +If not specified the server tries to build the tree on the best snapshot version where it is very likely that ACLs had already been replicated to all availability zones. --> | +| namespace | [string](#string) | | **Deprecated.** The namespace of the object and relation referenced in this subject set. | +| object | [string](#string) | | **Deprecated.** The object related by this subject set. | +| relation | [string](#string) | | **Deprecated.** The relation between the object and the subjects. | -If the value is less than 1 or greater than the global max-depth then the global -max-depth will be used instead. -It is important to set this parameter to a meaningful value. Ponder how deep you -really want to display this. | | snaptoken | [string](#string) | | This field is -not implemented yet and has no effect. <!-- Optional. Like reads, a expand is -always evaluated at a consistent snapshot no earlier than the given snaptoken. -Leave this field blank if you want to expand based on eventually consistent -ACLs, benefiting from very low latency, but possibly slightly stale results. -If the specified token is too old and no longer known, the server falls back as -if no snaptoken had been specified. -If not specified the server tries to build the tree on the best snapshot version -where it is very likely that ACLs had already been replicated to all -availability zones. --> | | namespace | [string](#string) | | **Deprecated.** -The namespace of the object and relation referenced in this subject set. | | -object | [string](#string) | | **Deprecated.** The object related by this -subject set. | | relation | [string](#string) | | **Deprecated.** The relation -between the object and the subjects. | ### ExpandResponse - The response for a ExpandService.Expand RPC. -| Field | Type | Label | Description | -| ----- | ------------------------------------------------------------- | ----- | ---------------------------------------------------------------------------------------------------- | -| tree | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | | The tree the requested subject set expands to. The requested subject set is the subject of the root. | + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| tree | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | | The tree the requested subject set expands to. The requested subject set is the subject of the root. This field can be nil in some circumstances. | + + + + + ### SubjectTree -| Field | Type | Label | Description | -| --------- | ----------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------- | -| node_type | [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) | | The type of the node. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The subject this node represents. Deprecated: More information is now available in the tuple field. | -| tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The relation tuple this node represents. | -| children | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | repeated | The children of this node. | + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| node_type | [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) | | The type of the node. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The subject this node represents. Deprecated: More information is now available in the tuple field. | +| tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The relation tuple this node represents. | +| children | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | repeated | The children of this node. This is never set if `node_type` == `NODE_TYPE_LEAF`. | + + + + + + + ### NodeType -| Name | Number | Description | -| ------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------- | -| unspecified | 0 | | -| NODE_TYPE_UNSPECIFIED | 0 | | -| NODE_TYPE_UNION | 1 | This node expands to a union of all children. | -| union | 1 | | -| NODE_TYPE_EXCLUSION | 2 | Not implemented yet. | -| exclusion | 2 | | -| NODE_TYPE_INTERSECTION | 3 | Not implemented yet. | -| intersection | 3 | | -| NODE_TYPE_LEAF | 4 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| leaf | 4 | | -| NODE_TYPE_TUPLE_TO_SUBJECT_SET | 5 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| tuple_to_subject_set | 5 | | -| NODE_TYPE_COMPUTED_SUBJECT_SET | 6 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| computed_subject_set | 6 | | -| NODE_TYPE_NOT | 7 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| not | 7 | | + +| Name | Number | Description | +| ---- | ------ | ----------- | +| unspecified | 0 | | +| NODE_TYPE_UNSPECIFIED | 0 | | +| NODE_TYPE_UNION | 1 | This node expands to a union of all children. | +| union | 1 | | +| NODE_TYPE_EXCLUSION | 2 | Not implemented yet. | +| exclusion | 2 | | +| NODE_TYPE_INTERSECTION | 3 | Not implemented yet. | +| intersection | 3 | | +| NODE_TYPE_LEAF | 4 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| leaf | 4 | | +| NODE_TYPE_TUPLE_TO_SUBJECT_SET | 5 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| tuple_to_subject_set | 5 | | +| NODE_TYPE_COMPUTED_SUBJECT_SET | 6 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| computed_subject_set | 6 | | +| NODE_TYPE_NOT | 7 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| not | 7 | | + + + + + + ### ExpandService - -The service that performs subject set expansion based on the stored Access -Control Lists. +The service that performs subject set expansion +based on the stored Access Control Lists. This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). -| Method Name | Request Type | Response Type | Description | -| ----------- | ----------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------ | -| Expand | [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) | [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) | Expands the subject set into a tree of subjects. | +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| Expand | [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) | [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) | Expands the subject set into a tree of subjects. | + + + - +

Top

## ory/keto/relation_tuples/v1alpha2/namespaces_service.proto + + ### ListNamespacesRequest - Request for ReadService.ListNamespaces RPC. + + + + + ### ListNamespacesResponse -| Field | Type | Label | Description | -| ---------- | --------------------------------------------------------- | -------- | ----------- | -| namespaces | [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) | repeated | | + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespaces | [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) | repeated | | + + + + + ### Namespace -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ----------- | -| name | [string](#string) | | | + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | | + + + + + + + + + + + ### NamespacesService - The service to query namespaces. This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). -| Method Name | Request Type | Response Type | Description | -| -------------- | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---------------- | -| ListNamespaces | [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) | [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) | Lists Namespaces | +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| ListNamespaces | [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) | [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) | Lists Namespaces Get all namespaces. | - + + + +

Top

## ory/keto/relation_tuples/v1alpha2/openapi.proto + + ### ErrorObject -| Field | Type | Label | Description | -| ------- | --------------------------------------------------------------------------------------- | -------- | ----------- | -| code | [int32](#int32) | | | -| message | [string](#string) | | | -| debug | [string](#string) | | | -| details | [ErrorObject.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorObject-DetailsEntry) | repeated | | -| id | [string](#string) | | | -| reason | [string](#string) | | | -| request | [string](#string) | | | -| status | [string](#string) | | | + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code | [int32](#int32) | | | +| message | [string](#string) | | | +| debug | [string](#string) | | | +| details | [ErrorObject.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorObject-DetailsEntry) | repeated | | +| id | [string](#string) | | | +| reason | [string](#string) | | | +| request | [string](#string) | | | +| status | [string](#string) | | | + + + + + ### ErrorObject.DetailsEntry -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + ### ErrorResponse -| Field | Type | Label | Description | -| ----- | ------------------------------------------------------------- | ----- | ----------- | -| error | [ErrorObject](#ory-keto-relation_tuples-v1alpha2-ErrorObject) | | | - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| error | [ErrorObject](#ory-keto-relation_tuples-v1alpha2-ErrorObject) | | | + + + + + + + + + + + + + + + +

Top

## ory/keto/relation_tuples/v1alpha2/read_service.proto + + ### ListRelationTuplesRequest +Request for ReadService.ListRelationTuples RPC. +See `ListRelationTuplesRequest_Query` for how to filter the query. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| query | [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) | | **Deprecated.** All query constraints are concatenated with a logical AND operator. + +The RelationTuple list from ListRelationTuplesResponse is ordered from the newest RelationTuple to the oldest. | +| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | +| expand_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | This field is not implemented yet and has no effect. <!-- Optional. The list of fields to be expanded in the RelationTuple list returned in `ListRelationTuplesResponse`. Leaving this field unspecified means all fields are expanded. + +Available fields: "object", "relation", "subject", "namespace", "subject.id", "subject.namespace", "subject.object", "subject.relation" --> | +| snaptoken | [string](#string) | | This field is not implemented yet and has no effect. <!-- Optional. The snapshot token for this read. --> | +| page_size | [int32](#int32) | | Optional. The maximum number of RelationTuples to return in the response. + +Default: 100 | +| page_token | [string](#string) | | Optional. An opaque pagination token returned from a previous call to `ListRelationTuples` that indicates where the page should start at. + +An empty token denotes the first page. All successive pages require the token from the previous page. | +| namespace | [string](#string) | | **Deprecated.** The namespace | +| object | [string](#string) | | **Deprecated.** The related object in this check. | +| relation | [string](#string) | | **Deprecated.** The relation between the Object and the Subject. | +| subject_id | [string](#string) | | A concrete id of the subject. | +| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + + -Request for ReadService.ListRelationTuples RPC. See -`ListRelationTuplesRequest_Query` for how to filter the query. - -| Field | Type | Label | Description | -| ----- | ----------------------------------------------------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------- | -| query | [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) | | **Deprecated.** All query constraints are concatenated with a logical AND operator. | - -The RelationTuple list from ListRelationTuplesResponse is ordered from the -newest RelationTuple to the oldest. | | relation_query | -[RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | | -expand_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | This -field is not implemented yet and has no effect. <!-- Optional. The list of -fields to be expanded in the RelationTuple list returned in -`ListRelationTuplesResponse`. Leaving this field unspecified means all fields -are expanded. - -Available fields: "object", "relation", "subject", -"namespace", "subject.id", "subject.namespace", -"subject.object", "subject.relation" --> | | snaptoken | -[string](#string) | | This field is not implemented yet and has no effect. -<!-- Optional. The snapshot token for this read. --> | | page_size | -[int32](#int32) | | Optional. The maximum number of RelationTuples to return in -the response. - -Default: 100 | | page_token | [string](#string) | | Optional. An opaque -pagination token returned from a previous call to `ListRelationTuples` that -indicates where the page should start at. - -An empty token denotes the first page. All successive pages require the token -from the previous page. | | namespace | [string](#string) | | **Deprecated.** -The namespace | | object | [string](#string) | | **Deprecated.** The related -object in this check. | | relation | [string](#string) | | **Deprecated.** The -relation between the Object and the Subject. | | subject_id | [string](#string) -| | A concrete id of the subject. | | subject_set | -[SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A -subject set that expands to more Subjects. More information are available under -[concepts](../concepts/subjects.mdx). | ### ListRelationTuplesRequest.Query - -The query for listing relationships. Clients can specify any optional field to +The query for listing relationships. +Clients can specify any optional field to partially filter for specific relationships. Example use cases (namespace is always required): + - object only: display a list of all permissions referring to a specific object + - relation only: get all groups that have members; get all directories that have content + - object & relation: display all subjects that have a specific permission relation + - subject & relation: display all groups a subject belongs to; display all objects a subject has access to + - object & relation & subject: check whether the relation tuple already exists + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | Required. The namespace to query. | +| object | [string](#string) | | Optional. The object to query for. | +| relation | [string](#string) | | Optional. The relation to query for. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | + + + + -- object only: display a list of all permissions referring to a specific object -- relation only: get all groups that have members; get all directories that have - content -- object & relation: display all subjects that have a specific permission - relation -- subject & relation: display all groups a subject belongs to; display all - objects a subject has access to -- object & relation & subject: check whether the relation tuple already - exists - -| Field | Type | Label | Description | -| --------- | ----------------------------------------------------- | ----- | ------------------------------------ | -| namespace | [string](#string) | | Required. The namespace to query. | -| object | [string](#string) | | Optional. The object to query for. | -| relation | [string](#string) | | Optional. The relation to query for. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | ### ListRelationTuplesResponse - The response of a ReadService.ListRelationTuples RPC. -| Field | Type | Label | Description | -| --------------- | ----------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------ | -| relation_tuples | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | repeated | The relationships matching the list request. | -| next_page_token | [string](#string) | | The token required to get the next page. If this is the last page, the token will be the empty string. | + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| relation_tuples | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | repeated | The relationships matching the list request. | +| next_page_token | [string](#string) | | The token required to get the next page. If this is the last page, the token will be the empty string. | + + + + + + + + + + + ### ReadService - The service to query relationships. This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). -| Method Name | Request Type | Response Type | Description | -| ------------------ | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------ | +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| | ListRelationTuples | [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) | [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) | Lists ACL relationships. | - + + + +

Top

## ory/keto/relation_tuples/v1alpha2/version.proto + + ### GetVersionRequest - Request for the VersionService.GetVersion RPC. + + + + + ### GetVersionResponse - Response of the VersionService.GetVersion RPC. -| Field | Type | Label | Description | -| ------- | ----------------- | ----- | -------------------------------------------- | -| version | [string](#string) | | The version string of the Ory Keto instance. | + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| version | [string](#string) | | The version string of the Ory Keto instance. | + + + + + + + + + + + ### VersionService - The service returning the specific Ory Keto instance version. -This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis) -and [write-APIs](../concepts/api-overview.mdx#write-apis). +This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis) and [write-APIs](../concepts/api-overview.mdx#write-apis). -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------- | -| GetVersion | [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) | [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) | Returns the version of the Ory Keto instance. | +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| GetVersion | [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) | [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) | Returns the version of the Ory Keto instance. -This endpoint returns the service version typically notated using semantic -versioning. +This endpoint returns the service version typically notated using semantic versioning. + +If the service supports TLS Edge Termination, this endpoint does not require the X-Forwarded-Proto header to be set. | + + -If the service supports TLS Edge Termination, this endpoint does not require the -X-Forwarded-Proto header to be set. | - +

Top

## ory/keto/relation_tuples/v1alpha2/write_service.proto + + ### CreateRelationTupleRequest - The request to create a new relationship. -| Field | Type | Label | Description | -| -------------- | --------------------------------------------------------------------------------------------------------------------- | ----- | --------------------------- | -| relation_tuple | [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) | | The relationship to create. | + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| relation_tuple | [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) | | The relationship to create. | + + + + + ### CreateRelationTupleRequest.Relationship -| Field | Type | Label | Description | -| ----------- | ----------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | -| namespace | [string](#string) | | The namespace this relation tuple lives in. | -| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | | The relation between an Object and a Subject. | -| subject_id | [string](#string) | | A concrete id of the subject. | -| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | The namespace this relation tuple lives in. | +| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | The relation between an Object and a Subject. | +| subject_id | [string](#string) | | A concrete id of the subject. | +| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + + + ### CreateRelationTupleResponse - The response from creating a new relationship. -| Field | Type | Label | Description | -| -------------- | ----------------------------------------------------------------- | ----- | ------------------------- | -| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The created relationship. | + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The created relationship. | + + + + + ### DeleteRelationTuplesRequest -| Field | Type | Label | Description | -| -------------- | --------------------------------------------------------------------------------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------- | -| query | [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) | | **Deprecated.** | -| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | -| namespace | [string](#string) | | **Deprecated.** The namespace this relation tuple lives in. | -| object | [string](#string) | | **Deprecated.** The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | | **Deprecated.** The relation between an Object and a Subject. | -| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | -| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| query | [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) | | **Deprecated.** | +| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | +| namespace | [string](#string) | | **Deprecated.** The namespace this relation tuple lives in. | +| object | [string](#string) | | **Deprecated.** The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | **Deprecated.** The relation between an Object and a Subject. | +| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | +| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + + + ### DeleteRelationTuplesRequest.Query - The query for deleting relationships -| Field | Type | Label | Description | -| --------- | ----------------------------------------------------- | ----- | ------------------------------------ | -| namespace | [string](#string) | | Optional. The namespace to query. | -| object | [string](#string) | | Optional. The object to query for. | -| relation | [string](#string) | | Optional. The relation to query for. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | Optional. The namespace to query. | +| object | [string](#string) | | Optional. The object to query for. | +| relation | [string](#string) | | Optional. The relation to query for. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | + + + + + ### DeleteRelationTuplesResponse + + + + + + ### RelationTupleDelta - Write-delta for a TransactRelationTuplesRequest. -| Field | Type | Label | Description | -| -------------- | ----------------------------------------------------------------------------------------- | ----- | -------------------------------------- | -| action | [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) | | The action to do on the RelationTuple. | -| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The target RelationTuple. | + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| action | [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) | | The action to do on the RelationTuple. | +| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The target RelationTuple. | + + + + + ### TransactRelationTuplesRequest - The request of a WriteService.TransactRelationTuples RPC. -| Field | Type | Label | Description | -| --------------------- | --------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- | + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | | relation_tuple_deltas | [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) | repeated | The write delta for the relationships operated in one single transaction. Either all actions succeed or no change takes effect on error. | + + + + + ### TransactRelationTuplesResponse - The response of a WriteService.TransactRelationTuples rpc. -| Field | Type | Label | Description | -| ---------- | ----------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| snaptokens | [string](#string) | repeated | This field is not implemented yet and has no effect. <!-- The list of the new latest snapshot tokens of the affected RelationTuple, with the same index as specified in the `relation_tuple_deltas` field of the TransactRelationTuplesRequest request. | -If the RelationTupleDelta_Action was DELETE the snaptoken is empty at the same -index. --> | +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| snaptokens | [string](#string) | repeated | This field is not implemented yet and has no effect. <!-- The list of the new latest snapshot tokens of the affected RelationTuple, with the same index as specified in the `relation_tuple_deltas` field of the TransactRelationTuplesRequest request. + +If the RelationTupleDelta_Action was DELETE the snaptoken is empty at the same index. --> | + + + + + + + ### RelationTupleDelta.Action -| Name | Number | Description | -| ------------------ | ------ | ----------------------------------------------------------------------------------------------------------- | -| ACTION_UNSPECIFIED | 0 | Unspecified. The `TransactRelationTuples` RPC ignores this RelationTupleDelta if an action was unspecified. | -| ACTION_INSERT | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | -| insert | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | -| ACTION_DELETE | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | -| delete | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | + +| Name | Number | Description | +| ---- | ------ | ----------- | +| ACTION_UNSPECIFIED | 0 | Unspecified. The `TransactRelationTuples` RPC ignores this RelationTupleDelta if an action was unspecified. | +| ACTION_INSERT | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | +| insert | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | +| ACTION_DELETE | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | +| delete | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | + + + + + + ### WriteService - The write service to create and delete Access Control Lists. -This service is part of the -[write-APIs](../concepts/api-overview.mdx#write-apis). +This service is part of the [write-APIs](../concepts/api-overview.mdx#write-apis). -| Method Name | Request Type | Response Type | Description | -| ---------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| | TransactRelationTuples | [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) | [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) | Writes one or more relationships in a single transaction. | -| CreateRelationTuple | [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) | [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) | Creates a relationship | -| DeleteRelationTuples | [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) | [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) | Deletes relationships based on relation query | +| CreateRelationTuple | [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) | [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) | Creates a relationship | +| DeleteRelationTuples | [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) | [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) | Deletes relationships based on relation query | + + + + ## Scalar Value Types -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------- | ----------- | ------- | ---------- | -------------- | ------------------------------ | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | +| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | +| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | +| double | | double | double | float | float64 | double | float | Float | +| float | | float | float | float | float32 | float | float | Float | +| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | +| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | +| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | +| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | +| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | +| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | +| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | + diff --git a/proto/buf.yaml b/proto/buf.yaml index 49f5d6437..ae8506a64 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -1,4 +1,5 @@ version: v1 +name: buf.build/ory/keto build: excludes: - node_modules diff --git a/proto/openapiv2/gateway.swagger.json b/proto/openapiv2/gateway.swagger.json index 02d25f7fa..2331d7b24 100644 --- a/proto/openapiv2/gateway.swagger.json +++ b/proto/openapiv2/gateway.swagger.json @@ -15,9 +15,16 @@ } }, "basePath": "/", - "schemes": ["http", "https"], - "consumes": ["application/json"], - "produces": ["application/json"], + "schemes": [ + "http", + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "paths": { "/admin/relation-tuples": { "delete": { @@ -86,8 +93,12 @@ "type": "string" } ], - "tags": ["relationship"], - "consumes": ["application/x-www-form-urlencoded"] + "tags": [ + "relationship" + ], + "consumes": [ + "application/x-www-form-urlencoded" + ] }, "put": { "summary": "Creates a relationship", @@ -117,7 +128,9 @@ } } ], - "tags": ["relationship"] + "tags": [ + "relationship" + ] }, "patch": { "summary": "Writes one or more relationships in a single transaction.", @@ -151,7 +164,9 @@ } } ], - "tags": ["relationship"] + "tags": [ + "relationship" + ] } }, "/namespaces": { @@ -182,8 +197,12 @@ } } }, - "tags": ["relationship"], - "consumes": ["application/x-www-form-urlencoded"] + "tags": [ + "relationship" + ], + "consumes": [ + "application/x-www-form-urlencoded" + ] } }, "/opl/syntax/check": { @@ -210,13 +229,16 @@ "in": "body", "required": true, "schema": { - "type": "string", - "format": "byte" + "type": "string" } } ], - "tags": ["relationship"], - "consumes": ["text/plain"] + "tags": [ + "relationship" + ], + "consumes": [ + "text/plain" + ] } }, "/relation-tuples": { @@ -303,8 +325,12 @@ "type": "string" } ], - "tags": ["relationship"], - "consumes": ["application/x-www-form-urlencoded"] + "tags": [ + "relationship" + ], + "consumes": [ + "application/x-www-form-urlencoded" + ] } }, "/relation-tuples/check": { @@ -390,8 +416,13 @@ "format": "int32" } ], - "tags": ["permission"], - "consumes": ["application/x-www-form-urlencoded", "application/json"] + "tags": [ + "permission" + ], + "consumes": [ + "application/x-www-form-urlencoded", + "application/json" + ] }, "post": { "summary": "Performs an authorization check.", @@ -427,8 +458,13 @@ } } ], - "tags": ["permission"], - "consumes": ["application/x-www-form-urlencoded", "application/json"] + "tags": [ + "permission" + ], + "consumes": [ + "application/x-www-form-urlencoded", + "application/json" + ] } }, "/relation-tuples/check/openapi": { @@ -514,8 +550,13 @@ "format": "int32" } ], - "tags": ["permission"], - "consumes": ["application/x-www-form-urlencoded", "application/json"] + "tags": [ + "permission" + ], + "consumes": [ + "application/x-www-form-urlencoded", + "application/json" + ] }, "post": { "summary": "Performs an authorization check.", @@ -551,8 +592,13 @@ } } ], - "tags": ["permission"], - "consumes": ["application/x-www-form-urlencoded", "application/json"] + "tags": [ + "permission" + ], + "consumes": [ + "application/x-www-form-urlencoded", + "application/json" + ] } }, "/relation-tuples/expand": { @@ -604,8 +650,12 @@ "type": "string" } ], - "tags": ["permission"], - "consumes": ["application/x-www-form-urlencoded"] + "tags": [ + "permission" + ], + "consumes": [ + "application/x-www-form-urlencoded" + ] } }, "/version": { @@ -627,7 +677,9 @@ } } }, - "tags": ["version"] + "tags": [ + "version" + ] } } }, @@ -907,7 +959,11 @@ } }, "description": "RelationTuple defines a relation between an Object and a Subject.", - "required": ["namespace", "object", "relation"] + "required": [ + "namespace", + "object", + "relation" + ] }, "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta": { "type": "object", @@ -925,7 +981,11 @@ }, "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action": { "type": "string", - "enum": ["ACTION_UNSPECIFIED", "insert", "delete"], + "enum": [ + "ACTION_UNSPECIFIED", + "insert", + "delete" + ], "default": "ACTION_UNSPECIFIED", "description": " - ACTION_UNSPECIFIED: Unspecified.\nThe `TransactRelationTuples` RPC ignores this\nRelationTupleDelta if an action was unspecified.\n - insert: Insertion of a new RelationTuple.\nIt is ignored if already existing.\n - delete: Deletion of the RelationTuple.\nIt is ignored if it does not exist." }, @@ -960,7 +1020,11 @@ } }, "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`.", - "required": ["namespace", "object", "relation"] + "required": [ + "namespace", + "object", + "relation" + ] }, "ory.keto.relation_tuples.v1alpha2.SubjectSetQuery": { "type": "object", @@ -1003,7 +1067,9 @@ "description": "The children of this node.\n\nThis is never set if `node_type` == `NODE_TYPE_LEAF`." } }, - "required": ["type"] + "required": [ + "type" + ] }, "ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse": { "type": "object", diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go index e5900d8ac..274c53996 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go @@ -27,7 +27,7 @@ type CheckRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` + Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` } func (x *CheckRequest) Reset() { @@ -62,11 +62,11 @@ func (*CheckRequest) Descriptor() ([]byte, []int) { return file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDescGZIP(), []int{0} } -func (x *CheckRequest) GetContent() []byte { +func (x *CheckRequest) GetContent() string { if x != nil { return x.Content } - return nil + return "" } type CheckResponse struct { @@ -248,7 +248,7 @@ var file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDesc = []byte{ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x4a, 0x0a, 0x0d, 0x43, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x4a, 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.proto b/proto/ory/keto/opl/v1alpha1/syntax_service.proto index 1c0d2f0c3..a90d0b29c 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.proto +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.proto @@ -39,7 +39,7 @@ service SyntaxService { } message CheckRequest { - bytes content = 1; + string content = 1; } message CheckResponse { diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts index 823e9f538..56bbae4bc 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts +++ b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts @@ -8,10 +8,8 @@ import * as jspb from "google-protobuf"; import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; export class CheckRequest extends jspb.Message { - getContent(): Uint8Array | string; - getContent_asU8(): Uint8Array; - getContent_asB64(): string; - setContent(value: Uint8Array | string): CheckRequest; + getContent(): string; + setContent(value: string): CheckRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CheckRequest.AsObject; @@ -25,7 +23,7 @@ export class CheckRequest extends jspb.Message { export namespace CheckRequest { export type AsObject = { - content: Uint8Array | string, + content: string, } } diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js index 17e6b99a7..d10e45233 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js +++ b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js @@ -139,7 +139,7 @@ proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.toObject = function(opt_inclu */ proto.ory.keto.opl.v1alpha1.CheckRequest.toObject = function(includeInstance, msg) { var f, obj = { - content: msg.getContent_asB64() + content: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -177,7 +177,7 @@ proto.ory.keto.opl.v1alpha1.CheckRequest.deserializeBinaryFromReader = function( var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); + var value = /** @type {string} */ (reader.readString()); msg.setContent(value); break; default: @@ -209,9 +209,9 @@ proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.serializeBinary = function() */ proto.ory.keto.opl.v1alpha1.CheckRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContent_asU8(); + f = message.getContent(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 1, f ); @@ -220,44 +220,20 @@ proto.ory.keto.opl.v1alpha1.CheckRequest.serializeBinaryToWriter = function(mess /** - * optional bytes content = 1; - * @return {!(string|Uint8Array)} - */ -proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.getContent = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes content = 1; - * This is a type-conversion wrapper around `getContent()` + * optional string content = 1; * @return {string} */ -proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.getContent_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContent())); -}; - - -/** - * optional bytes content = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContent()` - * @return {!Uint8Array} - */ -proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.getContent_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContent())); +proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.getContent = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!(string|Uint8Array)} value + * @param {string} value * @return {!proto.ory.keto.opl.v1alpha1.CheckRequest} returns this */ proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.setContent = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + return jspb.Message.setProto3StringField(this, 1, value); }; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go index 887135d38..c075d079c 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go @@ -52,6 +52,7 @@ type CheckRequest struct { // Deprecated: Do not use. Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` // Types that are assignable to RestApiSubject: + // // *CheckRequest_SubjectId // *CheckRequest_SubjectSet RestApiSubject isCheckRequest_RestApiSubject `protobuf_oneof:"rest_api_subject"` @@ -70,10 +71,11 @@ type CheckRequest struct { // of the same content version. // // Example use case: - // - You need to authorize a user to modify/delete some resource - // and it is unacceptable that if the permission to do that had - // just been revoked some seconds ago so that the change had not - // yet been fully replicated to all availability zones. + // - You need to authorize a user to modify/delete some resource + // and it is unacceptable that if the permission to do that had + // just been revoked some seconds ago so that the change had not + // yet been fully replicated to all availability zones. + // // --> Latest bool `protobuf:"varint,5,opt,name=latest,proto3" json:"latest,omitempty"` // This field is not implemented yet and has no effect. diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go deleted file mode 100644 index cd2279d57..000000000 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: ory/keto/relation_tuples/v1alpha2/check_service.proto - -package rts - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// CheckServiceClient is the client API for CheckService 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 CheckServiceClient interface { - // Performs an authorization check. - Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) -} - -type checkServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewCheckServiceClient(cc grpc.ClientConnInterface) CheckServiceClient { - return &checkServiceClient{cc} -} - -func (c *checkServiceClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) { - out := new(CheckResponse) - err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// CheckServiceServer is the server API for CheckService service. -// All implementations should embed UnimplementedCheckServiceServer -// for forward compatibility -type CheckServiceServer interface { - // Performs an authorization check. - Check(context.Context, *CheckRequest) (*CheckResponse, error) -} - -// UnimplementedCheckServiceServer should be embedded to have forward compatible implementations. -type UnimplementedCheckServiceServer struct { -} - -func (UnimplementedCheckServiceServer) Check(context.Context, *CheckRequest) (*CheckResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Check not implemented") -} - -// UnsafeCheckServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to CheckServiceServer will -// result in compilation errors. -type UnsafeCheckServiceServer interface { - mustEmbedUnimplementedCheckServiceServer() -} - -func RegisterCheckServiceServer(s grpc.ServiceRegistrar, srv CheckServiceServer) { - s.RegisterService(&CheckService_ServiceDesc, srv) -} - -func _CheckService_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CheckRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CheckServiceServer).Check(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CheckServiceServer).Check(ctx, req.(*CheckRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// CheckService_ServiceDesc is the grpc.ServiceDesc for CheckService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var CheckService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "ory.keto.relation_tuples.v1alpha2.CheckService", - HandlerType: (*CheckServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Check", - Handler: _CheckService_Check_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "ory/keto/relation_tuples/v1alpha2/check_service.proto", -} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go index 6cca3ce4c..6186f13c7 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go @@ -82,6 +82,7 @@ type ListRelationTuplesRequest struct { // Deprecated: Do not use. Relation string `protobuf:"bytes,9,opt,name=relation,proto3" json:"relation,omitempty"` // Types that are assignable to RestApiSubject: + // // *ListRelationTuplesRequest_SubjectId // *ListRelationTuplesRequest_SubjectSet RestApiSubject isListRelationTuplesRequest_RestApiSubject `protobuf_oneof:"rest_api_subject"` @@ -290,12 +291,11 @@ func (x *ListRelationTuplesResponse) GetNextPageToken() string { // partially filter for specific relationships. // // Example use cases (namespace is always required): -// - object only: display a list of all permissions referring to a specific object -// - relation only: get all groups that have members; get all directories that have content -// - object & relation: display all subjects that have a specific permission relation -// - subject & relation: display all groups a subject belongs to; display all objects a subject has access to -// - object & relation & subject: check whether the relation tuple already exists -// +// - object only: display a list of all permissions referring to a specific object +// - relation only: get all groups that have members; get all directories that have content +// - object & relation: display all subjects that have a specific permission relation +// - subject & relation: display all groups a subject belongs to; display all objects a subject has access to +// - object & relation & subject: check whether the relation tuple already exists type ListRelationTuplesRequest_Query struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go index 9892747e7..b133f7919 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go @@ -40,6 +40,7 @@ type RelationTuple struct { // a `SubjectSet` that expands to more Subjects. Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` // Types that are assignable to RestApiSubject: + // // *RelationTuple_SubjectId // *RelationTuple_SubjectSet RestApiSubject isRelationTuple_RestApiSubject `protobuf_oneof:"rest_api_subject"` @@ -156,11 +157,11 @@ func (*RelationTuple_SubjectSet) isRelationTuple_RestApiSubject() {} // partially filter for specific relationships. // // Example use cases (namespace is always required): -// - object only: display a list of all permissions referring to a specific object -// - relation only: get all groups that have members; get all directories that have content -// - object & relation: display all subjects that have a specific permission relation -// - subject & relation: display all groups a subject belongs to; display all objects a subject has access to -// - object & relation & subject: check whether the relation tuple already exists +// - object only: display a list of all permissions referring to a specific object +// - relation only: get all groups that have members; get all directories that have content +// - object & relation: display all subjects that have a specific permission relation +// - subject & relation: display all groups a subject belongs to; display all objects a subject has access to +// - object & relation & subject: check whether the relation tuple already exists type RelationQuery struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -249,6 +250,7 @@ type Subject struct { // The reference of this abstract subject. // // Types that are assignable to Ref: + // // *Subject_Id // *Subject_Set Ref isSubject_Ref `protobuf_oneof:"ref"` @@ -405,6 +407,7 @@ type SubjectQuery struct { // The reference of this abstract subject. // // Types that are assignable to Ref: + // // *SubjectQuery_Id // *SubjectQuery_Set Ref isSubjectQuery_Ref `protobuf_oneof:"ref"` diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go index e52559ce5..684cf0e06 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go @@ -374,6 +374,7 @@ type DeleteRelationTuplesRequest struct { // Deprecated: Do not use. Relation string `protobuf:"bytes,5,opt,name=relation,proto3" json:"relation,omitempty"` // Types that are assignable to RestApiSubject: + // // *DeleteRelationTuplesRequest_SubjectId // *DeleteRelationTuplesRequest_SubjectSet RestApiSubject isDeleteRelationTuplesRequest_RestApiSubject `protobuf_oneof:"rest_api_subject"` @@ -547,6 +548,7 @@ type CreateRelationTupleRequest_Relationship struct { // The relation between an Object and a Subject. Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` // Types that are assignable to Subject: + // // *CreateRelationTupleRequest_Relationship_SubjectId // *CreateRelationTupleRequest_Relationship_SubjectSet Subject isCreateRelationTupleRequest_Relationship_Subject `protobuf_oneof:"subject"` diff --git a/spec/api.json b/spec/api.json index 369e5ee60..c79784b3c 100755 --- a/spec/api.json +++ b/spec/api.json @@ -661,7 +661,6 @@ "content": { "text/plain": { "schema": { - "format": "byte", "type": "string" } } diff --git a/spec/swagger.json b/spec/swagger.json index c01101c46..44bfc4867 100755 --- a/spec/swagger.json +++ b/spec/swagger.json @@ -210,8 +210,7 @@ "in": "body", "required": true, "schema": { - "type": "string", - "format": "byte" + "type": "string" } } ], From 8fd10fa983ee88aadf28ff46d0b79b1863574c43 Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Mon, 13 Feb 2023 09:08:56 +0100 Subject: [PATCH 05/42] WIP --- proto/buf.md | 74 ------------- proto/openapiv2/gateway.swagger.json | 154 +-------------------------- 2 files changed, 2 insertions(+), 226 deletions(-) diff --git a/proto/buf.md b/proto/buf.md index 6cb500aa4..7adb57ec3 100644 --- a/proto/buf.md +++ b/proto/buf.md @@ -41,11 +41,6 @@ - [NamespacesService](#ory-keto-relation_tuples-v1alpha2-NamespacesService) -- [ory/keto/relation_tuples/v1alpha2/openapi.proto](#ory_keto_relation_tuples_v1alpha2_openapi-proto) - - [ErrorObject](#ory-keto-relation_tuples-v1alpha2-ErrorObject) - - [ErrorObject.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorObject-DetailsEntry) - - [ErrorResponse](#ory-keto-relation_tuples-v1alpha2-ErrorResponse) - - [ory/keto/relation_tuples/v1alpha2/read_service.proto](#ory_keto_relation_tuples_v1alpha2_read_service-proto) - [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) - [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) @@ -583,75 +578,6 @@ Get all namespaces. | - -

Top

- -## ory/keto/relation_tuples/v1alpha2/openapi.proto - - - - - -### ErrorObject - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int32](#int32) | | | -| message | [string](#string) | | | -| debug | [string](#string) | | | -| details | [ErrorObject.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorObject-DetailsEntry) | repeated | | -| id | [string](#string) | | | -| reason | [string](#string) | | | -| request | [string](#string) | | | -| status | [string](#string) | | | - - - - - - - - -### ErrorObject.DetailsEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - -### ErrorResponse - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| error | [ErrorObject](#ory-keto-relation_tuples-v1alpha2-ErrorObject) | | | - - - - - - - - - - - - - - -

Top

diff --git a/proto/openapiv2/gateway.swagger.json b/proto/openapiv2/gateway.swagger.json index 2331d7b24..c721fe996 100644 --- a/proto/openapiv2/gateway.swagger.json +++ b/proto/openapiv2/gateway.swagger.json @@ -1,24 +1,9 @@ { "swagger": "2.0", "info": { - "title": "ORY Keto", - "description": "Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.", - "version": "Latest", - "contact": { - "name": "ORY", - "url": "https://www.ory.sh", - "email": "hi@ory.sh" - }, - "license": { - "name": "Apache 2.0", - "url": "https://github.com/ory/keto/blob/master/LICENSE" - } + "title": "ory/keto/opl/v1alpha1/syntax_service.proto", + "version": "version not set" }, - "basePath": "/", - "schemes": [ - "http", - "https" - ], "consumes": [ "application/json" ], @@ -34,12 +19,6 @@ "204": { "description": "An empty response.", "schema": {} - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" - } } }, "parameters": [ @@ -109,12 +88,6 @@ "schema": { "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" - } } }, "parameters": [ @@ -142,12 +115,6 @@ "examples": { "application/json": {} } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" - } } }, "parameters": [ @@ -189,12 +156,6 @@ ] } } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" - } } }, "tags": [ @@ -215,12 +176,6 @@ "schema": { "$ref": "#/definitions/ory.keto.opl.v1alpha1.CheckResponse" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" - } } }, "parameters": [ @@ -251,12 +206,6 @@ "schema": { "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" - } } }, "parameters": [ @@ -349,12 +298,6 @@ "schema": { "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" - } } }, "parameters": [ @@ -439,12 +382,6 @@ "schema": { "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" - } } }, "parameters": [ @@ -483,12 +420,6 @@ "schema": { "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" - } } }, "parameters": [ @@ -573,12 +504,6 @@ "schema": { "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" - } } }, "parameters": [ @@ -611,12 +536,6 @@ "schema": { "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" - } } }, "parameters": [ @@ -669,12 +588,6 @@ "schema": { "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.GetVersionResponse" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" - } } }, "tags": [ @@ -801,69 +714,6 @@ "ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse": { "type": "object" }, - "ory.keto.relation_tuples.v1alpha2.ErrorObject": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int64", - "example": 404, - "description": "The status code", - "title": "code", - "pattern": "^[0-9]$" - }, - "message": { - "type": "string", - "example": "The resource could not be found", - "description": "Response message", - "title": "message" - }, - "debug": { - "type": "string", - "example": "SQL field 'foo' is not a bool", - "description": "This field is often not exposed to protect against leaking\nsensitive information", - "title": "Debug information" - }, - "details": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "Further error details" - }, - "id": { - "type": "string", - "description": "Useful when trying to identify various errors in application logic.", - "title": "The error ID" - }, - "reason": { - "type": "string", - "example": "User with ID 1234 does not exist.", - "description": "A human-readable reason for the error", - "title": "The reason for the failure" - }, - "request": { - "type": "string", - "example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6", - "description": "The request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.", - "title": "The request ID" - }, - "status": { - "type": "string", - "example": "Not Found", - "description": "The human-readable description of the code.", - "title": "The status description" - } - } - }, - "ory.keto.relation_tuples.v1alpha2.ErrorResponse": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorObject" - } - } - }, "ory.keto.relation_tuples.v1alpha2.ExpandResponse": { "type": "object", "properties": { From 57a26a50b469fd0a72b36bec758972217d1d26b1 Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Mon, 13 Feb 2023 10:27:19 +0100 Subject: [PATCH 06/42] chore: update sdk --- cmd/check/root.go | 2 +- cmd/check/root_test.go | 2 +- cmd/clidoc/main.go | 2 +- cmd/client/grpc_client.go | 2 +- cmd/client/grpc_client_test.go | 2 +- cmd/client/test_helpers.go | 2 +- cmd/expand/root.go | 2 +- cmd/expand/root_test.go | 2 +- cmd/helpers/helpers.go | 2 +- cmd/migrate/down.go | 2 +- cmd/migrate/migrate_test.go | 2 +- cmd/migrate/root.go | 2 +- cmd/migrate/status.go | 2 +- cmd/migrate/up.go | 2 +- cmd/namespace/opl_generate.go | 2 +- cmd/namespace/opl_generate_test.go | 2 +- cmd/namespace/root.go | 2 +- cmd/namespace/validate.go | 2 +- cmd/namespace/validate_test.go | 2 +- cmd/relationtuple/create.go | 2 +- cmd/relationtuple/delete.go | 2 +- cmd/relationtuple/delete_all.go | 2 +- cmd/relationtuple/delete_all_test.go | 2 +- cmd/relationtuple/get.go | 2 +- cmd/relationtuple/output.go | 2 +- cmd/relationtuple/output_test.go | 2 +- cmd/relationtuple/parse.go | 2 +- cmd/relationtuple/parse_test.go | 2 +- cmd/relationtuple/root.go | 2 +- cmd/root.go | 2 +- cmd/serve_debug_test.go | 2 +- cmd/server/serve.go | 2 +- cmd/status/root.go | 2 +- cmd/status/root_test.go | 2 +- .../00-create-tuples/index.js | 2 +- .../00-create-tuples/main.go | 2 +- .../01-expand-beach/index.js | 2 +- .../01-expand-beach/main.go | 2 +- .../99-cleanup/index.js | 2 +- .../99-cleanup/main.go | 2 +- .../00-create-tuples/index.js | 2 +- .../00-create-tuples/main.go | 2 +- .../01-list-PM/index.js | 2 +- .../01-list-PM/main.go | 2 +- .../02-list-coffee-break/index.js | 2 +- .../02-list-coffee-break/main.go | 2 +- .../99-cleanup/index.js | 2 +- .../99-cleanup/main.go | 2 +- .../00-write-direct-access/index.js | 2 +- .../00-write-direct-access/main.go | 2 +- .../01-check-direct-access/index.js | 2 +- .../01-check-direct-access/main.go | 2 +- .../99-cleanup/index.js | 2 +- .../99-cleanup/main.go | 2 +- contrib/namespace-type-lib/index.d.ts | 2 +- contrib/namespace-type-lib/test.ts | 2 +- contrib/rewrites-example/namespaces.keto.ts | 2 +- doc.go | 2 +- doc_swagger.go | 2 +- embedx/schemas.go | 2 +- embedx/schemas_test.go | 2 +- internal/check/bench_test.go | 2 +- internal/check/binop.go | 2 +- internal/check/checkgroup/checkgroup_test.go | 2 +- .../check/checkgroup/concurrent_checkgroup.go | 2 +- internal/check/checkgroup/definitions.go | 2 +- .../check/checkgroup/membership_string.go | 2 +- internal/check/checkgroup/testmain_test.go | 2 +- internal/check/checkgroup/workerpool_test.go | 2 +- internal/check/engine.go | 2 +- internal/check/engine_test.go | 2 +- internal/check/handler.go | 2 +- internal/check/handler_test.go | 2 +- internal/check/performance_test.go | 2 +- internal/check/rewrites.go | 2 +- internal/check/rewrites_test.go | 2 +- internal/check/testmain_test.go | 2 +- internal/driver/config/buildinfo.go | 2 +- internal/driver/config/namespace_memory.go | 2 +- .../driver/config/namespace_memory_test.go | 2 +- internal/driver/config/namespace_watcher.go | 2 +- .../driver/config/namespace_watcher_test.go | 2 +- .../config/opl_config_namespace_watcher.go | 2 +- internal/driver/config/provider.go | 2 +- internal/driver/config/provider_test.go | 2 +- internal/driver/daemon.go | 2 +- internal/driver/daemon_test.go | 2 +- internal/driver/pop_connection.go | 2 +- internal/driver/registry.go | 2 +- internal/driver/registry_default.go | 2 +- internal/driver/registry_factory.go | 2 +- internal/driver/selfsigned_cert_bench_test.go | 2 +- internal/e2e/cli_client_test.go | 2 +- internal/e2e/full_suit_test.go | 2 +- internal/e2e/grpc_client_test.go | 2 +- internal/e2e/helpers.go | 2 +- internal/e2e/rest_client_test.go | 2 +- internal/e2e/sdk_client_test.go | 2 +- internal/e2e/testcases_test.go | 2 +- internal/e2e/transaction_cases_test.go | 2 +- internal/expand/engine.go | 2 +- internal/expand/engine_test.go | 2 +- internal/expand/handler.go | 2 +- internal/expand/handler_test.go | 2 +- internal/expand/testhelper.go | 2 +- internal/httpclient/.openapi-generator/FILES | 4 - internal/httpclient/README.md | 2 - internal/httpclient/api/openapi.yaml | 120 -- internal/httpclient/api_permission.go | 39 - internal/httpclient/api_relationship.go | 46 +- internal/httpclient/docs/ErrorGeneric.md | 56 - ...ryKetoRelationTuplesV1alpha2ErrorObject.md | 238 ---- internal/httpclient/docs/RelationshipApi.md | 4 +- internal/httpclient/model_error_generic.go | 114 -- ...o_relation_tuples_v1alpha2_error_object.go | 373 ------ internal/namespace/ast/ast_definitions.go | 2 +- internal/namespace/ast/operator_string.go | 2 +- internal/namespace/definitions.go | 2 +- .../namespace/namespacehandler/handler.go | 2 +- internal/persistence/definitions.go | 2 +- internal/persistence/sql/full_test.go | 2 +- .../migrations/migratest/migration_test.go | 2 +- .../uuidmapping/uuid_mapping_migrator.go | 2 +- .../uuidmapping/uuid_mapping_migrator_test.go | 2 +- internal/persistence/sql/pagination_test.go | 2 +- internal/persistence/sql/persister.go | 2 +- internal/persistence/sql/relationtuples.go | 2 +- .../persistence/sql/relationtuples_test.go | 2 +- internal/persistence/sql/uuid_mapping.go | 2 +- internal/persistence/sql/uuid_mapping_test.go | 2 +- internal/relationtuple/definitions.go | 2 +- internal/relationtuple/definitions_test.go | 2 +- internal/relationtuple/handler.go | 2 +- internal/relationtuple/manager_isolation.go | 2 +- .../relationtuple/manager_requirements.go | 2 +- internal/relationtuple/read_server.go | 2 +- internal/relationtuple/read_server_test.go | 2 +- internal/relationtuple/swagger_definitions.go | 2 +- internal/relationtuple/test_helper.go | 2 +- internal/relationtuple/transact_server.go | 2 +- .../relationtuple/transact_server_test.go | 2 +- internal/relationtuple/uuid_mapping.go | 2 +- internal/relationtuple/uuid_mapping_test.go | 2 +- internal/schema/handler.go | 2 +- internal/schema/handler_test.go | 2 +- internal/schema/itemtype_string.go | 2 +- internal/schema/lexer.go | 2 +- internal/schema/lexer_test.go | 2 +- internal/schema/limits.go | 2 +- internal/schema/parse_errors.go | 2 +- internal/schema/parser.go | 2 +- internal/schema/parser_fuzzer.go | 2 +- internal/schema/parser_test.go | 2 +- internal/schema/typechecks.go | 2 +- internal/swagger_types.go | 2 +- internal/x/dbx/dsn_cockroach.go | 2 +- internal/x/dbx/dsn_mysql.go | 2 +- internal/x/dbx/dsn_nocockroach.go | 2 +- internal/x/dbx/dsn_nomysql.go | 2 +- internal/x/dbx/dsn_nopostgres.go | 2 +- internal/x/dbx/dsn_nosqlite.go | 2 +- internal/x/dbx/dsn_postgres.go | 2 +- internal/x/dbx/dsn_sqlite.go | 2 +- internal/x/dbx/dsn_testutils.go | 2 +- internal/x/dbx/dsn_testutils_test.go | 2 +- internal/x/graph/graph_utils.go | 2 +- internal/x/graph/graph_utils_test.go | 2 +- internal/x/helpers.go | 2 +- internal/x/max_depth.go | 2 +- internal/x/pagination.go | 2 +- internal/x/registry.go | 2 +- internal/x/router.go | 2 +- internal/x/test_endpoints.go | 3 + ketoapi/cmd_output.go | 2 +- ketoapi/enc_proto.go | 2 +- ketoapi/enc_string.go | 2 +- ketoapi/enc_test.go | 2 +- ketoapi/enc_url_query.go | 2 +- ketoapi/public_api_definitions.go | 2 +- ketoctx/contextualizer.go | 2 +- ketoctx/contextualizer_test.go | 2 +- ketoctx/options.go | 2 +- ketoctx/options_test.go | 2 +- main.go | 2 +- proto/buf.md | 1053 +++++++---------- proto/openapiv2/gateway.swagger.json | 118 +- spec/api.json | 173 --- spec/files.go | 2 +- spec/swagger.json | 151 +-- 189 files changed, 636 insertions(+), 2206 deletions(-) delete mode 100644 internal/httpclient/docs/ErrorGeneric.md delete mode 100644 internal/httpclient/docs/OryKetoRelationTuplesV1alpha2ErrorObject.md delete mode 100644 internal/httpclient/model_error_generic.go delete mode 100644 internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_error_object.go diff --git a/cmd/check/root.go b/cmd/check/root.go index f7c9018c6..c77f900c7 100644 --- a/cmd/check/root.go +++ b/cmd/check/root.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package check diff --git a/cmd/check/root_test.go b/cmd/check/root_test.go index 0436a90ba..94dea0a5f 100644 --- a/cmd/check/root_test.go +++ b/cmd/check/root_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package check diff --git a/cmd/clidoc/main.go b/cmd/clidoc/main.go index bc5b6dafe..58f881a3c 100644 --- a/cmd/clidoc/main.go +++ b/cmd/clidoc/main.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package main diff --git a/cmd/client/grpc_client.go b/cmd/client/grpc_client.go index 90db677b6..155d85aa2 100644 --- a/cmd/client/grpc_client.go +++ b/cmd/client/grpc_client.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package client diff --git a/cmd/client/grpc_client_test.go b/cmd/client/grpc_client_test.go index 3eb14a8b9..3cdae1b11 100644 --- a/cmd/client/grpc_client_test.go +++ b/cmd/client/grpc_client_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package client diff --git a/cmd/client/test_helpers.go b/cmd/client/test_helpers.go index 30bef36d3..cae14779f 100644 --- a/cmd/client/test_helpers.go +++ b/cmd/client/test_helpers.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package client diff --git a/cmd/expand/root.go b/cmd/expand/root.go index 4684ff695..ffa76d5e2 100644 --- a/cmd/expand/root.go +++ b/cmd/expand/root.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package expand diff --git a/cmd/expand/root_test.go b/cmd/expand/root_test.go index 52e7f0744..8f502fe01 100644 --- a/cmd/expand/root_test.go +++ b/cmd/expand/root_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package expand diff --git a/cmd/helpers/helpers.go b/cmd/helpers/helpers.go index fb84018a1..d5c876efb 100644 --- a/cmd/helpers/helpers.go +++ b/cmd/helpers/helpers.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package helpers diff --git a/cmd/migrate/down.go b/cmd/migrate/down.go index 1560a4378..2c3b50ad3 100644 --- a/cmd/migrate/down.go +++ b/cmd/migrate/down.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package migrate diff --git a/cmd/migrate/migrate_test.go b/cmd/migrate/migrate_test.go index d7ab52886..c5ba46a9c 100644 --- a/cmd/migrate/migrate_test.go +++ b/cmd/migrate/migrate_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package migrate diff --git a/cmd/migrate/root.go b/cmd/migrate/root.go index 8603222a0..d2699b4e0 100644 --- a/cmd/migrate/root.go +++ b/cmd/migrate/root.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package migrate diff --git a/cmd/migrate/status.go b/cmd/migrate/status.go index 5bfc8c8ef..9d1a22043 100644 --- a/cmd/migrate/status.go +++ b/cmd/migrate/status.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package migrate diff --git a/cmd/migrate/up.go b/cmd/migrate/up.go index bddfc5956..857a73d11 100644 --- a/cmd/migrate/up.go +++ b/cmd/migrate/up.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package migrate diff --git a/cmd/namespace/opl_generate.go b/cmd/namespace/opl_generate.go index 94bf9212b..88ab3d0a0 100644 --- a/cmd/namespace/opl_generate.go +++ b/cmd/namespace/opl_generate.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package namespace diff --git a/cmd/namespace/opl_generate_test.go b/cmd/namespace/opl_generate_test.go index d501f9002..26f48fa1a 100644 --- a/cmd/namespace/opl_generate_test.go +++ b/cmd/namespace/opl_generate_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package namespace_test diff --git a/cmd/namespace/root.go b/cmd/namespace/root.go index c3da8473a..24a8fd9da 100644 --- a/cmd/namespace/root.go +++ b/cmd/namespace/root.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package namespace diff --git a/cmd/namespace/validate.go b/cmd/namespace/validate.go index d7c38a43c..f6713f254 100644 --- a/cmd/namespace/validate.go +++ b/cmd/namespace/validate.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package namespace diff --git a/cmd/namespace/validate_test.go b/cmd/namespace/validate_test.go index 5d4c44e0d..2827e0b2e 100644 --- a/cmd/namespace/validate_test.go +++ b/cmd/namespace/validate_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package namespace diff --git a/cmd/relationtuple/create.go b/cmd/relationtuple/create.go index e446979f6..225fee3ee 100644 --- a/cmd/relationtuple/create.go +++ b/cmd/relationtuple/create.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/cmd/relationtuple/delete.go b/cmd/relationtuple/delete.go index 89b068b58..a26f014be 100644 --- a/cmd/relationtuple/delete.go +++ b/cmd/relationtuple/delete.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/cmd/relationtuple/delete_all.go b/cmd/relationtuple/delete_all.go index fa54725aa..92d3487c8 100644 --- a/cmd/relationtuple/delete_all.go +++ b/cmd/relationtuple/delete_all.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/cmd/relationtuple/delete_all_test.go b/cmd/relationtuple/delete_all_test.go index 7df06665f..b2314b110 100644 --- a/cmd/relationtuple/delete_all_test.go +++ b/cmd/relationtuple/delete_all_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/cmd/relationtuple/get.go b/cmd/relationtuple/get.go index c72d50072..b95817e47 100644 --- a/cmd/relationtuple/get.go +++ b/cmd/relationtuple/get.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/cmd/relationtuple/output.go b/cmd/relationtuple/output.go index 018787ef9..36f411469 100644 --- a/cmd/relationtuple/output.go +++ b/cmd/relationtuple/output.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/cmd/relationtuple/output_test.go b/cmd/relationtuple/output_test.go index bcfa29e4a..5057a6c7a 100644 --- a/cmd/relationtuple/output_test.go +++ b/cmd/relationtuple/output_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/cmd/relationtuple/parse.go b/cmd/relationtuple/parse.go index a33abde71..7b987f589 100644 --- a/cmd/relationtuple/parse.go +++ b/cmd/relationtuple/parse.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/cmd/relationtuple/parse_test.go b/cmd/relationtuple/parse_test.go index 38a9ebfa0..e6e704dff 100644 --- a/cmd/relationtuple/parse_test.go +++ b/cmd/relationtuple/parse_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/cmd/relationtuple/root.go b/cmd/relationtuple/root.go index 723d1580b..a71f309a7 100644 --- a/cmd/relationtuple/root.go +++ b/cmd/relationtuple/root.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/cmd/root.go b/cmd/root.go index 77885347a..5a95307ae 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd diff --git a/cmd/serve_debug_test.go b/cmd/serve_debug_test.go index 8df46a738..577ce209a 100644 --- a/cmd/serve_debug_test.go +++ b/cmd/serve_debug_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package cmd diff --git a/cmd/server/serve.go b/cmd/server/serve.go index 5e13ecb75..525442568 100644 --- a/cmd/server/serve.go +++ b/cmd/server/serve.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package server diff --git a/cmd/status/root.go b/cmd/status/root.go index 3061fe5cf..fe2ec9c4c 100644 --- a/cmd/status/root.go +++ b/cmd/status/root.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package status diff --git a/cmd/status/root_test.go b/cmd/status/root_test.go index 077dac61f..9b6c56bdb 100644 --- a/cmd/status/root_test.go +++ b/cmd/status/root_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package status diff --git a/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/index.js b/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/index.js index 63bb8458f..41becb2bc 100644 --- a/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/index.js +++ b/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/index.js @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js" diff --git a/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/main.go b/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/main.go index d94986577..bab0a8e75 100644 --- a/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/main.go +++ b/contrib/docs-code-samples/expand-api-display-access/00-create-tuples/main.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package main diff --git a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/index.js b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/index.js index 0022388a7..47f07fbfe 100644 --- a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/index.js +++ b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/index.js @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js" diff --git a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/main.go b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/main.go index 4321cecf9..1c6de4b71 100644 --- a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/main.go +++ b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/main.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package main diff --git a/contrib/docs-code-samples/expand-api-display-access/99-cleanup/index.js b/contrib/docs-code-samples/expand-api-display-access/99-cleanup/index.js index b9ded337f..da3452d80 100644 --- a/contrib/docs-code-samples/expand-api-display-access/99-cleanup/index.js +++ b/contrib/docs-code-samples/expand-api-display-access/99-cleanup/index.js @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js" diff --git a/contrib/docs-code-samples/expand-api-display-access/99-cleanup/main.go b/contrib/docs-code-samples/expand-api-display-access/99-cleanup/main.go index e89c60c7c..e3e7e6acd 100644 --- a/contrib/docs-code-samples/expand-api-display-access/99-cleanup/main.go +++ b/contrib/docs-code-samples/expand-api-display-access/99-cleanup/main.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 //go:build docscodesamples diff --git a/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/index.js b/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/index.js index 9c76c3d7a..81d46cbc5 100644 --- a/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/index.js +++ b/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/index.js @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js" diff --git a/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/main.go b/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/main.go index 0715a83aa..7cf292d55 100644 --- a/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/main.go +++ b/contrib/docs-code-samples/list-api-display-objects/00-create-tuples/main.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package main diff --git a/contrib/docs-code-samples/list-api-display-objects/01-list-PM/index.js b/contrib/docs-code-samples/list-api-display-objects/01-list-PM/index.js index 132afcb64..e97a7e307 100644 --- a/contrib/docs-code-samples/list-api-display-objects/01-list-PM/index.js +++ b/contrib/docs-code-samples/list-api-display-objects/01-list-PM/index.js @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js" diff --git a/contrib/docs-code-samples/list-api-display-objects/01-list-PM/main.go b/contrib/docs-code-samples/list-api-display-objects/01-list-PM/main.go index 35370b511..0e5afff33 100644 --- a/contrib/docs-code-samples/list-api-display-objects/01-list-PM/main.go +++ b/contrib/docs-code-samples/list-api-display-objects/01-list-PM/main.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package main diff --git a/contrib/docs-code-samples/list-api-display-objects/02-list-coffee-break/index.js b/contrib/docs-code-samples/list-api-display-objects/02-list-coffee-break/index.js index 033ebdc6a..cec4cbfef 100644 --- a/contrib/docs-code-samples/list-api-display-objects/02-list-coffee-break/index.js +++ b/contrib/docs-code-samples/list-api-display-objects/02-list-coffee-break/index.js @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js" diff --git a/contrib/docs-code-samples/list-api-display-objects/02-list-coffee-break/main.go b/contrib/docs-code-samples/list-api-display-objects/02-list-coffee-break/main.go index bc6d30671..d0d6556de 100644 --- a/contrib/docs-code-samples/list-api-display-objects/02-list-coffee-break/main.go +++ b/contrib/docs-code-samples/list-api-display-objects/02-list-coffee-break/main.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package main diff --git a/contrib/docs-code-samples/list-api-display-objects/99-cleanup/index.js b/contrib/docs-code-samples/list-api-display-objects/99-cleanup/index.js index 4486a19fc..91e1c69c5 100644 --- a/contrib/docs-code-samples/list-api-display-objects/99-cleanup/index.js +++ b/contrib/docs-code-samples/list-api-display-objects/99-cleanup/index.js @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js" diff --git a/contrib/docs-code-samples/list-api-display-objects/99-cleanup/main.go b/contrib/docs-code-samples/list-api-display-objects/99-cleanup/main.go index bd95d863f..f8397c952 100644 --- a/contrib/docs-code-samples/list-api-display-objects/99-cleanup/main.go +++ b/contrib/docs-code-samples/list-api-display-objects/99-cleanup/main.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 //go:build docscodesamples diff --git a/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/index.js b/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/index.js index 33da25cdf..d8f7bc617 100644 --- a/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/index.js +++ b/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/index.js @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js" diff --git a/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/main.go b/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/main.go index 9cbb5441f..86429ad17 100644 --- a/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/main.go +++ b/contrib/docs-code-samples/simple-access-check-guide/00-write-direct-access/main.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package main diff --git a/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/index.js b/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/index.js index 018397f75..1384b8da0 100644 --- a/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/index.js +++ b/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/index.js @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js" diff --git a/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/main.go b/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/main.go index 1c87760de..1d2fa8f0b 100644 --- a/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/main.go +++ b/contrib/docs-code-samples/simple-access-check-guide/01-check-direct-access/main.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package main diff --git a/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/index.js b/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/index.js index e4a1fb563..1f7f24905 100644 --- a/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/index.js +++ b/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/index.js @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js" diff --git a/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/main.go b/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/main.go index 725c3288e..f460c0145 100644 --- a/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/main.go +++ b/contrib/docs-code-samples/simple-access-check-guide/99-cleanup/main.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package main diff --git a/contrib/namespace-type-lib/index.d.ts b/contrib/namespace-type-lib/index.d.ts index 41f5dd55d..bb159ee35 100644 --- a/contrib/namespace-type-lib/index.d.ts +++ b/contrib/namespace-type-lib/index.d.ts @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 /// diff --git a/contrib/namespace-type-lib/test.ts b/contrib/namespace-type-lib/test.ts index 15d844f19..10f50de74 100644 --- a/contrib/namespace-type-lib/test.ts +++ b/contrib/namespace-type-lib/test.ts @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 import { Namespace, SubjectSet, Context } from "@ory/keto-namespace-types" diff --git a/contrib/rewrites-example/namespaces.keto.ts b/contrib/rewrites-example/namespaces.keto.ts index 10523d15f..7ae9cae94 100644 --- a/contrib/rewrites-example/namespaces.keto.ts +++ b/contrib/rewrites-example/namespaces.keto.ts @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 import { Namespace, SubjectSet, Context } from "@ory/keto-namespace-types" diff --git a/doc.go b/doc.go index 7ff65b40b..63207783f 100644 --- a/doc.go +++ b/doc.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 // Package main ORY Keto diff --git a/doc_swagger.go b/doc_swagger.go index 9d98dc4d7..c5ab14edb 100644 --- a/doc_swagger.go +++ b/doc_swagger.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package main diff --git a/embedx/schemas.go b/embedx/schemas.go index 5077ee82c..7b4c4dc6b 100644 --- a/embedx/schemas.go +++ b/embedx/schemas.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package embedx diff --git a/embedx/schemas_test.go b/embedx/schemas_test.go index bea06a96f..d4b578886 100644 --- a/embedx/schemas_test.go +++ b/embedx/schemas_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package embedx diff --git a/internal/check/bench_test.go b/internal/check/bench_test.go index 993e240b7..23b962bfa 100644 --- a/internal/check/bench_test.go +++ b/internal/check/bench_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package check_test diff --git a/internal/check/binop.go b/internal/check/binop.go index 1593557d6..75ba84828 100644 --- a/internal/check/binop.go +++ b/internal/check/binop.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package check diff --git a/internal/check/checkgroup/checkgroup_test.go b/internal/check/checkgroup/checkgroup_test.go index 0ed489da5..3dd1980cb 100644 --- a/internal/check/checkgroup/checkgroup_test.go +++ b/internal/check/checkgroup/checkgroup_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package checkgroup_test diff --git a/internal/check/checkgroup/concurrent_checkgroup.go b/internal/check/checkgroup/concurrent_checkgroup.go index 762549e4b..22c9e6cdf 100644 --- a/internal/check/checkgroup/concurrent_checkgroup.go +++ b/internal/check/checkgroup/concurrent_checkgroup.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package checkgroup diff --git a/internal/check/checkgroup/definitions.go b/internal/check/checkgroup/definitions.go index 0eac0924a..0f43569b0 100644 --- a/internal/check/checkgroup/definitions.go +++ b/internal/check/checkgroup/definitions.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package checkgroup diff --git a/internal/check/checkgroup/membership_string.go b/internal/check/checkgroup/membership_string.go index 3fc6fd662..e6c36bc9b 100644 --- a/internal/check/checkgroup/membership_string.go +++ b/internal/check/checkgroup/membership_string.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 // Code generated by "stringer -type Membership"; DO NOT EDIT. diff --git a/internal/check/checkgroup/testmain_test.go b/internal/check/checkgroup/testmain_test.go index 171494f7e..8f6430c6a 100644 --- a/internal/check/checkgroup/testmain_test.go +++ b/internal/check/checkgroup/testmain_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package checkgroup_test diff --git a/internal/check/checkgroup/workerpool_test.go b/internal/check/checkgroup/workerpool_test.go index 7a052aa20..0f30fda2c 100644 --- a/internal/check/checkgroup/workerpool_test.go +++ b/internal/check/checkgroup/workerpool_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package checkgroup_test diff --git a/internal/check/engine.go b/internal/check/engine.go index 263bfe62e..b42145a88 100644 --- a/internal/check/engine.go +++ b/internal/check/engine.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package check diff --git a/internal/check/engine_test.go b/internal/check/engine_test.go index b421d65c5..4d31da900 100644 --- a/internal/check/engine_test.go +++ b/internal/check/engine_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package check_test diff --git a/internal/check/handler.go b/internal/check/handler.go index 622ea793c..eeddf0499 100644 --- a/internal/check/handler.go +++ b/internal/check/handler.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package check diff --git a/internal/check/handler_test.go b/internal/check/handler_test.go index b3cedf4b5..6d1593872 100644 --- a/internal/check/handler_test.go +++ b/internal/check/handler_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package check_test diff --git a/internal/check/performance_test.go b/internal/check/performance_test.go index ce50f04a7..2bb37da16 100644 --- a/internal/check/performance_test.go +++ b/internal/check/performance_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package check_test diff --git a/internal/check/rewrites.go b/internal/check/rewrites.go index a1b36fa9b..d70dd4c85 100644 --- a/internal/check/rewrites.go +++ b/internal/check/rewrites.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package check diff --git a/internal/check/rewrites_test.go b/internal/check/rewrites_test.go index bdff9c665..48cab738b 100644 --- a/internal/check/rewrites_test.go +++ b/internal/check/rewrites_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package check_test diff --git a/internal/check/testmain_test.go b/internal/check/testmain_test.go index 0e3ab7c81..a0065a88b 100644 --- a/internal/check/testmain_test.go +++ b/internal/check/testmain_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package check_test diff --git a/internal/driver/config/buildinfo.go b/internal/driver/config/buildinfo.go index 54a894387..184d9636d 100644 --- a/internal/driver/config/buildinfo.go +++ b/internal/driver/config/buildinfo.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package config diff --git a/internal/driver/config/namespace_memory.go b/internal/driver/config/namespace_memory.go index e78420646..38f344fdd 100644 --- a/internal/driver/config/namespace_memory.go +++ b/internal/driver/config/namespace_memory.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package config diff --git a/internal/driver/config/namespace_memory_test.go b/internal/driver/config/namespace_memory_test.go index 281842d07..cc6b1955e 100644 --- a/internal/driver/config/namespace_memory_test.go +++ b/internal/driver/config/namespace_memory_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package config diff --git a/internal/driver/config/namespace_watcher.go b/internal/driver/config/namespace_watcher.go index 9c8643bf9..4835dbb7e 100644 --- a/internal/driver/config/namespace_watcher.go +++ b/internal/driver/config/namespace_watcher.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package config diff --git a/internal/driver/config/namespace_watcher_test.go b/internal/driver/config/namespace_watcher_test.go index 1a5d8d971..565aab8df 100644 --- a/internal/driver/config/namespace_watcher_test.go +++ b/internal/driver/config/namespace_watcher_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package config diff --git a/internal/driver/config/opl_config_namespace_watcher.go b/internal/driver/config/opl_config_namespace_watcher.go index 515e706f6..4dbde3c69 100644 --- a/internal/driver/config/opl_config_namespace_watcher.go +++ b/internal/driver/config/opl_config_namespace_watcher.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package config diff --git a/internal/driver/config/provider.go b/internal/driver/config/provider.go index c6729e306..e7748c1db 100644 --- a/internal/driver/config/provider.go +++ b/internal/driver/config/provider.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package config diff --git a/internal/driver/config/provider_test.go b/internal/driver/config/provider_test.go index f90b5dd67..302d39958 100644 --- a/internal/driver/config/provider_test.go +++ b/internal/driver/config/provider_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package config diff --git a/internal/driver/daemon.go b/internal/driver/daemon.go index 3b2df1991..b9cc2b1f5 100644 --- a/internal/driver/daemon.go +++ b/internal/driver/daemon.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package driver diff --git a/internal/driver/daemon_test.go b/internal/driver/daemon_test.go index 17e1b2ad5..0c46ebdd7 100644 --- a/internal/driver/daemon_test.go +++ b/internal/driver/daemon_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package driver diff --git a/internal/driver/pop_connection.go b/internal/driver/pop_connection.go index d076a1b76..4d1aa4556 100644 --- a/internal/driver/pop_connection.go +++ b/internal/driver/pop_connection.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package driver diff --git a/internal/driver/registry.go b/internal/driver/registry.go index 8ee7fff9f..ae9ac1c94 100644 --- a/internal/driver/registry.go +++ b/internal/driver/registry.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package driver diff --git a/internal/driver/registry_default.go b/internal/driver/registry_default.go index 76c578cae..e860aeddd 100644 --- a/internal/driver/registry_default.go +++ b/internal/driver/registry_default.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package driver diff --git a/internal/driver/registry_factory.go b/internal/driver/registry_factory.go index c40fb0b45..a0781f565 100644 --- a/internal/driver/registry_factory.go +++ b/internal/driver/registry_factory.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package driver diff --git a/internal/driver/selfsigned_cert_bench_test.go b/internal/driver/selfsigned_cert_bench_test.go index 4cc485e3f..91ff1a33b 100644 --- a/internal/driver/selfsigned_cert_bench_test.go +++ b/internal/driver/selfsigned_cert_bench_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package driver diff --git a/internal/e2e/cli_client_test.go b/internal/e2e/cli_client_test.go index 6889b999e..5ea581fd8 100644 --- a/internal/e2e/cli_client_test.go +++ b/internal/e2e/cli_client_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package e2e diff --git a/internal/e2e/full_suit_test.go b/internal/e2e/full_suit_test.go index 0cb2aa9a5..d40bb04c0 100644 --- a/internal/e2e/full_suit_test.go +++ b/internal/e2e/full_suit_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package e2e diff --git a/internal/e2e/grpc_client_test.go b/internal/e2e/grpc_client_test.go index 9921d5978..28a48a983 100644 --- a/internal/e2e/grpc_client_test.go +++ b/internal/e2e/grpc_client_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package e2e diff --git a/internal/e2e/helpers.go b/internal/e2e/helpers.go index fb98e485e..96bcef55a 100644 --- a/internal/e2e/helpers.go +++ b/internal/e2e/helpers.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package e2e diff --git a/internal/e2e/rest_client_test.go b/internal/e2e/rest_client_test.go index be49603dd..9dcaa3510 100644 --- a/internal/e2e/rest_client_test.go +++ b/internal/e2e/rest_client_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package e2e diff --git a/internal/e2e/sdk_client_test.go b/internal/e2e/sdk_client_test.go index 065f7a88a..a81ed1e0a 100644 --- a/internal/e2e/sdk_client_test.go +++ b/internal/e2e/sdk_client_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package e2e diff --git a/internal/e2e/testcases_test.go b/internal/e2e/testcases_test.go index 9a0a7fb58..da964ce55 100644 --- a/internal/e2e/testcases_test.go +++ b/internal/e2e/testcases_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package e2e diff --git a/internal/e2e/transaction_cases_test.go b/internal/e2e/transaction_cases_test.go index 76e0d5910..4e4e7e5b0 100644 --- a/internal/e2e/transaction_cases_test.go +++ b/internal/e2e/transaction_cases_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package e2e diff --git a/internal/expand/engine.go b/internal/expand/engine.go index 7a2ae0157..16eb95606 100644 --- a/internal/expand/engine.go +++ b/internal/expand/engine.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package expand diff --git a/internal/expand/engine_test.go b/internal/expand/engine_test.go index a255cf7ed..8679fd717 100644 --- a/internal/expand/engine_test.go +++ b/internal/expand/engine_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package expand_test diff --git a/internal/expand/handler.go b/internal/expand/handler.go index fa921a070..2de981e13 100644 --- a/internal/expand/handler.go +++ b/internal/expand/handler.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package expand diff --git a/internal/expand/handler_test.go b/internal/expand/handler_test.go index cf2d6733a..2b64e907c 100644 --- a/internal/expand/handler_test.go +++ b/internal/expand/handler_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package expand_test diff --git a/internal/expand/testhelper.go b/internal/expand/testhelper.go index 0d44956c7..142af22ea 100644 --- a/internal/expand/testhelper.go +++ b/internal/expand/testhelper.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package expand diff --git a/internal/httpclient/.openapi-generator/FILES b/internal/httpclient/.openapi-generator/FILES index c0e038de7..711017660 100644 --- a/internal/httpclient/.openapi-generator/FILES +++ b/internal/httpclient/.openapi-generator/FILES @@ -11,7 +11,6 @@ configuration.go docs/CheckOplSyntaxResult.md docs/CheckPermissionResult.md docs/CreateRelationshipBody.md -docs/ErrorGeneric.md docs/ExpandedPermissionTree.md docs/InlineResponse200.md docs/InlineResponse2001.md @@ -20,7 +19,6 @@ docs/MetadataApi.md docs/OryKetoOplV1alpha1ParseError.md docs/OryKetoOplV1alpha1SourcePosition.md docs/OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse.md -docs/OryKetoRelationTuplesV1alpha2ErrorObject.md docs/OryKetoRelationTuplesV1alpha2ExpandResponse.md docs/OryKetoRelationTuplesV1alpha2GetVersionResponse.md docs/OryKetoRelationTuplesV1alpha2Namespace.md @@ -42,7 +40,6 @@ go.sum model_check_opl_syntax_result.go model_check_permission_result.go model_create_relationship_body.go -model_error_generic.go model_expanded_permission_tree.go model_inline_response_200.go model_inline_response_200_1.go @@ -50,7 +47,6 @@ model_inline_response_503.go model_ory_keto_opl_v1alpha1_parse_error.go model_ory_keto_opl_v1alpha1_source_position.go model_ory_keto_relation_tuples_v1alpha2_create_relation_tuple_response.go -model_ory_keto_relation_tuples_v1alpha2_error_object.go model_ory_keto_relation_tuples_v1alpha2_expand_response.go model_ory_keto_relation_tuples_v1alpha2_get_version_response.go model_ory_keto_relation_tuples_v1alpha2_namespace.go diff --git a/internal/httpclient/README.md b/internal/httpclient/README.md index caa828460..2902ee708 100644 --- a/internal/httpclient/README.md +++ b/internal/httpclient/README.md @@ -100,7 +100,6 @@ Class | Method | HTTP request | Description - [CheckOplSyntaxResult](docs/CheckOplSyntaxResult.md) - [CheckPermissionResult](docs/CheckPermissionResult.md) - [CreateRelationshipBody](docs/CreateRelationshipBody.md) - - [ErrorGeneric](docs/ErrorGeneric.md) - [ExpandedPermissionTree](docs/ExpandedPermissionTree.md) - [InlineResponse200](docs/InlineResponse200.md) - [InlineResponse2001](docs/InlineResponse2001.md) @@ -108,7 +107,6 @@ Class | Method | HTTP request | Description - [OryKetoOplV1alpha1ParseError](docs/OryKetoOplV1alpha1ParseError.md) - [OryKetoOplV1alpha1SourcePosition](docs/OryKetoOplV1alpha1SourcePosition.md) - [OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse](docs/OryKetoRelationTuplesV1alpha2CreateRelationTupleResponse.md) - - [OryKetoRelationTuplesV1alpha2ErrorObject](docs/OryKetoRelationTuplesV1alpha2ErrorObject.md) - [OryKetoRelationTuplesV1alpha2ExpandResponse](docs/OryKetoRelationTuplesV1alpha2ExpandResponse.md) - [OryKetoRelationTuplesV1alpha2GetVersionResponse](docs/OryKetoRelationTuplesV1alpha2GetVersionResponse.md) - [OryKetoRelationTuplesV1alpha2Namespace](docs/OryKetoRelationTuplesV1alpha2Namespace.md) diff --git a/internal/httpclient/api/openapi.yaml b/internal/httpclient/api/openapi.yaml index df0f76a73..b5231386e 100644 --- a/internal/httpclient/api/openapi.yaml +++ b/internal/httpclient/api/openapi.yaml @@ -77,12 +77,6 @@ paths: responses: "204": description: An empty response. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: Generic error summary: Deletes relationships based on relation query tags: - relationship @@ -103,12 +97,6 @@ paths: responses: "204": description: An empty response. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: Generic error summary: Writes one or more relationships in a single transaction. tags: - relationship @@ -129,12 +117,6 @@ paths: schema: $ref: '#/components/schemas/relationship' description: The created relationship. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: Generic error summary: Creates a relationship tags: - relationship @@ -205,12 +187,6 @@ paths: schema: $ref: '#/components/schemas/relationshipNamespaces' description: The list of namespaces. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: Generic error summary: Lists Namespaces tags: - relationship @@ -231,12 +207,6 @@ paths: schema: $ref: '#/components/schemas/checkOplSyntaxResult' description: The result of the syntax checker - default: - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: Generic error summary: Performs a syntax check request. tags: - relationship @@ -336,12 +306,6 @@ paths: schema: $ref: '#/components/schemas/relationships' description: The list of relationships. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: Generic error summary: Lists ACL relationships. tags: - relationship @@ -441,12 +405,6 @@ paths: $ref: '#/components/schemas/checkPermissionResult' description: The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: Generic error summary: Performs an authorization check. tags: - permission @@ -480,12 +438,6 @@ paths: $ref: '#/components/schemas/checkPermissionResult' description: The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: Generic error summary: Performs an authorization check. tags: - permission @@ -585,12 +537,6 @@ paths: $ref: '#/components/schemas/checkPermissionResult' description: The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: Generic error summary: Performs an authorization check. tags: - permission @@ -624,12 +570,6 @@ paths: $ref: '#/components/schemas/checkPermissionResult' description: The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: Generic error summary: Performs an authorization check. tags: - permission @@ -687,12 +627,6 @@ paths: $ref: '#/components/schemas/expandedPermissionTree' description: The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/errorGeneric' - description: Generic error summary: Expands the subject set into a tree of subjects. tags: - permission @@ -777,11 +711,6 @@ components: subject_set: $ref: '#/components/schemas/subjectSet' type: object - errorGeneric: - properties: - error: - $ref: '#/components/schemas/ory.keto.relation_tuples.v1alpha2.ErrorObject' - type: object expandedPermissionTree: example: tuple: @@ -857,55 +786,6 @@ components: type: object ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse: type: object - ory.keto.relation_tuples.v1alpha2.ErrorObject: - properties: - code: - description: The status code - example: 404 - format: int64 - pattern: ^[0-9]$ - title: code - type: integer - debug: - description: |- - This field is often not exposed to protect against leaking - sensitive information - example: SQL field 'foo' is not a bool - title: Debug information - type: string - details: - additionalProperties: - type: string - title: Further error details - type: object - id: - description: Useful when trying to identify various errors in application - logic. - title: The error ID - type: string - message: - description: Response message - example: The resource could not be found - title: message - type: string - reason: - description: A human-readable reason for the error - example: User with ID 1234 does not exist. - title: The reason for the failure - type: string - request: - description: |- - The request ID is often exposed internally in order to trace - errors across service architectures. This is often a UUID. - example: d7ef54b1-ec15-46e6-bccb-524b82c035e6 - title: The request ID - type: string - status: - description: The human-readable description of the code. - example: Not Found - title: The status description - type: string - type: object ory.keto.relation_tuples.v1alpha2.ExpandResponse: description: The response for a ExpandService.Expand RPC. properties: diff --git a/internal/httpclient/api_permission.go b/internal/httpclient/api_permission.go index 666119806..a4f1d382b 100644 --- a/internal/httpclient/api_permission.go +++ b/internal/httpclient/api_permission.go @@ -253,15 +253,7 @@ func (a *PermissionApiService) CheckPermissionExecute(r PermissionApiApiCheckPer return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -435,15 +427,7 @@ func (a *PermissionApiService) CheckPermissionOrErrorExecute(r PermissionApiApiC return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr } - newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -580,13 +564,6 @@ func (a *PermissionApiService) ExpandPermissionsExecute(r PermissionApiApiExpand body: localVarBody, error: localVarHTTPResponse.Status, } - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -706,15 +683,7 @@ func (a *PermissionApiService) PostCheckPermissionExecute(r PermissionApiApiPost return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr } - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -834,15 +803,7 @@ func (a *PermissionApiService) PostCheckPermissionOrErrorExecute(r PermissionApi return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr } - newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/internal/httpclient/api_relationship.go b/internal/httpclient/api_relationship.go index 434872ced..70aab4337 100644 --- a/internal/httpclient/api_relationship.go +++ b/internal/httpclient/api_relationship.go @@ -203,13 +203,6 @@ func (a *RelationshipApiService) CheckOplSyntaxExecute(r RelationshipApiApiCheck body: localVarBody, error: localVarHTTPResponse.Status, } - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -321,13 +314,6 @@ func (a *RelationshipApiService) CreateRelationshipExecute(r RelationshipApiApiC body: localVarBody, error: localVarHTTPResponse.Status, } - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -454,7 +440,7 @@ func (a *RelationshipApiService) DeleteRelationshipsExecute(r RelationshipApiApi } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -483,13 +469,6 @@ func (a *RelationshipApiService) DeleteRelationshipsExecute(r RelationshipApiApi body: localVarBody, error: localVarHTTPResponse.Status, } - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v return localVarHTTPResponse, newErr } @@ -654,13 +633,6 @@ func (a *RelationshipApiService) GetRelationshipsExecute(r RelationshipApiApiGet body: localVarBody, error: localVarHTTPResponse.Status, } - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -762,13 +734,6 @@ func (a *RelationshipApiService) ListRelationshipNamespacesExecute(r Relationshi body: localVarBody, error: localVarHTTPResponse.Status, } - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -847,7 +812,7 @@ func (a *RelationshipApiService) PatchRelationshipsExecute(r RelationshipApiApiP } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -878,13 +843,6 @@ func (a *RelationshipApiService) PatchRelationshipsExecute(r RelationshipApiApiP body: localVarBody, error: localVarHTTPResponse.Status, } - var v ErrorGeneric - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v return localVarHTTPResponse, newErr } diff --git a/internal/httpclient/docs/ErrorGeneric.md b/internal/httpclient/docs/ErrorGeneric.md deleted file mode 100644 index 791bd6dac..000000000 --- a/internal/httpclient/docs/ErrorGeneric.md +++ /dev/null @@ -1,56 +0,0 @@ -# ErrorGeneric - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | Pointer to [**OryKetoRelationTuplesV1alpha2ErrorObject**](OryKetoRelationTuplesV1alpha2ErrorObject.md) | | [optional] - -## Methods - -### NewErrorGeneric - -`func NewErrorGeneric() *ErrorGeneric` - -NewErrorGeneric instantiates a new ErrorGeneric object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewErrorGenericWithDefaults - -`func NewErrorGenericWithDefaults() *ErrorGeneric` - -NewErrorGenericWithDefaults instantiates a new ErrorGeneric object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetError - -`func (o *ErrorGeneric) GetError() OryKetoRelationTuplesV1alpha2ErrorObject` - -GetError returns the Error field if non-nil, zero value otherwise. - -### GetErrorOk - -`func (o *ErrorGeneric) GetErrorOk() (*OryKetoRelationTuplesV1alpha2ErrorObject, bool)` - -GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetError - -`func (o *ErrorGeneric) SetError(v OryKetoRelationTuplesV1alpha2ErrorObject)` - -SetError sets Error field to given value. - -### HasError - -`func (o *ErrorGeneric) HasError() bool` - -HasError returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2ErrorObject.md b/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2ErrorObject.md deleted file mode 100644 index 9c26a646c..000000000 --- a/internal/httpclient/docs/OryKetoRelationTuplesV1alpha2ErrorObject.md +++ /dev/null @@ -1,238 +0,0 @@ -# OryKetoRelationTuplesV1alpha2ErrorObject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Code** | Pointer to **int64** | The status code | [optional] -**Debug** | Pointer to **string** | This field is often not exposed to protect against leaking sensitive information | [optional] -**Details** | Pointer to **map[string]string** | | [optional] -**Id** | Pointer to **string** | Useful when trying to identify various errors in application logic. | [optional] -**Message** | Pointer to **string** | Response message | [optional] -**Reason** | Pointer to **string** | A human-readable reason for the error | [optional] -**Request** | Pointer to **string** | The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. | [optional] -**Status** | Pointer to **string** | The human-readable description of the code. | [optional] - -## Methods - -### NewOryKetoRelationTuplesV1alpha2ErrorObject - -`func NewOryKetoRelationTuplesV1alpha2ErrorObject() *OryKetoRelationTuplesV1alpha2ErrorObject` - -NewOryKetoRelationTuplesV1alpha2ErrorObject instantiates a new OryKetoRelationTuplesV1alpha2ErrorObject object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewOryKetoRelationTuplesV1alpha2ErrorObjectWithDefaults - -`func NewOryKetoRelationTuplesV1alpha2ErrorObjectWithDefaults() *OryKetoRelationTuplesV1alpha2ErrorObject` - -NewOryKetoRelationTuplesV1alpha2ErrorObjectWithDefaults instantiates a new OryKetoRelationTuplesV1alpha2ErrorObject object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCode - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetCode() int64` - -GetCode returns the Code field if non-nil, zero value otherwise. - -### GetCodeOk - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetCodeOk() (*int64, bool)` - -GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCode - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetCode(v int64)` - -SetCode sets Code field to given value. - -### HasCode - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasCode() bool` - -HasCode returns a boolean if a field has been set. - -### GetDebug - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetDebug() string` - -GetDebug returns the Debug field if non-nil, zero value otherwise. - -### GetDebugOk - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetDebugOk() (*string, bool)` - -GetDebugOk returns a tuple with the Debug field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDebug - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetDebug(v string)` - -SetDebug sets Debug field to given value. - -### HasDebug - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasDebug() bool` - -HasDebug returns a boolean if a field has been set. - -### GetDetails - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetDetails() map[string]string` - -GetDetails returns the Details field if non-nil, zero value otherwise. - -### GetDetailsOk - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetDetailsOk() (*map[string]string, bool)` - -GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDetails - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetDetails(v map[string]string)` - -SetDetails sets Details field to given value. - -### HasDetails - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasDetails() bool` - -HasDetails returns a boolean if a field has been set. - -### GetId - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasId() bool` - -HasId returns a boolean if a field has been set. - -### GetMessage - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetMessage(v string)` - -SetMessage sets Message field to given value. - -### HasMessage - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasMessage() bool` - -HasMessage returns a boolean if a field has been set. - -### GetReason - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetReason() string` - -GetReason returns the Reason field if non-nil, zero value otherwise. - -### GetReasonOk - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetReasonOk() (*string, bool)` - -GetReasonOk returns a tuple with the Reason field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetReason - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetReason(v string)` - -SetReason sets Reason field to given value. - -### HasReason - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasReason() bool` - -HasReason returns a boolean if a field has been set. - -### GetRequest - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetRequest() string` - -GetRequest returns the Request field if non-nil, zero value otherwise. - -### GetRequestOk - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetRequestOk() (*string, bool)` - -GetRequestOk returns a tuple with the Request field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRequest - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetRequest(v string)` - -SetRequest sets Request field to given value. - -### HasRequest - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasRequest() bool` - -HasRequest returns a boolean if a field has been set. - -### GetStatus - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetStatus() string` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetStatusOk() (*string, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetStatus(v string)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/internal/httpclient/docs/RelationshipApi.md b/internal/httpclient/docs/RelationshipApi.md index 182bc2223..fed9a1969 100644 --- a/internal/httpclient/docs/RelationshipApi.md +++ b/internal/httpclient/docs/RelationshipApi.md @@ -208,7 +208,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -411,7 +411,7 @@ No authorization required ### HTTP request headers - **Content-Type**: application/json -- **Accept**: application/json +- **Accept**: Not defined [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) diff --git a/internal/httpclient/model_error_generic.go b/internal/httpclient/model_error_generic.go deleted file mode 100644 index 5031187e7..000000000 --- a/internal/httpclient/model_error_generic.go +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Ory Keto API - * - * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. - * - * API version: 1.0.0 - * Contact: hi@ory.sh - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// ErrorGeneric struct for ErrorGeneric -type ErrorGeneric struct { - Error *OryKetoRelationTuplesV1alpha2ErrorObject `json:"error,omitempty"` -} - -// NewErrorGeneric instantiates a new ErrorGeneric object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewErrorGeneric() *ErrorGeneric { - this := ErrorGeneric{} - return &this -} - -// NewErrorGenericWithDefaults instantiates a new ErrorGeneric object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewErrorGenericWithDefaults() *ErrorGeneric { - this := ErrorGeneric{} - return &this -} - -// GetError returns the Error field value if set, zero value otherwise. -func (o *ErrorGeneric) GetError() OryKetoRelationTuplesV1alpha2ErrorObject { - if o == nil || o.Error == nil { - var ret OryKetoRelationTuplesV1alpha2ErrorObject - return ret - } - return *o.Error -} - -// GetErrorOk returns a tuple with the Error field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ErrorGeneric) GetErrorOk() (*OryKetoRelationTuplesV1alpha2ErrorObject, bool) { - if o == nil || o.Error == nil { - return nil, false - } - return o.Error, true -} - -// HasError returns a boolean if a field has been set. -func (o *ErrorGeneric) HasError() bool { - if o != nil && o.Error != nil { - return true - } - - return false -} - -// SetError gets a reference to the given OryKetoRelationTuplesV1alpha2ErrorObject and assigns it to the Error field. -func (o *ErrorGeneric) SetError(v OryKetoRelationTuplesV1alpha2ErrorObject) { - o.Error = &v -} - -func (o ErrorGeneric) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Error != nil { - toSerialize["error"] = o.Error - } - return json.Marshal(toSerialize) -} - -type NullableErrorGeneric struct { - value *ErrorGeneric - isSet bool -} - -func (v NullableErrorGeneric) Get() *ErrorGeneric { - return v.value -} - -func (v *NullableErrorGeneric) Set(val *ErrorGeneric) { - v.value = val - v.isSet = true -} - -func (v NullableErrorGeneric) IsSet() bool { - return v.isSet -} - -func (v *NullableErrorGeneric) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableErrorGeneric(val *ErrorGeneric) *NullableErrorGeneric { - return &NullableErrorGeneric{value: val, isSet: true} -} - -func (v NullableErrorGeneric) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableErrorGeneric) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_error_object.go b/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_error_object.go deleted file mode 100644 index cc308fca7..000000000 --- a/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_error_object.go +++ /dev/null @@ -1,373 +0,0 @@ -/* - * Ory Keto API - * - * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. - * - * API version: 1.0.0 - * Contact: hi@ory.sh - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" -) - -// OryKetoRelationTuplesV1alpha2ErrorObject struct for OryKetoRelationTuplesV1alpha2ErrorObject -type OryKetoRelationTuplesV1alpha2ErrorObject struct { - // The status code - Code *int64 `json:"code,omitempty"` - // This field is often not exposed to protect against leaking sensitive information - Debug *string `json:"debug,omitempty"` - Details *map[string]string `json:"details,omitempty"` - // Useful when trying to identify various errors in application logic. - Id *string `json:"id,omitempty"` - // Response message - Message *string `json:"message,omitempty"` - // A human-readable reason for the error - Reason *string `json:"reason,omitempty"` - // The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. - Request *string `json:"request,omitempty"` - // The human-readable description of the code. - Status *string `json:"status,omitempty"` -} - -// NewOryKetoRelationTuplesV1alpha2ErrorObject instantiates a new OryKetoRelationTuplesV1alpha2ErrorObject object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewOryKetoRelationTuplesV1alpha2ErrorObject() *OryKetoRelationTuplesV1alpha2ErrorObject { - this := OryKetoRelationTuplesV1alpha2ErrorObject{} - return &this -} - -// NewOryKetoRelationTuplesV1alpha2ErrorObjectWithDefaults instantiates a new OryKetoRelationTuplesV1alpha2ErrorObject object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewOryKetoRelationTuplesV1alpha2ErrorObjectWithDefaults() *OryKetoRelationTuplesV1alpha2ErrorObject { - this := OryKetoRelationTuplesV1alpha2ErrorObject{} - return &this -} - -// GetCode returns the Code field value if set, zero value otherwise. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetCode() int64 { - if o == nil || o.Code == nil { - var ret int64 - return ret - } - return *o.Code -} - -// GetCodeOk returns a tuple with the Code field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetCodeOk() (*int64, bool) { - if o == nil || o.Code == nil { - return nil, false - } - return o.Code, true -} - -// HasCode returns a boolean if a field has been set. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasCode() bool { - if o != nil && o.Code != nil { - return true - } - - return false -} - -// SetCode gets a reference to the given int64 and assigns it to the Code field. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetCode(v int64) { - o.Code = &v -} - -// GetDebug returns the Debug field value if set, zero value otherwise. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetDebug() string { - if o == nil || o.Debug == nil { - var ret string - return ret - } - return *o.Debug -} - -// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetDebugOk() (*string, bool) { - if o == nil || o.Debug == nil { - return nil, false - } - return o.Debug, true -} - -// HasDebug returns a boolean if a field has been set. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasDebug() bool { - if o != nil && o.Debug != nil { - return true - } - - return false -} - -// SetDebug gets a reference to the given string and assigns it to the Debug field. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetDebug(v string) { - o.Debug = &v -} - -// GetDetails returns the Details field value if set, zero value otherwise. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetDetails() map[string]string { - if o == nil || o.Details == nil { - var ret map[string]string - return ret - } - return *o.Details -} - -// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetDetailsOk() (*map[string]string, bool) { - if o == nil || o.Details == nil { - return nil, false - } - return o.Details, true -} - -// HasDetails returns a boolean if a field has been set. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasDetails() bool { - if o != nil && o.Details != nil { - return true - } - - return false -} - -// SetDetails gets a reference to the given map[string]string and assigns it to the Details field. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetDetails(v map[string]string) { - o.Details = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetId() string { - if o == nil || o.Id == nil { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetIdOk() (*string, bool) { - if o == nil || o.Id == nil { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasId() bool { - if o != nil && o.Id != nil { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetId(v string) { - o.Id = &v -} - -// GetMessage returns the Message field value if set, zero value otherwise. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetMessage() string { - if o == nil || o.Message == nil { - var ret string - return ret - } - return *o.Message -} - -// GetMessageOk returns a tuple with the Message field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetMessageOk() (*string, bool) { - if o == nil || o.Message == nil { - return nil, false - } - return o.Message, true -} - -// HasMessage returns a boolean if a field has been set. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasMessage() bool { - if o != nil && o.Message != nil { - return true - } - - return false -} - -// SetMessage gets a reference to the given string and assigns it to the Message field. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetMessage(v string) { - o.Message = &v -} - -// GetReason returns the Reason field value if set, zero value otherwise. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetReason() string { - if o == nil || o.Reason == nil { - var ret string - return ret - } - return *o.Reason -} - -// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetReasonOk() (*string, bool) { - if o == nil || o.Reason == nil { - return nil, false - } - return o.Reason, true -} - -// HasReason returns a boolean if a field has been set. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasReason() bool { - if o != nil && o.Reason != nil { - return true - } - - return false -} - -// SetReason gets a reference to the given string and assigns it to the Reason field. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetReason(v string) { - o.Reason = &v -} - -// GetRequest returns the Request field value if set, zero value otherwise. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetRequest() string { - if o == nil || o.Request == nil { - var ret string - return ret - } - return *o.Request -} - -// GetRequestOk returns a tuple with the Request field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetRequestOk() (*string, bool) { - if o == nil || o.Request == nil { - return nil, false - } - return o.Request, true -} - -// HasRequest returns a boolean if a field has been set. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasRequest() bool { - if o != nil && o.Request != nil { - return true - } - - return false -} - -// SetRequest gets a reference to the given string and assigns it to the Request field. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetRequest(v string) { - o.Request = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetStatus() string { - if o == nil || o.Status == nil { - var ret string - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) GetStatusOk() (*string, bool) { - if o == nil || o.Status == nil { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) HasStatus() bool { - if o != nil && o.Status != nil { - return true - } - - return false -} - -// SetStatus gets a reference to the given string and assigns it to the Status field. -func (o *OryKetoRelationTuplesV1alpha2ErrorObject) SetStatus(v string) { - o.Status = &v -} - -func (o OryKetoRelationTuplesV1alpha2ErrorObject) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.Code != nil { - toSerialize["code"] = o.Code - } - if o.Debug != nil { - toSerialize["debug"] = o.Debug - } - if o.Details != nil { - toSerialize["details"] = o.Details - } - if o.Id != nil { - toSerialize["id"] = o.Id - } - if o.Message != nil { - toSerialize["message"] = o.Message - } - if o.Reason != nil { - toSerialize["reason"] = o.Reason - } - if o.Request != nil { - toSerialize["request"] = o.Request - } - if o.Status != nil { - toSerialize["status"] = o.Status - } - return json.Marshal(toSerialize) -} - -type NullableOryKetoRelationTuplesV1alpha2ErrorObject struct { - value *OryKetoRelationTuplesV1alpha2ErrorObject - isSet bool -} - -func (v NullableOryKetoRelationTuplesV1alpha2ErrorObject) Get() *OryKetoRelationTuplesV1alpha2ErrorObject { - return v.value -} - -func (v *NullableOryKetoRelationTuplesV1alpha2ErrorObject) Set(val *OryKetoRelationTuplesV1alpha2ErrorObject) { - v.value = val - v.isSet = true -} - -func (v NullableOryKetoRelationTuplesV1alpha2ErrorObject) IsSet() bool { - return v.isSet -} - -func (v *NullableOryKetoRelationTuplesV1alpha2ErrorObject) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableOryKetoRelationTuplesV1alpha2ErrorObject(val *OryKetoRelationTuplesV1alpha2ErrorObject) *NullableOryKetoRelationTuplesV1alpha2ErrorObject { - return &NullableOryKetoRelationTuplesV1alpha2ErrorObject{value: val, isSet: true} -} - -func (v NullableOryKetoRelationTuplesV1alpha2ErrorObject) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableOryKetoRelationTuplesV1alpha2ErrorObject) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/internal/namespace/ast/ast_definitions.go b/internal/namespace/ast/ast_definitions.go index b9c049863..cb7200ffb 100644 --- a/internal/namespace/ast/ast_definitions.go +++ b/internal/namespace/ast/ast_definitions.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package ast diff --git a/internal/namespace/ast/operator_string.go b/internal/namespace/ast/operator_string.go index 07834396c..bc0b7d5ed 100644 --- a/internal/namespace/ast/operator_string.go +++ b/internal/namespace/ast/operator_string.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 // Code generated by "stringer -type=Operator -linecomment"; DO NOT EDIT. diff --git a/internal/namespace/definitions.go b/internal/namespace/definitions.go index a47f05576..25e2073b6 100644 --- a/internal/namespace/definitions.go +++ b/internal/namespace/definitions.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package namespace diff --git a/internal/namespace/namespacehandler/handler.go b/internal/namespace/namespacehandler/handler.go index 53a77879f..990405701 100644 --- a/internal/namespace/namespacehandler/handler.go +++ b/internal/namespace/namespacehandler/handler.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package namespacehandler diff --git a/internal/persistence/definitions.go b/internal/persistence/definitions.go index 61d60d962..58118129d 100644 --- a/internal/persistence/definitions.go +++ b/internal/persistence/definitions.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package persistence diff --git a/internal/persistence/sql/full_test.go b/internal/persistence/sql/full_test.go index b74d8f44a..3c544ada0 100644 --- a/internal/persistence/sql/full_test.go +++ b/internal/persistence/sql/full_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package sql_test diff --git a/internal/persistence/sql/migrations/migratest/migration_test.go b/internal/persistence/sql/migrations/migratest/migration_test.go index 3d67a60fb..97ce74d44 100644 --- a/internal/persistence/sql/migrations/migratest/migration_test.go +++ b/internal/persistence/sql/migrations/migratest/migration_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package migratest diff --git a/internal/persistence/sql/migrations/uuidmapping/uuid_mapping_migrator.go b/internal/persistence/sql/migrations/uuidmapping/uuid_mapping_migrator.go index 1ff99350f..f6d609891 100644 --- a/internal/persistence/sql/migrations/uuidmapping/uuid_mapping_migrator.go +++ b/internal/persistence/sql/migrations/uuidmapping/uuid_mapping_migrator.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package uuidmapping diff --git a/internal/persistence/sql/migrations/uuidmapping/uuid_mapping_migrator_test.go b/internal/persistence/sql/migrations/uuidmapping/uuid_mapping_migrator_test.go index 428b01141..d9319e1f3 100644 --- a/internal/persistence/sql/migrations/uuidmapping/uuid_mapping_migrator_test.go +++ b/internal/persistence/sql/migrations/uuidmapping/uuid_mapping_migrator_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package uuidmapping_test diff --git a/internal/persistence/sql/pagination_test.go b/internal/persistence/sql/pagination_test.go index debeb7623..a2feb4b45 100644 --- a/internal/persistence/sql/pagination_test.go +++ b/internal/persistence/sql/pagination_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package sql diff --git a/internal/persistence/sql/persister.go b/internal/persistence/sql/persister.go index 1df576e57..b28a164f6 100644 --- a/internal/persistence/sql/persister.go +++ b/internal/persistence/sql/persister.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package sql diff --git a/internal/persistence/sql/relationtuples.go b/internal/persistence/sql/relationtuples.go index 4310edeff..7f1776221 100644 --- a/internal/persistence/sql/relationtuples.go +++ b/internal/persistence/sql/relationtuples.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package sql diff --git a/internal/persistence/sql/relationtuples_test.go b/internal/persistence/sql/relationtuples_test.go index aaa5691da..899f0621a 100644 --- a/internal/persistence/sql/relationtuples_test.go +++ b/internal/persistence/sql/relationtuples_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package sql_test diff --git a/internal/persistence/sql/uuid_mapping.go b/internal/persistence/sql/uuid_mapping.go index 66db88e45..0517b70e7 100644 --- a/internal/persistence/sql/uuid_mapping.go +++ b/internal/persistence/sql/uuid_mapping.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package sql diff --git a/internal/persistence/sql/uuid_mapping_test.go b/internal/persistence/sql/uuid_mapping_test.go index 8e3d6cea8..81ad96fd9 100644 --- a/internal/persistence/sql/uuid_mapping_test.go +++ b/internal/persistence/sql/uuid_mapping_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package sql_test diff --git a/internal/relationtuple/definitions.go b/internal/relationtuple/definitions.go index 8218d407a..e499cc6d7 100644 --- a/internal/relationtuple/definitions.go +++ b/internal/relationtuple/definitions.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/internal/relationtuple/definitions_test.go b/internal/relationtuple/definitions_test.go index ab850edb4..831bbc215 100644 --- a/internal/relationtuple/definitions_test.go +++ b/internal/relationtuple/definitions_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/internal/relationtuple/handler.go b/internal/relationtuple/handler.go index 8938af056..7bdff5bc5 100644 --- a/internal/relationtuple/handler.go +++ b/internal/relationtuple/handler.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/internal/relationtuple/manager_isolation.go b/internal/relationtuple/manager_isolation.go index d57db1dc0..3c3578282 100644 --- a/internal/relationtuple/manager_isolation.go +++ b/internal/relationtuple/manager_isolation.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/internal/relationtuple/manager_requirements.go b/internal/relationtuple/manager_requirements.go index e02086cf4..1e09413d6 100644 --- a/internal/relationtuple/manager_requirements.go +++ b/internal/relationtuple/manager_requirements.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/internal/relationtuple/read_server.go b/internal/relationtuple/read_server.go index d17a744a0..0979be1bd 100644 --- a/internal/relationtuple/read_server.go +++ b/internal/relationtuple/read_server.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/internal/relationtuple/read_server_test.go b/internal/relationtuple/read_server_test.go index 62c5a1a0a..0d3c2a6e5 100644 --- a/internal/relationtuple/read_server_test.go +++ b/internal/relationtuple/read_server_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple_test diff --git a/internal/relationtuple/swagger_definitions.go b/internal/relationtuple/swagger_definitions.go index f8abccda0..24bf0eda6 100644 --- a/internal/relationtuple/swagger_definitions.go +++ b/internal/relationtuple/swagger_definitions.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/internal/relationtuple/test_helper.go b/internal/relationtuple/test_helper.go index 71fa85d00..dc7a2f461 100644 --- a/internal/relationtuple/test_helper.go +++ b/internal/relationtuple/test_helper.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/internal/relationtuple/transact_server.go b/internal/relationtuple/transact_server.go index aec82c196..eee89448c 100644 --- a/internal/relationtuple/transact_server.go +++ b/internal/relationtuple/transact_server.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/internal/relationtuple/transact_server_test.go b/internal/relationtuple/transact_server_test.go index 613384458..9f1a6652c 100644 --- a/internal/relationtuple/transact_server_test.go +++ b/internal/relationtuple/transact_server_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple_test diff --git a/internal/relationtuple/uuid_mapping.go b/internal/relationtuple/uuid_mapping.go index 285e5a4ab..ea826e17f 100644 --- a/internal/relationtuple/uuid_mapping.go +++ b/internal/relationtuple/uuid_mapping.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple diff --git a/internal/relationtuple/uuid_mapping_test.go b/internal/relationtuple/uuid_mapping_test.go index 7100568cd..f69dbfe45 100644 --- a/internal/relationtuple/uuid_mapping_test.go +++ b/internal/relationtuple/uuid_mapping_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package relationtuple_test diff --git a/internal/schema/handler.go b/internal/schema/handler.go index 54f40abfd..a19ea0a13 100644 --- a/internal/schema/handler.go +++ b/internal/schema/handler.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package schema diff --git a/internal/schema/handler_test.go b/internal/schema/handler_test.go index eb6630423..d23dd90e0 100644 --- a/internal/schema/handler_test.go +++ b/internal/schema/handler_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package schema_test diff --git a/internal/schema/itemtype_string.go b/internal/schema/itemtype_string.go index c00f7375c..c2656ed19 100644 --- a/internal/schema/itemtype_string.go +++ b/internal/schema/itemtype_string.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 // Code generated by "stringer -type=itemType -trimprefix item -linecomment"; DO NOT EDIT. diff --git a/internal/schema/lexer.go b/internal/schema/lexer.go index 684d767ad..d5e2b7754 100644 --- a/internal/schema/lexer.go +++ b/internal/schema/lexer.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 // The lexer is inspired by Rob Pike's talk at diff --git a/internal/schema/lexer_test.go b/internal/schema/lexer_test.go index f095b2a4a..0967021b0 100644 --- a/internal/schema/lexer_test.go +++ b/internal/schema/lexer_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package schema diff --git a/internal/schema/limits.go b/internal/schema/limits.go index d849c6d7f..96a70a41f 100644 --- a/internal/schema/limits.go +++ b/internal/schema/limits.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package schema diff --git a/internal/schema/parse_errors.go b/internal/schema/parse_errors.go index 2e450e58f..47d3da156 100644 --- a/internal/schema/parse_errors.go +++ b/internal/schema/parse_errors.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package schema diff --git a/internal/schema/parser.go b/internal/schema/parser.go index 06c2f28b9..0db66aae3 100644 --- a/internal/schema/parser.go +++ b/internal/schema/parser.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package schema diff --git a/internal/schema/parser_fuzzer.go b/internal/schema/parser_fuzzer.go index 64e630026..d2cf83423 100644 --- a/internal/schema/parser_fuzzer.go +++ b/internal/schema/parser_fuzzer.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package schema diff --git a/internal/schema/parser_test.go b/internal/schema/parser_test.go index 33a5ee61b..3ecee5c00 100644 --- a/internal/schema/parser_test.go +++ b/internal/schema/parser_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package schema diff --git a/internal/schema/typechecks.go b/internal/schema/typechecks.go index 766bc53fe..d2c2773be 100644 --- a/internal/schema/typechecks.go +++ b/internal/schema/typechecks.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package schema diff --git a/internal/swagger_types.go b/internal/swagger_types.go index 16c884e22..e5d198744 100644 --- a/internal/swagger_types.go +++ b/internal/swagger_types.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package internal diff --git a/internal/x/dbx/dsn_cockroach.go b/internal/x/dbx/dsn_cockroach.go index fa9cee9e5..098efd900 100644 --- a/internal/x/dbx/dsn_cockroach.go +++ b/internal/x/dbx/dsn_cockroach.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 //go:build !nocrdb && !nocockroach diff --git a/internal/x/dbx/dsn_mysql.go b/internal/x/dbx/dsn_mysql.go index 91471e340..6ab8e4879 100644 --- a/internal/x/dbx/dsn_mysql.go +++ b/internal/x/dbx/dsn_mysql.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 //go:build !nomysql diff --git a/internal/x/dbx/dsn_nocockroach.go b/internal/x/dbx/dsn_nocockroach.go index beb01c15e..09fb2b138 100644 --- a/internal/x/dbx/dsn_nocockroach.go +++ b/internal/x/dbx/dsn_nocockroach.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 //go:build nocrdb || nocockroach diff --git a/internal/x/dbx/dsn_nomysql.go b/internal/x/dbx/dsn_nomysql.go index 680f749f5..37b78b9d4 100644 --- a/internal/x/dbx/dsn_nomysql.go +++ b/internal/x/dbx/dsn_nomysql.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 //go:build nomysql diff --git a/internal/x/dbx/dsn_nopostgres.go b/internal/x/dbx/dsn_nopostgres.go index 83b1c8375..fe13487f0 100644 --- a/internal/x/dbx/dsn_nopostgres.go +++ b/internal/x/dbx/dsn_nopostgres.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 //go:build nopostgres diff --git a/internal/x/dbx/dsn_nosqlite.go b/internal/x/dbx/dsn_nosqlite.go index 6b0b891b9..5e0f4b059 100644 --- a/internal/x/dbx/dsn_nosqlite.go +++ b/internal/x/dbx/dsn_nosqlite.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 //go:build !sqlite diff --git a/internal/x/dbx/dsn_postgres.go b/internal/x/dbx/dsn_postgres.go index a7e48e54a..e4a1df529 100644 --- a/internal/x/dbx/dsn_postgres.go +++ b/internal/x/dbx/dsn_postgres.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 //go:build !nopostgres diff --git a/internal/x/dbx/dsn_sqlite.go b/internal/x/dbx/dsn_sqlite.go index 3a157b4a3..c22769d63 100644 --- a/internal/x/dbx/dsn_sqlite.go +++ b/internal/x/dbx/dsn_sqlite.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 //go:build sqlite diff --git a/internal/x/dbx/dsn_testutils.go b/internal/x/dbx/dsn_testutils.go index e31b82b0c..f13ba8dd1 100644 --- a/internal/x/dbx/dsn_testutils.go +++ b/internal/x/dbx/dsn_testutils.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package dbx diff --git a/internal/x/dbx/dsn_testutils_test.go b/internal/x/dbx/dsn_testutils_test.go index 0ce51f5d7..84e670804 100644 --- a/internal/x/dbx/dsn_testutils_test.go +++ b/internal/x/dbx/dsn_testutils_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package dbx diff --git a/internal/x/graph/graph_utils.go b/internal/x/graph/graph_utils.go index d62773b7d..108e1e85c 100644 --- a/internal/x/graph/graph_utils.go +++ b/internal/x/graph/graph_utils.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package graph diff --git a/internal/x/graph/graph_utils_test.go b/internal/x/graph/graph_utils_test.go index 749bb06d5..754c25ea1 100644 --- a/internal/x/graph/graph_utils_test.go +++ b/internal/x/graph/graph_utils_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package graph diff --git a/internal/x/helpers.go b/internal/x/helpers.go index ed9f689ce..114e1bf43 100644 --- a/internal/x/helpers.go +++ b/internal/x/helpers.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package x diff --git a/internal/x/max_depth.go b/internal/x/max_depth.go index 0b8266056..a2617d600 100644 --- a/internal/x/max_depth.go +++ b/internal/x/max_depth.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package x diff --git a/internal/x/pagination.go b/internal/x/pagination.go index b55b45ea7..85db100e1 100644 --- a/internal/x/pagination.go +++ b/internal/x/pagination.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package x diff --git a/internal/x/registry.go b/internal/x/registry.go index b9d6e6014..00bddd941 100644 --- a/internal/x/registry.go +++ b/internal/x/registry.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package x diff --git a/internal/x/router.go b/internal/x/router.go index 1506586b6..e334c445e 100644 --- a/internal/x/router.go +++ b/internal/x/router.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package x diff --git a/internal/x/test_endpoints.go b/internal/x/test_endpoints.go index 109e1397a..e969aae59 100644 --- a/internal/x/test_endpoints.go +++ b/internal/x/test_endpoints.go @@ -1,3 +1,6 @@ +// Copyright © 2023 Ory Corp +// SPDX-License-Identifier: Apache-2.0 + package x import ( diff --git a/ketoapi/cmd_output.go b/ketoapi/cmd_output.go index 30c53441c..efba29017 100644 --- a/ketoapi/cmd_output.go +++ b/ketoapi/cmd_output.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package ketoapi diff --git a/ketoapi/enc_proto.go b/ketoapi/enc_proto.go index 2454f08d8..a5d5fe205 100644 --- a/ketoapi/enc_proto.go +++ b/ketoapi/enc_proto.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package ketoapi diff --git a/ketoapi/enc_string.go b/ketoapi/enc_string.go index 4a6db9fda..292c68e91 100644 --- a/ketoapi/enc_string.go +++ b/ketoapi/enc_string.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package ketoapi diff --git a/ketoapi/enc_test.go b/ketoapi/enc_test.go index 6c73b0dbb..5043d45e7 100644 --- a/ketoapi/enc_test.go +++ b/ketoapi/enc_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package ketoapi diff --git a/ketoapi/enc_url_query.go b/ketoapi/enc_url_query.go index cbdaa31ff..0001c391a 100644 --- a/ketoapi/enc_url_query.go +++ b/ketoapi/enc_url_query.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package ketoapi diff --git a/ketoapi/public_api_definitions.go b/ketoapi/public_api_definitions.go index dd8d9e785..85636f8d2 100644 --- a/ketoapi/public_api_definitions.go +++ b/ketoapi/public_api_definitions.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package ketoapi diff --git a/ketoctx/contextualizer.go b/ketoctx/contextualizer.go index 77860cd41..00b4ab9aa 100644 --- a/ketoctx/contextualizer.go +++ b/ketoctx/contextualizer.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package ketoctx diff --git a/ketoctx/contextualizer_test.go b/ketoctx/contextualizer_test.go index 69c9a0aad..9a72f581e 100644 --- a/ketoctx/contextualizer_test.go +++ b/ketoctx/contextualizer_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package ketoctx diff --git a/ketoctx/options.go b/ketoctx/options.go index 630623bee..0eec52899 100644 --- a/ketoctx/options.go +++ b/ketoctx/options.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package ketoctx diff --git a/ketoctx/options_test.go b/ketoctx/options_test.go index 18a067a8f..43f25a76c 100644 --- a/ketoctx/options_test.go +++ b/ketoctx/options_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package ketoctx diff --git a/main.go b/main.go index cb0d58758..cc5b0ba3b 100644 --- a/main.go +++ b/main.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package main diff --git a/proto/buf.md b/proto/buf.md index 7adb57ec3..8d3f72345 100644 --- a/proto/buf.md +++ b/proto/buf.md @@ -1,953 +1,752 @@ # Protocol Documentation + ## Table of Contents - [ory/keto/opl/v1alpha1/syntax_service.proto](#ory_keto_opl_v1alpha1_syntax_service-proto) - - [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) - - [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) - - [ParseError](#ory-keto-opl-v1alpha1-ParseError) - - [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) - - - [SyntaxService](#ory-keto-opl-v1alpha1-SyntaxService) - -- [ory/keto/relation_tuples/v1alpha2/relation_tuples.proto](#ory_keto_relation_tuples_v1alpha2_relation_tuples-proto) - - [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) - - [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) - - [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) - - [SubjectQuery](#ory-keto-relation_tuples-v1alpha2-SubjectQuery) - - [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) - - [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) - -- [ory/keto/relation_tuples/v1alpha2/check_service.proto](#ory_keto_relation_tuples_v1alpha2_check_service-proto) - - [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) - - [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) - - - [CheckService](#ory-keto-relation_tuples-v1alpha2-CheckService) - -- [ory/keto/relation_tuples/v1alpha2/expand_service.proto](#ory_keto_relation_tuples_v1alpha2_expand_service-proto) - - [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) - - [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) - - [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) - - - [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) - - - [ExpandService](#ory-keto-relation_tuples-v1alpha2-ExpandService) - -- [ory/keto/relation_tuples/v1alpha2/namespaces_service.proto](#ory_keto_relation_tuples_v1alpha2_namespaces_service-proto) - - [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) - - [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) - - [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) - - - [NamespacesService](#ory-keto-relation_tuples-v1alpha2-NamespacesService) - -- [ory/keto/relation_tuples/v1alpha2/read_service.proto](#ory_keto_relation_tuples_v1alpha2_read_service-proto) - - [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) - - [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) - - [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) - - - [ReadService](#ory-keto-relation_tuples-v1alpha2-ReadService) - -- [ory/keto/relation_tuples/v1alpha2/version.proto](#ory_keto_relation_tuples_v1alpha2_version-proto) - - [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) - - [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) - - - [VersionService](#ory-keto-relation_tuples-v1alpha2-VersionService) - -- [ory/keto/relation_tuples/v1alpha2/write_service.proto](#ory_keto_relation_tuples_v1alpha2_write_service-proto) - - [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) - - [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) - - [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) - - [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) - - [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) - - [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) - - [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) - - [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) - - [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) - - - [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) - - - [WriteService](#ory-keto-relation_tuples-v1alpha2-WriteService) - -- [Scalar Value Types](#scalar-value-types) - + - [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) + - [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) + - [ParseError](#ory-keto-opl-v1alpha1-ParseError) + - [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) - -

Top

+ - [SyntaxService](#ory-keto-opl-v1alpha1-SyntaxService) -## ory/keto/opl/v1alpha1/syntax_service.proto +- [ory/keto/relation_tuples/v1alpha2/relation_tuples.proto](#ory_keto_relation_tuples_v1alpha2_relation_tuples-proto) + - [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) + - [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) + - [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) + - [SubjectQuery](#ory-keto-relation_tuples-v1alpha2-SubjectQuery) + - [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) + - [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) +- [ory/keto/relation_tuples/v1alpha2/check_service.proto](#ory_keto_relation_tuples_v1alpha2_check_service-proto) + - [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) + - [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) + - [CheckService](#ory-keto-relation_tuples-v1alpha2-CheckService) - +- [ory/keto/relation_tuples/v1alpha2/expand_service.proto](#ory_keto_relation_tuples_v1alpha2_expand_service-proto) -### CheckRequest + - [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) + - [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) + - [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) + - [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) + - [ExpandService](#ory-keto-relation_tuples-v1alpha2-ExpandService) -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| content | [string](#string) | | | +- [ory/keto/relation_tuples/v1alpha2/namespaces_service.proto](#ory_keto_relation_tuples_v1alpha2_namespaces_service-proto) + - [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) + - [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) + - [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) + - [NamespacesService](#ory-keto-relation_tuples-v1alpha2-NamespacesService) +- [ory/keto/relation_tuples/v1alpha2/read_service.proto](#ory_keto_relation_tuples_v1alpha2_read_service-proto) + - [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) + - [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) + - [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) + - [ReadService](#ory-keto-relation_tuples-v1alpha2-ReadService) - +- [ory/keto/relation_tuples/v1alpha2/version.proto](#ory_keto_relation_tuples_v1alpha2_version-proto) -### CheckResponse + - [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) + - [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) + - [VersionService](#ory-keto-relation_tuples-v1alpha2-VersionService) +- [ory/keto/relation_tuples/v1alpha2/write_service.proto](#ory_keto_relation_tuples_v1alpha2_write_service-proto) -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | | + - [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) + - [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) + - [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) + - [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) + - [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) + - [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) + - [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) + - [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) + - [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) + - [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) + - [WriteService](#ory-keto-relation_tuples-v1alpha2-WriteService) +- [Scalar Value Types](#scalar-value-types) + +

Top

- +## ory/keto/opl/v1alpha1/syntax_service.proto -### ParseError + +### CheckRequest +| Field | Type | Label | Description | +| ------- | ----------------- | ----- | ----------- | +| content | [string](#string) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| message | [string](#string) | | | -| start | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | -| end | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | + +### CheckResponse +| Field | Type | Label | Description | +| ------ | ----------------------------------------------- | -------- | ----------- | +| errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | | + +### ParseError +| Field | Type | Label | Description | +| ------- | ------------------------------------------------------- | ----- | ----------- | +| message | [string](#string) | | | +| start | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | +| end | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | ### SourcePosition - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| line | [uint32](#uint32) | | | -| column | [uint32](#uint32) | | | - - - - - - - - - - - +| Field | Type | Label | Description | +| ------ | ----------------- | ----- | ----------- | +| line | [uint32](#uint32) | | | +| column | [uint32](#uint32) | | | ### SyntaxService -The service that checks the syntax of an OPL file. - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Check | [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) | [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) | Performs a syntax check request. | - - +The service that checks the syntax of an OPL file. +| Method Name | Request Type | Response Type | Description | +| ----------- | --------------------------------------------------- | ----------------------------------------------------- | -------------------------------- | +| Check | [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) | [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) | Performs a syntax check request. | +

Top

## ory/keto/relation_tuples/v1alpha2/relation_tuples.proto - - ### RelationQuery -The query for listing relationships. -Clients can specify any optional field to + +The query for listing relationships. Clients can specify any optional field to partially filter for specific relationships. Example use cases (namespace is always required): - - object only: display a list of all permissions referring to a specific object - - relation only: get all groups that have members; get all directories that have content - - object & relation: display all subjects that have a specific permission relation - - subject & relation: display all groups a subject belongs to; display all objects a subject has access to - - object & relation & subject: check whether the relation tuple already exists - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespace | [string](#string) | optional | The namespace this relation tuple lives in. | -| object | [string](#string) | optional | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | optional | The relation between an Object and a Subject. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | optional | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | - - - - +- object only: display a list of all permissions referring to a specific object +- relation only: get all groups that have members; get all directories that have + content +- object & relation: display all subjects that have a specific permission + relation +- subject & relation: display all groups a subject belongs to; display all + objects a subject has access to +- object & relation & subject: check whether the relation tuple already + exists + +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| namespace | [string](#string) | optional | The namespace this relation tuple lives in. | +| object | [string](#string) | optional | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | optional | The relation between an Object and a Subject. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | optional | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | ### RelationTuple -RelationTuple defines a relation between an Object and a Subject. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespace | [string](#string) | | The namespace this relation tuple lives in. | -| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | | The relation between an Object and a Subject. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | -| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | -| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - - - +RelationTuple defines a relation between an Object and a Subject. +| Field | Type | Label | Description | +| ----------- | ----------------------------------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------- | +| namespace | [string](#string) | | The namespace this relation tuple lives in. | +| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | The relation between an Object and a Subject. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | +| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | +| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | ### Subject -Subject is either a concrete subject id or -a `SubjectSet` expanding to more Subjects. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | A concrete id of the subject. | -| set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - - - +Subject is either a concrete subject id or a `SubjectSet` expanding to more +Subjects. +| Field | Type | Label | Description | +| ----- | ----------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | +| id | [string](#string) | | A concrete id of the subject. | +| set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | ### SubjectQuery -SubjectQuery is either a concrete subject id or -a `SubjectSet` expanding to more Subjects. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | A concrete id of the subject. | -| set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - - - +SubjectQuery is either a concrete subject id or a `SubjectSet` expanding to more +Subjects. +| Field | Type | Label | Description | +| ----- | --------------------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | +| id | [string](#string) | | A concrete id of the subject. | +| set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | ### SubjectSet -SubjectSet refers to all subjects who have -the same `relation` on an `object`. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | -| object | [string](#string) | | The object related by this subject set. | -| relation | [string](#string) | | The relation between the object and the subjects. | - - - +SubjectSet refers to all subjects who have the same `relation` on an `object`. +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ------------------------------------------------------------------------ | +| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | +| object | [string](#string) | | The object related by this subject set. | +| relation | [string](#string) | | The relation between the object and the subjects. | ### SubjectSetQuery -SubjectSetQuery refers to all subjects who have -the same `relation` on an `object`. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | -| object | [string](#string) | | The object related by this subject set. | -| relation | [string](#string) | | The relation between the object and the subjects. | - - - - - - - - - - - - +SubjectSetQuery refers to all subjects who have the same `relation` on an +`object`. +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ------------------------------------------------------------------------ | +| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | +| object | [string](#string) | | The object related by this subject set. | +| relation | [string](#string) | | The relation between the object and the subjects. | +

Top

## ory/keto/relation_tuples/v1alpha2/check_service.proto - - ### CheckRequest -The request for a CheckService.Check RPC. -Checks whether a specific subject is related to an object. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespace | [string](#string) | | **Deprecated.** The namespace to evaluate the check. - -Note: If you use the expand-API and the check evaluates a RelationTuple specifying a SubjectSet as subject or due to a rewrite rule in a namespace config this check request may involve other namespaces automatically. | -| object | [string](#string) | | **Deprecated.** The related object in this check. | -| relation | [string](#string) | | **Deprecated.** The relation between the Object and the Subject. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The related subject in this check. | -| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | -| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | -| tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | | -| latest | [bool](#bool) | | This field is not implemented yet and has no effect. <!-- Set this field to `true` in case your application needs to authorize depending on up to date ACLs, also called a "content-change check". - -If set to `true` the `snaptoken` field is ignored, the check is evaluated at the latest snapshot (globally consistent) and the response includes a snaptoken for clients to store along with object contents that can be used for subsequent checks of the same content version. - -Example use case: - You need to authorize a user to modify/delete some resource and it is unacceptable that if the permission to do that had just been revoked some seconds ago so that the change had not yet been fully replicated to all availability zones. --> | -| snaptoken | [string](#string) | | This field is not implemented yet and has no effect. <!-- Optional. Like reads, a check is always evaluated at a consistent snapshot no earlier than the given snaptoken. - -Leave this field blank if you want to evaluate the check based on eventually consistent ACLs, benefiting from very low latency, but possibly slightly stale results. - -If the specified token is too old and no longer known, the server falls back as if no snaptoken had been specified. - -If not specified the server tries to evaluate the check on the best snapshot version where it is very likely that ACLs had already been replicated to all availability zones. --> | -| max_depth | [int32](#int32) | | The maximum depth to search for a relation. - -If the value is less than 1 or greater than the global max-depth then the global max-depth will be used instead. | - - - - +The request for a CheckService.Check RPC. Checks whether a specific subject is +related to an object. + +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ---------------------------------------------------- | +| namespace | [string](#string) | | **Deprecated.** The namespace to evaluate the check. | + +Note: If you use the expand-API and the check evaluates a RelationTuple +specifying a SubjectSet as subject or due to a rewrite rule in a namespace +config this check request may involve other namespaces automatically. | | object +| [string](#string) | | **Deprecated.** The related object in this check. | | +relation | [string](#string) | | **Deprecated.** The relation between the Object +and the Subject. | | subject | +[Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The +related subject in this check. | | subject_id | [string](#string) | | +**Deprecated.** A concrete id of the subject. | | subject_set | +[SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | +**Deprecated.** A subject set that expands to more Subjects. More information +are available under [concepts](../concepts/subjects.mdx). | | tuple | +[RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | | | latest +| [bool](#bool) | | This field is not implemented yet and has no effect. <!-- +Set this field to `true` in case your application needs to authorize depending +on up to date ACLs, also called a "content-change check". + +If set to `true` the `snaptoken` field is ignored, the check is evaluated at the +latest snapshot (globally consistent) and the response includes a snaptoken for +clients to store along with object contents that can be used for subsequent +checks of the same content version. + +Example use case: - You need to authorize a user to modify/delete some resource +and it is unacceptable that if the permission to do that had just been revoked +some seconds ago so that the change had not yet been fully replicated to all +availability zones. --> | | snaptoken | [string](#string) | | This field is +not implemented yet and has no effect. <!-- Optional. Like reads, a check is +always evaluated at a consistent snapshot no earlier than the given snaptoken. + +Leave this field blank if you want to evaluate the check based on eventually +consistent ACLs, benefiting from very low latency, but possibly slightly stale +results. + +If the specified token is too old and no longer known, the server falls back as +if no snaptoken had been specified. + +If not specified the server tries to evaluate the check on the best snapshot +version where it is very likely that ACLs had already been replicated to all +availability zones. --> | | max_depth | [int32](#int32) | | The maximum depth +to search for a relation. + +If the value is less than 1 or greater than the global max-depth then the global +max-depth will be used instead. | ### CheckResponse -The response for a CheckService.Check rpc. +The response for a CheckService.Check rpc. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| allowed | [bool](#bool) | | Whether the specified subject (id) is related to the requested object. +| Field | Type | Label | Description | +| ------- | ------------- | ----- | ---------------------------------------------------------------------- | +| allowed | [bool](#bool) | | Whether the specified subject (id) is related to the requested object. | -It is false by default if no ACL matches. | -| snaptoken | [string](#string) | | This field is not implemented yet and has no effect. <!-- The last known snapshot token ONLY specified if the request had not specified a snaptoken, since this performed a "content-change request" and consistently fetched the last known snapshot token. +It is false by default if no ACL matches. | | snaptoken | [string](#string) | | +This field is not implemented yet and has no effect. <!-- The last known +snapshot token ONLY specified if the request had not specified a snaptoken, +since this performed a "content-change request" and consistently fetched +the last known snapshot token. This field is not set if the request had specified a snaptoken! -If set, clients should cache and use this token for subsequent requests to have minimal latency, but allow slightly stale responses (only some milliseconds or seconds). --> | - - - - - - - - - - - +If set, clients should cache and use this token for subsequent requests to have +minimal latency, but allow slightly stale responses (only some milliseconds or +seconds). --> | ### CheckService -The service that performs authorization checks -based on the stored Access Control Lists. - -This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Check | [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) | [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) | Performs an authorization check. | - - +The service that performs authorization checks based on the stored Access +Control Lists. +This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). +| Method Name | Request Type | Response Type | Description | +| ----------- | --------------------------------------------------------------- | ----------------------------------------------------------------- | -------------------------------- | +| Check | [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) | [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) | Performs an authorization check. | +

Top

## ory/keto/relation_tuples/v1alpha2/expand_service.proto - - ### ExpandRequest -The request for an ExpandService.Expand RPC. -Expands the given subject set. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject to expand. | -| max_depth | [int32](#int32) | | The maximum depth of tree to build. - -If the value is less than 1 or greater than the global max-depth then the global max-depth will be used instead. - -It is important to set this parameter to a meaningful value. Ponder how deep you really want to display this. | -| snaptoken | [string](#string) | | This field is not implemented yet and has no effect. <!-- Optional. Like reads, a expand is always evaluated at a consistent snapshot no earlier than the given snaptoken. - -Leave this field blank if you want to expand based on eventually consistent ACLs, benefiting from very low latency, but possibly slightly stale results. -If the specified token is too old and no longer known, the server falls back as if no snaptoken had been specified. +The request for an ExpandService.Expand RPC. Expands the given subject set. -If not specified the server tries to build the tree on the best snapshot version where it is very likely that ACLs had already been replicated to all availability zones. --> | -| namespace | [string](#string) | | **Deprecated.** The namespace of the object and relation referenced in this subject set. | -| object | [string](#string) | | **Deprecated.** The object related by this subject set. | -| relation | [string](#string) | | **Deprecated.** The relation between the object and the subjects. | +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------- | ----- | ----------------------------------- | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject to expand. | +| max_depth | [int32](#int32) | | The maximum depth of tree to build. | +If the value is less than 1 or greater than the global max-depth then the global +max-depth will be used instead. +It is important to set this parameter to a meaningful value. Ponder how deep you +really want to display this. | | snaptoken | [string](#string) | | This field is +not implemented yet and has no effect. <!-- Optional. Like reads, a expand is +always evaluated at a consistent snapshot no earlier than the given snaptoken. +Leave this field blank if you want to expand based on eventually consistent +ACLs, benefiting from very low latency, but possibly slightly stale results. +If the specified token is too old and no longer known, the server falls back as +if no snaptoken had been specified. +If not specified the server tries to build the tree on the best snapshot version +where it is very likely that ACLs had already been replicated to all +availability zones. --> | | namespace | [string](#string) | | **Deprecated.** +The namespace of the object and relation referenced in this subject set. | | +object | [string](#string) | | **Deprecated.** The object related by this +subject set. | | relation | [string](#string) | | **Deprecated.** The relation +between the object and the subjects. | ### ExpandResponse -The response for a ExpandService.Expand RPC. +The response for a ExpandService.Expand RPC. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| tree | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | | The tree the requested subject set expands to. The requested subject set is the subject of the root. +| Field | Type | Label | Description | +| ----- | ------------------------------------------------------------- | ----- | ---------------------------------------------------------------------------------------------------- | +| tree | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | | The tree the requested subject set expands to. The requested subject set is the subject of the root. | This field can be nil in some circumstances. | - - - - - ### SubjectTree - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| node_type | [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) | | The type of the node. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The subject this node represents. Deprecated: More information is now available in the tuple field. | -| tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The relation tuple this node represents. | -| children | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | repeated | The children of this node. +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------- | +| node_type | [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) | | The type of the node. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The subject this node represents. Deprecated: More information is now available in the tuple field. | +| tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The relation tuple this node represents. | +| children | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | repeated | The children of this node. | This is never set if `node_type` == `NODE_TYPE_LEAF`. | - - - - - - - ### NodeType - -| Name | Number | Description | -| ---- | ------ | ----------- | -| unspecified | 0 | | -| NODE_TYPE_UNSPECIFIED | 0 | | -| NODE_TYPE_UNION | 1 | This node expands to a union of all children. | -| union | 1 | | -| NODE_TYPE_EXCLUSION | 2 | Not implemented yet. | -| exclusion | 2 | | -| NODE_TYPE_INTERSECTION | 3 | Not implemented yet. | -| intersection | 3 | | -| NODE_TYPE_LEAF | 4 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| leaf | 4 | | -| NODE_TYPE_TUPLE_TO_SUBJECT_SET | 5 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| tuple_to_subject_set | 5 | | -| NODE_TYPE_COMPUTED_SUBJECT_SET | 6 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| computed_subject_set | 6 | | -| NODE_TYPE_NOT | 7 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| not | 7 | | - - - - - - +| Name | Number | Description | +| ------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------- | +| unspecified | 0 | | +| NODE_TYPE_UNSPECIFIED | 0 | | +| NODE_TYPE_UNION | 1 | This node expands to a union of all children. | +| union | 1 | | +| NODE_TYPE_EXCLUSION | 2 | Not implemented yet. | +| exclusion | 2 | | +| NODE_TYPE_INTERSECTION | 3 | Not implemented yet. | +| intersection | 3 | | +| NODE_TYPE_LEAF | 4 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| leaf | 4 | | +| NODE_TYPE_TUPLE_TO_SUBJECT_SET | 5 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| tuple_to_subject_set | 5 | | +| NODE_TYPE_COMPUTED_SUBJECT_SET | 6 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| computed_subject_set | 6 | | +| NODE_TYPE_NOT | 7 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| not | 7 | | ### ExpandService -The service that performs subject set expansion -based on the stored Access Control Lists. -This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Expand | [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) | [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) | Expands the subject set into a tree of subjects. | - - +The service that performs subject set expansion based on the stored Access +Control Lists. +This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). +| Method Name | Request Type | Response Type | Description | +| ----------- | ----------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------ | +| Expand | [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) | [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) | Expands the subject set into a tree of subjects. | +

Top

## ory/keto/relation_tuples/v1alpha2/namespaces_service.proto - - ### ListNamespacesRequest -Request for ReadService.ListNamespaces RPC. - - - - +Request for ReadService.ListNamespaces RPC. ### ListNamespacesResponse - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespaces | [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) | repeated | | - - - - - +| Field | Type | Label | Description | +| ---------- | --------------------------------------------------------- | -------- | ----------- | +| namespaces | [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) | repeated | | ### Namespace - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | | - - - - - - - - - - - +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------- | +| name | [string](#string) | | | ### NamespacesService + The service to query namespaces. This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| ListNamespaces | [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) | [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) | Lists Namespaces +| Method Name | Request Type | Response Type | Description | +| -------------- | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---------------- | +| ListNamespaces | [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) | [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) | Lists Namespaces | Get all namespaces. | - - - - +

Top

## ory/keto/relation_tuples/v1alpha2/read_service.proto - - ### ListRelationTuplesRequest -Request for ReadService.ListRelationTuples RPC. -See `ListRelationTuplesRequest_Query` for how to filter the query. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| query | [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) | | **Deprecated.** All query constraints are concatenated with a logical AND operator. - -The RelationTuple list from ListRelationTuplesResponse is ordered from the newest RelationTuple to the oldest. | -| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | -| expand_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | This field is not implemented yet and has no effect. <!-- Optional. The list of fields to be expanded in the RelationTuple list returned in `ListRelationTuplesResponse`. Leaving this field unspecified means all fields are expanded. - -Available fields: "object", "relation", "subject", "namespace", "subject.id", "subject.namespace", "subject.object", "subject.relation" --> | -| snaptoken | [string](#string) | | This field is not implemented yet and has no effect. <!-- Optional. The snapshot token for this read. --> | -| page_size | [int32](#int32) | | Optional. The maximum number of RelationTuples to return in the response. - -Default: 100 | -| page_token | [string](#string) | | Optional. An opaque pagination token returned from a previous call to `ListRelationTuples` that indicates where the page should start at. - -An empty token denotes the first page. All successive pages require the token from the previous page. | -| namespace | [string](#string) | | **Deprecated.** The namespace | -| object | [string](#string) | | **Deprecated.** The related object in this check. | -| relation | [string](#string) | | **Deprecated.** The relation between the Object and the Subject. | -| subject_id | [string](#string) | | A concrete id of the subject. | -| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - - - - +Request for ReadService.ListRelationTuples RPC. See +`ListRelationTuplesRequest_Query` for how to filter the query. + +| Field | Type | Label | Description | +| ----- | ----------------------------------------------------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------- | +| query | [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) | | **Deprecated.** All query constraints are concatenated with a logical AND operator. | + +The RelationTuple list from ListRelationTuplesResponse is ordered from the +newest RelationTuple to the oldest. | | relation_query | +[RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | | +expand_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | This +field is not implemented yet and has no effect. <!-- Optional. The list of +fields to be expanded in the RelationTuple list returned in +`ListRelationTuplesResponse`. Leaving this field unspecified means all fields +are expanded. + +Available fields: "object", "relation", "subject", +"namespace", "subject.id", "subject.namespace", +"subject.object", "subject.relation" --> | | snaptoken | +[string](#string) | | This field is not implemented yet and has no effect. +<!-- Optional. The snapshot token for this read. --> | | page_size | +[int32](#int32) | | Optional. The maximum number of RelationTuples to return in +the response. + +Default: 100 | | page_token | [string](#string) | | Optional. An opaque +pagination token returned from a previous call to `ListRelationTuples` that +indicates where the page should start at. + +An empty token denotes the first page. All successive pages require the token +from the previous page. | | namespace | [string](#string) | | **Deprecated.** +The namespace | | object | [string](#string) | | **Deprecated.** The related +object in this check. | | relation | [string](#string) | | **Deprecated.** The +relation between the Object and the Subject. | | subject_id | [string](#string) +| | A concrete id of the subject. | | subject_set | +[SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A +subject set that expands to more Subjects. More information are available under +[concepts](../concepts/subjects.mdx). | ### ListRelationTuplesRequest.Query -The query for listing relationships. -Clients can specify any optional field to + +The query for listing relationships. Clients can specify any optional field to partially filter for specific relationships. Example use cases (namespace is always required): - - object only: display a list of all permissions referring to a specific object - - relation only: get all groups that have members; get all directories that have content - - object & relation: display all subjects that have a specific permission relation - - subject & relation: display all groups a subject belongs to; display all objects a subject has access to - - object & relation & subject: check whether the relation tuple already exists - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespace | [string](#string) | | Required. The namespace to query. | -| object | [string](#string) | | Optional. The object to query for. | -| relation | [string](#string) | | Optional. The relation to query for. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | - - - - +- object only: display a list of all permissions referring to a specific object +- relation only: get all groups that have members; get all directories that have + content +- object & relation: display all subjects that have a specific permission + relation +- subject & relation: display all groups a subject belongs to; display all + objects a subject has access to +- object & relation & subject: check whether the relation tuple already + exists + +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------- | ----- | ------------------------------------ | +| namespace | [string](#string) | | Required. The namespace to query. | +| object | [string](#string) | | Optional. The object to query for. | +| relation | [string](#string) | | Optional. The relation to query for. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | ### ListRelationTuplesResponse -The response of a ReadService.ListRelationTuples RPC. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| relation_tuples | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | repeated | The relationships matching the list request. | -| next_page_token | [string](#string) | | The token required to get the next page. If this is the last page, the token will be the empty string. | - - +The response of a ReadService.ListRelationTuples RPC. - - - - - - - +| Field | Type | Label | Description | +| --------------- | ----------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------ | +| relation_tuples | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | repeated | The relationships matching the list request. | +| next_page_token | [string](#string) | | The token required to get the next page. If this is the last page, the token will be the empty string. | ### ReadService + The service to query relationships. This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| +| Method Name | Request Type | Response Type | Description | +| ------------------ | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------ | | ListRelationTuples | [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) | [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) | Lists ACL relationships. | - - - - +

Top

## ory/keto/relation_tuples/v1alpha2/version.proto - - ### GetVersionRequest -Request for the VersionService.GetVersion RPC. - - - - +Request for the VersionService.GetVersion RPC. ### GetVersionResponse -Response of the VersionService.GetVersion RPC. - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| version | [string](#string) | | The version string of the Ory Keto instance. | - - - - - - - - - - +Response of the VersionService.GetVersion RPC. +| Field | Type | Label | Description | +| ------- | ----------------- | ----- | -------------------------------------------- | +| version | [string](#string) | | The version string of the Ory Keto instance. | ### VersionService -The service returning the specific Ory Keto instance version. -This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis) and [write-APIs](../concepts/api-overview.mdx#write-apis). - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| GetVersion | [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) | [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) | Returns the version of the Ory Keto instance. - -This endpoint returns the service version typically notated using semantic versioning. +The service returning the specific Ory Keto instance version. -If the service supports TLS Edge Termination, this endpoint does not require the X-Forwarded-Proto header to be set. | +This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis) +and [write-APIs](../concepts/api-overview.mdx#write-apis). - +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------- | +| GetVersion | [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) | [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) | Returns the version of the Ory Keto instance. | +This endpoint returns the service version typically notated using semantic +versioning. +If the service supports TLS Edge Termination, this endpoint does not require the +X-Forwarded-Proto header to be set. | +

Top

## ory/keto/relation_tuples/v1alpha2/write_service.proto - - ### CreateRelationTupleRequest -The request to create a new relationship. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| relation_tuple | [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) | | The relationship to create. | - - - +The request to create a new relationship. +| Field | Type | Label | Description | +| -------------- | --------------------------------------------------------------------------------------------------------------------- | ----- | --------------------------- | +| relation_tuple | [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) | | The relationship to create. | ### CreateRelationTupleRequest.Relationship - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespace | [string](#string) | | The namespace this relation tuple lives in. | -| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | | The relation between an Object and a Subject. | -| subject_id | [string](#string) | | A concrete id of the subject. | -| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - - - - - +| Field | Type | Label | Description | +| ----------- | ----------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | +| namespace | [string](#string) | | The namespace this relation tuple lives in. | +| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | The relation between an Object and a Subject. | +| subject_id | [string](#string) | | A concrete id of the subject. | +| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | ### CreateRelationTupleResponse -The response from creating a new relationship. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The created relationship. | - - - +The response from creating a new relationship. +| Field | Type | Label | Description | +| -------------- | ----------------------------------------------------------------- | ----- | ------------------------- | +| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The created relationship. | ### DeleteRelationTuplesRequest - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| query | [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) | | **Deprecated.** | -| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | -| namespace | [string](#string) | | **Deprecated.** The namespace this relation tuple lives in. | -| object | [string](#string) | | **Deprecated.** The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | | **Deprecated.** The relation between an Object and a Subject. | -| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | -| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - - - - - +| Field | Type | Label | Description | +| -------------- | --------------------------------------------------------------------------------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------- | +| query | [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) | | **Deprecated.** | +| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | +| namespace | [string](#string) | | **Deprecated.** The namespace this relation tuple lives in. | +| object | [string](#string) | | **Deprecated.** The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | **Deprecated.** The relation between an Object and a Subject. | +| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | +| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | ### DeleteRelationTuplesRequest.Query -The query for deleting relationships - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespace | [string](#string) | | Optional. The namespace to query. | -| object | [string](#string) | | Optional. The object to query for. | -| relation | [string](#string) | | Optional. The relation to query for. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | - - - +The query for deleting relationships +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------- | ----- | ------------------------------------ | +| namespace | [string](#string) | | Optional. The namespace to query. | +| object | [string](#string) | | Optional. The object to query for. | +| relation | [string](#string) | | Optional. The relation to query for. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | ### DeleteRelationTuplesResponse - - - - - - ### RelationTupleDelta -Write-delta for a TransactRelationTuplesRequest. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| action | [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) | | The action to do on the RelationTuple. | -| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The target RelationTuple. | - - - +Write-delta for a TransactRelationTuplesRequest. +| Field | Type | Label | Description | +| -------------- | ----------------------------------------------------------------------------------------- | ----- | -------------------------------------- | +| action | [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) | | The action to do on the RelationTuple. | +| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The target RelationTuple. | ### TransactRelationTuplesRequest -The request of a WriteService.TransactRelationTuples RPC. +The request of a WriteService.TransactRelationTuples RPC. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | +| Field | Type | Label | Description | +| --------------------- | --------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- | | relation_tuple_deltas | [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) | repeated | The write delta for the relationships operated in one single transaction. Either all actions succeed or no change takes effect on error. | - - - - - ### TransactRelationTuplesResponse -The response of a WriteService.TransactRelationTuples rpc. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| snaptokens | [string](#string) | repeated | This field is not implemented yet and has no effect. <!-- The list of the new latest snapshot tokens of the affected RelationTuple, with the same index as specified in the `relation_tuple_deltas` field of the TransactRelationTuplesRequest request. - -If the RelationTupleDelta_Action was DELETE the snaptoken is empty at the same index. --> | - - - +The response of a WriteService.TransactRelationTuples rpc. - +| Field | Type | Label | Description | +| ---------- | ----------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| snaptokens | [string](#string) | repeated | This field is not implemented yet and has no effect. <!-- The list of the new latest snapshot tokens of the affected RelationTuple, with the same index as specified in the `relation_tuple_deltas` field of the TransactRelationTuplesRequest request. | +If the RelationTupleDelta_Action was DELETE the snaptoken is empty at the same +index. --> | ### RelationTupleDelta.Action - -| Name | Number | Description | -| ---- | ------ | ----------- | -| ACTION_UNSPECIFIED | 0 | Unspecified. The `TransactRelationTuples` RPC ignores this RelationTupleDelta if an action was unspecified. | -| ACTION_INSERT | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | -| insert | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | -| ACTION_DELETE | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | -| delete | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | - - - - - - +| Name | Number | Description | +| ------------------ | ------ | ----------------------------------------------------------------------------------------------------------- | +| ACTION_UNSPECIFIED | 0 | Unspecified. The `TransactRelationTuples` RPC ignores this RelationTupleDelta if an action was unspecified. | +| ACTION_INSERT | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | +| insert | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | +| ACTION_DELETE | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | +| delete | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | ### WriteService + The write service to create and delete Access Control Lists. -This service is part of the [write-APIs](../concepts/api-overview.mdx#write-apis). +This service is part of the +[write-APIs](../concepts/api-overview.mdx#write-apis). -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| +| Method Name | Request Type | Response Type | Description | +| ---------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | | TransactRelationTuples | [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) | [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) | Writes one or more relationships in a single transaction. | -| CreateRelationTuple | [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) | [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) | Creates a relationship | -| DeleteRelationTuples | [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) | [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) | Deletes relationships based on relation query | - - - - +| CreateRelationTuple | [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) | [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) | Creates a relationship | +| DeleteRelationTuples | [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) | [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) | Deletes relationships based on relation query | ## Scalar Value Types -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | - +| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | +| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------- | ----------- | ------- | ---------- | -------------- | ------------------------------ | +| double | | double | double | float | float64 | double | float | Float | +| float | | float | float | float | float32 | float | float | Float | +| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | +| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | +| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | +| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | +| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | +| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | +| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | diff --git a/proto/openapiv2/gateway.swagger.json b/proto/openapiv2/gateway.swagger.json index c721fe996..9eb08b047 100644 --- a/proto/openapiv2/gateway.swagger.json +++ b/proto/openapiv2/gateway.swagger.json @@ -4,12 +4,8 @@ "title": "ory/keto/opl/v1alpha1/syntax_service.proto", "version": "version not set" }, - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "consumes": ["application/json"], + "produces": ["application/json"], "paths": { "/admin/relation-tuples": { "delete": { @@ -72,12 +68,8 @@ "type": "string" } ], - "tags": [ - "relationship" - ], - "consumes": [ - "application/x-www-form-urlencoded" - ] + "tags": ["relationship"], + "consumes": ["application/x-www-form-urlencoded"] }, "put": { "summary": "Creates a relationship", @@ -101,9 +93,7 @@ } } ], - "tags": [ - "relationship" - ] + "tags": ["relationship"] }, "patch": { "summary": "Writes one or more relationships in a single transaction.", @@ -131,9 +121,7 @@ } } ], - "tags": [ - "relationship" - ] + "tags": ["relationship"] } }, "/namespaces": { @@ -158,12 +146,8 @@ } } }, - "tags": [ - "relationship" - ], - "consumes": [ - "application/x-www-form-urlencoded" - ] + "tags": ["relationship"], + "consumes": ["application/x-www-form-urlencoded"] } }, "/opl/syntax/check": { @@ -188,12 +172,8 @@ } } ], - "tags": [ - "relationship" - ], - "consumes": [ - "text/plain" - ] + "tags": ["relationship"], + "consumes": ["text/plain"] } }, "/relation-tuples": { @@ -274,12 +254,8 @@ "type": "string" } ], - "tags": [ - "relationship" - ], - "consumes": [ - "application/x-www-form-urlencoded" - ] + "tags": ["relationship"], + "consumes": ["application/x-www-form-urlencoded"] } }, "/relation-tuples/check": { @@ -359,13 +335,8 @@ "format": "int32" } ], - "tags": [ - "permission" - ], - "consumes": [ - "application/x-www-form-urlencoded", - "application/json" - ] + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded", "application/json"] }, "post": { "summary": "Performs an authorization check.", @@ -395,13 +366,8 @@ } } ], - "tags": [ - "permission" - ], - "consumes": [ - "application/x-www-form-urlencoded", - "application/json" - ] + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded", "application/json"] } }, "/relation-tuples/check/openapi": { @@ -481,13 +447,8 @@ "format": "int32" } ], - "tags": [ - "permission" - ], - "consumes": [ - "application/x-www-form-urlencoded", - "application/json" - ] + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded", "application/json"] }, "post": { "summary": "Performs an authorization check.", @@ -517,13 +478,8 @@ } } ], - "tags": [ - "permission" - ], - "consumes": [ - "application/x-www-form-urlencoded", - "application/json" - ] + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded", "application/json"] } }, "/relation-tuples/expand": { @@ -569,12 +525,8 @@ "type": "string" } ], - "tags": [ - "permission" - ], - "consumes": [ - "application/x-www-form-urlencoded" - ] + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded"] } }, "/version": { @@ -590,9 +542,7 @@ } } }, - "tags": [ - "version" - ] + "tags": ["version"] } } }, @@ -809,11 +759,7 @@ } }, "description": "RelationTuple defines a relation between an Object and a Subject.", - "required": [ - "namespace", - "object", - "relation" - ] + "required": ["namespace", "object", "relation"] }, "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta": { "type": "object", @@ -831,11 +777,7 @@ }, "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action": { "type": "string", - "enum": [ - "ACTION_UNSPECIFIED", - "insert", - "delete" - ], + "enum": ["ACTION_UNSPECIFIED", "insert", "delete"], "default": "ACTION_UNSPECIFIED", "description": " - ACTION_UNSPECIFIED: Unspecified.\nThe `TransactRelationTuples` RPC ignores this\nRelationTupleDelta if an action was unspecified.\n - insert: Insertion of a new RelationTuple.\nIt is ignored if already existing.\n - delete: Deletion of the RelationTuple.\nIt is ignored if it does not exist." }, @@ -870,11 +812,7 @@ } }, "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`.", - "required": [ - "namespace", - "object", - "relation" - ] + "required": ["namespace", "object", "relation"] }, "ory.keto.relation_tuples.v1alpha2.SubjectSetQuery": { "type": "object", @@ -917,9 +855,7 @@ "description": "The children of this node.\n\nThis is never set if `node_type` == `NODE_TYPE_LEAF`." } }, - "required": [ - "type" - ] + "required": ["type"] }, "ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse": { "type": "object", diff --git a/spec/api.json b/spec/api.json index c79784b3c..eb7312289 100755 --- a/spec/api.json +++ b/spec/api.json @@ -50,14 +50,6 @@ }, "type": "object" }, - "errorGeneric": { - "properties": { - "error": { - "$ref": "#/components/schemas/ory.keto.relation_tuples.v1alpha2.ErrorObject" - } - }, - "type": "object" - }, "expandedPermissionTree": { "properties": { "children": { @@ -119,61 +111,6 @@ "ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse": { "type": "object" }, - "ory.keto.relation_tuples.v1alpha2.ErrorObject": { - "properties": { - "code": { - "description": "The status code", - "example": 404, - "format": "int64", - "pattern": "^[0-9]$", - "title": "code", - "type": "integer" - }, - "debug": { - "description": "This field is often not exposed to protect against leaking\nsensitive information", - "example": "SQL field 'foo' is not a bool", - "title": "Debug information", - "type": "string" - }, - "details": { - "additionalProperties": { - "type": "string" - }, - "title": "Further error details", - "type": "object" - }, - "id": { - "description": "Useful when trying to identify various errors in application logic.", - "title": "The error ID", - "type": "string" - }, - "message": { - "description": "Response message", - "example": "The resource could not be found", - "title": "message", - "type": "string" - }, - "reason": { - "description": "A human-readable reason for the error", - "example": "User with ID 1234 does not exist.", - "title": "The reason for the failure", - "type": "string" - }, - "request": { - "description": "The request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.", - "example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6", - "title": "The request ID", - "type": "string" - }, - "status": { - "description": "The human-readable description of the code.", - "example": "Not Found", - "title": "The status description", - "type": "string" - } - }, - "type": "object" - }, "ory.keto.relation_tuples.v1alpha2.ExpandResponse": { "description": "The response for a ExpandService.Expand RPC.", "properties": { @@ -450,16 +387,6 @@ "responses": { "204": { "description": "An empty response." - }, - "default": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "Generic error" } }, "summary": "Deletes relationships based on relation query", @@ -485,16 +412,6 @@ "responses": { "204": { "description": "An empty response." - }, - "default": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "Generic error" } }, "summary": "Writes one or more relationships in a single transaction.", @@ -524,16 +441,6 @@ } }, "description": "The created relationship." - }, - "default": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "Generic error" } }, "summary": "Creates a relationship", @@ -638,16 +545,6 @@ } }, "description": "The list of namespaces." - }, - "default": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "Generic error" } }, "summary": "Lists Namespaces", @@ -678,16 +575,6 @@ } }, "description": "The result of the syntax checker" - }, - "default": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "Generic error" } }, "summary": "Performs a syntax check request.", @@ -782,16 +669,6 @@ } }, "description": "The list of relationships." - }, - "default": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "Generic error" } }, "summary": "Lists ACL relationships.", @@ -888,16 +765,6 @@ } }, "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200." - }, - "default": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "Generic error" } }, "summary": "Performs an authorization check.", @@ -942,16 +809,6 @@ } }, "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200." - }, - "default": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "Generic error" } }, "summary": "Performs an authorization check.", @@ -1048,16 +905,6 @@ } }, "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200." - }, - "default": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "Generic error" } }, "summary": "Performs an authorization check.", @@ -1102,16 +949,6 @@ } }, "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200." - }, - "default": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "Generic error" } }, "summary": "Performs an authorization check.", @@ -1169,16 +1006,6 @@ } }, "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200." - }, - "default": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/errorGeneric" - } - } - }, - "description": "Generic error" } }, "summary": "Expands the subject set into a tree of subjects.", diff --git a/spec/files.go b/spec/files.go index d1bbbdad6..3e8dbefe6 100644 --- a/spec/files.go +++ b/spec/files.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Ory Corp +// Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 package spec diff --git a/spec/swagger.json b/spec/swagger.json index 44bfc4867..734700853 100755 --- a/spec/swagger.json +++ b/spec/swagger.json @@ -1,21 +1,9 @@ { "swagger": "2.0", "info": { - "title": "ORY Keto", - "description": "Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.", - "version": "Latest", - "contact": { - "name": "ORY", - "url": "https://www.ory.sh", - "email": "hi@ory.sh" - }, - "license": { - "name": "Apache 2.0", - "url": "https://github.com/ory/keto/blob/master/LICENSE" - } + "title": "ory/keto/opl/v1alpha1/syntax_service.proto", + "version": "version not set" }, - "basePath": "/", - "schemes": ["http", "https"], "consumes": ["application/json"], "produces": ["application/json"], "paths": { @@ -27,12 +15,6 @@ "204": { "description": "An empty response.", "schema": {} - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/errorGeneric" - } } }, "parameters": [ @@ -98,12 +80,6 @@ "schema": { "$ref": "#/definitions/relationship" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/errorGeneric" - } } }, "parameters": [ @@ -129,12 +105,6 @@ "examples": { "application/json": {} } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/errorGeneric" - } } }, "parameters": [ @@ -174,12 +144,6 @@ ] } } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/errorGeneric" - } } }, "tags": ["relationship"], @@ -196,12 +160,6 @@ "schema": { "$ref": "#/definitions/checkOplSyntaxResult" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/errorGeneric" - } } }, "parameters": [ @@ -228,12 +186,6 @@ "schema": { "$ref": "#/definitions/relationships" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/errorGeneric" - } } }, "parameters": [ @@ -322,12 +274,6 @@ "schema": { "$ref": "#/definitions/checkPermissionResult" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/errorGeneric" - } } }, "parameters": [ @@ -407,12 +353,6 @@ "schema": { "$ref": "#/definitions/checkPermissionResult" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/errorGeneric" - } } }, "parameters": [ @@ -446,12 +386,6 @@ "schema": { "$ref": "#/definitions/checkPermissionResult" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/errorGeneric" - } } }, "parameters": [ @@ -531,12 +465,6 @@ "schema": { "$ref": "#/definitions/checkPermissionResult" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/errorGeneric" - } } }, "parameters": [ @@ -564,12 +492,6 @@ "schema": { "$ref": "#/definitions/expandedPermissionTree" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/errorGeneric" - } } }, "parameters": [ @@ -618,12 +540,6 @@ "schema": { "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.GetVersionResponse" } - }, - "default": { - "description": "Generic error", - "schema": { - "$ref": "#/definitions/errorGeneric" - } } }, "tags": ["version"] @@ -748,69 +664,6 @@ "ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse": { "type": "object" }, - "ory.keto.relation_tuples.v1alpha2.ErrorObject": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int64", - "example": 404, - "description": "The status code", - "title": "code", - "pattern": "^[0-9]$" - }, - "message": { - "type": "string", - "example": "The resource could not be found", - "description": "Response message", - "title": "message" - }, - "debug": { - "type": "string", - "example": "SQL field 'foo' is not a bool", - "description": "This field is often not exposed to protect against leaking\nsensitive information", - "title": "Debug information" - }, - "details": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "title": "Further error details" - }, - "id": { - "type": "string", - "description": "Useful when trying to identify various errors in application logic.", - "title": "The error ID" - }, - "reason": { - "type": "string", - "example": "User with ID 1234 does not exist.", - "description": "A human-readable reason for the error", - "title": "The reason for the failure" - }, - "request": { - "type": "string", - "example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6", - "description": "The request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.", - "title": "The request ID" - }, - "status": { - "type": "string", - "example": "Not Found", - "description": "The human-readable description of the code.", - "title": "The status description" - } - } - }, - "errorGeneric": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorObject" - } - } - }, "ory.keto.relation_tuples.v1alpha2.ExpandResponse": { "type": "object", "properties": { From 2f11642e77f2378a84dd0807500ecdcf1fa6a2c0 Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Tue, 21 Feb 2023 15:05:41 +0100 Subject: [PATCH 07/42] feat: switch to gRPC gateway --- .schema/openapi/patches/replacements.sed | 1 + Makefile | 10 +- buf.gen.yaml | 8 +- go.mod | 9 +- go.sum | 4 + internal/check/handler.go | 38 +- internal/check/handler_test.go | 14 +- internal/driver/daemon.go | 34 +- internal/e2e/full_suit_test.go | 5 +- internal/e2e/grpc_client_test.go | 2 +- internal/e2e/rest_client_test.go | 14 +- internal/e2e/sdk_client_test.go | 6 +- internal/e2e/testcases_test.go | 8 +- internal/expand/handler.go | 32 +- internal/httpclient/.openapi-generator/FILES | 4 + internal/httpclient/README.md | 2 + internal/httpclient/api/openapi.yaml | 138 ++ internal/httpclient/api_permission.go | 49 + internal/httpclient/api_relationship.go | 58 +- internal/httpclient/docs/ErrorGeneric.md | 51 + internal/httpclient/docs/ErrorGenericError.md | 233 +++ internal/httpclient/docs/RelationshipApi.md | 8 +- internal/httpclient/docs/RelationshipDelta.md | 16 +- internal/httpclient/model_error_generic.go | 107 ++ .../httpclient/model_error_generic_error.go | 366 +++++ ...keto_relation_tuples_v1alpha2_node_type.go | 2 +- .../httpclient/model_relationship_delta.go | 68 +- internal/relationtuple/transact_server.go | 34 +- .../relationtuple/transact_server_test.go | 2 +- internal/schema/handler_test.go | 7 +- internal/x/helpers.go | 64 + internal/x/test_endpoints.go | 15 +- ketoapi/enc_proto.go | 61 + proto/buf.lock | 8 +- proto/buf.md | 96 +- proto/buf.yaml | 1 + proto/openapiv2/gateway.swagger.json | 865 ----------- .../keto/opl/v1alpha1/syntax_service.pb.go | 8 +- .../keto/opl/v1alpha1/syntax_service.pb.gw.go | 171 +++ .../v1alpha1/syntax_service.pb.validate.go | 534 +++++++ .../keto/opl/v1alpha1/syntax_service.proto | 2 +- .../keto/opl/v1alpha1/syntax_service_pb.d.ts | 8 +- .../keto/opl/v1alpha1/syntax_service_pb.js | 42 +- .../v1alpha2/check_service.pb.gw.go | 430 ++++++ .../v1alpha2/check_service.pb.validate.go | 367 +++++ .../v1alpha2/check_service_grpc.pb.go | 105 ++ .../v1alpha2/expand_service.pb.go | 108 +- .../v1alpha2/expand_service.pb.gw.go | 182 +++ .../v1alpha2/expand_service.pb.validate.go | 497 ++++++ .../v1alpha2/expand_service.proto | 14 +- .../v1alpha2/expand_service_pb.d.ts | 14 +- .../v1alpha2/expand_service_pb.js | 16 +- .../v1alpha2/namespaces_service.pb.gw.go | 155 ++ .../namespaces_service.pb.validate.go | 375 +++++ .../relation_tuples/v1alpha2/openapi.pb.go | 366 +++++ .../v1alpha2/openapi.pb.validate.go | 283 ++++ .../relation_tuples/v1alpha2/openapi.proto | 101 ++ .../v1alpha2/openapi_grpc_pb.js | 1 + .../relation_tuples/v1alpha2/openapi_pb.d.ts | 77 + .../relation_tuples/v1alpha2/openapi_pb.js | 567 +++++++ .../v1alpha2/read_service.pb.gw.go | 173 +++ .../v1alpha2/read_service.pb.validate.go | 571 +++++++ .../v1alpha2/relation_tuples.pb.validate.go | 898 +++++++++++ .../relation_tuples/v1alpha2/version.pb.gw.go | 155 ++ .../v1alpha2/version.pb.validate.go | 242 +++ .../v1alpha2/write_service.pb.go | 371 ++--- .../v1alpha2/write_service.pb.gw.go | 352 +++++ .../v1alpha2/write_service.pb.validate.go | 1335 +++++++++++++++++ .../v1alpha2/write_service.proto | 14 +- .../v1alpha2/write_service_grpc_pb.d.ts | 2 + .../v1alpha2/write_service_grpc_pb.js | 2 + .../v1alpha2/write_service_pb.d.ts | 2 + .../v1alpha2/write_service_pb.js | 4 + spec/api.json | 177 +++ spec/{swagger.json => api.swagger.json} | 161 +- 75 files changed, 9982 insertions(+), 1340 deletions(-) create mode 100644 internal/httpclient/docs/ErrorGeneric.md create mode 100644 internal/httpclient/docs/ErrorGenericError.md create mode 100644 internal/httpclient/model_error_generic.go create mode 100644 internal/httpclient/model_error_generic_error.go delete mode 100644 proto/openapiv2/gateway.swagger.json create mode 100644 proto/ory/keto/opl/v1alpha1/syntax_service.pb.gw.go create mode 100644 proto/ory/keto/opl/v1alpha1/syntax_service.pb.validate.go create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.gw.go create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.validate.go create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.gw.go create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.validate.go create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.gw.go create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.validate.go create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.validate.go create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/openapi.proto create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/openapi_grpc_pb.js create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.d.ts create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.js create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.gw.go create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.validate.go create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.validate.go create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/version.pb.gw.go create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/version.pb.validate.go create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.gw.go create mode 100644 proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.validate.go rename spec/{swagger.json => api.swagger.json} (84%) diff --git a/.schema/openapi/patches/replacements.sed b/.schema/openapi/patches/replacements.sed index 95527c06d..f18d381bd 100644 --- a/.schema/openapi/patches/replacements.sed +++ b/.schema/openapi/patches/replacements.sed @@ -1,4 +1,5 @@ s/ory.keto.relation_tuples.v1alpha2.ErrorResponse/errorGeneric/g +s/ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error/genericError/g s/ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship/createRelationshipBody/g s/ory.keto.relation_tuples.v1alpha2.SubjectSet/subjectSet/g s/ory.keto.relation_tuples.v1alpha2.SubjectTree/expandedPermissionTree/g diff --git a/Makefile b/Makefile index f58340193..42e100976 100644 --- a/Makefile +++ b/Makefile @@ -61,22 +61,22 @@ docker: .PHONY: sdk sdk: buf .bin/swagger .bin/ory node_modules rm -rf internal/httpclient - cp proto/openapiv2/gateway.swagger.json spec/swagger.json + # cp proto/openapiv2/gateway.swagger.json spec/swagger.json # swagger generate spec -m -o spec/swagger.json \ # -c github.com/ory/keto \ # -c github.com/ory/x/healthx \ # -x internal/httpclient \ # -x internal/e2e - .bin/ory dev swagger sanitize ./spec/swagger.json - sed -i -f ./.schema/openapi/patches/replacements.sed ./spec/swagger.json - swagger validate ./spec/swagger.json + .bin/ory dev swagger sanitize ./spec/api.swagger.json + sed -i -f ./.schema/openapi/patches/replacements.sed ./spec/api.swagger.json + swagger validate ./spec/api.swagger.json CIRCLE_PROJECT_USERNAME=ory CIRCLE_PROJECT_REPONAME=keto \ .bin/ory dev openapi migrate \ --health-path-tags metadata \ -p file://.schema/openapi/patches/health.yaml \ -p file://.schema/openapi/patches/meta.yaml \ -p file://.schema/openapi/patches/checkServices.yaml \ - spec/swagger.json spec/api.json + spec/api.swagger.json spec/api.json mkdir -p internal/httpclient diff --git a/buf.gen.yaml b/buf.gen.yaml index 68e3024d6..9ba025710 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -9,6 +9,10 @@ plugins: out: proto opt: paths=source_relative,require_unimplemented_servers=false + - plugin: buf.build/bufbuild/validate-go + out: proto + opt: paths=source_relative + - plugin: buf.build/protocolbuffers/js out: proto opt: import_style=commonjs,binary @@ -29,13 +33,13 @@ plugins: - remote: buf.build/grpc-ecosystem/plugins/openapiv2:v2.14.0-1 opt: - allow_merge=true - - merge_file_name=gateway + - merge_file_name=api - openapi_naming_strategy=fqn - visibility_restriction_selectors=PUBLIC - disable_service_tags=true - disable_default_errors=true - disable_default_responses=true - out: proto/openapiv2 + out: spec - remote: buf.build/sawadashota/plugins/protoc-gen-doc:v1.5.1 out: proto diff --git a/go.mod b/go.mod index 4dd190674..90915b490 100644 --- a/go.mod +++ b/go.mod @@ -12,13 +12,14 @@ require ( github.com/gobuffalo/pop/v6 v6.1.1 github.com/gofrs/uuid v4.4.0+incompatible github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 github.com/julienschmidt/httprouter v1.3.0 github.com/luna-duclos/instrumentedsql v1.1.3 github.com/ory/analytics-go/v4 v4.0.3 github.com/ory/graceful v0.1.3 - github.com/ory/herodot v0.9.13 + github.com/ory/herodot v0.9.14-0.20230221151357-8771415caa58 github.com/ory/jsonschema/v3 v3.0.7 - github.com/ory/keto/proto v0.10.0-alpha.0 + github.com/ory/keto/proto v0.10.0-alpha.0.pre.1 github.com/ory/x v0.0.534 github.com/pelletier/go-toml v1.9.5 github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 @@ -41,6 +42,7 @@ require ( golang.org/x/exp v0.0.0-20230131160201-f062dba9d201 golang.org/x/oauth2 v0.5.0 golang.org/x/sync v0.1.0 + google.golang.org/genproto v0.0.0-20230131230820-1c016267d619 google.golang.org/grpc v1.53.0 google.golang.org/protobuf v1.28.1 ) @@ -68,6 +70,7 @@ require ( github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect + github.com/envoyproxy/protoc-gen-validate v0.9.1 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/fatih/color v1.14.1 // indirect github.com/fatih/structs v1.1.0 // indirect @@ -96,7 +99,6 @@ require ( github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/gorilla/css v1.0.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-hclog v1.4.0 // indirect github.com/hashicorp/go-retryablehttp v0.7.2 // indirect @@ -181,7 +183,6 @@ require ( golang.org/x/tools v0.5.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230131230820-1c016267d619 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 8f70442c7..cca6a6a60 100644 --- a/go.sum +++ b/go.sum @@ -169,6 +169,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.9.1 h1:PS7VIOgmSVhWUEeZwTe7z7zouA22Cr590PzXKbZHOVY= +github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -639,6 +641,8 @@ github.com/ory/graceful v0.1.3 h1:FaeXcHZh168WzS+bqruqWEw/HgXWLdNv2nJ+fbhxbhc= github.com/ory/graceful v0.1.3/go.mod h1:4zFz687IAF7oNHHiB586U4iL+/4aV09o/PYLE34t2bA= github.com/ory/herodot v0.9.13 h1:cN/Z4eOkErl/9W7hDIDLb79IO/bfsH+8yscBjRpB4IU= github.com/ory/herodot v0.9.13/go.mod h1:IWDs9kSvFQqw/cQ8zi5ksyYvITiUU4dI7glUrhZcJYo= +github.com/ory/herodot v0.9.14-0.20230221151357-8771415caa58 h1:bhqc664AI9K8ZT4ArUFUrs54Yy057WcO8ZzLzwtnqo4= +github.com/ory/herodot v0.9.14-0.20230221151357-8771415caa58/go.mod h1:pgbrEh43b0Gl1ZI8UC3qxkKWXH4RFX5wTX/RTydKqmM= github.com/ory/jsonschema/v3 v3.0.7 h1:GQ9qfZDiJqs4l2d3p56dozCChvejQFZyLKGHYzDzOSo= github.com/ory/jsonschema/v3 v3.0.7/go.mod h1:g8c8YOtN4TrR2wYeMdT02GDmzJDI0fEW2nI26BECafY= github.com/ory/viper v1.7.5/go.mod h1:ypOuyJmEUb3oENywQZRgeAMwqgOyDqwboO1tj3DjTaM= diff --git a/internal/check/handler.go b/internal/check/handler.go index 86f778b34..957f427ec 100644 --- a/internal/check/handler.go +++ b/internal/check/handler.go @@ -12,6 +12,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/pkg/errors" + "google.golang.org/grpc/metadata" "github.com/ory/herodot" @@ -67,7 +68,7 @@ func (h *Handler) RegisterReadGRPCGateway(ctx context.Context, mux *runtime.Serv return rts.RegisterCheckServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) } func (h *Handler) RegisterReadGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return rts.RegisterReadServiceHandler(ctx, mux, conn) + return rts.RegisterCheckServiceHandler(ctx, mux, conn) } // Check Permission Result @@ -305,31 +306,38 @@ func (h *Handler) postCheck(ctx context.Context, body io.Reader, query url.Value return h.d.PermissionEngine().CheckIsMember(ctx, t[0], maxDepth) } -func (h *Handler) Check(ctx context.Context, req *rts.CheckRequest) (*rts.CheckResponse, error) { - var src ketoapi.TupleData - if req.Tuple != nil { - src = req.Tuple - } else { - src = req +func (h *Handler) Check(ctx context.Context, req *rts.CheckRequest) (res *rts.CheckResponse, err error) { + tuple := (&ketoapi.RelationTuple{}).FromCheckRequest(req) + + // Check if we should set the HTTP status code to 403 instead of 200 if the check fails. + if md, ok := metadata.FromIncomingContext(ctx); ok { + path := md["path"] + if len(path) > 0 && path[0] == RouteBase { + defer func() { + if res != nil && !res.Allowed { + _ = grpc.SetHeader(ctx, metadata.Pairs("x-http-code", "403")) + } + }() + } } - tuple, err := (&ketoapi.RelationTuple{}).FromDataProvider(src) - if err != nil { - return nil, err + if tuple.SubjectID == nil && tuple.SubjectSet == nil { + return nil, ketoapi.ErrNilSubject } internalTuple, err := h.d.ReadOnlyMapper().FromTuple(ctx, tuple) + if errors.Is(err, herodot.ErrNotFound) { + res = &rts.CheckResponse{Allowed: false} + return res, nil + } if err != nil { return nil, err } allowed, err := h.d.PermissionEngine().CheckIsMember(ctx, internalTuple[0], int(req.MaxDepth)) - // TODO add content change handling if err != nil { return nil, err } - return &rts.CheckResponse{ - Allowed: allowed, - Snaptoken: "not yet implemented", - }, nil + res = &rts.CheckResponse{Allowed: allowed} + return res, nil } diff --git a/internal/check/handler_test.go b/internal/check/handler_test.go index 6d1593872..6ed7d2bd7 100644 --- a/internal/check/handler_test.go +++ b/internal/check/handler_test.go @@ -7,7 +7,6 @@ import ( "context" "io" "net/http" - "net/http/httptest" "net/url" "testing" @@ -17,7 +16,6 @@ import ( "github.com/ory/keto/internal/driver/config" - "github.com/julienschmidt/httprouter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" @@ -60,19 +58,15 @@ func openAPIAssertDenied(t *testing.T, resp *http.Response) { } func TestRESTHandler(t *testing.T) { - nspaces := []*namespace.Namespace{{ - Name: "check handler", - }} + nspaces := []*namespace.Namespace{{Name: "check handler"}} ctx, cancel := context.WithCancel(context.Background()) defer cancel() reg := driver.NewSqliteTestRegistry(t, false) require.NoError(t, reg.Config(ctx).Set(config.KeyNamespaces, nspaces)) - h := check.NewHandler(reg) - r := httprouter.New() - h.RegisterReadRoutes(&x.ReadRouter{Router: r}) - ts := httptest.NewServer(r) - defer ts.Close() + + endpoints := x.NewTestEndpoints(t, check.NewHandler(reg)) + ts := endpoints.HTTP for _, suite := range []struct { name string diff --git a/internal/driver/daemon.go b/internal/driver/daemon.go index 726252eeb..0375f5cb2 100644 --- a/internal/driver/daemon.go +++ b/internal/driver/daemon.go @@ -340,7 +340,16 @@ func (r *RegistryDefault) ReadRouter(ctx context.Context) http.Handler { } n.Use(reqlog.NewMiddlewareFromLogger(r.l, "read#Ory Keto").ExcludePaths(healthx.AliveCheckPath, healthx.ReadyCheckPath)) - mux := runtime.NewServeMux(runtime.WithForwardResponseOption(x.HttpResponseModifier)) + conn, err := grpc.DialContext(ctx, r.Config(ctx).ReadAPIListenOn(), grpc.WithTransportCredentials(insecure.NewCredentials())) + if err != nil { + panic(err) + } + healthClient := grpcHealthV1.NewHealthClient(conn) + mux := runtime.NewServeMux(append( + x.GRPCGatewayMuxOptions, + runtime.WithHealthEndpointAt(healthClient, healthx.ReadyCheckPath), + runtime.WithHealthEndpointAt(healthClient, healthx.AliveCheckPath), + )...) for _, h := range r.allHandlers() { if h, ok := h.(ReadHandler); ok { if err := h.RegisterReadGRPCGateway(ctx, mux, r.Config(ctx).ReadAPIListenOn(), grpc.WithTransportCredentials(insecure.NewCredentials())); err != nil { @@ -353,7 +362,6 @@ func (r *RegistryDefault) ReadRouter(ctx context.Context) http.Handler { r.PrometheusManager().RegisterRouter(br.Router) r.MetricsHandler().SetRoutes(br.Router) - r.HealthHandler().SetHealthRoutes(br.Router, false) r.HealthHandler().SetVersionRoutes(br.Router) n.UseHandler(&RouterOrGatewayHandler{Router: br.Router, ServeMux: mux}) @@ -379,7 +387,16 @@ func (r *RegistryDefault) WriteRouter(ctx context.Context) http.Handler { } n.Use(reqlog.NewMiddlewareFromLogger(r.l, "write#Ory Keto").ExcludePaths(healthx.AliveCheckPath, healthx.ReadyCheckPath)) - mux := runtime.NewServeMux(runtime.WithForwardResponseOption(x.HttpResponseModifier)) + conn, err := grpc.DialContext(ctx, r.Config(ctx).WriteAPIListenOn(), grpc.WithTransportCredentials(insecure.NewCredentials())) + if err != nil { + panic(err) + } + healthClient := grpcHealthV1.NewHealthClient(conn) + mux := runtime.NewServeMux(append( + x.GRPCGatewayMuxOptions, + runtime.WithHealthEndpointAt(healthClient, healthx.ReadyCheckPath), + runtime.WithHealthEndpointAt(healthClient, healthx.AliveCheckPath), + )...) for _, h := range r.allHandlers() { if h, ok := h.(WriteHandler); ok { if err := h.RegisterWriteGRPCGateway(ctx, mux, r.Config(ctx).WriteAPIListenOn(), grpc.WithTransportCredentials(insecure.NewCredentials())); err != nil { @@ -425,7 +442,16 @@ func (r *RegistryDefault) OPLSyntaxRouter(ctx context.Context) http.Handler { r.HealthHandler().SetHealthRoutes(pr.Router, false) r.HealthHandler().SetVersionRoutes(pr.Router) - mux := runtime.NewServeMux(runtime.WithForwardResponseOption(x.HttpResponseModifier)) + conn, err := grpc.DialContext(ctx, r.Config(ctx).OPLSyntaxAPIListenOn(), grpc.WithTransportCredentials(insecure.NewCredentials())) + if err != nil { + panic(err) + } + healthClient := grpcHealthV1.NewHealthClient(conn) + mux := runtime.NewServeMux(append( + x.GRPCGatewayMuxOptions, + runtime.WithHealthEndpointAt(healthClient, healthx.ReadyCheckPath), + runtime.WithHealthEndpointAt(healthClient, healthx.AliveCheckPath), + )...) for _, h := range r.allHandlers() { if h, ok := h.(OPLSyntaxHandler); ok { if err := h.RegisterSyntaxGRPCGateway(ctx, mux, r.Config(ctx).OPLSyntaxAPIListenOn(), grpc.WithTransportCredentials(insecure.NewCredentials())); err != nil { diff --git a/internal/e2e/full_suit_test.go b/internal/e2e/full_suit_test.go index d40bb04c0..60ec9a9fc 100644 --- a/internal/e2e/full_suit_test.go +++ b/internal/e2e/full_suit_test.go @@ -129,7 +129,7 @@ func Test(t *testing.T) { } } -func TestServeConfig(t *testing.T) { +func TestServeCORS(t *testing.T) { t.Parallel() ctx, reg, _ := newInitializedReg(t, dbx.GetSqlite(t, dbx.SQLiteMemory), map[string]interface{}{ @@ -150,8 +150,9 @@ func TestServeConfig(t *testing.T) { req, err := http.NewRequest(http.MethodOptions, "http://"+reg.Config(ctx).ReadAPIListenOn()+relationtuple.ReadRouteBase, nil) require.NoError(t, err) req.Header.Set("Origin", "https://ory.sh") + req.Header.Set("Access-Control-Request-Method", http.MethodGet) resp, err := http.DefaultClient.Do(req) require.NoError(t, err) - require.Equal(t, http.StatusOK, resp.StatusCode) + require.Equal(t, http.StatusNoContent, resp.StatusCode) assert.Equal(t, "https://ory.sh", resp.Header.Get("Access-Control-Allow-Origin"), "%+v", resp.Header) } diff --git a/internal/e2e/grpc_client_test.go b/internal/e2e/grpc_client_test.go index 28a48a983..0e1fee51e 100644 --- a/internal/e2e/grpc_client_test.go +++ b/internal/e2e/grpc_client_test.go @@ -237,7 +237,7 @@ func (g *grpcClient) transactTuples(t require.TestingT, ins []*ketoapi.RelationT func (g *grpcClient) oplCheckSyntax(t require.TestingT, content []byte) (parseErrors []*ketoapi.ParseError) { c := opl.NewSyntaxServiceClient(g.oplSyntaxConn(t)) - res, err := c.Check(g.ctx, &opl.CheckRequest{Content: string(content)}) + res, err := c.Check(g.ctx, &opl.CheckRequest{Content: content}) require.NoError(t, err) raw, err := json.Marshal(res.Errors) diff --git a/internal/e2e/rest_client_test.go b/internal/e2e/rest_client_test.go index 9dcaa3510..149285ea7 100644 --- a/internal/e2e/rest_client_test.go +++ b/internal/e2e/rest_client_test.go @@ -12,14 +12,14 @@ import ( "strconv" "time" + "github.com/ory/x/healthx" + "github.com/ory/keto/internal/schema" "github.com/ory/keto/ketoapi" "github.com/ory/herodot" "github.com/tidwall/gjson" - "github.com/ory/x/healthx" - "github.com/ory/keto/internal/x" "github.com/stretchr/testify/assert" @@ -45,7 +45,9 @@ func (rc *restClient) queryNamespaces(t require.TestingT) (res ketoapi.GetNamesp } func (rc *restClient) oplCheckSyntax(t require.TestingT, content []byte) []*ketoapi.ParseError { - body, code := rc.makeRequest(t, http.MethodPost, schema.RouteBase, string(content), rc.oplSyntaxURL) + enc, err := json.Marshal(content) + require.NoError(t, err) + body, code := rc.makeRequest(t, http.MethodPost, schema.RouteBase, string(enc), rc.oplSyntaxURL) assert.Equal(t, http.StatusOK, code, body) var response ketoapi.CheckOPLSyntaxResponse require.NoError(t, json.Unmarshal([]byte(body), &response)) @@ -168,10 +170,8 @@ func (rc *restClient) expand(t require.TestingT, r *ketoapi.SubjectSet, depth in return tree } -func healthReady(t require.TestingT, readURL string) bool { - req, err := http.NewRequest("GET", readURL+healthx.ReadyCheckPath, nil) - require.NoError(t, err) - resp, err := http.DefaultClient.Do(req) +func healthReady(_ require.TestingT, readURL string) bool { + resp, err := http.Get(readURL + healthx.ReadyCheckPath) if err != nil { return false } diff --git a/internal/e2e/sdk_client_test.go b/internal/e2e/sdk_client_test.go index a81ed1e0a..b9a5f317a 100644 --- a/internal/e2e/sdk_client_test.go +++ b/internal/e2e/sdk_client_test.go @@ -36,10 +36,12 @@ func (c *sdkClient) requestCtx() context.Context { } func (c *sdkClient) oplCheckSyntax(t require.TestingT, content []byte) (parseErrors []*ketoapi.ParseError) { + body, err := json.Marshal(content) + require.NoError(t, err) res, _, err := c.getOPLSyntaxClient(). RelationshipApi. CheckOplSyntax(c.requestCtx()). - Body(string(content)). + Body(string(body)). Execute() require.NoError(t, err) @@ -286,7 +288,7 @@ func (c *sdkClient) waitUntilLive(t require.TestingT) { for err != nil { resp, _, err = c.getReadClient().MetadataApi.IsReady(c.requestCtx()).Execute() } - require.Equal(t, "ok", resp.Status) + require.Equal(t, "SERVING", resp.Status) } func (c *sdkClient) queryNamespaces(t require.TestingT) (response ketoapi.GetNamespacesResponse) { diff --git a/internal/e2e/testcases_test.go b/internal/e2e/testcases_test.go index da964ce55..1d15aca32 100644 --- a/internal/e2e/testcases_test.go +++ b/internal/e2e/testcases_test.go @@ -8,17 +8,15 @@ import ( "strconv" "testing" - "github.com/ory/x/pointerx" - - "github.com/ory/keto/internal/expand" - "github.com/ory/keto/ketoapi" - "github.com/ory/herodot" + "github.com/ory/x/pointerx" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/ory/keto/internal/expand" "github.com/ory/keto/internal/namespace" "github.com/ory/keto/internal/x" + "github.com/ory/keto/ketoapi" ) func runCases(c client, m *namespaceTestManager) func(*testing.T) { diff --git a/internal/expand/handler.go b/internal/expand/handler.go index 5104be8dd..6c09d8a2b 100644 --- a/internal/expand/handler.go +++ b/internal/expand/handler.go @@ -124,19 +124,27 @@ func (h *handler) getExpand(w http.ResponseWriter, r *http.Request, _ httprouter func (h *handler) Expand(ctx context.Context, req *rts.ExpandRequest) (*rts.ExpandResponse, error) { var subSet *ketoapi.SubjectSet - switch sub := req.Subject.Ref.(type) { - case *rts.Subject_Id: - return &rts.ExpandResponse{ - Tree: &rts.SubjectTree{ - NodeType: rts.NodeType_NODE_TYPE_LEAF, - Subject: rts.NewSubjectID(sub.Id), - }, - }, nil - case *rts.Subject_Set: + if req.Subject == nil { subSet = &ketoapi.SubjectSet{ - Namespace: sub.Set.Namespace, - Object: sub.Set.Object, - Relation: sub.Set.Relation, + Namespace: req.Namespace, + Object: req.Object, + Relation: req.Relation, + } + } else { + switch sub := req.Subject.Ref.(type) { + case *rts.Subject_Id: + return &rts.ExpandResponse{ + Tree: &rts.SubjectTree{ + NodeType: rts.NodeType_NODE_TYPE_LEAF, + Subject: rts.NewSubjectID(sub.Id), + }, + }, nil + case *rts.Subject_Set: + subSet = &ketoapi.SubjectSet{ + Namespace: sub.Set.Namespace, + Object: sub.Set.Object, + Relation: sub.Set.Relation, + } } } diff --git a/internal/httpclient/.openapi-generator/FILES b/internal/httpclient/.openapi-generator/FILES index 711017660..edee192f8 100644 --- a/internal/httpclient/.openapi-generator/FILES +++ b/internal/httpclient/.openapi-generator/FILES @@ -11,6 +11,8 @@ configuration.go docs/CheckOplSyntaxResult.md docs/CheckPermissionResult.md docs/CreateRelationshipBody.md +docs/ErrorGeneric.md +docs/ErrorGenericError.md docs/ExpandedPermissionTree.md docs/InlineResponse200.md docs/InlineResponse2001.md @@ -40,6 +42,8 @@ go.sum model_check_opl_syntax_result.go model_check_permission_result.go model_create_relationship_body.go +model_error_generic.go +model_error_generic_error.go model_expanded_permission_tree.go model_inline_response_200.go model_inline_response_200_1.go diff --git a/internal/httpclient/README.md b/internal/httpclient/README.md index 2902ee708..0e72c1a5d 100644 --- a/internal/httpclient/README.md +++ b/internal/httpclient/README.md @@ -100,6 +100,8 @@ Class | Method | HTTP request | Description - [CheckOplSyntaxResult](docs/CheckOplSyntaxResult.md) - [CheckPermissionResult](docs/CheckPermissionResult.md) - [CreateRelationshipBody](docs/CreateRelationshipBody.md) + - [ErrorGeneric](docs/ErrorGeneric.md) + - [ErrorGenericError](docs/ErrorGenericError.md) - [ExpandedPermissionTree](docs/ExpandedPermissionTree.md) - [InlineResponse200](docs/InlineResponse200.md) - [InlineResponse2001](docs/InlineResponse2001.md) diff --git a/internal/httpclient/api/openapi.yaml b/internal/httpclient/api/openapi.yaml index b5231386e..cdd5f207f 100644 --- a/internal/httpclient/api/openapi.yaml +++ b/internal/httpclient/api/openapi.yaml @@ -77,6 +77,12 @@ paths: responses: "204": description: An empty response. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorGeneric' + description: errorGeneric summary: Deletes relationships based on relation query tags: - relationship @@ -97,6 +103,12 @@ paths: responses: "204": description: An empty response. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorGeneric' + description: errorGeneric summary: Writes one or more relationships in a single transaction. tags: - relationship @@ -117,6 +129,12 @@ paths: schema: $ref: '#/components/schemas/relationship' description: The created relationship. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorGeneric' + description: errorGeneric summary: Creates a relationship tags: - relationship @@ -187,6 +205,12 @@ paths: schema: $ref: '#/components/schemas/relationshipNamespaces' description: The list of namespaces. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorGeneric' + description: errorGeneric summary: Lists Namespaces tags: - relationship @@ -197,6 +221,7 @@ paths: content: text/plain: schema: + format: byte type: string required: true x-originalParamName: content @@ -207,6 +232,12 @@ paths: schema: $ref: '#/components/schemas/checkOplSyntaxResult' description: The result of the syntax checker + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorGeneric' + description: errorGeneric summary: Performs a syntax check request. tags: - relationship @@ -306,6 +337,12 @@ paths: schema: $ref: '#/components/schemas/relationships' description: The list of relationships. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorGeneric' + description: errorGeneric summary: Lists ACL relationships. tags: - relationship @@ -398,6 +435,12 @@ paths: $ref: '#/components/schemas/checkPermissionResult' description: The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorGeneric' + description: errorGeneric "403": content: application/json: @@ -431,6 +474,12 @@ paths: $ref: '#/components/schemas/checkPermissionResult' description: The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorGeneric' + description: errorGeneric "403": content: application/json: @@ -530,6 +579,12 @@ paths: $ref: '#/components/schemas/checkPermissionResult' description: The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorGeneric' + description: errorGeneric "403": content: application/json: @@ -563,6 +618,12 @@ paths: $ref: '#/components/schemas/checkPermissionResult' description: The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorGeneric' + description: errorGeneric "403": content: application/json: @@ -627,6 +688,12 @@ paths: $ref: '#/components/schemas/expandedPermissionTree' description: The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/errorGeneric' + description: errorGeneric summary: Expands the subject set into a tree of subjects. tags: - permission @@ -711,6 +778,62 @@ components: subject_set: $ref: '#/components/schemas/subjectSet' type: object + errorGeneric: + description: The standard Ory JSON API error format. + properties: + error: + $ref: '#/components/schemas/errorGeneric.Error' + required: + - error + title: JSON API Error Response + type: object + errorGeneric.Error: + properties: + code: + example: "404" + format: int64 + title: The status code + type: string + debug: + description: Debug information is often not exposed to protect against leaking + sensitive information. + title: Debug information + type: string + details: + additionalProperties: + type: string + description: Further details about the error. + title: Further error details + type: object + id: + description: The error ID is useful when trying to identify various errors + in application logic. + title: The error ID + type: string + message: + description: The error's message (required). + example: The requested resource could not be found. + title: The error message + type: string + reason: + description: Reason holds a human-readable reason for the error. + title: The error reason + type: string + request: + description: |- + The request ID is often exposed internally in order to trace + errors across service architectures. This is often a UUID. + example: d7ef54b1-ec15-46e6-bccb-524b82c035e6 + title: The request ID + type: string + status: + description: Status holds the human-readable HTTP status code. + example: Not Found + title: The status description + type: string + required: + - message + type: object expandedPermissionTree: example: tuple: @@ -808,6 +931,18 @@ components: type: object ory.keto.relation_tuples.v1alpha2.NodeType: default: unspecified + description: |2- + - union: This node expands to a union of all children. + - exclusion: Not implemented yet. + - intersection: Not implemented yet. + - leaf: This node is a leaf and contains no children. + Its subject is a `SubjectID` unless `max_depth` was reached. + - tuple_to_subject_set: This node is a leaf and contains no children. + Its subject is a `SubjectID` unless `max_depth` was reached. + - computed_subject_set: This node is a leaf and contains no children. + Its subject is a `SubjectID` unless `max_depth` was reached. + - not: This node is a leaf and contains no children. + Its subject is a `SubjectID` unless `max_depth` was reached. enum: - unspecified - union @@ -912,6 +1047,9 @@ components: $ref: '#/components/schemas/relationshipDelta.Action' relation_tuple: $ref: '#/components/schemas/relationship' + required: + - action + - relation_tuple type: object relationshipDelta.Action: default: ACTION_UNSPECIFIED diff --git a/internal/httpclient/api_permission.go b/internal/httpclient/api_permission.go index a4f1d382b..7b1483d70 100644 --- a/internal/httpclient/api_permission.go +++ b/internal/httpclient/api_permission.go @@ -245,6 +245,16 @@ func (a *PermissionApiService) CheckPermissionExecute(r PermissionApiApiCheckPer body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorGeneric + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 403 { var v CheckPermissionResult err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -419,6 +429,16 @@ func (a *PermissionApiService) CheckPermissionOrErrorExecute(r PermissionApiApiC body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorGeneric + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 403 { var v CheckPermissionResult err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -564,6 +584,15 @@ func (a *PermissionApiService) ExpandPermissionsExecute(r PermissionApiApiExpand body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorGeneric + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -675,6 +704,16 @@ func (a *PermissionApiService) PostCheckPermissionExecute(r PermissionApiApiPost body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorGeneric + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 403 { var v CheckPermissionResult err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -795,6 +834,16 @@ func (a *PermissionApiService) PostCheckPermissionOrErrorExecute(r PermissionApi body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorGeneric + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 403 { var v CheckPermissionResult err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) diff --git a/internal/httpclient/api_relationship.go b/internal/httpclient/api_relationship.go index 70aab4337..6935fa50d 100644 --- a/internal/httpclient/api_relationship.go +++ b/internal/httpclient/api_relationship.go @@ -203,6 +203,15 @@ func (a *RelationshipApiService) CheckOplSyntaxExecute(r RelationshipApiApiCheck body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorGeneric + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -314,6 +323,15 @@ func (a *RelationshipApiService) CreateRelationshipExecute(r RelationshipApiApiC body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorGeneric + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -440,7 +458,7 @@ func (a *RelationshipApiService) DeleteRelationshipsExecute(r RelationshipApiApi } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -469,6 +487,15 @@ func (a *RelationshipApiService) DeleteRelationshipsExecute(r RelationshipApiApi body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorGeneric + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } return localVarHTTPResponse, newErr } @@ -633,6 +660,15 @@ func (a *RelationshipApiService) GetRelationshipsExecute(r RelationshipApiApiGet body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorGeneric + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -734,6 +770,15 @@ func (a *RelationshipApiService) ListRelationshipNamespacesExecute(r Relationshi body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorGeneric + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -812,7 +857,7 @@ func (a *RelationshipApiService) PatchRelationshipsExecute(r RelationshipApiApiP } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -843,6 +888,15 @@ func (a *RelationshipApiService) PatchRelationshipsExecute(r RelationshipApiApiP body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorGeneric + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } return localVarHTTPResponse, newErr } diff --git a/internal/httpclient/docs/ErrorGeneric.md b/internal/httpclient/docs/ErrorGeneric.md new file mode 100644 index 000000000..2886986d7 --- /dev/null +++ b/internal/httpclient/docs/ErrorGeneric.md @@ -0,0 +1,51 @@ +# ErrorGeneric + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | [**ErrorGenericError**](ErrorGenericError.md) | | + +## Methods + +### NewErrorGeneric + +`func NewErrorGeneric(error_ ErrorGenericError, ) *ErrorGeneric` + +NewErrorGeneric instantiates a new ErrorGeneric object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewErrorGenericWithDefaults + +`func NewErrorGenericWithDefaults() *ErrorGeneric` + +NewErrorGenericWithDefaults instantiates a new ErrorGeneric object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetError + +`func (o *ErrorGeneric) GetError() ErrorGenericError` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *ErrorGeneric) GetErrorOk() (*ErrorGenericError, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *ErrorGeneric) SetError(v ErrorGenericError)` + +SetError sets Error field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/internal/httpclient/docs/ErrorGenericError.md b/internal/httpclient/docs/ErrorGenericError.md new file mode 100644 index 000000000..2bfc1e355 --- /dev/null +++ b/internal/httpclient/docs/ErrorGenericError.md @@ -0,0 +1,233 @@ +# ErrorGenericError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | Pointer to **string** | | [optional] +**Debug** | Pointer to **string** | Debug information is often not exposed to protect against leaking sensitive information. | [optional] +**Details** | Pointer to **map[string]string** | Further details about the error. | [optional] +**Id** | Pointer to **string** | The error ID is useful when trying to identify various errors in application logic. | [optional] +**Message** | **string** | The error's message (required). | +**Reason** | Pointer to **string** | Reason holds a human-readable reason for the error. | [optional] +**Request** | Pointer to **string** | The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. | [optional] +**Status** | Pointer to **string** | Status holds the human-readable HTTP status code. | [optional] + +## Methods + +### NewErrorGenericError + +`func NewErrorGenericError(message string, ) *ErrorGenericError` + +NewErrorGenericError instantiates a new ErrorGenericError object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewErrorGenericErrorWithDefaults + +`func NewErrorGenericErrorWithDefaults() *ErrorGenericError` + +NewErrorGenericErrorWithDefaults instantiates a new ErrorGenericError object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCode + +`func (o *ErrorGenericError) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *ErrorGenericError) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *ErrorGenericError) SetCode(v string)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *ErrorGenericError) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetDebug + +`func (o *ErrorGenericError) GetDebug() string` + +GetDebug returns the Debug field if non-nil, zero value otherwise. + +### GetDebugOk + +`func (o *ErrorGenericError) GetDebugOk() (*string, bool)` + +GetDebugOk returns a tuple with the Debug field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDebug + +`func (o *ErrorGenericError) SetDebug(v string)` + +SetDebug sets Debug field to given value. + +### HasDebug + +`func (o *ErrorGenericError) HasDebug() bool` + +HasDebug returns a boolean if a field has been set. + +### GetDetails + +`func (o *ErrorGenericError) GetDetails() map[string]string` + +GetDetails returns the Details field if non-nil, zero value otherwise. + +### GetDetailsOk + +`func (o *ErrorGenericError) GetDetailsOk() (*map[string]string, bool)` + +GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetails + +`func (o *ErrorGenericError) SetDetails(v map[string]string)` + +SetDetails sets Details field to given value. + +### HasDetails + +`func (o *ErrorGenericError) HasDetails() bool` + +HasDetails returns a boolean if a field has been set. + +### GetId + +`func (o *ErrorGenericError) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ErrorGenericError) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ErrorGenericError) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ErrorGenericError) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetMessage + +`func (o *ErrorGenericError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *ErrorGenericError) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *ErrorGenericError) SetMessage(v string)` + +SetMessage sets Message field to given value. + + +### GetReason + +`func (o *ErrorGenericError) GetReason() string` + +GetReason returns the Reason field if non-nil, zero value otherwise. + +### GetReasonOk + +`func (o *ErrorGenericError) GetReasonOk() (*string, bool)` + +GetReasonOk returns a tuple with the Reason field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReason + +`func (o *ErrorGenericError) SetReason(v string)` + +SetReason sets Reason field to given value. + +### HasReason + +`func (o *ErrorGenericError) HasReason() bool` + +HasReason returns a boolean if a field has been set. + +### GetRequest + +`func (o *ErrorGenericError) GetRequest() string` + +GetRequest returns the Request field if non-nil, zero value otherwise. + +### GetRequestOk + +`func (o *ErrorGenericError) GetRequestOk() (*string, bool)` + +GetRequestOk returns a tuple with the Request field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRequest + +`func (o *ErrorGenericError) SetRequest(v string)` + +SetRequest sets Request field to given value. + +### HasRequest + +`func (o *ErrorGenericError) HasRequest() bool` + +HasRequest returns a boolean if a field has been set. + +### GetStatus + +`func (o *ErrorGenericError) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *ErrorGenericError) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *ErrorGenericError) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *ErrorGenericError) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/internal/httpclient/docs/RelationshipApi.md b/internal/httpclient/docs/RelationshipApi.md index fed9a1969..e3f50e135 100644 --- a/internal/httpclient/docs/RelationshipApi.md +++ b/internal/httpclient/docs/RelationshipApi.md @@ -32,7 +32,7 @@ import ( ) func main() { - body := "body_example" // string | + body := string(BYTE_ARRAY_DATA_HERE) // string | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -208,7 +208,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: Not defined +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) @@ -375,7 +375,7 @@ import ( ) func main() { - relationshipDelta := []openapiclient.RelationshipDelta{*openapiclient.NewRelationshipDelta()} // []RelationshipDelta | The write delta for the relationships operated in one single transaction. Either all actions succeed or no change takes effect on error. + relationshipDelta := []openapiclient.RelationshipDelta{*openapiclient.NewRelationshipDelta(openapiclient.relationshipDelta.Action("ACTION_UNSPECIFIED"), *openapiclient.NewRelationship("Namespace_example", "Object_example", "Relation_example"))} // []RelationshipDelta | The write delta for the relationships operated in one single transaction. Either all actions succeed or no change takes effect on error. configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -411,7 +411,7 @@ No authorization required ### HTTP request headers - **Content-Type**: application/json -- **Accept**: Not defined +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) diff --git a/internal/httpclient/docs/RelationshipDelta.md b/internal/httpclient/docs/RelationshipDelta.md index 35df3bc98..54c52bffb 100644 --- a/internal/httpclient/docs/RelationshipDelta.md +++ b/internal/httpclient/docs/RelationshipDelta.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Action** | Pointer to [**RelationshipDeltaAction**](RelationshipDeltaAction.md) | | [optional] [default to RELATIONSHIPDELTAACTION_ACTION_UNSPECIFIED] -**RelationTuple** | Pointer to [**Relationship**](Relationship.md) | | [optional] +**Action** | [**RelationshipDeltaAction**](RelationshipDeltaAction.md) | | [default to RELATIONSHIPDELTAACTION_ACTION_UNSPECIFIED] +**RelationTuple** | [**Relationship**](Relationship.md) | | ## Methods ### NewRelationshipDelta -`func NewRelationshipDelta() *RelationshipDelta` +`func NewRelationshipDelta(action RelationshipDeltaAction, relationTuple Relationship, ) *RelationshipDelta` NewRelationshipDelta instantiates a new RelationshipDelta object This constructor will assign default values to properties that have it defined, @@ -45,11 +45,6 @@ and a boolean to check if the value has been set. SetAction sets Action field to given value. -### HasAction - -`func (o *RelationshipDelta) HasAction() bool` - -HasAction returns a boolean if a field has been set. ### GetRelationTuple @@ -70,11 +65,6 @@ and a boolean to check if the value has been set. SetRelationTuple sets RelationTuple field to given value. -### HasRelationTuple - -`func (o *RelationshipDelta) HasRelationTuple() bool` - -HasRelationTuple returns a boolean if a field has been set. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/internal/httpclient/model_error_generic.go b/internal/httpclient/model_error_generic.go new file mode 100644 index 000000000..064d3421c --- /dev/null +++ b/internal/httpclient/model_error_generic.go @@ -0,0 +1,107 @@ +/* + * Ory Keto API + * + * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. + * + * API version: 1.0.0 + * Contact: hi@ory.sh + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// ErrorGeneric The standard Ory JSON API error format. +type ErrorGeneric struct { + Error ErrorGenericError `json:"error"` +} + +// NewErrorGeneric instantiates a new ErrorGeneric object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewErrorGeneric(error_ ErrorGenericError) *ErrorGeneric { + this := ErrorGeneric{} + this.Error = error_ + return &this +} + +// NewErrorGenericWithDefaults instantiates a new ErrorGeneric object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewErrorGenericWithDefaults() *ErrorGeneric { + this := ErrorGeneric{} + return &this +} + +// GetError returns the Error field value +func (o *ErrorGeneric) GetError() ErrorGenericError { + if o == nil { + var ret ErrorGenericError + return ret + } + + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value +// and a boolean to check if the value has been set. +func (o *ErrorGeneric) GetErrorOk() (*ErrorGenericError, bool) { + if o == nil { + return nil, false + } + return &o.Error, true +} + +// SetError sets field value +func (o *ErrorGeneric) SetError(v ErrorGenericError) { + o.Error = v +} + +func (o ErrorGeneric) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["error"] = o.Error + } + return json.Marshal(toSerialize) +} + +type NullableErrorGeneric struct { + value *ErrorGeneric + isSet bool +} + +func (v NullableErrorGeneric) Get() *ErrorGeneric { + return v.value +} + +func (v *NullableErrorGeneric) Set(val *ErrorGeneric) { + v.value = val + v.isSet = true +} + +func (v NullableErrorGeneric) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorGeneric) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorGeneric(val *ErrorGeneric) *NullableErrorGeneric { + return &NullableErrorGeneric{value: val, isSet: true} +} + +func (v NullableErrorGeneric) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorGeneric) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/httpclient/model_error_generic_error.go b/internal/httpclient/model_error_generic_error.go new file mode 100644 index 000000000..994a0d51c --- /dev/null +++ b/internal/httpclient/model_error_generic_error.go @@ -0,0 +1,366 @@ +/* + * Ory Keto API + * + * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. + * + * API version: 1.0.0 + * Contact: hi@ory.sh + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// ErrorGenericError struct for ErrorGenericError +type ErrorGenericError struct { + Code *string `json:"code,omitempty"` + // Debug information is often not exposed to protect against leaking sensitive information. + Debug *string `json:"debug,omitempty"` + // Further details about the error. + Details *map[string]string `json:"details,omitempty"` + // The error ID is useful when trying to identify various errors in application logic. + Id *string `json:"id,omitempty"` + // The error's message (required). + Message string `json:"message"` + // Reason holds a human-readable reason for the error. + Reason *string `json:"reason,omitempty"` + // The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. + Request *string `json:"request,omitempty"` + // Status holds the human-readable HTTP status code. + Status *string `json:"status,omitempty"` +} + +// NewErrorGenericError instantiates a new ErrorGenericError object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewErrorGenericError(message string) *ErrorGenericError { + this := ErrorGenericError{} + this.Message = message + return &this +} + +// NewErrorGenericErrorWithDefaults instantiates a new ErrorGenericError object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewErrorGenericErrorWithDefaults() *ErrorGenericError { + this := ErrorGenericError{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *ErrorGenericError) GetCode() string { + if o == nil || o.Code == nil { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorGenericError) GetCodeOk() (*string, bool) { + if o == nil || o.Code == nil { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *ErrorGenericError) HasCode() bool { + if o != nil && o.Code != nil { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *ErrorGenericError) SetCode(v string) { + o.Code = &v +} + +// GetDebug returns the Debug field value if set, zero value otherwise. +func (o *ErrorGenericError) GetDebug() string { + if o == nil || o.Debug == nil { + var ret string + return ret + } + return *o.Debug +} + +// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorGenericError) GetDebugOk() (*string, bool) { + if o == nil || o.Debug == nil { + return nil, false + } + return o.Debug, true +} + +// HasDebug returns a boolean if a field has been set. +func (o *ErrorGenericError) HasDebug() bool { + if o != nil && o.Debug != nil { + return true + } + + return false +} + +// SetDebug gets a reference to the given string and assigns it to the Debug field. +func (o *ErrorGenericError) SetDebug(v string) { + o.Debug = &v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *ErrorGenericError) GetDetails() map[string]string { + if o == nil || o.Details == nil { + var ret map[string]string + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorGenericError) GetDetailsOk() (*map[string]string, bool) { + if o == nil || o.Details == nil { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *ErrorGenericError) HasDetails() bool { + if o != nil && o.Details != nil { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string]string and assigns it to the Details field. +func (o *ErrorGenericError) SetDetails(v map[string]string) { + o.Details = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ErrorGenericError) GetId() string { + if o == nil || o.Id == nil { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorGenericError) GetIdOk() (*string, bool) { + if o == nil || o.Id == nil { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ErrorGenericError) HasId() bool { + if o != nil && o.Id != nil { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ErrorGenericError) SetId(v string) { + o.Id = &v +} + +// GetMessage returns the Message field value +func (o *ErrorGenericError) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *ErrorGenericError) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *ErrorGenericError) SetMessage(v string) { + o.Message = v +} + +// GetReason returns the Reason field value if set, zero value otherwise. +func (o *ErrorGenericError) GetReason() string { + if o == nil || o.Reason == nil { + var ret string + return ret + } + return *o.Reason +} + +// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorGenericError) GetReasonOk() (*string, bool) { + if o == nil || o.Reason == nil { + return nil, false + } + return o.Reason, true +} + +// HasReason returns a boolean if a field has been set. +func (o *ErrorGenericError) HasReason() bool { + if o != nil && o.Reason != nil { + return true + } + + return false +} + +// SetReason gets a reference to the given string and assigns it to the Reason field. +func (o *ErrorGenericError) SetReason(v string) { + o.Reason = &v +} + +// GetRequest returns the Request field value if set, zero value otherwise. +func (o *ErrorGenericError) GetRequest() string { + if o == nil || o.Request == nil { + var ret string + return ret + } + return *o.Request +} + +// GetRequestOk returns a tuple with the Request field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorGenericError) GetRequestOk() (*string, bool) { + if o == nil || o.Request == nil { + return nil, false + } + return o.Request, true +} + +// HasRequest returns a boolean if a field has been set. +func (o *ErrorGenericError) HasRequest() bool { + if o != nil && o.Request != nil { + return true + } + + return false +} + +// SetRequest gets a reference to the given string and assigns it to the Request field. +func (o *ErrorGenericError) SetRequest(v string) { + o.Request = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *ErrorGenericError) GetStatus() string { + if o == nil || o.Status == nil { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ErrorGenericError) GetStatusOk() (*string, bool) { + if o == nil || o.Status == nil { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *ErrorGenericError) HasStatus() bool { + if o != nil && o.Status != nil { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *ErrorGenericError) SetStatus(v string) { + o.Status = &v +} + +func (o ErrorGenericError) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Code != nil { + toSerialize["code"] = o.Code + } + if o.Debug != nil { + toSerialize["debug"] = o.Debug + } + if o.Details != nil { + toSerialize["details"] = o.Details + } + if o.Id != nil { + toSerialize["id"] = o.Id + } + if true { + toSerialize["message"] = o.Message + } + if o.Reason != nil { + toSerialize["reason"] = o.Reason + } + if o.Request != nil { + toSerialize["request"] = o.Request + } + if o.Status != nil { + toSerialize["status"] = o.Status + } + return json.Marshal(toSerialize) +} + +type NullableErrorGenericError struct { + value *ErrorGenericError + isSet bool +} + +func (v NullableErrorGenericError) Get() *ErrorGenericError { + return v.value +} + +func (v *NullableErrorGenericError) Set(val *ErrorGenericError) { + v.value = val + v.isSet = true +} + +func (v NullableErrorGenericError) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorGenericError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorGenericError(val *ErrorGenericError) *NullableErrorGenericError { + return &NullableErrorGenericError{value: val, isSet: true} +} + +func (v NullableErrorGenericError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorGenericError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_node_type.go b/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_node_type.go index 5203242e3..8f76778c0 100644 --- a/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_node_type.go +++ b/internal/httpclient/model_ory_keto_relation_tuples_v1alpha2_node_type.go @@ -16,7 +16,7 @@ import ( "fmt" ) -// OryKetoRelationTuplesV1alpha2NodeType the model 'OryKetoRelationTuplesV1alpha2NodeType' +// OryKetoRelationTuplesV1alpha2NodeType - union: This node expands to a union of all children. - exclusion: Not implemented yet. - intersection: Not implemented yet. - leaf: This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. - tuple_to_subject_set: This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. - computed_subject_set: This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. - not: This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. type OryKetoRelationTuplesV1alpha2NodeType string // List of ory.keto.relation_tuples.v1alpha2.NodeType diff --git a/internal/httpclient/model_relationship_delta.go b/internal/httpclient/model_relationship_delta.go index 2863bf46a..06857942c 100644 --- a/internal/httpclient/model_relationship_delta.go +++ b/internal/httpclient/model_relationship_delta.go @@ -17,18 +17,18 @@ import ( // RelationshipDelta Write-delta for a TransactRelationTuplesRequest. type RelationshipDelta struct { - Action *RelationshipDeltaAction `json:"action,omitempty"` - RelationTuple *Relationship `json:"relation_tuple,omitempty"` + Action RelationshipDeltaAction `json:"action"` + RelationTuple Relationship `json:"relation_tuple"` } // NewRelationshipDelta instantiates a new RelationshipDelta object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewRelationshipDelta() *RelationshipDelta { +func NewRelationshipDelta(action RelationshipDeltaAction, relationTuple Relationship) *RelationshipDelta { this := RelationshipDelta{} - var action RelationshipDeltaAction = RELATIONSHIPDELTAACTION_ACTION_UNSPECIFIED - this.Action = &action + this.Action = action + this.RelationTuple = relationTuple return &this } @@ -38,80 +38,64 @@ func NewRelationshipDelta() *RelationshipDelta { func NewRelationshipDeltaWithDefaults() *RelationshipDelta { this := RelationshipDelta{} var action RelationshipDeltaAction = RELATIONSHIPDELTAACTION_ACTION_UNSPECIFIED - this.Action = &action + this.Action = action return &this } -// GetAction returns the Action field value if set, zero value otherwise. +// GetAction returns the Action field value func (o *RelationshipDelta) GetAction() RelationshipDeltaAction { - if o == nil || o.Action == nil { + if o == nil { var ret RelationshipDeltaAction return ret } - return *o.Action + + return o.Action } -// GetActionOk returns a tuple with the Action field value if set, nil otherwise +// GetActionOk returns a tuple with the Action field value // and a boolean to check if the value has been set. func (o *RelationshipDelta) GetActionOk() (*RelationshipDeltaAction, bool) { - if o == nil || o.Action == nil { + if o == nil { return nil, false } - return o.Action, true -} - -// HasAction returns a boolean if a field has been set. -func (o *RelationshipDelta) HasAction() bool { - if o != nil && o.Action != nil { - return true - } - - return false + return &o.Action, true } -// SetAction gets a reference to the given RelationshipDeltaAction and assigns it to the Action field. +// SetAction sets field value func (o *RelationshipDelta) SetAction(v RelationshipDeltaAction) { - o.Action = &v + o.Action = v } -// GetRelationTuple returns the RelationTuple field value if set, zero value otherwise. +// GetRelationTuple returns the RelationTuple field value func (o *RelationshipDelta) GetRelationTuple() Relationship { - if o == nil || o.RelationTuple == nil { + if o == nil { var ret Relationship return ret } - return *o.RelationTuple + + return o.RelationTuple } -// GetRelationTupleOk returns a tuple with the RelationTuple field value if set, nil otherwise +// GetRelationTupleOk returns a tuple with the RelationTuple field value // and a boolean to check if the value has been set. func (o *RelationshipDelta) GetRelationTupleOk() (*Relationship, bool) { - if o == nil || o.RelationTuple == nil { + if o == nil { return nil, false } - return o.RelationTuple, true -} - -// HasRelationTuple returns a boolean if a field has been set. -func (o *RelationshipDelta) HasRelationTuple() bool { - if o != nil && o.RelationTuple != nil { - return true - } - - return false + return &o.RelationTuple, true } -// SetRelationTuple gets a reference to the given Relationship and assigns it to the RelationTuple field. +// SetRelationTuple sets field value func (o *RelationshipDelta) SetRelationTuple(v Relationship) { - o.RelationTuple = &v + o.RelationTuple = v } func (o RelationshipDelta) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Action != nil { + if true { toSerialize["action"] = o.Action } - if o.RelationTuple != nil { + if true { toSerialize["relation_tuple"] = o.RelationTuple } return json.Marshal(toSerialize) diff --git a/internal/relationtuple/transact_server.go b/internal/relationtuple/transact_server.go index 03678be99..7c6f97206 100644 --- a/internal/relationtuple/transact_server.go +++ b/internal/relationtuple/transact_server.go @@ -25,7 +25,7 @@ var _ rts.WriteServiceServer = (*handler)(nil) func protoTuplesWithAction(deltas []*rts.RelationTupleDelta, action rts.RelationTupleDelta_Action) (filtered []*ketoapi.RelationTuple, err error) { for _, d := range deltas { if d.Action == action { - it, err := (&ketoapi.RelationTuple{}).FromDataProvider(&openAPITupleWrapper{d.RelationTuple}) + it, err := (&ketoapi.RelationTuple{}).FromDataProvider(&ketoapi.OpenAPITupleData{d.RelationTuple}) if err != nil { return nil, err } @@ -38,6 +38,10 @@ func protoTuplesWithAction(deltas []*rts.RelationTupleDelta, action rts.Relation func (h *handler) TransactRelationTuples(ctx context.Context, req *rts.TransactRelationTuplesRequest) (*rts.TransactRelationTuplesResponse, error) { events.Add(ctx, h.d, events.RelationtuplesChanged) + if err := req.ValidateAll(); err != nil { + return nil, herodot.ErrBadRequest.WithWrap(err).WithReason(err.Error()) + } + insertTuples, err := protoTuplesWithAction(req.RelationTupleDeltas, rts.RelationTupleDelta_ACTION_INSERT) if err != nil { return nil, err @@ -68,37 +72,11 @@ func (h *handler) TransactRelationTuples(ctx context.Context, req *rts.TransactR }, nil } -type openAPITupleWrapper struct { - wrapped interface { - GetObject() string - GetRelation() string - GetNamespace() string - GetSubjectSet() *rts.SubjectSet - GetSubjectId() string - } -} - -func (q *openAPITupleWrapper) GetObject() string { return q.wrapped.GetObject() } -func (q *openAPITupleWrapper) GetNamespace() string { return q.wrapped.GetNamespace() } -func (q *openAPITupleWrapper) GetRelation() string { return q.wrapped.GetRelation() } -func (q *openAPITupleWrapper) GetSubject() *rts.Subject { - if sub, ok := q.wrapped.(interface{ GetSubject() *rts.Subject }); ok && sub.GetSubject() != nil { - return sub.GetSubject() - } - if set := q.wrapped.GetSubjectSet(); set != nil { - return rts.NewSubjectSet(set.Namespace, set.Object, set.Relation) - } - if sID := q.wrapped.GetSubjectId(); sID != "" { - return rts.NewSubjectID(q.wrapped.GetSubjectId()) - } - return nil -} - func (h *handler) CreateRelationTuple(ctx context.Context, request *rts.CreateRelationTupleRequest) (*rts.CreateRelationTupleResponse, error) { if request.RelationTuple == nil { return nil, errors.WithStack(herodot.ErrBadRequest.WithReason("invalid request: missing relation_tuple")) } - tuple, err := (&ketoapi.RelationTuple{}).FromDataProvider(&openAPITupleWrapper{request.RelationTuple}) + tuple, err := (&ketoapi.RelationTuple{}).FromDataProvider(&ketoapi.OpenAPITupleData{request.RelationTuple}) if err != nil { return nil, err } diff --git a/internal/relationtuple/transact_server_test.go b/internal/relationtuple/transact_server_test.go index 2b84bb88c..ba9927111 100644 --- a/internal/relationtuple/transact_server_test.go +++ b/internal/relationtuple/transact_server_test.go @@ -457,7 +457,7 @@ func TestWriteHandlers(t *testing.T) { defer resp.Body.Close() errContent, err := io.ReadAll(resp.Body) require.NoError(t, err) - assert.Contains(t, string(errContent), "subject is not allowed to be nil") + assert.Contains(t, string(errContent), "RelationTuple: value is required") }) t.Run("case=unknown action", func(t *testing.T) { diff --git a/internal/schema/handler_test.go b/internal/schema/handler_test.go index d23dd90e0..326c3389a 100644 --- a/internal/schema/handler_test.go +++ b/internal/schema/handler_test.go @@ -6,6 +6,7 @@ package schema_test import ( "bytes" "context" + "encoding/json" "io" "net/http" "testing" @@ -28,10 +29,12 @@ func TestNewHandler(t *testing.T) { t.Run("proto=REST", func(t *testing.T) { t.Run("method=POST /opl/syntax/check", func(t *testing.T) { + content, err := json.Marshal([]byte("/* comment???")) + require.NoError(t, err) response, err := endpoints.HTTP.Client().Post( endpoints.HTTP.URL+"/opl/syntax/check", "text/plain", - bytes.NewBufferString(`"/* comment???"`)) + bytes.NewReader(content)) require.NoError(t, err) body, err := io.ReadAll(response.Body) require.NoError(t, err) @@ -46,7 +49,7 @@ func TestNewHandler(t *testing.T) { t.Run("method=Syntax.Check", func(t *testing.T) { response, err := client.Check(ctx, &opl.CheckRequest{ - Content: "/* comment???", + Content: []byte("/* comment???"), }) require.NoError(t, err) assert.Contains(t, response.Errors[0].Message, "unclosed comment") diff --git a/internal/x/helpers.go b/internal/x/helpers.go index 114e1bf43..e1b7d80d1 100644 --- a/internal/x/helpers.go +++ b/internal/x/helpers.go @@ -4,7 +4,19 @@ package x import ( + "context" + "encoding/json" + "errors" + "net/http" + "strconv" + "github.com/gofrs/uuid" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "google.golang.org/genproto/googleapis/rpc/errdetails" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" ) func UUIDs(n int) []uuid.UUID { @@ -14,3 +26,55 @@ func UUIDs(n int) []uuid.UUID { } return res } + +var GRPCGatewayMuxOptions = []runtime.ServeMuxOption{ + runtime.WithForwardResponseOption(HttpResponseModifier), + runtime.WithMetadata(func(ctx context.Context, req *http.Request) metadata.MD { + md := make(metadata.MD) + + contentLength, _ := strconv.Atoi(req.Header.Get("Content-Length")) + md.Set("hasbody", strconv.FormatBool(contentLength > 0)) + md.Set("path", req.URL.Path) + return md + }), + runtime.WithErrorHandler(func(_ context.Context, _ *runtime.ServeMux, _ runtime.Marshaler, w http.ResponseWriter, _ *http.Request, err error) { + var customStatus *runtime.HTTPStatusError + if errors.As(err, &customStatus) { + err = customStatus.Err + } + + s := status.Convert(err) + + st := runtime.HTTPStatusFromCode(s.Code()) + if customStatus != nil { + st = customStatus.HTTPStatus + } + w.WriteHeader(st) + + errResponse := rts.ErrorResponse{ + Error: &rts.ErrorResponse_Error{ + Code: int64(st), + Status: http.StatusText(st), + Message: s.Message(), + }, + } + for _, detail := range s.Details() { + switch t := detail.(type) { + case *errdetails.ErrorInfo: + errResponse.Error.Reason = t.Reason + case *errdetails.DebugInfo: + errResponse.Error.Debug = t.Detail + case *errdetails.RequestInfo: + errResponse.Error.Request = t.RequestId + case *errdetails.BadRequest: + errResponse.Error.Details = make(map[string]string, len(t.FieldViolations)) + for _, v := range t.FieldViolations { + errResponse.Error.Details[v.Field] = v.Description + } + } + } + + buf, _ := json.Marshal(&errResponse) + _, _ = w.Write(buf) + }), +} diff --git a/internal/x/test_endpoints.go b/internal/x/test_endpoints.go index 28d44e205..c5f0c7c73 100644 --- a/internal/x/test_endpoints.go +++ b/internal/x/test_endpoints.go @@ -16,7 +16,6 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/test/bufconn" "google.golang.org/protobuf/proto" ) @@ -75,6 +74,7 @@ func NewTestEndpoints( t.Cleanup(cancel) l := bufconn.Listen(1024 * 1024) + t.Cleanup(func() { _ = l.Close() }) s := grpc.NewServer( grpc.ChainUnaryInterceptor(herodot.UnaryErrorUnwrapInterceptor), ) @@ -101,18 +101,9 @@ func NewTestEndpoints( grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { return l.Dial() }), ) require.NoError(t, err) + t.Cleanup(func() { _ = conn.Close() }) - // TODO: Sync with router setup in daemon.go - mux := runtime.NewServeMux( - runtime.WithForwardResponseOption(HttpResponseModifier), - runtime.WithMetadata(func(ctx context.Context, req *http.Request) metadata.MD { - md := make(metadata.MD) - contentLength, _ := strconv.Atoi(req.Header.Get("Content-Length")) - md.Set("hasbody", strconv.FormatBool(contentLength > 0)) - - return md - }), - ) + mux := runtime.NewServeMux(GRPCGatewayMuxOptions...) if h, ok := handler.(readHandler); ok { require.NoError(t, h.RegisterReadGRPCGatewayConn(ctx, mux, conn)) } diff --git a/ketoapi/enc_proto.go b/ketoapi/enc_proto.go index a5d5fe205..78416ea45 100644 --- a/ketoapi/enc_proto.go +++ b/ketoapi/enc_proto.go @@ -34,8 +34,31 @@ type ( GetSubjectSet() *rts.SubjectSet } } + + OpenAPITupleData struct { + Wrapped interface { + GetObject() string + GetRelation() string + GetNamespace() string + GetSubjectSet() *rts.SubjectSet + GetSubjectId() string + } + } ) +func (q *OpenAPITupleData) GetObject() string { return q.Wrapped.GetObject() } +func (q *OpenAPITupleData) GetNamespace() string { return q.Wrapped.GetNamespace() } +func (q *OpenAPITupleData) GetRelation() string { return q.Wrapped.GetRelation() } +func (q *OpenAPITupleData) GetSubject() *rts.Subject { + if sub, ok := q.Wrapped.(interface{ GetSubject() *rts.Subject }); ok && sub.GetSubject() != nil { + return sub.GetSubject() + } + if set := q.Wrapped.GetSubjectSet(); set != nil { + return rts.NewSubjectSet(set.Namespace, set.Object, set.Relation) + } + return rts.NewSubjectID(q.Wrapped.GetSubjectId()) +} + func (r *RelationTuple) FromOpenAPIFields(f openAPIFields) (*RelationTuple, error) { subject := f.GetSubject() if subject == nil { @@ -121,6 +144,44 @@ func (r *RelationTuple) FromProto(proto *rts.RelationTuple) *RelationTuple { return r } +func (r *RelationTuple) FromCheckRequest(proto *rts.CheckRequest) *RelationTuple { + if proto.Tuple != nil { + return r.FromProto(proto.Tuple) + } + + r = &RelationTuple{ + Namespace: proto.Namespace, + Object: proto.Object, + Relation: proto.Relation, + } + + if proto.Subject != nil { + switch subject := proto.Subject.Ref.(type) { + case *rts.Subject_Id: + r.SubjectID = pointerx.Ptr(subject.Id) + case *rts.Subject_Set: + r.SubjectSet = &SubjectSet{ + Namespace: subject.Set.Namespace, + Object: subject.Set.Object, + Relation: subject.Set.Relation, + } + } + } else { + switch subject := proto.RestApiSubject.(type) { + case *rts.CheckRequest_SubjectId: + r.SubjectID = pointerx.Ptr(subject.SubjectId) + case *rts.CheckRequest_SubjectSet: + r.SubjectSet = &SubjectSet{ + Namespace: subject.SubjectSet.Namespace, + Object: subject.SubjectSet.Object, + Relation: subject.SubjectSet.Relation, + } + } + } + + return r +} + func (q *RelationQuery) FromDataProvider(d queryData) *RelationQuery { q.Namespace = d.GetNamespace() q.Object = d.GetObject() diff --git a/proto/buf.lock b/proto/buf.lock index 656b82fa2..99e2d27c7 100644 --- a/proto/buf.lock +++ b/proto/buf.lock @@ -1,11 +1,15 @@ # Generated by buf. DO NOT EDIT. version: v1 deps: + - remote: buf.build + owner: envoyproxy + repository: protoc-gen-validate + commit: 6607b10f00ed4a3d98f906807131c44a - remote: buf.build owner: googleapis repository: googleapis - commit: 5abafbf55b5c4c07ad5fb06d2599560f + commit: 75b4300737fb4efca0831636be94e517 - remote: buf.build owner: grpc-ecosystem repository: grpc-gateway - commit: b98ae2f8ce63452e97e6bae65c5add1b + commit: a1ecdc58eccd49aa8bea2a7a9022dc27 diff --git a/proto/buf.md b/proto/buf.md index 8d3f72345..d43e1099f 100644 --- a/proto/buf.md +++ b/proto/buf.md @@ -45,6 +45,10 @@ - [NamespacesService](#ory-keto-relation_tuples-v1alpha2-NamespacesService) +- [ory/keto/relation_tuples/v1alpha2/openapi.proto](#ory_keto_relation_tuples_v1alpha2_openapi-proto) + - [ErrorResponse](#ory-keto-relation_tuples-v1alpha2-ErrorResponse) + - [ErrorResponse.Error](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error) + - [ErrorResponse.Error.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error-DetailsEntry) - [ory/keto/relation_tuples/v1alpha2/read_service.proto](#ory_keto_relation_tuples_v1alpha2_read_service-proto) - [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) @@ -88,9 +92,9 @@ ### CheckRequest -| Field | Type | Label | Description | -| ------- | ----------------- | ----- | ----------- | -| content | [string](#string) | | | +| Field | Type | Label | Description | +| ------- | --------------- | ----- | ----------- | +| content | [bytes](#bytes) | | | @@ -393,20 +397,20 @@ This is never set if `node_type` == `NODE_TYPE_LEAF`. | | ------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------- | | unspecified | 0 | | | NODE_TYPE_UNSPECIFIED | 0 | | -| NODE_TYPE_UNION | 1 | This node expands to a union of all children. | -| union | 1 | | -| NODE_TYPE_EXCLUSION | 2 | Not implemented yet. | -| exclusion | 2 | | -| NODE_TYPE_INTERSECTION | 3 | Not implemented yet. | -| intersection | 3 | | -| NODE_TYPE_LEAF | 4 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| leaf | 4 | | -| NODE_TYPE_TUPLE_TO_SUBJECT_SET | 5 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| tuple_to_subject_set | 5 | | -| NODE_TYPE_COMPUTED_SUBJECT_SET | 6 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| computed_subject_set | 6 | | -| NODE_TYPE_NOT | 7 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| not | 7 | | +| union | 1 | This node expands to a union of all children. | +| NODE_TYPE_UNION | 1 | | +| exclusion | 2 | Not implemented yet. | +| NODE_TYPE_EXCLUSION | 2 | | +| intersection | 3 | Not implemented yet. | +| NODE_TYPE_INTERSECTION | 3 | | +| leaf | 4 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| NODE_TYPE_LEAF | 4 | | +| tuple_to_subject_set | 5 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| NODE_TYPE_TUPLE_TO_SUBJECT_SET | 5 | | +| computed_subject_set | 6 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| NODE_TYPE_COMPUTED_SUBJECT_SET | 6 | | +| not | 7 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| NODE_TYPE_NOT | 7 | | @@ -463,6 +467,64 @@ This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). Get all namespaces. | + + +

Top

+ +## ory/keto/relation_tuples/v1alpha2/openapi.proto + + + +### ErrorResponse + +JSON API Error Response + +The standard Ory JSON API error format. + +| Field | Type | Label | Description | +| ----- | ----------------------------------------------------------------------------- | ----- | ----------- | +| error | [ErrorResponse.Error](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error) | | | + + + +### ErrorResponse.Error + +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------------- | +| code | [int64](#int64) | | The status code | +| debug | [string](#string) | | Debug information | + +Debug information is often not exposed to protect against leaking sensitive +information. | | details | +[ErrorResponse.Error.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error-DetailsEntry) +| repeated | Further error details + +Further details about the error. | | id | [string](#string) | | The error ID + +The error ID is useful when trying to identify various errors in application +logic. | | message | [string](#string) | | The error message + +The error's message (required). | | reason | [string](#string) | | The error +reason + +Reason holds a human-readable reason for the error. | | request | +[string](#string) | | The request ID + +The request ID is often exposed internally in order to trace errors across +service architectures. This is often a UUID. | | status | [string](#string) | | +The status description + +Status holds the human-readable HTTP status code. | + + + +### ErrorResponse.Error.DetailsEntry + +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | +

Top

diff --git a/proto/buf.yaml b/proto/buf.yaml index ae8506a64..21d440bd2 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -19,3 +19,4 @@ breaking: deps: - buf.build/googleapis/googleapis - buf.build/grpc-ecosystem/grpc-gateway + - buf.build/envoyproxy/protoc-gen-validate diff --git a/proto/openapiv2/gateway.swagger.json b/proto/openapiv2/gateway.swagger.json deleted file mode 100644 index 9eb08b047..000000000 --- a/proto/openapiv2/gateway.swagger.json +++ /dev/null @@ -1,865 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "ory/keto/opl/v1alpha1/syntax_service.proto", - "version": "version not set" - }, - "consumes": ["application/json"], - "produces": ["application/json"], - "paths": { - "/admin/relation-tuples": { - "delete": { - "summary": "Deletes relationships based on relation query", - "operationId": "deleteRelationships", - "responses": { - "204": { - "description": "An empty response.", - "schema": {} - } - }, - "parameters": [ - { - "name": "namespace", - "description": "The namespace this relation tuple lives in.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "object", - "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "relation", - "description": "The relation between an Object and a Subject.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "subject_id", - "description": "A concrete id of the subject.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "subject_set.namespace", - "description": "The namespace of the object and relation\nreferenced in this subject set.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "subject_set.object", - "description": "The object related by this subject set.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "subject_set.relation", - "description": "The relation between the object and the subjects.", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": ["relationship"], - "consumes": ["application/x-www-form-urlencoded"] - }, - "put": { - "summary": "Creates a relationship", - "operationId": "createRelationship", - "responses": { - "201": { - "description": "The created relationship.", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" - } - } - }, - "parameters": [ - { - "name": "relationTuple", - "description": "The relationship to create.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship" - } - } - ], - "tags": ["relationship"] - }, - "patch": { - "summary": "Writes one or more relationships in a single transaction.", - "operationId": "patchRelationships", - "responses": { - "204": { - "description": "An empty response.", - "schema": {}, - "examples": { - "application/json": {} - } - } - }, - "parameters": [ - { - "name": "relationTupleDeltas", - "description": "The write delta for the relationships operated in one single transaction.\nEither all actions succeed or no change takes effect on error.", - "in": "body", - "required": true, - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta" - } - } - } - ], - "tags": ["relationship"] - } - }, - "/namespaces": { - "get": { - "summary": "Lists Namespaces", - "description": "Get all namespaces.", - "operationId": "listRelationshipNamespaces", - "responses": { - "200": { - "description": "The list of namespaces.", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse" - }, - "examples": { - "application/json": { - "namespaces": [ - { - "name": "my namespace" - } - ] - } - } - } - }, - "tags": ["relationship"], - "consumes": ["application/x-www-form-urlencoded"] - } - }, - "/opl/syntax/check": { - "post": { - "summary": "Performs a syntax check request.", - "operationId": "checkOplSyntax", - "responses": { - "200": { - "description": "The result of the syntax checker", - "schema": { - "$ref": "#/definitions/ory.keto.opl.v1alpha1.CheckResponse" - } - } - }, - "parameters": [ - { - "name": "content", - "in": "body", - "required": true, - "schema": { - "type": "string" - } - } - ], - "tags": ["relationship"], - "consumes": ["text/plain"] - } - }, - "/relation-tuples": { - "get": { - "summary": "Lists ACL relationships.", - "operationId": "getRelationships", - "responses": { - "200": { - "description": "The list of relationships.", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse" - } - } - }, - "parameters": [ - { - "name": "page_size", - "description": "Optional. The maximum number of\nRelationTuples to return in the response.\n\nDefault: 100", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "page_token", - "description": "Optional. An opaque pagination token returned from\na previous call to `ListRelationTuples` that\nindicates where the page should start at.\n\nAn empty token denotes the first page. All successive\npages require the token from the previous page.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "namespace", - "description": "The namespace", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "object", - "description": "The related object in this check.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "relation", - "description": "The relation between the Object and the Subject.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "subject_id", - "description": "A concrete id of the subject.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "subject_set.namespace", - "description": "The namespace of the object and relation\nreferenced in this subject set.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "subject_set.object", - "description": "The object related by this subject set.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "subject_set.relation", - "description": "The relation between the object and the subjects.", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": ["relationship"], - "consumes": ["application/x-www-form-urlencoded"] - } - }, - "/relation-tuples/check": { - "get": { - "summary": "Performs an authorization check.", - "operationId": "CheckService_Check", - "responses": { - "200": { - "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" - } - }, - "403": { - "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" - } - } - }, - "parameters": [ - { - "name": "namespace", - "description": "The namespace to evaluate the check.\n\nNote: If you use the expand-API and the check\nevaluates a RelationTuple specifying a SubjectSet as\nsubject or due to a rewrite rule in a namespace config\nthis check request may involve other namespaces automatically.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "object", - "description": "The related object in this check.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "relation", - "description": "The relation between the Object and the Subject.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "subject_id", - "description": "A concrete id of the subject.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "subject_set.namespace", - "description": "The namespace of the object and relation\nreferenced in this subject set.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "subject_set.object", - "description": "The object related by this subject set.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "subject_set.relation", - "description": "The relation between the object and the subjects.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "max-depth", - "description": "The maximum depth to search for a relation.\n\nIf the value is less than 1 or greater than the global\nmax-depth then the global max-depth will be used instead.", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - } - ], - "tags": ["permission"], - "consumes": ["application/x-www-form-urlencoded", "application/json"] - }, - "post": { - "summary": "Performs an authorization check.", - "operationId": "CheckService_Check3", - "responses": { - "200": { - "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" - } - }, - "403": { - "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" - } - } - }, - "parameters": [ - { - "name": "body", - "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" - } - } - ], - "tags": ["permission"], - "consumes": ["application/x-www-form-urlencoded", "application/json"] - } - }, - "/relation-tuples/check/openapi": { - "get": { - "summary": "Performs an authorization check.", - "operationId": "CheckService_Check2", - "responses": { - "200": { - "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" - } - }, - "403": { - "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" - } - } - }, - "parameters": [ - { - "name": "namespace", - "description": "The namespace to evaluate the check.\n\nNote: If you use the expand-API and the check\nevaluates a RelationTuple specifying a SubjectSet as\nsubject or due to a rewrite rule in a namespace config\nthis check request may involve other namespaces automatically.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "object", - "description": "The related object in this check.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "relation", - "description": "The relation between the Object and the Subject.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "subject_id", - "description": "A concrete id of the subject.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "subject_set.namespace", - "description": "The namespace of the object and relation\nreferenced in this subject set.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "subject_set.object", - "description": "The object related by this subject set.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "subject_set.relation", - "description": "The relation between the object and the subjects.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "max-depth", - "description": "The maximum depth to search for a relation.\n\nIf the value is less than 1 or greater than the global\nmax-depth then the global max-depth will be used instead.", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - } - ], - "tags": ["permission"], - "consumes": ["application/x-www-form-urlencoded", "application/json"] - }, - "post": { - "summary": "Performs an authorization check.", - "operationId": "CheckService_Check4", - "responses": { - "200": { - "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" - } - }, - "403": { - "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" - } - } - }, - "parameters": [ - { - "name": "body", - "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object.", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" - } - } - ], - "tags": ["permission"], - "consumes": ["application/x-www-form-urlencoded", "application/json"] - } - }, - "/relation-tuples/expand": { - "get": { - "summary": "Expands the subject set into a tree of subjects.", - "operationId": "expandPermissions", - "responses": { - "200": { - "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" - } - } - }, - "parameters": [ - { - "name": "max-depth", - "description": "The maximum depth of tree to build.\n\nIf the value is less than 1 or greater than the global\nmax-depth then the global max-depth will be used instead.\n\nIt is important to set this parameter to a meaningful\nvalue. Ponder how deep you really want to display this.", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - }, - { - "name": "namespace", - "description": "The namespace of the object and relation\nreferenced in this subject set.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "object", - "description": "The object related by this subject set.", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "relation", - "description": "The relation between the object and the subjects.", - "in": "query", - "required": true, - "type": "string" - } - ], - "tags": ["permission"], - "consumes": ["application/x-www-form-urlencoded"] - } - }, - "/version": { - "get": { - "summary": "Returns the version of the Ory Keto instance.", - "description": "This endpoint returns the service version typically notated using semantic versioning.\n\nIf the service supports TLS Edge Termination, this endpoint does not require the\nX-Forwarded-Proto header to be set.", - "operationId": "getVersion", - "responses": { - "200": { - "description": "The version of the instance.", - "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.GetVersionResponse" - } - } - }, - "tags": ["version"] - } - } - }, - "definitions": { - "ory.keto.opl.v1alpha1.CheckResponse": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/definitions/ory.keto.opl.v1alpha1.ParseError" - } - } - } - }, - "ory.keto.opl.v1alpha1.ParseError": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "start": { - "$ref": "#/definitions/ory.keto.opl.v1alpha1.SourcePosition" - }, - "end": { - "$ref": "#/definitions/ory.keto.opl.v1alpha1.SourcePosition" - } - } - }, - "ory.keto.opl.v1alpha1.SourcePosition": { - "type": "object", - "properties": { - "Line": { - "type": "integer", - "format": "int64" - }, - "column": { - "type": "integer", - "format": "int64" - } - } - }, - "ory.keto.relation_tuples.v1alpha2.CheckRequest": { - "type": "object", - "properties": { - "namespace": { - "type": "string", - "description": "The namespace to evaluate the check.\n\nNote: If you use the expand-API and the check\nevaluates a RelationTuple specifying a SubjectSet as\nsubject or due to a rewrite rule in a namespace config\nthis check request may involve other namespaces automatically." - }, - "object": { - "type": "string", - "description": "The related object in this check." - }, - "relation": { - "type": "string", - "description": "The relation between the Object and the Subject." - }, - "subject_id": { - "type": "string", - "description": "A concrete id of the subject." - }, - "subject_set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSetQuery", - "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." - }, - "max-depth": { - "type": "integer", - "format": "int32", - "description": "The maximum depth to search for a relation.\n\nIf the value is less than 1 or greater than the global\nmax-depth then the global max-depth will be used instead." - } - }, - "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object." - }, - "ory.keto.relation_tuples.v1alpha2.CheckResponse": { - "type": "object", - "properties": { - "allowed": { - "type": "boolean", - "description": "Whether the specified subject (id)\nis related to the requested object.\n\nIt is false by default if no ACL matches." - } - }, - "description": "The response for a CheckService.Check rpc." - }, - "ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship": { - "type": "object", - "properties": { - "namespace": { - "type": "string", - "description": "The namespace this relation tuple lives in." - }, - "object": { - "type": "string", - "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple." - }, - "relation": { - "type": "string", - "description": "The relation between an Object and a Subject." - }, - "subject_id": { - "type": "string", - "description": "A concrete id of the subject." - }, - "subject_set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", - "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." - } - } - }, - "ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse": { - "type": "object", - "properties": { - "relationTuple": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", - "description": "The created relationship." - } - }, - "description": "The response from creating a new relationship." - }, - "ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse": { - "type": "object" - }, - "ory.keto.relation_tuples.v1alpha2.ExpandResponse": { - "type": "object", - "properties": { - "tree": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree", - "description": "The tree the requested subject set expands to.\nThe requested subject set is the subject of the root.\n\nThis field can be nil in some circumstances." - } - }, - "description": "The response for a ExpandService.Expand RPC." - }, - "ory.keto.relation_tuples.v1alpha2.GetVersionResponse": { - "type": "object", - "properties": { - "version": { - "type": "string", - "description": "The version string of the Ory Keto instance." - } - }, - "description": "Response of the VersionService.GetVersion RPC." - }, - "ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse": { - "type": "object", - "properties": { - "namespaces": { - "type": "array", - "items": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.Namespace" - } - } - } - }, - "ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse": { - "type": "object", - "properties": { - "relation_tuples": { - "type": "array", - "items": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" - }, - "description": "The relationships matching the list request." - }, - "next_page_token": { - "type": "string", - "description": "The token required to get the next page.\nIf this is the last page, the token will be the empty string." - } - }, - "description": "The response of a ReadService.ListRelationTuples RPC." - }, - "ory.keto.relation_tuples.v1alpha2.Namespace": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - }, - "ory.keto.relation_tuples.v1alpha2.NodeType": { - "type": "string", - "enum": [ - "unspecified", - "union", - "exclusion", - "intersection", - "leaf", - "tuple_to_subject_set", - "computed_subject_set", - "not" - ], - "default": "unspecified" - }, - "ory.keto.relation_tuples.v1alpha2.RelationTuple": { - "type": "object", - "properties": { - "namespace": { - "type": "string", - "description": "The namespace this relation tuple lives in." - }, - "object": { - "type": "string", - "description": "The object related by this tuple.\nIt is an object in the namespace of the tuple." - }, - "relation": { - "type": "string", - "description": "The relation between an Object and a Subject." - }, - "subject_id": { - "type": "string", - "description": "A concrete id of the subject." - }, - "subject_set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", - "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." - } - }, - "description": "RelationTuple defines a relation between an Object and a Subject.", - "required": ["namespace", "object", "relation"] - }, - "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta": { - "type": "object", - "properties": { - "action": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action", - "description": "The action to do on the RelationTuple." - }, - "relation_tuple": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", - "description": "The target RelationTuple." - } - }, - "description": "Write-delta for a TransactRelationTuplesRequest." - }, - "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action": { - "type": "string", - "enum": ["ACTION_UNSPECIFIED", "insert", "delete"], - "default": "ACTION_UNSPECIFIED", - "description": " - ACTION_UNSPECIFIED: Unspecified.\nThe `TransactRelationTuples` RPC ignores this\nRelationTupleDelta if an action was unspecified.\n - insert: Insertion of a new RelationTuple.\nIt is ignored if already existing.\n - delete: Deletion of the RelationTuple.\nIt is ignored if it does not exist." - }, - "ory.keto.relation_tuples.v1alpha2.Subject": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "A concrete id of the subject." - }, - "set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", - "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." - } - }, - "description": "Subject is either a concrete subject id or\na `SubjectSet` expanding to more Subjects." - }, - "ory.keto.relation_tuples.v1alpha2.SubjectSet": { - "type": "object", - "properties": { - "namespace": { - "type": "string", - "description": "The namespace of the object and relation\nreferenced in this subject set." - }, - "object": { - "type": "string", - "description": "The object related by this subject set." - }, - "relation": { - "type": "string", - "description": "The relation between the object and the subjects." - } - }, - "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`.", - "required": ["namespace", "object", "relation"] - }, - "ory.keto.relation_tuples.v1alpha2.SubjectSetQuery": { - "type": "object", - "properties": { - "namespace": { - "type": "string", - "description": "The namespace of the object and relation\nreferenced in this subject set." - }, - "object": { - "type": "string", - "description": "The object related by this subject set." - }, - "relation": { - "type": "string", - "description": "The relation between the object and the subjects." - } - }, - "description": "SubjectSetQuery refers to all subjects who have\nthe same `relation` on an `object`." - }, - "ory.keto.relation_tuples.v1alpha2.SubjectTree": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.NodeType", - "description": "The type of the node." - }, - "subject": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.Subject", - "description": "The subject this node represents.\nDeprecated: More information is now available in the tuple field." - }, - "tuple": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", - "description": "The relation tuple this node represents." - }, - "children": { - "type": "array", - "items": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" - }, - "description": "The children of this node.\n\nThis is never set if `node_type` == `NODE_TYPE_LEAF`." - } - }, - "required": ["type"] - }, - "ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse": { - "type": "object", - "description": "The response of a WriteService.TransactRelationTuples rpc." - } - } -} diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go index 274c53996..e5900d8ac 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go @@ -27,7 +27,7 @@ type CheckRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` + Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` } func (x *CheckRequest) Reset() { @@ -62,11 +62,11 @@ func (*CheckRequest) Descriptor() ([]byte, []int) { return file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDescGZIP(), []int{0} } -func (x *CheckRequest) GetContent() string { +func (x *CheckRequest) GetContent() []byte { if x != nil { return x.Content } - return "" + return nil } type CheckResponse struct { @@ -248,7 +248,7 @@ var file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDesc = []byte{ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x4a, 0x0a, 0x0d, 0x43, + 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x4a, 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.gw.go b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.gw.go new file mode 100644 index 000000000..859a32861 --- /dev/null +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.gw.go @@ -0,0 +1,171 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ory/keto/opl/v1alpha1/syntax_service.proto + +/* +Package opl is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package opl + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_SyntaxService_Check_0(ctx context.Context, marshaler runtime.Marshaler, client SyntaxServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CheckRequest + 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.Content); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Check(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SyntaxService_Check_0(ctx context.Context, marshaler runtime.Marshaler, server SyntaxServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CheckRequest + 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.Content); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Check(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterSyntaxServiceHandlerServer registers the http handlers for service SyntaxService to "mux". +// UnaryRPC :call SyntaxServiceServer 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 RegisterSyntaxServiceHandlerFromEndpoint instead. +func RegisterSyntaxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SyntaxServiceServer) error { + + mux.Handle("POST", pattern_SyntaxService_Check_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.opl.v1alpha1.SyntaxService/Check", runtime.WithHTTPPathPattern("/opl/syntax/check")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SyntaxService_Check_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyntaxService_Check_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterSyntaxServiceHandlerFromEndpoint is same as RegisterSyntaxServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterSyntaxServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterSyntaxServiceHandler(ctx, mux, conn) +} + +// RegisterSyntaxServiceHandler registers the http handlers for service SyntaxService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterSyntaxServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterSyntaxServiceHandlerClient(ctx, mux, NewSyntaxServiceClient(conn)) +} + +// RegisterSyntaxServiceHandlerClient registers the http handlers for service SyntaxService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SyntaxServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SyntaxServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "SyntaxServiceClient" to call the correct interceptors. +func RegisterSyntaxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SyntaxServiceClient) error { + + mux.Handle("POST", pattern_SyntaxService_Check_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.opl.v1alpha1.SyntaxService/Check", runtime.WithHTTPPathPattern("/opl/syntax/check")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SyntaxService_Check_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_SyntaxService_Check_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_SyntaxService_Check_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"opl", "syntax", "check"}, "")) +) + +var ( + forward_SyntaxService_Check_0 = runtime.ForwardResponseMessage +) diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.validate.go b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.validate.go new file mode 100644 index 000000000..d39925890 --- /dev/null +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.validate.go @@ -0,0 +1,534 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: ory/keto/opl/v1alpha1/syntax_service.proto + +package opl + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on CheckRequest with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *CheckRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CheckRequest with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CheckRequestMultiError, or +// nil if none found. +func (m *CheckRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *CheckRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Content + + if len(errors) > 0 { + return CheckRequestMultiError(errors) + } + + return nil +} + +// CheckRequestMultiError is an error wrapping multiple validation errors +// returned by CheckRequest.ValidateAll() if the designated constraints aren't met. +type CheckRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CheckRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CheckRequestMultiError) AllErrors() []error { return m } + +// CheckRequestValidationError is the validation error returned by +// CheckRequest.Validate if the designated constraints aren't met. +type CheckRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CheckRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CheckRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CheckRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CheckRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CheckRequestValidationError) ErrorName() string { return "CheckRequestValidationError" } + +// Error satisfies the builtin error interface +func (e CheckRequestValidationError) 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 %sCheckRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CheckRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CheckRequestValidationError{} + +// Validate checks the field values on CheckResponse with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *CheckResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CheckResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CheckResponseMultiError, or +// nil if none found. +func (m *CheckResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *CheckResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetErrors() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: fmt.Sprintf("Errors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: fmt.Sprintf("Errors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CheckResponseValidationError{ + field: fmt.Sprintf("Errors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return CheckResponseMultiError(errors) + } + + return nil +} + +// CheckResponseMultiError is an error wrapping multiple validation errors +// returned by CheckResponse.ValidateAll() if the designated constraints +// aren't met. +type CheckResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CheckResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CheckResponseMultiError) AllErrors() []error { return m } + +// CheckResponseValidationError is the validation error returned by +// CheckResponse.Validate if the designated constraints aren't met. +type CheckResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CheckResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CheckResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CheckResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CheckResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CheckResponseValidationError) ErrorName() string { return "CheckResponseValidationError" } + +// Error satisfies the builtin error interface +func (e CheckResponseValidationError) 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 %sCheckResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CheckResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CheckResponseValidationError{} + +// Validate checks the field values on ParseError with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *ParseError) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ParseError with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ParseErrorMultiError, or +// nil if none found. +func (m *ParseError) ValidateAll() error { + return m.validate(true) +} + +func (m *ParseError) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Message + + if all { + switch v := interface{}(m.GetStart()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ParseErrorValidationError{ + field: "Start", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ParseErrorValidationError{ + field: "Start", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetStart()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ParseErrorValidationError{ + field: "Start", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetEnd()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ParseErrorValidationError{ + field: "End", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ParseErrorValidationError{ + field: "End", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnd()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ParseErrorValidationError{ + field: "End", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ParseErrorMultiError(errors) + } + + return nil +} + +// ParseErrorMultiError is an error wrapping multiple validation errors +// returned by ParseError.ValidateAll() if the designated constraints aren't met. +type ParseErrorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ParseErrorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ParseErrorMultiError) AllErrors() []error { return m } + +// ParseErrorValidationError is the validation error returned by +// ParseError.Validate if the designated constraints aren't met. +type ParseErrorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ParseErrorValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ParseErrorValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ParseErrorValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ParseErrorValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ParseErrorValidationError) ErrorName() string { return "ParseErrorValidationError" } + +// Error satisfies the builtin error interface +func (e ParseErrorValidationError) 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 %sParseError.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ParseErrorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ParseErrorValidationError{} + +// Validate checks the field values on SourcePosition with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *SourcePosition) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SourcePosition with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SourcePositionMultiError, +// or nil if none found. +func (m *SourcePosition) ValidateAll() error { + return m.validate(true) +} + +func (m *SourcePosition) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Line + + // no validation rules for Column + + if len(errors) > 0 { + return SourcePositionMultiError(errors) + } + + return nil +} + +// SourcePositionMultiError is an error wrapping multiple validation errors +// returned by SourcePosition.ValidateAll() if the designated constraints +// aren't met. +type SourcePositionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SourcePositionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SourcePositionMultiError) AllErrors() []error { return m } + +// SourcePositionValidationError is the validation error returned by +// SourcePosition.Validate if the designated constraints aren't met. +type SourcePositionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SourcePositionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SourcePositionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SourcePositionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SourcePositionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SourcePositionValidationError) ErrorName() string { return "SourcePositionValidationError" } + +// Error satisfies the builtin error interface +func (e SourcePositionValidationError) 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 %sSourcePosition.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SourcePositionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SourcePositionValidationError{} diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.proto b/proto/ory/keto/opl/v1alpha1/syntax_service.proto index a90d0b29c..1c0d2f0c3 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.proto +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.proto @@ -39,7 +39,7 @@ service SyntaxService { } message CheckRequest { - string content = 1; + bytes content = 1; } message CheckResponse { diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts index 56bbae4bc..823e9f538 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts +++ b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts @@ -8,8 +8,10 @@ import * as jspb from "google-protobuf"; import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; export class CheckRequest extends jspb.Message { - getContent(): string; - setContent(value: string): CheckRequest; + getContent(): Uint8Array | string; + getContent_asU8(): Uint8Array; + getContent_asB64(): string; + setContent(value: Uint8Array | string): CheckRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CheckRequest.AsObject; @@ -23,7 +25,7 @@ export class CheckRequest extends jspb.Message { export namespace CheckRequest { export type AsObject = { - content: string, + content: Uint8Array | string, } } diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js index 031e8ec8d..ff66fed8f 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js +++ b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js @@ -145,7 +145,7 @@ proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.toObject = function(opt_inclu */ proto.ory.keto.opl.v1alpha1.CheckRequest.toObject = function(includeInstance, msg) { var f, obj = { - content: jspb.Message.getFieldWithDefault(msg, 1, "") + content: msg.getContent_asB64() }; if (includeInstance) { @@ -183,7 +183,7 @@ proto.ory.keto.opl.v1alpha1.CheckRequest.deserializeBinaryFromReader = function( var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setContent(value); break; default: @@ -215,9 +215,9 @@ proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.serializeBinary = function() */ proto.ory.keto.opl.v1alpha1.CheckRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContent(); + f = message.getContent_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 1, f ); @@ -226,20 +226,44 @@ proto.ory.keto.opl.v1alpha1.CheckRequest.serializeBinaryToWriter = function(mess /** - * optional string content = 1; - * @return {string} + * optional bytes content = 1; + * @return {!(string|Uint8Array)} */ proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.getContent = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {string} value + * optional bytes content = 1; + * This is a type-conversion wrapper around `getContent()` + * @return {string} + */ +proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.getContent_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContent())); +}; + + +/** + * optional bytes content = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContent()` + * @return {!Uint8Array} + */ +proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.getContent_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContent())); +}; + + +/** + * @param {!(string|Uint8Array)} value * @return {!proto.ory.keto.opl.v1alpha1.CheckRequest} returns this */ proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.setContent = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3BytesField(this, 1, value); }; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.gw.go new file mode 100644 index 000000000..78d790587 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.gw.go @@ -0,0 +1,430 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ory/keto/relation_tuples/v1alpha2/check_service.proto + +/* +Package rts is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package rts + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_CheckService_Check_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_CheckService_Check_0(ctx context.Context, marshaler runtime.Marshaler, client CheckServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CheckRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CheckService_Check_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Check(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CheckService_Check_0(ctx context.Context, marshaler runtime.Marshaler, server CheckServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CheckRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CheckService_Check_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Check(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_CheckService_Check_1 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_CheckService_Check_1(ctx context.Context, marshaler runtime.Marshaler, client CheckServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CheckRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CheckService_Check_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Check(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CheckService_Check_1(ctx context.Context, marshaler runtime.Marshaler, server CheckServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CheckRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CheckService_Check_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Check(ctx, &protoReq) + return msg, metadata, err + +} + +func request_CheckService_Check_2(ctx context.Context, marshaler runtime.Marshaler, client CheckServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CheckRequest + 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) + } + + msg, err := client.Check(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CheckService_Check_2(ctx context.Context, marshaler runtime.Marshaler, server CheckServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CheckRequest + 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) + } + + msg, err := server.Check(ctx, &protoReq) + return msg, metadata, err + +} + +func request_CheckService_Check_3(ctx context.Context, marshaler runtime.Marshaler, client CheckServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CheckRequest + 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) + } + + msg, err := client.Check(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_CheckService_Check_3(ctx context.Context, marshaler runtime.Marshaler, server CheckServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CheckRequest + 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) + } + + msg, err := server.Check(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterCheckServiceHandlerServer registers the http handlers for service CheckService to "mux". +// UnaryRPC :call CheckServiceServer 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 RegisterCheckServiceHandlerFromEndpoint instead. +func RegisterCheckServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CheckServiceServer) error { + + mux.Handle("GET", pattern_CheckService_Check_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CheckService_Check_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_CheckService_Check_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_CheckService_Check_1, 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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check/openapi")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CheckService_Check_1(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_CheckService_Check_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_CheckService_Check_2, 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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CheckService_Check_2(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_CheckService_Check_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_CheckService_Check_3, 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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check/openapi")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_CheckService_Check_3(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_CheckService_Check_3(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterCheckServiceHandlerFromEndpoint is same as RegisterCheckServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterCheckServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterCheckServiceHandler(ctx, mux, conn) +} + +// RegisterCheckServiceHandler registers the http handlers for service CheckService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterCheckServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterCheckServiceHandlerClient(ctx, mux, NewCheckServiceClient(conn)) +} + +// RegisterCheckServiceHandlerClient registers the http handlers for service CheckService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CheckServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CheckServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "CheckServiceClient" to call the correct interceptors. +func RegisterCheckServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CheckServiceClient) error { + + mux.Handle("GET", pattern_CheckService_Check_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CheckService_Check_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_CheckService_Check_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_CheckService_Check_1, 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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check/openapi")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CheckService_Check_1(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_CheckService_Check_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_CheckService_Check_2, 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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CheckService_Check_2(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_CheckService_Check_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_CheckService_Check_3, 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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check/openapi")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_CheckService_Check_3(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_CheckService_Check_3(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_CheckService_Check_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"relation-tuples", "check"}, "")) + + pattern_CheckService_Check_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"relation-tuples", "check", "openapi"}, "")) + + pattern_CheckService_Check_2 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"relation-tuples", "check"}, "")) + + pattern_CheckService_Check_3 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"relation-tuples", "check", "openapi"}, "")) +) + +var ( + forward_CheckService_Check_0 = runtime.ForwardResponseMessage + + forward_CheckService_Check_1 = runtime.ForwardResponseMessage + + forward_CheckService_Check_2 = runtime.ForwardResponseMessage + + forward_CheckService_Check_3 = runtime.ForwardResponseMessage +) diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.validate.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.validate.go new file mode 100644 index 000000000..bfe0caa24 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.validate.go @@ -0,0 +1,367 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: ory/keto/relation_tuples/v1alpha2/check_service.proto + +package rts + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on CheckRequest with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *CheckRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CheckRequest with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CheckRequestMultiError, or +// nil if none found. +func (m *CheckRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *CheckRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Namespace + + // no validation rules for Object + + // no validation rules for Relation + + if all { + switch v := interface{}(m.GetSubject()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckRequestValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckRequestValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CheckRequestValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTuple()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckRequestValidationError{ + field: "Tuple", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckRequestValidationError{ + field: "Tuple", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTuple()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CheckRequestValidationError{ + field: "Tuple", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Latest + + // no validation rules for Snaptoken + + // no validation rules for MaxDepth + + switch v := m.RestApiSubject.(type) { + case *CheckRequest_SubjectId: + if v == nil { + err := CheckRequestValidationError{ + field: "RestApiSubject", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for SubjectId + case *CheckRequest_SubjectSet: + if v == nil { + err := CheckRequestValidationError{ + field: "RestApiSubject", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetSubjectSet()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckRequestValidationError{ + field: "SubjectSet", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckRequestValidationError{ + field: "SubjectSet", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSubjectSet()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CheckRequestValidationError{ + field: "SubjectSet", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return CheckRequestMultiError(errors) + } + + return nil +} + +// CheckRequestMultiError is an error wrapping multiple validation errors +// returned by CheckRequest.ValidateAll() if the designated constraints aren't met. +type CheckRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CheckRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CheckRequestMultiError) AllErrors() []error { return m } + +// CheckRequestValidationError is the validation error returned by +// CheckRequest.Validate if the designated constraints aren't met. +type CheckRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CheckRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CheckRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CheckRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CheckRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CheckRequestValidationError) ErrorName() string { return "CheckRequestValidationError" } + +// Error satisfies the builtin error interface +func (e CheckRequestValidationError) 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 %sCheckRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CheckRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CheckRequestValidationError{} + +// Validate checks the field values on CheckResponse with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *CheckResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CheckResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in CheckResponseMultiError, or +// nil if none found. +func (m *CheckResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *CheckResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Allowed + + // no validation rules for Snaptoken + + if len(errors) > 0 { + return CheckResponseMultiError(errors) + } + + return nil +} + +// CheckResponseMultiError is an error wrapping multiple validation errors +// returned by CheckResponse.ValidateAll() if the designated constraints +// aren't met. +type CheckResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CheckResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CheckResponseMultiError) AllErrors() []error { return m } + +// CheckResponseValidationError is the validation error returned by +// CheckResponse.Validate if the designated constraints aren't met. +type CheckResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CheckResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CheckResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CheckResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CheckResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CheckResponseValidationError) ErrorName() string { return "CheckResponseValidationError" } + +// Error satisfies the builtin error interface +func (e CheckResponseValidationError) 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 %sCheckResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CheckResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CheckResponseValidationError{} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go new file mode 100644 index 000000000..cd2279d57 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go @@ -0,0 +1,105 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: ory/keto/relation_tuples/v1alpha2/check_service.proto + +package rts + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// CheckServiceClient is the client API for CheckService 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 CheckServiceClient interface { + // Performs an authorization check. + Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) +} + +type checkServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewCheckServiceClient(cc grpc.ClientConnInterface) CheckServiceClient { + return &checkServiceClient{cc} +} + +func (c *checkServiceClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) { + out := new(CheckResponse) + err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CheckServiceServer is the server API for CheckService service. +// All implementations should embed UnimplementedCheckServiceServer +// for forward compatibility +type CheckServiceServer interface { + // Performs an authorization check. + Check(context.Context, *CheckRequest) (*CheckResponse, error) +} + +// UnimplementedCheckServiceServer should be embedded to have forward compatible implementations. +type UnimplementedCheckServiceServer struct { +} + +func (UnimplementedCheckServiceServer) Check(context.Context, *CheckRequest) (*CheckResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Check not implemented") +} + +// UnsafeCheckServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CheckServiceServer will +// result in compilation errors. +type UnsafeCheckServiceServer interface { + mustEmbedUnimplementedCheckServiceServer() +} + +func RegisterCheckServiceServer(s grpc.ServiceRegistrar, srv CheckServiceServer) { + s.RegisterService(&CheckService_ServiceDesc, srv) +} + +func _CheckService_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CheckServiceServer).Check(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CheckServiceServer).Check(ctx, req.(*CheckRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// CheckService_ServiceDesc is the grpc.ServiceDesc for CheckService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var CheckService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "ory.keto.relation_tuples.v1alpha2.CheckService", + HandlerType: (*CheckServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Check", + Handler: _CheckService_Check_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ory/keto/relation_tuples/v1alpha2/check_service.proto", +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go index 06c34df0b..a0c12bd83 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go @@ -29,30 +29,30 @@ const ( NodeType_unspecified NodeType = 0 NodeType_NODE_TYPE_UNSPECIFIED NodeType = 0 // This node expands to a union of all children. - NodeType_NODE_TYPE_UNION NodeType = 1 NodeType_union NodeType = 1 + NodeType_NODE_TYPE_UNION NodeType = 1 // Not implemented yet. - NodeType_NODE_TYPE_EXCLUSION NodeType = 2 NodeType_exclusion NodeType = 2 + NodeType_NODE_TYPE_EXCLUSION NodeType = 2 // Not implemented yet. - NodeType_NODE_TYPE_INTERSECTION NodeType = 3 NodeType_intersection NodeType = 3 + NodeType_NODE_TYPE_INTERSECTION NodeType = 3 // This node is a leaf and contains no children. // Its subject is a `SubjectID` unless `max_depth` was reached. - NodeType_NODE_TYPE_LEAF NodeType = 4 NodeType_leaf NodeType = 4 + NodeType_NODE_TYPE_LEAF NodeType = 4 // This node is a leaf and contains no children. // Its subject is a `SubjectID` unless `max_depth` was reached. - NodeType_NODE_TYPE_TUPLE_TO_SUBJECT_SET NodeType = 5 NodeType_tuple_to_subject_set NodeType = 5 + NodeType_NODE_TYPE_TUPLE_TO_SUBJECT_SET NodeType = 5 // This node is a leaf and contains no children. // Its subject is a `SubjectID` unless `max_depth` was reached. - NodeType_NODE_TYPE_COMPUTED_SUBJECT_SET NodeType = 6 NodeType_computed_subject_set NodeType = 6 + NodeType_NODE_TYPE_COMPUTED_SUBJECT_SET NodeType = 6 // This node is a leaf and contains no children. // Its subject is a `SubjectID` unless `max_depth` was reached. - NodeType_NODE_TYPE_NOT NodeType = 7 NodeType_not NodeType = 7 + NodeType_NODE_TYPE_NOT NodeType = 7 ) // Enum value maps for NodeType. @@ -60,38 +60,38 @@ var ( NodeType_name = map[int32]string{ 0: "unspecified", // Duplicate value: 0: "NODE_TYPE_UNSPECIFIED", - 1: "NODE_TYPE_UNION", - // Duplicate value: 1: "union", - 2: "NODE_TYPE_EXCLUSION", - // Duplicate value: 2: "exclusion", - 3: "NODE_TYPE_INTERSECTION", - // Duplicate value: 3: "intersection", - 4: "NODE_TYPE_LEAF", - // Duplicate value: 4: "leaf", - 5: "NODE_TYPE_TUPLE_TO_SUBJECT_SET", - // Duplicate value: 5: "tuple_to_subject_set", - 6: "NODE_TYPE_COMPUTED_SUBJECT_SET", - // Duplicate value: 6: "computed_subject_set", - 7: "NODE_TYPE_NOT", - // Duplicate value: 7: "not", + 1: "union", + // Duplicate value: 1: "NODE_TYPE_UNION", + 2: "exclusion", + // Duplicate value: 2: "NODE_TYPE_EXCLUSION", + 3: "intersection", + // Duplicate value: 3: "NODE_TYPE_INTERSECTION", + 4: "leaf", + // Duplicate value: 4: "NODE_TYPE_LEAF", + 5: "tuple_to_subject_set", + // Duplicate value: 5: "NODE_TYPE_TUPLE_TO_SUBJECT_SET", + 6: "computed_subject_set", + // Duplicate value: 6: "NODE_TYPE_COMPUTED_SUBJECT_SET", + 7: "not", + // Duplicate value: 7: "NODE_TYPE_NOT", } NodeType_value = map[string]int32{ "unspecified": 0, "NODE_TYPE_UNSPECIFIED": 0, - "NODE_TYPE_UNION": 1, "union": 1, - "NODE_TYPE_EXCLUSION": 2, + "NODE_TYPE_UNION": 1, "exclusion": 2, - "NODE_TYPE_INTERSECTION": 3, + "NODE_TYPE_EXCLUSION": 2, "intersection": 3, - "NODE_TYPE_LEAF": 4, + "NODE_TYPE_INTERSECTION": 3, "leaf": 4, - "NODE_TYPE_TUPLE_TO_SUBJECT_SET": 5, + "NODE_TYPE_LEAF": 4, "tuple_to_subject_set": 5, - "NODE_TYPE_COMPUTED_SUBJECT_SET": 6, + "NODE_TYPE_TUPLE_TO_SUBJECT_SET": 5, "computed_subject_set": 6, - "NODE_TYPE_NOT": 7, + "NODE_TYPE_COMPUTED_SUBJECT_SET": 6, "not": 7, + "NODE_TYPE_NOT": 7, } ) @@ -450,34 +450,34 @@ var file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDesc = []byte 0x12, 0x2d, 0x0a, 0x15, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, - 0x27, 0x0a, 0x0f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, - 0x4f, 0x4e, 0x10, 0x01, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, - 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x09, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, - 0x6e, 0x10, 0x01, 0x12, 0x2b, 0x0a, 0x13, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x1a, 0x12, 0xfa, 0xd2, - 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, - 0x12, 0x0d, 0x0a, 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x02, 0x12, - 0x2e, 0x0a, 0x16, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, - 0x45, 0x52, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, + 0x09, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x27, 0x0a, 0x0f, 0x4e, 0x4f, + 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x1a, + 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, + 0x47, 0x45, 0x52, 0x12, 0x0d, 0x0a, 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, + 0x10, 0x02, 0x12, 0x2b, 0x0a, 0x13, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, - 0x03, 0x12, 0x26, 0x0a, 0x0e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, - 0x45, 0x41, 0x46, 0x10, 0x04, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, - 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x65, 0x61, - 0x66, 0x10, 0x04, 0x12, 0x36, 0x0a, 0x1e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x54, 0x55, 0x50, 0x4c, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, - 0x54, 0x5f, 0x53, 0x45, 0x54, 0x10, 0x05, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, - 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x18, 0x0a, 0x14, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x73, 0x65, 0x74, 0x10, 0x05, 0x12, 0x36, 0x0a, 0x1e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x42, 0x4a, - 0x45, 0x43, 0x54, 0x5f, 0x53, 0x45, 0x54, 0x10, 0x06, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, - 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x18, 0x0a, - 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x06, 0x12, 0x25, 0x0a, 0x0d, 0x4e, 0x4f, 0x44, 0x45, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x10, 0x07, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, - 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x07, - 0x0a, 0x03, 0x6e, 0x6f, 0x74, 0x10, 0x07, 0x1a, 0x02, 0x10, 0x01, 0x32, 0xa7, 0x03, 0x0a, 0x0d, + 0x03, 0x12, 0x2e, 0x0a, 0x16, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, + 0x4e, 0x54, 0x45, 0x52, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x1a, 0x12, 0xfa, + 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, + 0x52, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x65, 0x61, 0x66, 0x10, 0x04, 0x12, 0x26, 0x0a, 0x0e, 0x4e, + 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x45, 0x41, 0x46, 0x10, 0x04, 0x1a, + 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, + 0x47, 0x45, 0x52, 0x12, 0x18, 0x0a, 0x14, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x5f, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x05, 0x12, 0x36, 0x0a, + 0x1e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x55, 0x50, 0x4c, 0x45, + 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x53, 0x45, 0x54, 0x10, + 0x05, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, + 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x18, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x06, 0x12, + 0x36, 0x0a, 0x1e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x4d, + 0x50, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x53, 0x45, + 0x54, 0x10, 0x06, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, + 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x07, 0x0a, 0x03, 0x6e, 0x6f, 0x74, 0x10, 0x07, + 0x12, 0x25, 0x0a, 0x0d, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x4f, + 0x54, 0x10, 0x07, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, + 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x1a, 0x02, 0x10, 0x01, 0x32, 0xa7, 0x03, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x95, 0x03, 0x0a, 0x06, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.gw.go new file mode 100644 index 000000000..a37b2aedb --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.gw.go @@ -0,0 +1,182 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ory/keto/relation_tuples/v1alpha2/expand_service.proto + +/* +Package rts is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package rts + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_ExpandService_Expand_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_ExpandService_Expand_0(ctx context.Context, marshaler runtime.Marshaler, client ExpandServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ExpandRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ExpandService_Expand_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Expand(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ExpandService_Expand_0(ctx context.Context, marshaler runtime.Marshaler, server ExpandServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ExpandRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ExpandService_Expand_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Expand(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterExpandServiceHandlerServer registers the http handlers for service ExpandService to "mux". +// UnaryRPC :call ExpandServiceServer 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 RegisterExpandServiceHandlerFromEndpoint instead. +func RegisterExpandServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExpandServiceServer) error { + + mux.Handle("GET", pattern_ExpandService_Expand_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand", runtime.WithHTTPPathPattern("/relation-tuples/expand")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ExpandService_Expand_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ExpandService_Expand_0(annotatedContext, mux, outboundMarshaler, w, req, response_ExpandService_Expand_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterExpandServiceHandlerFromEndpoint is same as RegisterExpandServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterExpandServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterExpandServiceHandler(ctx, mux, conn) +} + +// RegisterExpandServiceHandler registers the http handlers for service ExpandService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterExpandServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterExpandServiceHandlerClient(ctx, mux, NewExpandServiceClient(conn)) +} + +// RegisterExpandServiceHandlerClient registers the http handlers for service ExpandService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ExpandServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ExpandServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "ExpandServiceClient" to call the correct interceptors. +func RegisterExpandServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExpandServiceClient) error { + + mux.Handle("GET", pattern_ExpandService_Expand_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand", runtime.WithHTTPPathPattern("/relation-tuples/expand")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ExpandService_Expand_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ExpandService_Expand_0(annotatedContext, mux, outboundMarshaler, w, req, response_ExpandService_Expand_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +type response_ExpandService_Expand_0 struct { + proto.Message +} + +func (m response_ExpandService_Expand_0) XXX_ResponseBody() interface{} { + response := m.Message.(*ExpandResponse) + return response.Tree +} + +var ( + pattern_ExpandService_Expand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"relation-tuples", "expand"}, "")) +) + +var ( + forward_ExpandService_Expand_0 = runtime.ForwardResponseMessage +) diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.validate.go b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.validate.go new file mode 100644 index 000000000..73075623d --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.validate.go @@ -0,0 +1,497 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: ory/keto/relation_tuples/v1alpha2/expand_service.proto + +package rts + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ExpandRequest with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *ExpandRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExpandRequest with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ExpandRequestMultiError, or +// nil if none found. +func (m *ExpandRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ExpandRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetSubject()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExpandRequestValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExpandRequestValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExpandRequestValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for MaxDepth + + // no validation rules for Snaptoken + + // no validation rules for Namespace + + // no validation rules for Object + + // no validation rules for Relation + + if len(errors) > 0 { + return ExpandRequestMultiError(errors) + } + + return nil +} + +// ExpandRequestMultiError is an error wrapping multiple validation errors +// returned by ExpandRequest.ValidateAll() if the designated constraints +// aren't met. +type ExpandRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExpandRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExpandRequestMultiError) AllErrors() []error { return m } + +// ExpandRequestValidationError is the validation error returned by +// ExpandRequest.Validate if the designated constraints aren't met. +type ExpandRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExpandRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExpandRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExpandRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExpandRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExpandRequestValidationError) ErrorName() string { return "ExpandRequestValidationError" } + +// Error satisfies the builtin error interface +func (e ExpandRequestValidationError) 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 %sExpandRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExpandRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExpandRequestValidationError{} + +// Validate checks the field values on ExpandResponse with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *ExpandResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExpandResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ExpandResponseMultiError, +// or nil if none found. +func (m *ExpandResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ExpandResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetTree()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ExpandResponseValidationError{ + field: "Tree", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ExpandResponseValidationError{ + field: "Tree", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTree()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ExpandResponseValidationError{ + field: "Tree", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ExpandResponseMultiError(errors) + } + + return nil +} + +// ExpandResponseMultiError is an error wrapping multiple validation errors +// returned by ExpandResponse.ValidateAll() if the designated constraints +// aren't met. +type ExpandResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExpandResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExpandResponseMultiError) AllErrors() []error { return m } + +// ExpandResponseValidationError is the validation error returned by +// ExpandResponse.Validate if the designated constraints aren't met. +type ExpandResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExpandResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExpandResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExpandResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExpandResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExpandResponseValidationError) ErrorName() string { return "ExpandResponseValidationError" } + +// Error satisfies the builtin error interface +func (e ExpandResponseValidationError) 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 %sExpandResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExpandResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExpandResponseValidationError{} + +// Validate checks the field values on SubjectTree with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *SubjectTree) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SubjectTree with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SubjectTreeMultiError, or +// nil if none found. +func (m *SubjectTree) ValidateAll() error { + return m.validate(true) +} + +func (m *SubjectTree) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for NodeType + + if all { + switch v := interface{}(m.GetSubject()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SubjectTreeValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SubjectTreeValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SubjectTreeValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetTuple()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SubjectTreeValidationError{ + field: "Tuple", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SubjectTreeValidationError{ + field: "Tuple", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTuple()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SubjectTreeValidationError{ + field: "Tuple", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetChildren() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SubjectTreeValidationError{ + field: fmt.Sprintf("Children[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SubjectTreeValidationError{ + field: fmt.Sprintf("Children[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SubjectTreeValidationError{ + field: fmt.Sprintf("Children[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return SubjectTreeMultiError(errors) + } + + return nil +} + +// SubjectTreeMultiError is an error wrapping multiple validation errors +// returned by SubjectTree.ValidateAll() if the designated constraints aren't met. +type SubjectTreeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SubjectTreeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SubjectTreeMultiError) AllErrors() []error { return m } + +// SubjectTreeValidationError is the validation error returned by +// SubjectTree.Validate if the designated constraints aren't met. +type SubjectTreeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SubjectTreeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SubjectTreeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SubjectTreeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SubjectTreeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SubjectTreeValidationError) ErrorName() string { return "SubjectTreeValidationError" } + +// Error satisfies the builtin error interface +func (e SubjectTreeValidationError) 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 %sSubjectTree.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SubjectTreeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SubjectTreeValidationError{} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.proto index 1ef8d5641..8fe344bfb 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.proto @@ -106,36 +106,36 @@ enum NodeType { NODE_TYPE_UNSPECIFIED = 0 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; // This node expands to a union of all children. - NODE_TYPE_UNION = 1 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; union = 1; + NODE_TYPE_UNION = 1 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; // Not implemented yet. - NODE_TYPE_EXCLUSION = 2 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; exclusion = 2; + NODE_TYPE_EXCLUSION = 2 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; // Not implemented yet. - NODE_TYPE_INTERSECTION = 3 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; intersection = 3; + NODE_TYPE_INTERSECTION = 3 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; // This node is a leaf and contains no children. // Its subject is a `SubjectID` unless `max_depth` was reached. - NODE_TYPE_LEAF = 4 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; leaf = 4; + NODE_TYPE_LEAF = 4 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; // This node is a leaf and contains no children. // Its subject is a `SubjectID` unless `max_depth` was reached. - NODE_TYPE_TUPLE_TO_SUBJECT_SET = 5 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; tuple_to_subject_set = 5; + NODE_TYPE_TUPLE_TO_SUBJECT_SET = 5 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; // This node is a leaf and contains no children. // Its subject is a `SubjectID` unless `max_depth` was reached. - NODE_TYPE_COMPUTED_SUBJECT_SET = 6 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; computed_subject_set = 6; + NODE_TYPE_COMPUTED_SUBJECT_SET = 6 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; // This node is a leaf and contains no children. // Its subject is a `SubjectID` unless `max_depth` was reached. - NODE_TYPE_NOT = 7 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; not = 7; + NODE_TYPE_NOT = 7 [(google.api.value_visibility).restriction = "NO_SWAGGER"]; } message SubjectTree { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts index c5a8d924e..47ee39753 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts @@ -111,18 +111,18 @@ export namespace SubjectTree { export enum NodeType { UNSPECIFIED = 0, NODE_TYPE_UNSPECIFIED = 0, - NODE_TYPE_UNION = 1, UNION = 1, - NODE_TYPE_EXCLUSION = 2, + NODE_TYPE_UNION = 1, EXCLUSION = 2, - NODE_TYPE_INTERSECTION = 3, + NODE_TYPE_EXCLUSION = 2, INTERSECTION = 3, - NODE_TYPE_LEAF = 4, + NODE_TYPE_INTERSECTION = 3, LEAF = 4, - NODE_TYPE_TUPLE_TO_SUBJECT_SET = 5, + NODE_TYPE_LEAF = 4, TUPLE_TO_SUBJECT_SET = 5, - NODE_TYPE_COMPUTED_SUBJECT_SET = 6, + NODE_TYPE_TUPLE_TO_SUBJECT_SET = 5, COMPUTED_SUBJECT_SET = 6, - NODE_TYPE_NOT = 7, + NODE_TYPE_COMPUTED_SUBJECT_SET = 6, NOT = 7, + NODE_TYPE_NOT = 7, } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js index 2cffdd5e3..6b6c2e15b 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js @@ -848,20 +848,20 @@ proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.clearChildrenList proto.ory.keto.relation_tuples.v1alpha2.NodeType = { UNSPECIFIED: 0, NODE_TYPE_UNSPECIFIED: 0, - NODE_TYPE_UNION: 1, UNION: 1, - NODE_TYPE_EXCLUSION: 2, + NODE_TYPE_UNION: 1, EXCLUSION: 2, - NODE_TYPE_INTERSECTION: 3, + NODE_TYPE_EXCLUSION: 2, INTERSECTION: 3, - NODE_TYPE_LEAF: 4, + NODE_TYPE_INTERSECTION: 3, LEAF: 4, - NODE_TYPE_TUPLE_TO_SUBJECT_SET: 5, + NODE_TYPE_LEAF: 4, TUPLE_TO_SUBJECT_SET: 5, - NODE_TYPE_COMPUTED_SUBJECT_SET: 6, + NODE_TYPE_TUPLE_TO_SUBJECT_SET: 5, COMPUTED_SUBJECT_SET: 6, - NODE_TYPE_NOT: 7, - NOT: 7 + NODE_TYPE_COMPUTED_SUBJECT_SET: 6, + NOT: 7, + NODE_TYPE_NOT: 7 }; goog.object.extend(exports, proto.ory.keto.relation_tuples.v1alpha2); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.gw.go new file mode 100644 index 000000000..b1f8847df --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.gw.go @@ -0,0 +1,155 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ory/keto/relation_tuples/v1alpha2/namespaces_service.proto + +/* +Package rts is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package rts + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_NamespacesService_ListNamespaces_0(ctx context.Context, marshaler runtime.Marshaler, client NamespacesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListNamespacesRequest + var metadata runtime.ServerMetadata + + msg, err := client.ListNamespaces(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NamespacesService_ListNamespaces_0(ctx context.Context, marshaler runtime.Marshaler, server NamespacesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListNamespacesRequest + var metadata runtime.ServerMetadata + + msg, err := server.ListNamespaces(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterNamespacesServiceHandlerServer registers the http handlers for service NamespacesService to "mux". +// UnaryRPC :call NamespacesServiceServer 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 RegisterNamespacesServiceHandlerFromEndpoint instead. +func RegisterNamespacesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NamespacesServiceServer) error { + + mux.Handle("GET", pattern_NamespacesService_ListNamespaces_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.NamespacesService/ListNamespaces", runtime.WithHTTPPathPattern("/namespaces")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NamespacesService_ListNamespaces_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_NamespacesService_ListNamespaces_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterNamespacesServiceHandlerFromEndpoint is same as RegisterNamespacesServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterNamespacesServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterNamespacesServiceHandler(ctx, mux, conn) +} + +// RegisterNamespacesServiceHandler registers the http handlers for service NamespacesService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterNamespacesServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterNamespacesServiceHandlerClient(ctx, mux, NewNamespacesServiceClient(conn)) +} + +// RegisterNamespacesServiceHandlerClient registers the http handlers for service NamespacesService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NamespacesServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NamespacesServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "NamespacesServiceClient" to call the correct interceptors. +func RegisterNamespacesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NamespacesServiceClient) error { + + mux.Handle("GET", pattern_NamespacesService_ListNamespaces_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.NamespacesService/ListNamespaces", runtime.WithHTTPPathPattern("/namespaces")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NamespacesService_ListNamespaces_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_NamespacesService_ListNamespaces_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_NamespacesService_ListNamespaces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"namespaces"}, "")) +) + +var ( + forward_NamespacesService_ListNamespaces_0 = runtime.ForwardResponseMessage +) diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.validate.go b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.validate.go new file mode 100644 index 000000000..b89530a71 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.validate.go @@ -0,0 +1,375 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: ory/keto/relation_tuples/v1alpha2/namespaces_service.proto + +package rts + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ListNamespacesRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ListNamespacesRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListNamespacesRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ListNamespacesRequestMultiError, or nil if none found. +func (m *ListNamespacesRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ListNamespacesRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return ListNamespacesRequestMultiError(errors) + } + + return nil +} + +// ListNamespacesRequestMultiError is an error wrapping multiple validation +// errors returned by ListNamespacesRequest.ValidateAll() if the designated +// constraints aren't met. +type ListNamespacesRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListNamespacesRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListNamespacesRequestMultiError) AllErrors() []error { return m } + +// ListNamespacesRequestValidationError is the validation error returned by +// ListNamespacesRequest.Validate if the designated constraints aren't met. +type ListNamespacesRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListNamespacesRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListNamespacesRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListNamespacesRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListNamespacesRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListNamespacesRequestValidationError) ErrorName() string { + return "ListNamespacesRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ListNamespacesRequestValidationError) 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 %sListNamespacesRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListNamespacesRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListNamespacesRequestValidationError{} + +// Validate checks the field values on ListNamespacesResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ListNamespacesResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListNamespacesResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ListNamespacesResponseMultiError, or nil if none found. +func (m *ListNamespacesResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ListNamespacesResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetNamespaces() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListNamespacesResponseValidationError{ + field: fmt.Sprintf("Namespaces[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListNamespacesResponseValidationError{ + field: fmt.Sprintf("Namespaces[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListNamespacesResponseValidationError{ + field: fmt.Sprintf("Namespaces[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ListNamespacesResponseMultiError(errors) + } + + return nil +} + +// ListNamespacesResponseMultiError is an error wrapping multiple validation +// errors returned by ListNamespacesResponse.ValidateAll() if the designated +// constraints aren't met. +type ListNamespacesResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListNamespacesResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListNamespacesResponseMultiError) AllErrors() []error { return m } + +// ListNamespacesResponseValidationError is the validation error returned by +// ListNamespacesResponse.Validate if the designated constraints aren't met. +type ListNamespacesResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListNamespacesResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListNamespacesResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListNamespacesResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListNamespacesResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListNamespacesResponseValidationError) ErrorName() string { + return "ListNamespacesResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ListNamespacesResponseValidationError) 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 %sListNamespacesResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListNamespacesResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListNamespacesResponseValidationError{} + +// Validate checks the field values on Namespace with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Namespace) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Namespace with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in NamespaceMultiError, or nil +// if none found. +func (m *Namespace) ValidateAll() error { + return m.validate(true) +} + +func (m *Namespace) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + if len(errors) > 0 { + return NamespaceMultiError(errors) + } + + return nil +} + +// NamespaceMultiError is an error wrapping multiple validation errors returned +// by Namespace.ValidateAll() if the designated constraints aren't met. +type NamespaceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m NamespaceMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m NamespaceMultiError) AllErrors() []error { return m } + +// NamespaceValidationError is the validation error returned by +// Namespace.Validate if the designated constraints aren't met. +type NamespaceValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e NamespaceValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e NamespaceValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e NamespaceValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e NamespaceValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e NamespaceValidationError) ErrorName() string { return "NamespaceValidationError" } + +// Error satisfies the builtin error interface +func (e NamespaceValidationError) 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 %sNamespace.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = NamespaceValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = NamespaceValidationError{} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go new file mode 100644 index 000000000..263a3da18 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go @@ -0,0 +1,366 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: ory/keto/relation_tuples/v1alpha2/openapi.proto + +package rts + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// JSON API Error Response +// +// The standard Ory JSON API error format. +type ErrorResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Error *ErrorResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *ErrorResponse) Reset() { + *x = ErrorResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrorResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrorResponse) ProtoMessage() {} + +func (x *ErrorResponse) ProtoReflect() protoreflect.Message { + mi := &file_ory_keto_relation_tuples_v1alpha2_openapi_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 ErrorResponse.ProtoReflect.Descriptor instead. +func (*ErrorResponse) Descriptor() ([]byte, []int) { + return file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDescGZIP(), []int{0} +} + +func (x *ErrorResponse) GetError() *ErrorResponse_Error { + if x != nil { + return x.Error + } + return nil +} + +type ErrorResponse_Error struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The status code + Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + // Debug information + // + // Debug information is often not exposed to protect against leaking sensitive information. + Debug string `protobuf:"bytes,2,opt,name=debug,proto3" json:"debug,omitempty"` + // Further error details + // + // Further details about the error. + Details map[string]string `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The error ID + // + // The error ID is useful when trying to identify various errors in application logic. + Id string `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"` + // The error message + // + // The error's message (required). + Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"` + // The error reason + // + // Reason holds a human-readable reason for the error. + Reason string `protobuf:"bytes,6,opt,name=reason,proto3" json:"reason,omitempty"` + // The request ID + // + // The request ID is often exposed internally in order to trace + // errors across service architectures. This is often a UUID. + Request string `protobuf:"bytes,7,opt,name=request,proto3" json:"request,omitempty"` + // The status description + // + // Status holds the human-readable HTTP status code. + Status string `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *ErrorResponse_Error) Reset() { + *x = ErrorResponse_Error{} + if protoimpl.UnsafeEnabled { + mi := &file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrorResponse_Error) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrorResponse_Error) ProtoMessage() {} + +func (x *ErrorResponse_Error) ProtoReflect() protoreflect.Message { + mi := &file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ErrorResponse_Error.ProtoReflect.Descriptor instead. +func (*ErrorResponse_Error) Descriptor() ([]byte, []int) { + return file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *ErrorResponse_Error) GetCode() int64 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *ErrorResponse_Error) GetDebug() string { + if x != nil { + return x.Debug + } + return "" +} + +func (x *ErrorResponse_Error) GetDetails() map[string]string { + if x != nil { + return x.Details + } + return nil +} + +func (x *ErrorResponse_Error) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ErrorResponse_Error) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *ErrorResponse_Error) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *ErrorResponse_Error) GetRequest() string { + if x != nil { + return x.Request + } + return "" +} + +func (x *ErrorResponse_Error) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +var File_ory_keto_relation_tuples_v1alpha2_openapi_proto protoreflect.FileDescriptor + +var file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDesc = []byte{ + 0x0a, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x21, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 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, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa4, 0x04, 0x0a, 0x0d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, + 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0xbf, 0x03, 0x0a, 0x05, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x08, 0x92, 0x41, 0x05, 0x4a, 0x03, 0x34, 0x30, 0x34, 0x52, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x12, 0x5d, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x6f, 0x72, 0x79, 0x2e, + 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4e, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0x92, 0x41, 0x2e, 0x4a, 0x2c, 0x22, + 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6e, 0x6f, 0x74, + 0x20, 0x62, 0x65, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x22, 0xe0, 0x41, 0x02, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, + 0x45, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2b, 0x92, 0x41, 0x28, 0x4a, 0x26, 0x22, 0x64, 0x37, 0x65, 0x66, 0x35, 0x34, 0x62, 0x31, + 0x2d, 0x65, 0x63, 0x31, 0x35, 0x2d, 0x34, 0x36, 0x65, 0x36, 0x2d, 0x62, 0x63, 0x63, 0x62, 0x2d, + 0x35, 0x32, 0x34, 0x62, 0x38, 0x32, 0x63, 0x30, 0x33, 0x35, 0x65, 0x36, 0x22, 0x52, 0x07, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0x92, 0x41, 0x0d, 0x4a, 0x0b, 0x22, 0x4e, 0x6f, + 0x74, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x1a, 0x3a, 0x0a, 0x0c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xd1, 0x04, 0x0a, + 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, + 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, + 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x92, 0x41, 0x90, 0x03, + 0x12, 0x95, 0x02, 0x0a, 0x08, 0x4f, 0x52, 0x59, 0x20, 0x4b, 0x65, 0x74, 0x6f, 0x12, 0x9b, 0x01, + 0x4f, 0x72, 0x79, 0x20, 0x4b, 0x65, 0x74, 0x6f, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x62, 0x65, 0x73, 0x74, 0x2d, + 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x20, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x73, 0x20, 0x28, 0x52, 0x42, 0x41, 0x43, 0x2c, 0x20, 0x41, 0x42, 0x41, 0x43, 0x2c, 0x20, 0x41, + 0x43, 0x4c, 0x2c, 0x20, 0x41, 0x57, 0x53, 0x20, 0x49, 0x41, 0x4d, 0x20, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x69, 0x65, 0x73, 0x2c, 0x20, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, + 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x20, 0x76, 0x69, 0x61, + 0x20, 0x52, 0x45, 0x53, 0x54, 0x20, 0x41, 0x50, 0x49, 0x73, 0x2e, 0x22, 0x24, 0x0a, 0x03, 0x4f, + 0x52, 0x59, 0x12, 0x12, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, + 0x6f, 0x72, 0x79, 0x2e, 0x73, 0x68, 0x1a, 0x09, 0x68, 0x69, 0x40, 0x6f, 0x72, 0x79, 0x2e, 0x73, + 0x68, 0x2a, 0x3d, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x32, 0x2e, 0x30, 0x12, + 0x2f, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x62, 0x6c, 0x6f, + 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, + 0x32, 0x06, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x22, 0x01, 0x2f, 0x2a, 0x02, 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, 0x52, 0x4b, 0x0a, 0x03, 0x34, 0x30, 0x30, 0x12, 0x44, 0x0a, 0x0c, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x12, 0x34, 0x0a, 0x32, 0x1a, 0x30, + 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDescOnce sync.Once + file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDescData = file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDesc +) + +func file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDescGZIP() []byte { + file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDescOnce.Do(func() { + file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDescData = protoimpl.X.CompressGZIP(file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDescData) + }) + return file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDescData +} + +var file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_ory_keto_relation_tuples_v1alpha2_openapi_proto_goTypes = []interface{}{ + (*ErrorResponse)(nil), // 0: ory.keto.relation_tuples.v1alpha2.ErrorResponse + (*ErrorResponse_Error)(nil), // 1: ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error + nil, // 2: ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.DetailsEntry +} +var file_ory_keto_relation_tuples_v1alpha2_openapi_proto_depIdxs = []int32{ + 1, // 0: ory.keto.relation_tuples.v1alpha2.ErrorResponse.error:type_name -> ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error + 2, // 1: ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.details:type_name -> ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.DetailsEntry + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_ory_keto_relation_tuples_v1alpha2_openapi_proto_init() } +func file_ory_keto_relation_tuples_v1alpha2_openapi_proto_init() { + if File_ory_keto_relation_tuples_v1alpha2_openapi_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ErrorResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ErrorResponse_Error); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ory_keto_relation_tuples_v1alpha2_openapi_proto_goTypes, + DependencyIndexes: file_ory_keto_relation_tuples_v1alpha2_openapi_proto_depIdxs, + MessageInfos: file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes, + }.Build() + File_ory_keto_relation_tuples_v1alpha2_openapi_proto = out.File + file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDesc = nil + file_ory_keto_relation_tuples_v1alpha2_openapi_proto_goTypes = nil + file_ory_keto_relation_tuples_v1alpha2_openapi_proto_depIdxs = nil +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.validate.go b/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.validate.go new file mode 100644 index 000000000..fe80fb1db --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.validate.go @@ -0,0 +1,283 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: ory/keto/relation_tuples/v1alpha2/openapi.proto + +package rts + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ErrorResponse with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *ErrorResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ErrorResponse with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ErrorResponseMultiError, or +// nil if none found. +func (m *ErrorResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ErrorResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetError()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ErrorResponseValidationError{ + field: "Error", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ErrorResponseValidationError{ + field: "Error", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetError()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ErrorResponseValidationError{ + field: "Error", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ErrorResponseMultiError(errors) + } + + return nil +} + +// ErrorResponseMultiError is an error wrapping multiple validation errors +// returned by ErrorResponse.ValidateAll() if the designated constraints +// aren't met. +type ErrorResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ErrorResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ErrorResponseMultiError) AllErrors() []error { return m } + +// ErrorResponseValidationError is the validation error returned by +// ErrorResponse.Validate if the designated constraints aren't met. +type ErrorResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ErrorResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ErrorResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ErrorResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ErrorResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ErrorResponseValidationError) ErrorName() string { return "ErrorResponseValidationError" } + +// Error satisfies the builtin error interface +func (e ErrorResponseValidationError) 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 %sErrorResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ErrorResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ErrorResponseValidationError{} + +// Validate checks the field values on ErrorResponse_Error with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ErrorResponse_Error) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ErrorResponse_Error with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ErrorResponse_ErrorMultiError, or nil if none found. +func (m *ErrorResponse_Error) ValidateAll() error { + return m.validate(true) +} + +func (m *ErrorResponse_Error) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Code + + // no validation rules for Debug + + // no validation rules for Details + + // no validation rules for Id + + // no validation rules for Message + + // no validation rules for Reason + + // no validation rules for Request + + // no validation rules for Status + + if len(errors) > 0 { + return ErrorResponse_ErrorMultiError(errors) + } + + return nil +} + +// ErrorResponse_ErrorMultiError is an error wrapping multiple validation +// errors returned by ErrorResponse_Error.ValidateAll() if the designated +// constraints aren't met. +type ErrorResponse_ErrorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ErrorResponse_ErrorMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ErrorResponse_ErrorMultiError) AllErrors() []error { return m } + +// ErrorResponse_ErrorValidationError is the validation error returned by +// ErrorResponse_Error.Validate if the designated constraints aren't met. +type ErrorResponse_ErrorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ErrorResponse_ErrorValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ErrorResponse_ErrorValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ErrorResponse_ErrorValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ErrorResponse_ErrorValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ErrorResponse_ErrorValidationError) ErrorName() string { + return "ErrorResponse_ErrorValidationError" +} + +// Error satisfies the builtin error interface +func (e ErrorResponse_ErrorValidationError) 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 %sErrorResponse_Error.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ErrorResponse_ErrorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ErrorResponse_ErrorValidationError{} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/openapi.proto b/proto/ory/keto/relation_tuples/v1alpha2/openapi.proto new file mode 100644 index 000000000..f34ffb56f --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/openapi.proto @@ -0,0 +1,101 @@ +syntax = "proto3"; + +package ory.keto.relation_tuples.v1alpha2; + +import "protoc-gen-openapiv2/options/annotations.proto"; +import "google/api/field_behavior.proto"; + +option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; +option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; +option java_multiple_files = true; +option java_outer_classname = "OpenapiProto"; +option java_package = "sh.ory.keto.relation_tuples.v1alpha2"; +option php_namespace = "Ory\\Keto\\RelationTuples\\v1alpha2"; + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: { + title: "ORY Keto"; + description: "Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs."; + contact: { + name: "ORY"; + url: "https://www.ory.sh"; + email: "hi@ory.sh"; + }; + license: { + name: "Apache 2.0"; + url: "https://github.com/ory/keto/blob/master/LICENSE"; + }; + version: "Latest"; + }; + base_path: "/"; + schemes: [HTTP, HTTPS]; + consumes: ["application/json"]; + produces: ["application/json"]; + responses: { + key: "400"; + value: { + description: "errorGeneric"; + schema: { + json_schema: { + ref: ".ory.keto.relation_tuples.v1alpha2.ErrorResponse" + } + } + }; + }; +}; + +// JSON API Error Response +// +// The standard Ory JSON API error format. +message ErrorResponse { + message Error { + // The status code + int64 code = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + example: "404"; + }]; + + // Debug information + // + // Debug information is often not exposed to protect against leaking sensitive information. + string debug = 2; + + // Further error details + // + // Further details about the error. + map details = 3; + + // The error ID + // + // The error ID is useful when trying to identify various errors in application logic. + string id = 4; + + // The error message + // + // The error's message (required). + string message = 5 [(google.api.field_behavior) = REQUIRED, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + example: "\"The requested resource could not be found.\""; + }]; + + // The error reason + // + // Reason holds a human-readable reason for the error. + string reason = 6; + + // The request ID + // + // The request ID is often exposed internally in order to trace + // errors across service architectures. This is often a UUID. + string request = 7 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + example: "\"d7ef54b1-ec15-46e6-bccb-524b82c035e6\""; + }]; + + // The status description + // + // Status holds the human-readable HTTP status code. + string status = 8 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + example: "\"Not Found\""; + }]; + } + + Error error = 1 [(google.api.field_behavior) = REQUIRED]; +} \ No newline at end of file diff --git a/proto/ory/keto/relation_tuples/v1alpha2/openapi_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/openapi_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/openapi_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.d.ts new file mode 100644 index 000000000..58ee89b67 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.d.ts @@ -0,0 +1,77 @@ +// package: ory.keto.relation_tuples.v1alpha2 +// file: ory/keto/relation_tuples/v1alpha2/openapi.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; +import * as google_api_field_behavior_pb from "../../../../google/api/field_behavior_pb"; + +export class ErrorResponse extends jspb.Message { + + hasError(): boolean; + clearError(): void; + getError(): ErrorResponse.Error | undefined; + setError(value?: ErrorResponse.Error): ErrorResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ErrorResponse.AsObject; + static toObject(includeInstance: boolean, msg: ErrorResponse): ErrorResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ErrorResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ErrorResponse; + static deserializeBinaryFromReader(message: ErrorResponse, reader: jspb.BinaryReader): ErrorResponse; +} + +export namespace ErrorResponse { + export type AsObject = { + error?: ErrorResponse.Error.AsObject, + } + + + export class Error extends jspb.Message { + getCode(): number; + setCode(value: number): Error; + getDebug(): string; + setDebug(value: string): Error; + + getDetailsMap(): jspb.Map; + clearDetailsMap(): void; + getId(): string; + setId(value: string): Error; + getMessage(): string; + setMessage(value: string): Error; + getReason(): string; + setReason(value: string): Error; + getRequest(): string; + setRequest(value: string): Error; + getStatus(): string; + setStatus(value: string): Error; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Error.AsObject; + static toObject(includeInstance: boolean, msg: Error): Error.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Error, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Error; + static deserializeBinaryFromReader(message: Error, reader: jspb.BinaryReader): Error; + } + + export namespace Error { + export type AsObject = { + code: number, + debug: string, + + detailsMap: Array<[string, string]>, + id: string, + message: string, + reason: string, + request: string, + status: string, + } + } + +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.js new file mode 100644 index 000000000..fc39a357c --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.js @@ -0,0 +1,567 @@ +// source: ory/keto/relation_tuples/v1alpha2/openapi.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); +goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); +var google_api_field_behavior_pb = require('../../../../google/api/field_behavior_pb.js'); +goog.object.extend(proto, google_api_field_behavior_pb); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse', null, global); +goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.displayName = 'proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + error: (f = msg.getError()) && proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse; + return proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error; + reader.readMessage(value,proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.deserializeBinaryFromReader); + msg.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.toObject = function(opt_includeInstance) { + return proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + debug: jspb.Message.getFieldWithDefault(msg, 2, ""), + detailsMap: (f = msg.getDetailsMap()) ? f.toObject(includeInstance, undefined) : [], + id: jspb.Message.getFieldWithDefault(msg, 4, ""), + message: jspb.Message.getFieldWithDefault(msg, 5, ""), + reason: jspb.Message.getFieldWithDefault(msg, 6, ""), + request: jspb.Message.getFieldWithDefault(msg, 7, ""), + status: jspb.Message.getFieldWithDefault(msg, 8, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error; + return proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCode(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDebug(value); + break; + case 3: + var value = msg.getDetailsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setReason(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setRequest(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getDebug(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDetailsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getReason(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getRequest(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getStatus(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional int64 code = 1; + * @return {number} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string debug = 2; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.getDebug = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.setDebug = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * map details = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.getDetailsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.clearDetailsMap = function() { + this.getDetailsMap().clear(); + return this; +}; + + +/** + * optional string id = 4; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string message = 5; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string reason = 6; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.getReason = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.setReason = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string request = 7; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.getRequest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.setRequest = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string status = 8; + * @return {string} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.getStatus = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.setStatus = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional Error error = 1; + * @return {?proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.prototype.getError = function() { + return /** @type{?proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error} */ ( + jspb.Message.getWrapperField(this, proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error, 1)); +}; + + +/** + * @param {?proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error|undefined} value + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse} returns this +*/ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.prototype.setError = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse} returns this + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.prototype.clearError = function() { + return this.setError(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.prototype.hasError = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.ory.keto.relation_tuples.v1alpha2); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.gw.go new file mode 100644 index 000000000..7ad30f1b8 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.gw.go @@ -0,0 +1,173 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ory/keto/relation_tuples/v1alpha2/read_service.proto + +/* +Package rts is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package rts + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_ReadService_ListRelationTuples_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_ReadService_ListRelationTuples_0(ctx context.Context, marshaler runtime.Marshaler, client ReadServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListRelationTuplesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ReadService_ListRelationTuples_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListRelationTuples(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_ReadService_ListRelationTuples_0(ctx context.Context, marshaler runtime.Marshaler, server ReadServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListRelationTuplesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ReadService_ListRelationTuples_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListRelationTuples(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterReadServiceHandlerServer registers the http handlers for service ReadService to "mux". +// UnaryRPC :call ReadServiceServer 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 RegisterReadServiceHandlerFromEndpoint instead. +func RegisterReadServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ReadServiceServer) error { + + mux.Handle("GET", pattern_ReadService_ListRelationTuples_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples", runtime.WithHTTPPathPattern("/relation-tuples")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ReadService_ListRelationTuples_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ReadService_ListRelationTuples_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterReadServiceHandlerFromEndpoint is same as RegisterReadServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterReadServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterReadServiceHandler(ctx, mux, conn) +} + +// RegisterReadServiceHandler registers the http handlers for service ReadService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterReadServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterReadServiceHandlerClient(ctx, mux, NewReadServiceClient(conn)) +} + +// RegisterReadServiceHandlerClient registers the http handlers for service ReadService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ReadServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ReadServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "ReadServiceClient" to call the correct interceptors. +func RegisterReadServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ReadServiceClient) error { + + mux.Handle("GET", pattern_ReadService_ListRelationTuples_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples", runtime.WithHTTPPathPattern("/relation-tuples")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ReadService_ListRelationTuples_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_ReadService_ListRelationTuples_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_ReadService_ListRelationTuples_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"relation-tuples"}, "")) +) + +var ( + forward_ReadService_ListRelationTuples_0 = runtime.ForwardResponseMessage +) diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.validate.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.validate.go new file mode 100644 index 000000000..586bff6a0 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.validate.go @@ -0,0 +1,571 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: ory/keto/relation_tuples/v1alpha2/read_service.proto + +package rts + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on ListRelationTuplesRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ListRelationTuplesRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListRelationTuplesRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ListRelationTuplesRequestMultiError, or nil if none found. +func (m *ListRelationTuplesRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ListRelationTuplesRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetQuery()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListRelationTuplesRequestValidationError{ + field: "Query", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListRelationTuplesRequestValidationError{ + field: "Query", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetQuery()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListRelationTuplesRequestValidationError{ + field: "Query", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRelationQuery()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListRelationTuplesRequestValidationError{ + field: "RelationQuery", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListRelationTuplesRequestValidationError{ + field: "RelationQuery", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRelationQuery()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListRelationTuplesRequestValidationError{ + field: "RelationQuery", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetExpandMask()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListRelationTuplesRequestValidationError{ + field: "ExpandMask", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListRelationTuplesRequestValidationError{ + field: "ExpandMask", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExpandMask()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListRelationTuplesRequestValidationError{ + field: "ExpandMask", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Snaptoken + + // no validation rules for PageSize + + // no validation rules for PageToken + + // no validation rules for Namespace + + // no validation rules for Object + + // no validation rules for Relation + + switch v := m.RestApiSubject.(type) { + case *ListRelationTuplesRequest_SubjectId: + if v == nil { + err := ListRelationTuplesRequestValidationError{ + field: "RestApiSubject", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for SubjectId + case *ListRelationTuplesRequest_SubjectSet: + if v == nil { + err := ListRelationTuplesRequestValidationError{ + field: "RestApiSubject", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetSubjectSet()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListRelationTuplesRequestValidationError{ + field: "SubjectSet", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListRelationTuplesRequestValidationError{ + field: "SubjectSet", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSubjectSet()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListRelationTuplesRequestValidationError{ + field: "SubjectSet", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return ListRelationTuplesRequestMultiError(errors) + } + + return nil +} + +// ListRelationTuplesRequestMultiError is an error wrapping multiple validation +// errors returned by ListRelationTuplesRequest.ValidateAll() if the +// designated constraints aren't met. +type ListRelationTuplesRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListRelationTuplesRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListRelationTuplesRequestMultiError) AllErrors() []error { return m } + +// ListRelationTuplesRequestValidationError is the validation error returned by +// ListRelationTuplesRequest.Validate if the designated constraints aren't met. +type ListRelationTuplesRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListRelationTuplesRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListRelationTuplesRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListRelationTuplesRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListRelationTuplesRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListRelationTuplesRequestValidationError) ErrorName() string { + return "ListRelationTuplesRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ListRelationTuplesRequestValidationError) 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 %sListRelationTuplesRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListRelationTuplesRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListRelationTuplesRequestValidationError{} + +// Validate checks the field values on ListRelationTuplesResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ListRelationTuplesResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListRelationTuplesResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ListRelationTuplesResponseMultiError, or nil if none found. +func (m *ListRelationTuplesResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ListRelationTuplesResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetRelationTuples() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListRelationTuplesResponseValidationError{ + field: fmt.Sprintf("RelationTuples[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListRelationTuplesResponseValidationError{ + field: fmt.Sprintf("RelationTuples[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListRelationTuplesResponseValidationError{ + field: fmt.Sprintf("RelationTuples[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for NextPageToken + + if len(errors) > 0 { + return ListRelationTuplesResponseMultiError(errors) + } + + return nil +} + +// ListRelationTuplesResponseMultiError is an error wrapping multiple +// validation errors returned by ListRelationTuplesResponse.ValidateAll() if +// the designated constraints aren't met. +type ListRelationTuplesResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListRelationTuplesResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListRelationTuplesResponseMultiError) AllErrors() []error { return m } + +// ListRelationTuplesResponseValidationError is the validation error returned +// by ListRelationTuplesResponse.Validate if the designated constraints aren't met. +type ListRelationTuplesResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListRelationTuplesResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListRelationTuplesResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListRelationTuplesResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListRelationTuplesResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListRelationTuplesResponseValidationError) ErrorName() string { + return "ListRelationTuplesResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ListRelationTuplesResponseValidationError) 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 %sListRelationTuplesResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListRelationTuplesResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListRelationTuplesResponseValidationError{} + +// Validate checks the field values on ListRelationTuplesRequest_Query with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ListRelationTuplesRequest_Query) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListRelationTuplesRequest_Query with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// ListRelationTuplesRequest_QueryMultiError, or nil if none found. +func (m *ListRelationTuplesRequest_Query) ValidateAll() error { + return m.validate(true) +} + +func (m *ListRelationTuplesRequest_Query) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Namespace + + // no validation rules for Object + + // no validation rules for Relation + + if all { + switch v := interface{}(m.GetSubject()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListRelationTuplesRequest_QueryValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListRelationTuplesRequest_QueryValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListRelationTuplesRequest_QueryValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ListRelationTuplesRequest_QueryMultiError(errors) + } + + return nil +} + +// ListRelationTuplesRequest_QueryMultiError is an error wrapping multiple +// validation errors returned by ListRelationTuplesRequest_Query.ValidateAll() +// if the designated constraints aren't met. +type ListRelationTuplesRequest_QueryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListRelationTuplesRequest_QueryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListRelationTuplesRequest_QueryMultiError) AllErrors() []error { return m } + +// ListRelationTuplesRequest_QueryValidationError is the validation error +// returned by ListRelationTuplesRequest_Query.Validate if the designated +// constraints aren't met. +type ListRelationTuplesRequest_QueryValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListRelationTuplesRequest_QueryValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListRelationTuplesRequest_QueryValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListRelationTuplesRequest_QueryValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListRelationTuplesRequest_QueryValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListRelationTuplesRequest_QueryValidationError) ErrorName() string { + return "ListRelationTuplesRequest_QueryValidationError" +} + +// Error satisfies the builtin error interface +func (e ListRelationTuplesRequest_QueryValidationError) 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 %sListRelationTuplesRequest_Query.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListRelationTuplesRequest_QueryValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListRelationTuplesRequest_QueryValidationError{} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.validate.go b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.validate.go new file mode 100644 index 000000000..82f7e8a09 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.validate.go @@ -0,0 +1,898 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: ory/keto/relation_tuples/v1alpha2/relation_tuples.proto + +package rts + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on RelationTuple with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *RelationTuple) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RelationTuple with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RelationTupleMultiError, or +// nil if none found. +func (m *RelationTuple) ValidateAll() error { + return m.validate(true) +} + +func (m *RelationTuple) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Namespace + + // no validation rules for Object + + // no validation rules for Relation + + if all { + switch v := interface{}(m.GetSubject()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RelationTupleValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RelationTupleValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RelationTupleValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch v := m.RestApiSubject.(type) { + case *RelationTuple_SubjectId: + if v == nil { + err := RelationTupleValidationError{ + field: "RestApiSubject", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for SubjectId + case *RelationTuple_SubjectSet: + if v == nil { + err := RelationTupleValidationError{ + field: "RestApiSubject", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetSubjectSet()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RelationTupleValidationError{ + field: "SubjectSet", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RelationTupleValidationError{ + field: "SubjectSet", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSubjectSet()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RelationTupleValidationError{ + field: "SubjectSet", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return RelationTupleMultiError(errors) + } + + return nil +} + +// RelationTupleMultiError is an error wrapping multiple validation errors +// returned by RelationTuple.ValidateAll() if the designated constraints +// aren't met. +type RelationTupleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RelationTupleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RelationTupleMultiError) AllErrors() []error { return m } + +// RelationTupleValidationError is the validation error returned by +// RelationTuple.Validate if the designated constraints aren't met. +type RelationTupleValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RelationTupleValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RelationTupleValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RelationTupleValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RelationTupleValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RelationTupleValidationError) ErrorName() string { return "RelationTupleValidationError" } + +// Error satisfies the builtin error interface +func (e RelationTupleValidationError) 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 %sRelationTuple.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RelationTupleValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RelationTupleValidationError{} + +// Validate checks the field values on RelationQuery with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *RelationQuery) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RelationQuery with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RelationQueryMultiError, or +// nil if none found. +func (m *RelationQuery) ValidateAll() error { + return m.validate(true) +} + +func (m *RelationQuery) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.Namespace != nil { + // no validation rules for Namespace + } + + if m.Object != nil { + // no validation rules for Object + } + + if m.Relation != nil { + // no validation rules for Relation + } + + if m.Subject != nil { + + if all { + switch v := interface{}(m.GetSubject()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RelationQueryValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RelationQueryValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RelationQueryValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return RelationQueryMultiError(errors) + } + + return nil +} + +// RelationQueryMultiError is an error wrapping multiple validation errors +// returned by RelationQuery.ValidateAll() if the designated constraints +// aren't met. +type RelationQueryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RelationQueryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RelationQueryMultiError) AllErrors() []error { return m } + +// RelationQueryValidationError is the validation error returned by +// RelationQuery.Validate if the designated constraints aren't met. +type RelationQueryValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RelationQueryValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RelationQueryValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RelationQueryValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RelationQueryValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RelationQueryValidationError) ErrorName() string { return "RelationQueryValidationError" } + +// Error satisfies the builtin error interface +func (e RelationQueryValidationError) 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 %sRelationQuery.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RelationQueryValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RelationQueryValidationError{} + +// Validate checks the field values on Subject with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Subject) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Subject with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in SubjectMultiError, or nil if none found. +func (m *Subject) ValidateAll() error { + return m.validate(true) +} + +func (m *Subject) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch v := m.Ref.(type) { + case *Subject_Id: + if v == nil { + err := SubjectValidationError{ + field: "Ref", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Id + case *Subject_Set: + if v == nil { + err := SubjectValidationError{ + field: "Ref", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetSet()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SubjectValidationError{ + field: "Set", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SubjectValidationError{ + field: "Set", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSet()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SubjectValidationError{ + field: "Set", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return SubjectMultiError(errors) + } + + return nil +} + +// SubjectMultiError is an error wrapping multiple validation errors returned +// by Subject.ValidateAll() if the designated constraints aren't met. +type SubjectMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SubjectMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SubjectMultiError) AllErrors() []error { return m } + +// 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{} + +// Validate checks the field values on SubjectSet with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *SubjectSet) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SubjectSet with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SubjectSetMultiError, or +// nil if none found. +func (m *SubjectSet) ValidateAll() error { + return m.validate(true) +} + +func (m *SubjectSet) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Namespace + + // no validation rules for Object + + // no validation rules for Relation + + if len(errors) > 0 { + return SubjectSetMultiError(errors) + } + + return nil +} + +// SubjectSetMultiError is an error wrapping multiple validation errors +// returned by SubjectSet.ValidateAll() if the designated constraints aren't met. +type SubjectSetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SubjectSetMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SubjectSetMultiError) AllErrors() []error { return m } + +// SubjectSetValidationError is the validation error returned by +// SubjectSet.Validate if the designated constraints aren't met. +type SubjectSetValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SubjectSetValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SubjectSetValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SubjectSetValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SubjectSetValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SubjectSetValidationError) ErrorName() string { return "SubjectSetValidationError" } + +// Error satisfies the builtin error interface +func (e SubjectSetValidationError) 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 %sSubjectSet.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SubjectSetValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SubjectSetValidationError{} + +// Validate checks the field values on SubjectQuery with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *SubjectQuery) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SubjectQuery with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SubjectQueryMultiError, or +// nil if none found. +func (m *SubjectQuery) ValidateAll() error { + return m.validate(true) +} + +func (m *SubjectQuery) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch v := m.Ref.(type) { + case *SubjectQuery_Id: + if v == nil { + err := SubjectQueryValidationError{ + field: "Ref", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Id + case *SubjectQuery_Set: + if v == nil { + err := SubjectQueryValidationError{ + field: "Ref", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetSet()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SubjectQueryValidationError{ + field: "Set", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SubjectQueryValidationError{ + field: "Set", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSet()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SubjectQueryValidationError{ + field: "Set", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return SubjectQueryMultiError(errors) + } + + return nil +} + +// SubjectQueryMultiError is an error wrapping multiple validation errors +// returned by SubjectQuery.ValidateAll() if the designated constraints aren't met. +type SubjectQueryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SubjectQueryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SubjectQueryMultiError) AllErrors() []error { return m } + +// SubjectQueryValidationError is the validation error returned by +// SubjectQuery.Validate if the designated constraints aren't met. +type SubjectQueryValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SubjectQueryValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SubjectQueryValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SubjectQueryValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SubjectQueryValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SubjectQueryValidationError) ErrorName() string { return "SubjectQueryValidationError" } + +// Error satisfies the builtin error interface +func (e SubjectQueryValidationError) 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 %sSubjectQuery.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SubjectQueryValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SubjectQueryValidationError{} + +// Validate checks the field values on SubjectSetQuery with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *SubjectSetQuery) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SubjectSetQuery with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SubjectSetQueryMultiError, or nil if none found. +func (m *SubjectSetQuery) ValidateAll() error { + return m.validate(true) +} + +func (m *SubjectSetQuery) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Namespace + + // no validation rules for Object + + // no validation rules for Relation + + if len(errors) > 0 { + return SubjectSetQueryMultiError(errors) + } + + return nil +} + +// SubjectSetQueryMultiError is an error wrapping multiple validation errors +// returned by SubjectSetQuery.ValidateAll() if the designated constraints +// aren't met. +type SubjectSetQueryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SubjectSetQueryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SubjectSetQueryMultiError) AllErrors() []error { return m } + +// SubjectSetQueryValidationError is the validation error returned by +// SubjectSetQuery.Validate if the designated constraints aren't met. +type SubjectSetQueryValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SubjectSetQueryValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SubjectSetQueryValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SubjectSetQueryValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SubjectSetQueryValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SubjectSetQueryValidationError) ErrorName() string { return "SubjectSetQueryValidationError" } + +// Error satisfies the builtin error interface +func (e SubjectSetQueryValidationError) 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 %sSubjectSetQuery.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SubjectSetQueryValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SubjectSetQueryValidationError{} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.gw.go new file mode 100644 index 000000000..1f27fa761 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.gw.go @@ -0,0 +1,155 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ory/keto/relation_tuples/v1alpha2/version.proto + +/* +Package rts is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package rts + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_VersionService_GetVersion_0(ctx context.Context, marshaler runtime.Marshaler, client VersionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetVersionRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_VersionService_GetVersion_0(ctx context.Context, marshaler runtime.Marshaler, server VersionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetVersionRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetVersion(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterVersionServiceHandlerServer registers the http handlers for service VersionService to "mux". +// UnaryRPC :call VersionServiceServer 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 RegisterVersionServiceHandlerFromEndpoint instead. +func RegisterVersionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VersionServiceServer) error { + + mux.Handle("GET", pattern_VersionService_GetVersion_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion", runtime.WithHTTPPathPattern("/version")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_VersionService_GetVersion_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_VersionService_GetVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterVersionServiceHandlerFromEndpoint is same as RegisterVersionServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterVersionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterVersionServiceHandler(ctx, mux, conn) +} + +// RegisterVersionServiceHandler registers the http handlers for service VersionService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterVersionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterVersionServiceHandlerClient(ctx, mux, NewVersionServiceClient(conn)) +} + +// RegisterVersionServiceHandlerClient registers the http handlers for service VersionService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "VersionServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "VersionServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "VersionServiceClient" to call the correct interceptors. +func RegisterVersionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client VersionServiceClient) error { + + mux.Handle("GET", pattern_VersionService_GetVersion_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion", runtime.WithHTTPPathPattern("/version")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_VersionService_GetVersion_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_VersionService_GetVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_VersionService_GetVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"version"}, "")) +) + +var ( + forward_VersionService_GetVersion_0 = runtime.ForwardResponseMessage +) diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.validate.go b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.validate.go new file mode 100644 index 000000000..b7ecd4e22 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.validate.go @@ -0,0 +1,242 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: ory/keto/relation_tuples/v1alpha2/version.proto + +package rts + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on GetVersionRequest with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *GetVersionRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetVersionRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GetVersionRequestMultiError, or nil if none found. +func (m *GetVersionRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *GetVersionRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return GetVersionRequestMultiError(errors) + } + + return nil +} + +// GetVersionRequestMultiError is an error wrapping multiple validation errors +// returned by GetVersionRequest.ValidateAll() if the designated constraints +// aren't met. +type GetVersionRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetVersionRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetVersionRequestMultiError) AllErrors() []error { return m } + +// GetVersionRequestValidationError is the validation error returned by +// GetVersionRequest.Validate if the designated constraints aren't met. +type GetVersionRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetVersionRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetVersionRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetVersionRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetVersionRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetVersionRequestValidationError) ErrorName() string { + return "GetVersionRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e GetVersionRequestValidationError) 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 %sGetVersionRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetVersionRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetVersionRequestValidationError{} + +// Validate checks the field values on GetVersionResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *GetVersionResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetVersionResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// GetVersionResponseMultiError, or nil if none found. +func (m *GetVersionResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *GetVersionResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Version + + if len(errors) > 0 { + return GetVersionResponseMultiError(errors) + } + + return nil +} + +// GetVersionResponseMultiError is an error wrapping multiple validation errors +// returned by GetVersionResponse.ValidateAll() if the designated constraints +// aren't met. +type GetVersionResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetVersionResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetVersionResponseMultiError) AllErrors() []error { return m } + +// GetVersionResponseValidationError is the validation error returned by +// GetVersionResponse.Validate if the designated constraints aren't met. +type GetVersionResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetVersionResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetVersionResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetVersionResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetVersionResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetVersionResponseValidationError) ErrorName() string { + return "GetVersionResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e GetVersionResponseValidationError) 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 %sGetVersionResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetVersionResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetVersionResponseValidationError{} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go index 684cf0e06..2005ee838 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go @@ -7,6 +7,7 @@ package rts import ( + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" _ "google.golang.org/genproto/googleapis/api/visibility" @@ -737,195 +738,201 @@ var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDesc = []byte{ 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, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 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, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8a, - 0x01, 0x0a, 0x1d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x69, 0x0a, 0x15, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x35, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, - 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x13, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x22, 0xd1, 0x02, 0x0a, 0x12, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, - 0x74, 0x61, 0x12, 0x54, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x52, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, - 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x25, 0x0a, 0x0d, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x10, 0x01, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, - 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x0a, 0x0a, 0x06, - 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x10, 0x01, 0x12, 0x25, 0x0a, 0x0d, 0x41, 0x43, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x02, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, - 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, - 0x0a, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x02, 0x1a, 0x02, 0x10, 0x01, 0x22, - 0x54, 0x0a, 0x1e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, - 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0xf2, 0x02, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x71, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x6f, - 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x1a, 0xe0, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, - 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0a, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x51, 0x0a, 0x0b, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, - 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x42, - 0x09, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x76, 0x0a, 0x1b, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0e, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x22, 0x92, 0x05, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x70, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x44, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x14, 0x18, 0x01, 0xfa, 0xd2, 0xe4, 0x93, 0x02, - 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x05, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 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, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, + 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 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, 0x8a, 0x01, 0x0a, 0x1d, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x69, 0x0a, 0x15, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x6c, + 0x74, 0x61, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6f, 0x72, 0x79, 0x2e, + 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, + 0x52, 0x13, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, + 0x65, 0x6c, 0x74, 0x61, 0x73, 0x22, 0xed, 0x02, 0x0a, 0x12, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x63, 0x0a, 0x06, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, - 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x12, + 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, + 0x6c, 0x74, 0x61, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0xe0, 0x41, 0x02, 0xfa, + 0x42, 0x07, 0x82, 0x01, 0x04, 0x18, 0x01, 0x18, 0x02, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x65, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, + 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x42, 0x0b, 0xe0, 0x41, 0x02, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x06, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x25, 0x0a, 0x0d, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x10, 0x01, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, - 0x45, 0x52, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, - 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x24, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x5a, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x02, - 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, - 0x74, 0x1a, 0x9f, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, - 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x1e, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb8, 0x07, 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xaf, 0x02, 0x0a, 0x16, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x12, 0x40, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, - 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8f, 0x01, 0x92, 0x41, 0x57, 0x0a, 0x0c, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x12, 0x70, 0x61, - 0x74, 0x63, 0x68, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, - 0x4a, 0x33, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x2c, 0x0a, 0x12, 0x41, 0x6e, 0x20, 0x65, 0x6d, - 0x70, 0x74, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x22, 0x16, 0x0a, - 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, - 0x6e, 0x12, 0x02, 0x7b, 0x7d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x15, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, - 0x61, 0x73, 0x32, 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0xd4, 0x02, 0x0a, 0x13, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x12, 0x3d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, + 0x45, 0x52, 0x12, 0x0a, 0x0a, 0x06, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x10, 0x01, 0x12, 0x25, + 0x0a, 0x0d, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, + 0x02, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, + 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x0a, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, + 0x02, 0x1a, 0x02, 0x10, 0x01, 0x22, 0x54, 0x0a, 0x1e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, 0xd2, 0xe4, + 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, + 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0xf2, 0x02, 0x0a, 0x1a, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, + 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x71, 0x0a, 0x0e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x3e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xbd, 0x01, 0x92, 0x41, 0x7c, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x4a, 0x58, 0x0a, 0x03, 0x32, 0x30, 0x31, - 0x12, 0x51, 0x0a, 0x19, 0x54, 0x68, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, 0x12, 0x34, 0x0a, - 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x3a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x62, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x1a, 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x12, 0x9e, 0x02, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x3e, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x84, 0x01, 0x92, 0x41, - 0x63, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, - 0x13, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x68, 0x69, 0x70, 0x73, 0x32, 0x21, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x75, 0x72, 0x6c, - 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x4a, 0x1b, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x14, - 0x0a, 0x12, 0x41, 0x6e, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x61, 0x64, 0x6d, - 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x42, 0xc2, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0d, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x1a, 0xe0, 0x01, + 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x1c, + 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x20, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x69, 0x64, 0x12, 0x51, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x22, 0x76, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x57, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x22, 0x92, 0x05, 0x0a, 0x1b, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x70, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x11, 0x57, 0x72, 0x69, - 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, - 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, - 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, - 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x14, 0x18, + 0x01, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, + 0x47, 0x45, 0x52, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x0e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, + 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x06, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, + 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x5a, 0x0a, 0x0b, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x32, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x1a, 0x9f, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x73, + 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x1e, 0x0a, + 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb8, 0x07, + 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xaf, + 0x02, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x40, 0x2e, 0x6f, 0x72, 0x79, 0x2e, + 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x6f, 0x72, + 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8f, + 0x01, 0x92, 0x41, 0x57, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, + 0x69, 0x70, 0x2a, 0x12, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x4a, 0x33, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x2c, 0x0a, + 0x12, 0x41, 0x6e, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x22, 0x16, 0x0a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x12, 0x02, 0x7b, 0x7d, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2f, 0x3a, 0x15, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x32, 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x12, 0xd4, 0x02, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x3d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, + 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbd, 0x01, 0x92, 0x41, 0x7c, 0x0a, 0x0c, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x12, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x4a, + 0x58, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x51, 0x0a, 0x19, 0x54, 0x68, 0x65, 0x20, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, + 0x69, 0x70, 0x2e, 0x12, 0x34, 0x0a, 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x3a, + 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x62, + 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x1a, + 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x9e, 0x02, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x12, 0x3e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x3f, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x84, 0x01, 0x92, 0x41, 0x63, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x32, 0x21, 0x61, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, + 0x72, 0x6d, 0x2d, 0x75, 0x72, 0x6c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x4a, 0x1b, 0x0a, + 0x03, 0x32, 0x30, 0x34, 0x12, 0x14, 0x0a, 0x12, 0x41, 0x6e, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, + 0x2a, 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x42, 0xc2, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, + 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x42, 0x11, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, + 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, + 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.gw.go new file mode 100644 index 000000000..9e5ab6865 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.gw.go @@ -0,0 +1,352 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ory/keto/relation_tuples/v1alpha2/write_service.proto + +/* +Package rts is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package rts + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_WriteService_TransactRelationTuples_0(ctx context.Context, marshaler runtime.Marshaler, client WriteServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TransactRelationTuplesRequest + 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.RelationTupleDeltas); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.TransactRelationTuples(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WriteService_TransactRelationTuples_0(ctx context.Context, marshaler runtime.Marshaler, server WriteServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TransactRelationTuplesRequest + 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.RelationTupleDeltas); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.TransactRelationTuples(ctx, &protoReq) + return msg, metadata, err + +} + +func request_WriteService_CreateRelationTuple_0(ctx context.Context, marshaler runtime.Marshaler, client WriteServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateRelationTupleRequest + 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.RelationTuple); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateRelationTuple(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WriteService_CreateRelationTuple_0(ctx context.Context, marshaler runtime.Marshaler, server WriteServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateRelationTupleRequest + 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.RelationTuple); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateRelationTuple(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_WriteService_DeleteRelationTuples_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_WriteService_DeleteRelationTuples_0(ctx context.Context, marshaler runtime.Marshaler, client WriteServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteRelationTuplesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WriteService_DeleteRelationTuples_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteRelationTuples(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_WriteService_DeleteRelationTuples_0(ctx context.Context, marshaler runtime.Marshaler, server WriteServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteRelationTuplesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WriteService_DeleteRelationTuples_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DeleteRelationTuples(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterWriteServiceHandlerServer registers the http handlers for service WriteService to "mux". +// UnaryRPC :call WriteServiceServer 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 RegisterWriteServiceHandlerFromEndpoint instead. +func RegisterWriteServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WriteServiceServer) error { + + mux.Handle("PATCH", pattern_WriteService_TransactRelationTuples_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples", runtime.WithHTTPPathPattern("/admin/relation-tuples")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WriteService_TransactRelationTuples_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_WriteService_TransactRelationTuples_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WriteService_CreateRelationTuple_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/CreateRelationTuple", runtime.WithHTTPPathPattern("/admin/relation-tuples")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WriteService_CreateRelationTuple_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_WriteService_CreateRelationTuple_0(annotatedContext, mux, outboundMarshaler, w, req, response_WriteService_CreateRelationTuple_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_WriteService_DeleteRelationTuples_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples", runtime.WithHTTPPathPattern("/admin/relation-tuples")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_WriteService_DeleteRelationTuples_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_WriteService_DeleteRelationTuples_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterWriteServiceHandlerFromEndpoint is same as RegisterWriteServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterWriteServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterWriteServiceHandler(ctx, mux, conn) +} + +// RegisterWriteServiceHandler registers the http handlers for service WriteService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterWriteServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterWriteServiceHandlerClient(ctx, mux, NewWriteServiceClient(conn)) +} + +// RegisterWriteServiceHandlerClient registers the http handlers for service WriteService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WriteServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WriteServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "WriteServiceClient" to call the correct interceptors. +func RegisterWriteServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WriteServiceClient) error { + + mux.Handle("PATCH", pattern_WriteService_TransactRelationTuples_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples", runtime.WithHTTPPathPattern("/admin/relation-tuples")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WriteService_TransactRelationTuples_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_WriteService_TransactRelationTuples_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_WriteService_CreateRelationTuple_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/CreateRelationTuple", runtime.WithHTTPPathPattern("/admin/relation-tuples")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WriteService_CreateRelationTuple_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_WriteService_CreateRelationTuple_0(annotatedContext, mux, outboundMarshaler, w, req, response_WriteService_CreateRelationTuple_0{resp}, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_WriteService_DeleteRelationTuples_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples", runtime.WithHTTPPathPattern("/admin/relation-tuples")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_WriteService_DeleteRelationTuples_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_WriteService_DeleteRelationTuples_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +type response_WriteService_CreateRelationTuple_0 struct { + proto.Message +} + +func (m response_WriteService_CreateRelationTuple_0) XXX_ResponseBody() interface{} { + response := m.Message.(*CreateRelationTupleResponse) + return response.RelationTuple +} + +var ( + pattern_WriteService_TransactRelationTuples_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"admin", "relation-tuples"}, "")) + + pattern_WriteService_CreateRelationTuple_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"admin", "relation-tuples"}, "")) + + pattern_WriteService_DeleteRelationTuples_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"admin", "relation-tuples"}, "")) +) + +var ( + forward_WriteService_TransactRelationTuples_0 = runtime.ForwardResponseMessage + + forward_WriteService_CreateRelationTuple_0 = runtime.ForwardResponseMessage + + forward_WriteService_DeleteRelationTuples_0 = runtime.ForwardResponseMessage +) diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.validate.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.validate.go new file mode 100644 index 000000000..3dcbd85f3 --- /dev/null +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.validate.go @@ -0,0 +1,1335 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: ory/keto/relation_tuples/v1alpha2/write_service.proto + +package rts + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on TransactRelationTuplesRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *TransactRelationTuplesRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TransactRelationTuplesRequest with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// TransactRelationTuplesRequestMultiError, or nil if none found. +func (m *TransactRelationTuplesRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *TransactRelationTuplesRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetRelationTupleDeltas() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TransactRelationTuplesRequestValidationError{ + field: fmt.Sprintf("RelationTupleDeltas[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TransactRelationTuplesRequestValidationError{ + field: fmt.Sprintf("RelationTupleDeltas[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TransactRelationTuplesRequestValidationError{ + field: fmt.Sprintf("RelationTupleDeltas[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return TransactRelationTuplesRequestMultiError(errors) + } + + return nil +} + +// TransactRelationTuplesRequestMultiError is an error wrapping multiple +// validation errors returned by TransactRelationTuplesRequest.ValidateAll() +// if the designated constraints aren't met. +type TransactRelationTuplesRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TransactRelationTuplesRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TransactRelationTuplesRequestMultiError) AllErrors() []error { return m } + +// TransactRelationTuplesRequestValidationError is the validation error +// returned by TransactRelationTuplesRequest.Validate if the designated +// constraints aren't met. +type TransactRelationTuplesRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TransactRelationTuplesRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TransactRelationTuplesRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TransactRelationTuplesRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TransactRelationTuplesRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TransactRelationTuplesRequestValidationError) ErrorName() string { + return "TransactRelationTuplesRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e TransactRelationTuplesRequestValidationError) 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 %sTransactRelationTuplesRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TransactRelationTuplesRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TransactRelationTuplesRequestValidationError{} + +// Validate checks the field values on RelationTupleDelta with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *RelationTupleDelta) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RelationTupleDelta with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// RelationTupleDeltaMultiError, or nil if none found. +func (m *RelationTupleDelta) ValidateAll() error { + return m.validate(true) +} + +func (m *RelationTupleDelta) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := _RelationTupleDelta_Action_InLookup[m.GetAction()]; !ok { + err := RelationTupleDeltaValidationError{ + field: "Action", + reason: "value must be in list [1 2]", + } + if !all { + return err + } + errors = append(errors, err) + } + + if m.GetRelationTuple() == nil { + err := RelationTupleDeltaValidationError{ + field: "RelationTuple", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRelationTuple()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RelationTupleDeltaValidationError{ + field: "RelationTuple", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RelationTupleDeltaValidationError{ + field: "RelationTuple", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRelationTuple()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RelationTupleDeltaValidationError{ + field: "RelationTuple", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return RelationTupleDeltaMultiError(errors) + } + + return nil +} + +// RelationTupleDeltaMultiError is an error wrapping multiple validation errors +// returned by RelationTupleDelta.ValidateAll() if the designated constraints +// aren't met. +type RelationTupleDeltaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RelationTupleDeltaMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RelationTupleDeltaMultiError) AllErrors() []error { return m } + +// RelationTupleDeltaValidationError is the validation error returned by +// RelationTupleDelta.Validate if the designated constraints aren't met. +type RelationTupleDeltaValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RelationTupleDeltaValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RelationTupleDeltaValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RelationTupleDeltaValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RelationTupleDeltaValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RelationTupleDeltaValidationError) ErrorName() string { + return "RelationTupleDeltaValidationError" +} + +// Error satisfies the builtin error interface +func (e RelationTupleDeltaValidationError) 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 %sRelationTupleDelta.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RelationTupleDeltaValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RelationTupleDeltaValidationError{} + +var _RelationTupleDelta_Action_InLookup = map[RelationTupleDelta_Action]struct{}{ + 1: {}, + 2: {}, +} + +// Validate checks the field values on TransactRelationTuplesResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *TransactRelationTuplesResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TransactRelationTuplesResponse with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// TransactRelationTuplesResponseMultiError, or nil if none found. +func (m *TransactRelationTuplesResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *TransactRelationTuplesResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return TransactRelationTuplesResponseMultiError(errors) + } + + return nil +} + +// TransactRelationTuplesResponseMultiError is an error wrapping multiple +// validation errors returned by TransactRelationTuplesResponse.ValidateAll() +// if the designated constraints aren't met. +type TransactRelationTuplesResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TransactRelationTuplesResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TransactRelationTuplesResponseMultiError) AllErrors() []error { return m } + +// TransactRelationTuplesResponseValidationError is the validation error +// returned by TransactRelationTuplesResponse.Validate if the designated +// constraints aren't met. +type TransactRelationTuplesResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TransactRelationTuplesResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TransactRelationTuplesResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TransactRelationTuplesResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TransactRelationTuplesResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TransactRelationTuplesResponseValidationError) ErrorName() string { + return "TransactRelationTuplesResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e TransactRelationTuplesResponseValidationError) 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 %sTransactRelationTuplesResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TransactRelationTuplesResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TransactRelationTuplesResponseValidationError{} + +// Validate checks the field values on CreateRelationTupleRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *CreateRelationTupleRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CreateRelationTupleRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CreateRelationTupleRequestMultiError, or nil if none found. +func (m *CreateRelationTupleRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *CreateRelationTupleRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetRelationTuple()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CreateRelationTupleRequestValidationError{ + field: "RelationTuple", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CreateRelationTupleRequestValidationError{ + field: "RelationTuple", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRelationTuple()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CreateRelationTupleRequestValidationError{ + field: "RelationTuple", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return CreateRelationTupleRequestMultiError(errors) + } + + return nil +} + +// CreateRelationTupleRequestMultiError is an error wrapping multiple +// validation errors returned by CreateRelationTupleRequest.ValidateAll() if +// the designated constraints aren't met. +type CreateRelationTupleRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CreateRelationTupleRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CreateRelationTupleRequestMultiError) AllErrors() []error { return m } + +// CreateRelationTupleRequestValidationError is the validation error returned +// by CreateRelationTupleRequest.Validate if the designated constraints aren't met. +type CreateRelationTupleRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CreateRelationTupleRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CreateRelationTupleRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CreateRelationTupleRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CreateRelationTupleRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CreateRelationTupleRequestValidationError) ErrorName() string { + return "CreateRelationTupleRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e CreateRelationTupleRequestValidationError) 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 %sCreateRelationTupleRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CreateRelationTupleRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CreateRelationTupleRequestValidationError{} + +// Validate checks the field values on CreateRelationTupleResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *CreateRelationTupleResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CreateRelationTupleResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CreateRelationTupleResponseMultiError, or nil if none found. +func (m *CreateRelationTupleResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *CreateRelationTupleResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetRelationTuple()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CreateRelationTupleResponseValidationError{ + field: "RelationTuple", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CreateRelationTupleResponseValidationError{ + field: "RelationTuple", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRelationTuple()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CreateRelationTupleResponseValidationError{ + field: "RelationTuple", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return CreateRelationTupleResponseMultiError(errors) + } + + return nil +} + +// CreateRelationTupleResponseMultiError is an error wrapping multiple +// validation errors returned by CreateRelationTupleResponse.ValidateAll() if +// the designated constraints aren't met. +type CreateRelationTupleResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CreateRelationTupleResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CreateRelationTupleResponseMultiError) AllErrors() []error { return m } + +// CreateRelationTupleResponseValidationError is the validation error returned +// by CreateRelationTupleResponse.Validate if the designated constraints +// aren't met. +type CreateRelationTupleResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CreateRelationTupleResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CreateRelationTupleResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CreateRelationTupleResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CreateRelationTupleResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CreateRelationTupleResponseValidationError) ErrorName() string { + return "CreateRelationTupleResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e CreateRelationTupleResponseValidationError) 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 %sCreateRelationTupleResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CreateRelationTupleResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CreateRelationTupleResponseValidationError{} + +// Validate checks the field values on DeleteRelationTuplesRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *DeleteRelationTuplesRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DeleteRelationTuplesRequest with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DeleteRelationTuplesRequestMultiError, or nil if none found. +func (m *DeleteRelationTuplesRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *DeleteRelationTuplesRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetQuery()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeleteRelationTuplesRequestValidationError{ + field: "Query", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeleteRelationTuplesRequestValidationError{ + field: "Query", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetQuery()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DeleteRelationTuplesRequestValidationError{ + field: "Query", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetRelationQuery()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeleteRelationTuplesRequestValidationError{ + field: "RelationQuery", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeleteRelationTuplesRequestValidationError{ + field: "RelationQuery", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRelationQuery()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DeleteRelationTuplesRequestValidationError{ + field: "RelationQuery", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Namespace + + // no validation rules for Object + + // no validation rules for Relation + + switch v := m.RestApiSubject.(type) { + case *DeleteRelationTuplesRequest_SubjectId: + if v == nil { + err := DeleteRelationTuplesRequestValidationError{ + field: "RestApiSubject", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for SubjectId + case *DeleteRelationTuplesRequest_SubjectSet: + if v == nil { + err := DeleteRelationTuplesRequestValidationError{ + field: "RestApiSubject", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetSubjectSet()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeleteRelationTuplesRequestValidationError{ + field: "SubjectSet", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeleteRelationTuplesRequestValidationError{ + field: "SubjectSet", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSubjectSet()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DeleteRelationTuplesRequestValidationError{ + field: "SubjectSet", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return DeleteRelationTuplesRequestMultiError(errors) + } + + return nil +} + +// DeleteRelationTuplesRequestMultiError is an error wrapping multiple +// validation errors returned by DeleteRelationTuplesRequest.ValidateAll() if +// the designated constraints aren't met. +type DeleteRelationTuplesRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DeleteRelationTuplesRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DeleteRelationTuplesRequestMultiError) AllErrors() []error { return m } + +// DeleteRelationTuplesRequestValidationError is the validation error returned +// by DeleteRelationTuplesRequest.Validate if the designated constraints +// aren't met. +type DeleteRelationTuplesRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DeleteRelationTuplesRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DeleteRelationTuplesRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DeleteRelationTuplesRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DeleteRelationTuplesRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DeleteRelationTuplesRequestValidationError) ErrorName() string { + return "DeleteRelationTuplesRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e DeleteRelationTuplesRequestValidationError) 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 %sDeleteRelationTuplesRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DeleteRelationTuplesRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DeleteRelationTuplesRequestValidationError{} + +// Validate checks the field values on DeleteRelationTuplesResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *DeleteRelationTuplesResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DeleteRelationTuplesResponse with the +// rules defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// DeleteRelationTuplesResponseMultiError, or nil if none found. +func (m *DeleteRelationTuplesResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *DeleteRelationTuplesResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return DeleteRelationTuplesResponseMultiError(errors) + } + + return nil +} + +// DeleteRelationTuplesResponseMultiError is an error wrapping multiple +// validation errors returned by DeleteRelationTuplesResponse.ValidateAll() if +// the designated constraints aren't met. +type DeleteRelationTuplesResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DeleteRelationTuplesResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DeleteRelationTuplesResponseMultiError) AllErrors() []error { return m } + +// DeleteRelationTuplesResponseValidationError is the validation error returned +// by DeleteRelationTuplesResponse.Validate if the designated constraints +// aren't met. +type DeleteRelationTuplesResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DeleteRelationTuplesResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DeleteRelationTuplesResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DeleteRelationTuplesResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DeleteRelationTuplesResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DeleteRelationTuplesResponseValidationError) ErrorName() string { + return "DeleteRelationTuplesResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e DeleteRelationTuplesResponseValidationError) 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 %sDeleteRelationTuplesResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DeleteRelationTuplesResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DeleteRelationTuplesResponseValidationError{} + +// Validate checks the field values on CreateRelationTupleRequest_Relationship +// with the rules defined in the proto definition for this message. If any +// rules are violated, the first error encountered is returned, or nil if +// there are no violations. +func (m *CreateRelationTupleRequest_Relationship) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// CreateRelationTupleRequest_Relationship with the rules defined in the proto +// definition for this message. If any rules are violated, the result is a +// list of violation errors wrapped in +// CreateRelationTupleRequest_RelationshipMultiError, or nil if none found. +func (m *CreateRelationTupleRequest_Relationship) ValidateAll() error { + return m.validate(true) +} + +func (m *CreateRelationTupleRequest_Relationship) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Namespace + + // no validation rules for Object + + // no validation rules for Relation + + switch v := m.Subject.(type) { + case *CreateRelationTupleRequest_Relationship_SubjectId: + if v == nil { + err := CreateRelationTupleRequest_RelationshipValidationError{ + field: "Subject", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for SubjectId + case *CreateRelationTupleRequest_Relationship_SubjectSet: + if v == nil { + err := CreateRelationTupleRequest_RelationshipValidationError{ + field: "Subject", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetSubjectSet()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CreateRelationTupleRequest_RelationshipValidationError{ + field: "SubjectSet", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CreateRelationTupleRequest_RelationshipValidationError{ + field: "SubjectSet", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSubjectSet()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CreateRelationTupleRequest_RelationshipValidationError{ + field: "SubjectSet", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return CreateRelationTupleRequest_RelationshipMultiError(errors) + } + + return nil +} + +// CreateRelationTupleRequest_RelationshipMultiError is an error wrapping +// multiple validation errors returned by +// CreateRelationTupleRequest_Relationship.ValidateAll() if the designated +// constraints aren't met. +type CreateRelationTupleRequest_RelationshipMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CreateRelationTupleRequest_RelationshipMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CreateRelationTupleRequest_RelationshipMultiError) AllErrors() []error { return m } + +// CreateRelationTupleRequest_RelationshipValidationError is the validation +// error returned by CreateRelationTupleRequest_Relationship.Validate if the +// designated constraints aren't met. +type CreateRelationTupleRequest_RelationshipValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CreateRelationTupleRequest_RelationshipValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CreateRelationTupleRequest_RelationshipValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CreateRelationTupleRequest_RelationshipValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CreateRelationTupleRequest_RelationshipValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CreateRelationTupleRequest_RelationshipValidationError) ErrorName() string { + return "CreateRelationTupleRequest_RelationshipValidationError" +} + +// Error satisfies the builtin error interface +func (e CreateRelationTupleRequest_RelationshipValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCreateRelationTupleRequest_Relationship.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CreateRelationTupleRequest_RelationshipValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CreateRelationTupleRequest_RelationshipValidationError{} + +// Validate checks the field values on DeleteRelationTuplesRequest_Query with +// the rules defined in the proto definition for this message. If any rules +// are violated, the first error encountered is returned, or nil if there are +// no violations. +func (m *DeleteRelationTuplesRequest_Query) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DeleteRelationTuplesRequest_Query +// with the rules defined in the proto definition for this message. If any +// rules are violated, the result is a list of violation errors wrapped in +// DeleteRelationTuplesRequest_QueryMultiError, or nil if none found. +func (m *DeleteRelationTuplesRequest_Query) ValidateAll() error { + return m.validate(true) +} + +func (m *DeleteRelationTuplesRequest_Query) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Namespace + + // no validation rules for Object + + // no validation rules for Relation + + if all { + switch v := interface{}(m.GetSubject()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DeleteRelationTuplesRequest_QueryValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DeleteRelationTuplesRequest_QueryValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DeleteRelationTuplesRequest_QueryValidationError{ + field: "Subject", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return DeleteRelationTuplesRequest_QueryMultiError(errors) + } + + return nil +} + +// DeleteRelationTuplesRequest_QueryMultiError is an error wrapping multiple +// validation errors returned by +// DeleteRelationTuplesRequest_Query.ValidateAll() if the designated +// constraints aren't met. +type DeleteRelationTuplesRequest_QueryMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DeleteRelationTuplesRequest_QueryMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DeleteRelationTuplesRequest_QueryMultiError) AllErrors() []error { return m } + +// DeleteRelationTuplesRequest_QueryValidationError is the validation error +// returned by DeleteRelationTuplesRequest_Query.Validate if the designated +// constraints aren't met. +type DeleteRelationTuplesRequest_QueryValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DeleteRelationTuplesRequest_QueryValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DeleteRelationTuplesRequest_QueryValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DeleteRelationTuplesRequest_QueryValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DeleteRelationTuplesRequest_QueryValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DeleteRelationTuplesRequest_QueryValidationError) ErrorName() string { + return "DeleteRelationTuplesRequest_QueryValidationError" +} + +// Error satisfies the builtin error interface +func (e DeleteRelationTuplesRequest_QueryValidationError) 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 %sDeleteRelationTuplesRequest_Query.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DeleteRelationTuplesRequest_QueryValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DeleteRelationTuplesRequest_QueryValidationError{} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto index 0ae726850..d00513171 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto @@ -4,8 +4,11 @@ package ory.keto.relation_tuples.v1alpha2; import "google/api/annotations.proto"; import "google/api/visibility.proto"; +import "google/api/field_behavior.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; import "ory/keto/relation_tuples/v1alpha2/relation_tuples.proto"; +import "validate/validate.proto"; + option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; @@ -117,10 +120,17 @@ message RelationTupleDelta { delete = 2; } // The action to do on the RelationTuple. - Action action = 1; + Action action = 1 [ + (google.api.field_behavior) = REQUIRED, + (validate.rules).enum = {in: [1, 2]} + ]; // The target RelationTuple. - RelationTuple relation_tuple = 2 [json_name = "relation_tuple"]; + RelationTuple relation_tuple = 2 [ + json_name = "relation_tuple", + (google.api.field_behavior) = REQUIRED, + (validate.rules).message.required = true + ]; } // The response of a WriteService.TransactRelationTuples rpc. diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts index 651ba756d..d80d08510 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts @@ -7,8 +7,10 @@ import * as grpc from "grpc"; import * as ory_keto_relation_tuples_v1alpha2_write_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/write_service_pb"; import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; +import * as google_api_field_behavior_pb from "../../../../google/api/field_behavior_pb"; import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; +import * as validate_validate_pb from "../../../../validate/validate_pb"; interface IWriteServiceService extends grpc.ServiceDefinition { transactRelationTuples: IWriteServiceService_ITransactRelationTuples; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js index 5a7e51c60..3f7bd19f8 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js @@ -5,8 +5,10 @@ var grpc = require('@grpc/grpc-js'); var ory_keto_relation_tuples_v1alpha2_write_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/write_service_pb.js'); var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); +var google_api_field_behavior_pb = require('../../../../google/api/field_behavior_pb.js'); var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); +var validate_validate_pb = require('../../../../validate/validate_pb.js'); function serialize_ory_keto_relation_tuples_v1alpha2_CreateRelationTupleRequest(arg) { if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_write_service_pb.CreateRelationTupleRequest)) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts index 7f4fd2254..7fe7f3e36 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts @@ -6,8 +6,10 @@ import * as jspb from "google-protobuf"; import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; +import * as google_api_field_behavior_pb from "../../../../google/api/field_behavior_pb"; import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; +import * as validate_validate_pb from "../../../../validate/validate_pb"; export class TransactRelationTuplesRequest extends jspb.Message { clearRelationTupleDeltasList(): void; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js index 66e612146..072d74947 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js @@ -25,10 +25,14 @@ var google_api_annotations_pb = require('../../../../google/api/annotations_pb.j goog.object.extend(proto, google_api_annotations_pb); var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); goog.object.extend(proto, google_api_visibility_pb); +var google_api_field_behavior_pb = require('../../../../google/api/field_behavior_pb.js'); +goog.object.extend(proto, google_api_field_behavior_pb); var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); +var validate_validate_pb = require('../../../../validate/validate_pb.js'); +goog.object.extend(proto, validate_validate_pb); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.SubjectCase', null, global); diff --git a/spec/api.json b/spec/api.json index eb7312289..75f8a4e9f 100755 --- a/spec/api.json +++ b/spec/api.json @@ -50,6 +50,70 @@ }, "type": "object" }, + "errorGeneric": { + "description": "The standard Ory JSON API error format.", + "properties": { + "error": { + "$ref": "#/components/schemas/errorGeneric.Error" + } + }, + "required": ["error"], + "title": "JSON API Error Response", + "type": "object" + }, + "errorGeneric.Error": { + "properties": { + "code": { + "example": 404, + "format": "int64", + "title": "The status code", + "type": "string" + }, + "debug": { + "description": "Debug information is often not exposed to protect against leaking sensitive information.", + "title": "Debug information", + "type": "string" + }, + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Further details about the error.", + "title": "Further error details", + "type": "object" + }, + "id": { + "description": "The error ID is useful when trying to identify various errors in application logic.", + "title": "The error ID", + "type": "string" + }, + "message": { + "description": "The error's message (required).", + "example": "The requested resource could not be found.", + "title": "The error message", + "type": "string" + }, + "reason": { + "description": "Reason holds a human-readable reason for the error.", + "title": "The error reason", + "type": "string" + }, + "request": { + "description": "The request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.", + "example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6", + "title": "The request ID", + "type": "string" + }, + "status": { + "description": "Status holds the human-readable HTTP status code.", + "example": "Not Found", + "title": "The status description", + "type": "string" + } + }, + "required": ["message"], + "type": "object" + }, "expandedPermissionTree": { "properties": { "children": { @@ -140,6 +204,7 @@ }, "ory.keto.relation_tuples.v1alpha2.NodeType": { "default": "unspecified", + "description": " - union: This node expands to a union of all children.\n - exclusion: Not implemented yet.\n - intersection: Not implemented yet.\n - leaf: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - tuple_to_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - computed_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - not: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.", "enum": [ "unspecified", "union", @@ -235,6 +300,7 @@ "$ref": "#/components/schemas/relationship" } }, + "required": ["action", "relation_tuple"], "type": "object" }, "relationshipDelta.Action": { @@ -387,6 +453,16 @@ "responses": { "204": { "description": "An empty response." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorGeneric" + } + } + }, + "description": "errorGeneric" } }, "summary": "Deletes relationships based on relation query", @@ -412,6 +488,16 @@ "responses": { "204": { "description": "An empty response." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorGeneric" + } + } + }, + "description": "errorGeneric" } }, "summary": "Writes one or more relationships in a single transaction.", @@ -441,6 +527,16 @@ } }, "description": "The created relationship." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorGeneric" + } + } + }, + "description": "errorGeneric" } }, "summary": "Creates a relationship", @@ -545,6 +641,16 @@ } }, "description": "The list of namespaces." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorGeneric" + } + } + }, + "description": "errorGeneric" } }, "summary": "Lists Namespaces", @@ -558,6 +664,7 @@ "content": { "text/plain": { "schema": { + "format": "byte", "type": "string" } } @@ -575,6 +682,16 @@ } }, "description": "The result of the syntax checker" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorGeneric" + } + } + }, + "description": "errorGeneric" } }, "summary": "Performs a syntax check request.", @@ -669,6 +786,16 @@ } }, "description": "The list of relationships." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorGeneric" + } + } + }, + "description": "errorGeneric" } }, "summary": "Lists ACL relationships.", @@ -756,6 +883,16 @@ }, "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200." }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorGeneric" + } + } + }, + "description": "errorGeneric" + }, "403": { "content": { "application/json": { @@ -800,6 +937,16 @@ }, "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200." }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorGeneric" + } + } + }, + "description": "errorGeneric" + }, "403": { "content": { "application/json": { @@ -896,6 +1043,16 @@ }, "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200." }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorGeneric" + } + } + }, + "description": "errorGeneric" + }, "403": { "content": { "application/json": { @@ -940,6 +1097,16 @@ }, "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200." }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorGeneric" + } + } + }, + "description": "errorGeneric" + }, "403": { "content": { "application/json": { @@ -1006,6 +1173,16 @@ } }, "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorGeneric" + } + } + }, + "description": "errorGeneric" } }, "summary": "Expands the subject set into a tree of subjects.", diff --git a/spec/swagger.json b/spec/api.swagger.json similarity index 84% rename from spec/swagger.json rename to spec/api.swagger.json index 734700853..5bbb4e20c 100755 --- a/spec/swagger.json +++ b/spec/api.swagger.json @@ -1,9 +1,21 @@ { "swagger": "2.0", "info": { - "title": "ory/keto/opl/v1alpha1/syntax_service.proto", - "version": "version not set" + "title": "ORY Keto", + "description": "Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs.", + "version": "Latest", + "contact": { + "name": "ORY", + "url": "https://www.ory.sh", + "email": "hi@ory.sh" + }, + "license": { + "name": "Apache 2.0", + "url": "https://github.com/ory/keto/blob/master/LICENSE" + } }, + "basePath": "/", + "schemes": ["http", "https"], "consumes": ["application/json"], "produces": ["application/json"], "paths": { @@ -15,6 +27,12 @@ "204": { "description": "An empty response.", "schema": {} + }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } } }, "parameters": [ @@ -80,6 +98,12 @@ "schema": { "$ref": "#/definitions/relationship" } + }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } } }, "parameters": [ @@ -105,6 +129,12 @@ "examples": { "application/json": {} } + }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } } }, "parameters": [ @@ -144,6 +174,12 @@ ] } } + }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } } }, "tags": ["relationship"], @@ -160,6 +196,12 @@ "schema": { "$ref": "#/definitions/checkOplSyntaxResult" } + }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } } }, "parameters": [ @@ -168,7 +210,8 @@ "in": "body", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "byte" } } ], @@ -186,6 +229,12 @@ "schema": { "$ref": "#/definitions/relationships" } + }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } } }, "parameters": [ @@ -269,6 +318,12 @@ "$ref": "#/definitions/checkPermissionResult" } }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { @@ -348,6 +403,12 @@ "$ref": "#/definitions/checkPermissionResult" } }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { @@ -381,6 +442,12 @@ "$ref": "#/definitions/checkPermissionResult" } }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { @@ -460,6 +527,12 @@ "$ref": "#/definitions/checkPermissionResult" } }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } + }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { @@ -492,6 +565,12 @@ "schema": { "$ref": "#/definitions/expandedPermissionTree" } + }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } } }, "parameters": [ @@ -540,6 +619,12 @@ "schema": { "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.GetVersionResponse" } + }, + "400": { + "description": "errorGeneric", + "schema": { + "$ref": "#/definitions/errorGeneric" + } } }, "tags": ["version"] @@ -664,6 +749,70 @@ "ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse": { "type": "object" }, + "errorGeneric": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/errorGeneric.Error" + } + }, + "description": "The standard Ory JSON API error format.", + "title": "JSON API Error Response", + "required": ["error"] + }, + "errorGeneric.Error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "format": "int64", + "example": 404, + "title": "The status code" + }, + "debug": { + "type": "string", + "description": "Debug information is often not exposed to protect against leaking sensitive information.", + "title": "Debug information" + }, + "details": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Further details about the error.", + "title": "Further error details" + }, + "id": { + "type": "string", + "description": "The error ID is useful when trying to identify various errors in application logic.", + "title": "The error ID" + }, + "message": { + "type": "string", + "example": "The requested resource could not be found.", + "description": "The error's message (required).", + "title": "The error message" + }, + "reason": { + "type": "string", + "description": "Reason holds a human-readable reason for the error.", + "title": "The error reason" + }, + "request": { + "type": "string", + "example": "d7ef54b1-ec15-46e6-bccb-524b82c035e6", + "description": "The request ID is often exposed internally in order to trace\nerrors across service architectures. This is often a UUID.", + "title": "The request ID" + }, + "status": { + "type": "string", + "example": "Not Found", + "description": "Status holds the human-readable HTTP status code.", + "title": "The status description" + } + }, + "required": ["message"] + }, "ory.keto.relation_tuples.v1alpha2.ExpandResponse": { "type": "object", "properties": { @@ -732,7 +881,8 @@ "computed_subject_set", "not" ], - "default": "unspecified" + "default": "unspecified", + "description": " - union: This node expands to a union of all children.\n - exclusion: Not implemented yet.\n - intersection: Not implemented yet.\n - leaf: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - tuple_to_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - computed_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - not: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached." }, "relationship": { "type": "object", @@ -773,7 +923,8 @@ "description": "The target RelationTuple." } }, - "description": "Write-delta for a TransactRelationTuplesRequest." + "description": "Write-delta for a TransactRelationTuplesRequest.", + "required": ["action", "relation_tuple"] }, "relationshipDelta.Action": { "type": "string", From 31e931cd14415a5041414ee9ba4d26fd4447b04f Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Wed, 22 Feb 2023 11:52:09 +0100 Subject: [PATCH 08/42] fix: docs examples --- cmd/expand/root.go | 18 +- cmd/expand/root_test.go | 2 +- .../01-expand-beach/expected_output.json | 113 +- .../01-expand-beach/index.js | 41 +- .../01-expand-beach/main.go | 16 +- ketoapi/enc_proto.go | 4 +- proto/buf.md | 3438 +++- proto/google/api/annotations.pb.go | 118 + proto/google/api/annotations.pb.validate.go | 36 + proto/google/api/annotations_grpc_pb.js | 1 + proto/google/api/annotations_pb.d.ts | 11 + proto/google/api/annotations_pb.js | 54 + proto/google/api/field_behavior.pb.go | 249 + .../google/api/field_behavior.pb.validate.go | 36 + proto/google/api/field_behavior_grpc_pb.js | 1 + proto/google/api/field_behavior_pb.d.ts | 21 + proto/google/api/field_behavior_pb.js | 67 + proto/google/api/http.pb.go | 777 + proto/google/api/http.pb.validate.go | 521 + proto/google/api/http_grpc_pb.js | 1 + proto/google/api/http_pb.d.ts | 135 + proto/google/api/http_pb.js | 1012 ++ proto/google/api/visibility.pb.go | 447 + proto/google/api/visibility.pb.validate.go | 273 + proto/google/api/visibility_grpc_pb.js | 1 + proto/google/api/visibility_pb.d.ts | 65 + proto/google/api/visibility_pb.js | 546 + .../keto/opl/v1alpha1/syntax_service.proto | 16 +- .../v1alpha2/check_service.pb.go | 8 +- .../v1alpha2/check_service.proto | 31 +- .../v1alpha2/check_service_grpc_pb.d.ts | 2 +- .../v1alpha2/check_service_grpc_pb.js | 2 +- .../v1alpha2/check_service_pb.d.ts | 2 +- .../v1alpha2/check_service_pb.js | 4 +- .../v1alpha2/expand_service.pb.go | 16 +- .../v1alpha2/expand_service.proto | 33 +- .../v1alpha2/expand_service_grpc_pb.d.ts | 4 +- .../v1alpha2/expand_service_grpc_pb.js | 4 +- .../v1alpha2/expand_service_pb.d.ts | 4 +- .../v1alpha2/expand_service_pb.js | 8 +- .../v1alpha2/namespaces_service.proto | 18 +- .../relation_tuples/v1alpha2/openapi.pb.go | 8 +- .../relation_tuples/v1alpha2/openapi.proto | 37 +- .../relation_tuples/v1alpha2/openapi_pb.d.ts | 2 +- .../relation_tuples/v1alpha2/openapi_pb.js | 4 +- .../v1alpha2/read_service.pb.go | 8 +- .../v1alpha2/read_service.proto | 33 +- .../v1alpha2/read_service_grpc_pb.d.ts | 2 +- .../v1alpha2/read_service_grpc_pb.js | 2 +- .../v1alpha2/read_service_pb.d.ts | 2 +- .../v1alpha2/read_service_pb.js | 4 +- .../v1alpha2/relation_tuples.pb.go | 10 +- .../v1alpha2/relation_tuples.proto | 20 +- .../v1alpha2/relation_tuples_pb.d.ts | 2 +- .../v1alpha2/relation_tuples_pb.js | 4 +- .../relation_tuples/v1alpha2/version.proto | 16 +- .../v1alpha2/write_service.pb.go | 14 +- .../v1alpha2/write_service.proto | 66 +- .../v1alpha2/write_service_grpc_pb.d.ts | 4 +- .../v1alpha2/write_service_grpc_pb.js | 4 +- .../v1alpha2/write_service_pb.d.ts | 4 +- .../v1alpha2/write_service_pb.js | 8 +- .../options/annotations.pb.go | 236 + .../options/annotations.pb.validate.go | 36 + .../options/annotations_grpc_pb.js | 1 + .../options/annotations_pb.d.ts | 19 + .../options/annotations_pb.js | 158 + .../options/openapiv2.pb.go | 3226 ++++ .../options/openapiv2.pb.validate.go | 3125 ++++ .../options/openapiv2_grpc_pb.js | 1 + .../options/openapiv2_pb.d.ts | 800 + .../options/openapiv2_pb.js | 6256 ++++++++ proto/validate/validate.pb.go | 4106 +++++ proto/validate/validate.pb.validate.go | 4079 +++++ proto/validate/validate_grpc_pb.js | 1 + proto/validate/validate_pb.d.ts | 1624 ++ proto/validate/validate_pb.js | 12932 ++++++++++++++++ spec/api.swagger.json | 249 +- 78 files changed, 44391 insertions(+), 868 deletions(-) create mode 100644 proto/google/api/annotations.pb.go create mode 100644 proto/google/api/annotations.pb.validate.go create mode 100644 proto/google/api/annotations_grpc_pb.js create mode 100644 proto/google/api/annotations_pb.d.ts create mode 100644 proto/google/api/annotations_pb.js create mode 100644 proto/google/api/field_behavior.pb.go create mode 100644 proto/google/api/field_behavior.pb.validate.go create mode 100644 proto/google/api/field_behavior_grpc_pb.js create mode 100644 proto/google/api/field_behavior_pb.d.ts create mode 100644 proto/google/api/field_behavior_pb.js create mode 100644 proto/google/api/http.pb.go create mode 100644 proto/google/api/http.pb.validate.go create mode 100644 proto/google/api/http_grpc_pb.js create mode 100644 proto/google/api/http_pb.d.ts create mode 100644 proto/google/api/http_pb.js create mode 100644 proto/google/api/visibility.pb.go create mode 100644 proto/google/api/visibility.pb.validate.go create mode 100644 proto/google/api/visibility_grpc_pb.js create mode 100644 proto/google/api/visibility_pb.d.ts create mode 100644 proto/google/api/visibility_pb.js create mode 100644 proto/protoc-gen-openapiv2/options/annotations.pb.go create mode 100644 proto/protoc-gen-openapiv2/options/annotations.pb.validate.go create mode 100644 proto/protoc-gen-openapiv2/options/annotations_grpc_pb.js create mode 100644 proto/protoc-gen-openapiv2/options/annotations_pb.d.ts create mode 100644 proto/protoc-gen-openapiv2/options/annotations_pb.js create mode 100644 proto/protoc-gen-openapiv2/options/openapiv2.pb.go create mode 100644 proto/protoc-gen-openapiv2/options/openapiv2.pb.validate.go create mode 100644 proto/protoc-gen-openapiv2/options/openapiv2_grpc_pb.js create mode 100644 proto/protoc-gen-openapiv2/options/openapiv2_pb.d.ts create mode 100644 proto/protoc-gen-openapiv2/options/openapiv2_pb.js create mode 100644 proto/validate/validate.pb.go create mode 100644 proto/validate/validate.pb.validate.go create mode 100644 proto/validate/validate_grpc_pb.js create mode 100644 proto/validate/validate_pb.d.ts create mode 100644 proto/validate/validate_pb.js diff --git a/cmd/expand/root.go b/cmd/expand/root.go index ffa76d5e2..12215d89d 100644 --- a/cmd/expand/root.go +++ b/cmd/expand/root.go @@ -6,6 +6,8 @@ package expand import ( "fmt" + "google.golang.org/protobuf/encoding/protojson" + "github.com/ory/keto/ketoapi" rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" @@ -53,7 +55,7 @@ func NewExpandCmd() *cobra.Command { tree = ketoapi.TreeFromProto[*ketoapi.RelationTuple](resp.Tree) } - cmdx.PrintJSONAble(cmd, tree) + cmdx.PrintJSONAble(cmd, &pbJSONValue{resp}) switch flagx.MustGetString(cmd, cmdx.FlagFormat) { case string(cmdx.FormatDefault), "": if tree == nil && !flagx.MustGetBool(cmd, cmdx.FlagQuiet) { @@ -76,3 +78,17 @@ func NewExpandCmd() *cobra.Command { func RegisterCommandsRecursive(parent *cobra.Command) { parent.AddCommand(NewExpandCmd()) } + +type pbJSONValue struct{ *rts.ExpandResponse } + +func (v *pbJSONValue) MarshalJSON() ([]byte, error) { + marshaler := &protojson.MarshalOptions{EmitUnpopulated: true} + return marshaler.Marshal(v.Tree) +} +func (v *pbJSONValue) String() string { + var tree *ketoapi.Tree[*ketoapi.RelationTuple] + if v.Tree != nil { + tree = ketoapi.TreeFromProto[*ketoapi.RelationTuple](v.Tree) + } + return tree.String() +} diff --git a/cmd/expand/root_test.go b/cmd/expand/root_test.go index 8f502fe01..71d6b3c72 100644 --- a/cmd/expand/root_test.go +++ b/cmd/expand/root_test.go @@ -25,7 +25,7 @@ func TestExpandCommand(t *testing.T) { "--"+cmdx.FlagFormat, string(cmdx.FormatJSON), "--insecure-skip-hostname-verification=true", ) - assert.Equal(t, "null\n", stdOut) + assert.Equal(t, "{\"type\":\"unspecified\",\"subject\":null,\"tuple\":null,\"children\":[]}\n", stdOut) }) t.Run("format=default", func(t *testing.T) { diff --git a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/expected_output.json b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/expected_output.json index 8c61c2eaf..e583be78c 100644 --- a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/expected_output.json +++ b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/expected_output.json @@ -3,23 +3,72 @@ { "children": [ { + "children": [], + "subject": { + "id": "laura" + }, "tuple": { "namespace": "", "object": "", "relation": "", - "subject_id": "maureen" + "subject": { + "id": "laura" + }, + "subject_id": "laura" + }, + "type": "leaf" + }, + { + "children": [], + "subject": { + "set": { + "namespace": "directories", + "object": "/photos", + "relation": "owner" + } + }, + "tuple": { + "namespace": "", + "object": "", + "relation": "", + "subject": { + "set": { + "namespace": "directories", + "object": "/photos", + "relation": "owner" + } + }, + "subject_set": { + "namespace": "directories", + "object": "/photos", + "relation": "owner" + } }, "type": "leaf" } ], + "subject": { + "set": { + "namespace": "directories", + "object": "/photos", + "relation": "access" + } + }, "tuple": { "namespace": "", "object": "", "relation": "", + "subject": { + "set": { + "namespace": "directories", + "object": "/photos", + "relation": "access" + } + }, "subject_set": { - "namespace": "files", - "object": "/photos/beach.jpg", - "relation": "owner" + "namespace": "directories", + "object": "/photos", + "relation": "access" } }, "type": "union" @@ -27,45 +76,67 @@ { "children": [ { - "tuple": { - "namespace": "", - "object": "", - "relation": "", - "subject_id": "laura" + "children": [], + "subject": { + "id": "maureen" }, - "type": "leaf" - }, - { "tuple": { "namespace": "", "object": "", "relation": "", - "subject_set": { - "namespace": "directories", - "object": "/photos", - "relation": "owner" - } + "subject": { + "id": "maureen" + }, + "subject_id": "maureen" }, "type": "leaf" } ], + "subject": { + "set": { + "namespace": "files", + "object": "/photos/beach.jpg", + "relation": "owner" + } + }, "tuple": { "namespace": "", "object": "", "relation": "", + "subject": { + "set": { + "namespace": "files", + "object": "/photos/beach.jpg", + "relation": "owner" + } + }, "subject_set": { - "namespace": "directories", - "object": "/photos", - "relation": "access" + "namespace": "files", + "object": "/photos/beach.jpg", + "relation": "owner" } }, "type": "union" } ], + "subject": { + "set": { + "namespace": "files", + "object": "/photos/beach.jpg", + "relation": "access" + } + }, "tuple": { "namespace": "", "object": "", "relation": "", + "subject": { + "set": { + "namespace": "files", + "object": "/photos/beach.jpg", + "relation": "access" + } + }, "subject_set": { "namespace": "files", "object": "/photos/beach.jpg", @@ -73,4 +144,4 @@ } }, "type": "union" -} +} \ No newline at end of file diff --git a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/index.js b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/index.js index 47f07fbfe..1c2910f8f 100644 --- a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/index.js +++ b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/index.js @@ -22,9 +22,14 @@ expandRequest.setSubject(sub) expandRequest.setMaxDepth(3) // helper to get a nice result -const subjectJSON = (subject) => { +const tupleSubjectJSON = (subject) => { if (subject.hasId()) { - return { subject_id: subject.getId() } + return { + subject_id: subject.getId(), + subject: { + id: subject.getId(), + }, + } } const set = subject.getSet() return { @@ -33,6 +38,33 @@ const subjectJSON = (subject) => { object: set.getObject(), relation: set.getRelation(), }, + subject: { + set: { + namespace: set.getNamespace(), + object: set.getObject(), + relation: set.getRelation(), + }, + }, + } +} + +const toplevelSubjectJSON = (subject) => { + if (subject.hasId()) { + return { + subject: { + id: subject.getId(), + }, + } + } + const set = subject.getSet() + return { + subject: { + set: { + namespace: set.getNamespace(), + object: set.getObject(), + relation: set.getRelation(), + }, + }, } } @@ -41,18 +73,19 @@ const prettyTree = (tree) => { const [nodeType, tuple, children] = [ tree.getNodeType(), { + ...toplevelSubjectJSON(tree.getSubject()), tuple: { namespace: "", object: "", relation: "", - ...subjectJSON(tree.getSubject()), + ...tupleSubjectJSON(tree.getSubject()), }, }, tree.getChildrenList(), ] switch (nodeType) { case expand.NodeType.NODE_TYPE_LEAF: - return { type: "leaf", ...tuple } + return { type: "leaf", children: [], ...tuple } case expand.NodeType.NODE_TYPE_UNION: return { type: "union", children: children.map(prettyTree), ...tuple } } diff --git a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/main.go b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/main.go index 1c6de4b71..725b8b614 100644 --- a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/main.go +++ b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/main.go @@ -5,13 +5,12 @@ package main import ( "context" - "encoding/json" "os" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" + "google.golang.org/protobuf/encoding/protojson" - "github.com/ory/keto/ketoapi" rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" ) @@ -31,11 +30,12 @@ func main() { panic(err) } - tree := ketoapi.TreeFromProto[*ketoapi.RelationTuple](res.Tree) - - enc := json.NewEncoder(os.Stdout) - enc.SetIndent("", " ") - if err := enc.Encode(tree); err != nil { - panic(err.Error()) + marshaler := protojson.MarshalOptions{EmitUnpopulated: true} + bs, err := marshaler.Marshal(res.Tree) + if err != nil { + panic(err) + } + if _, err = os.Stdout.Write(bs); err != nil { + panic(err) } } diff --git a/ketoapi/enc_proto.go b/ketoapi/enc_proto.go index 78416ea45..58baf7bfd 100644 --- a/ketoapi/enc_proto.go +++ b/ketoapi/enc_proto.go @@ -221,7 +221,9 @@ func (q *RelationQuery) ToProto() *rts.RelationQuery { func (t *Tree[NodeT]) ToProto() *rts.SubjectTree { res := &rts.SubjectTree{ NodeType: t.Type.ToProto(), - Children: make([]*rts.SubjectTree, len(t.Children)), + } + if len(t.Children) > 0 { + res.Children = make([]*rts.SubjectTree, len(t.Children)) } res.Tuple = t.Tuple.ToProto() // nolint - fill deprecated field diff --git a/proto/buf.md b/proto/buf.md index d43e1099f..77c782e7c 100644 --- a/proto/buf.md +++ b/proto/buf.md @@ -1,814 +1,3164 @@ # Protocol Documentation + + +## Table of Contents + +- [google/api/http.proto](#google_api_http-proto) + - [CustomHttpPattern](#google-api-CustomHttpPattern) + - [Http](#google-api-Http) + - [HttpRule](#google-api-HttpRule) + +- [google/api/annotations.proto](#google_api_annotations-proto) + - [File-level Extensions](#google_api_annotations-proto-extensions) + +- [protoc-gen-openapiv2/options/openapiv2.proto](#protoc-gen-openapiv2_options_openapiv2-proto) + - [Contact](#grpc-gateway-protoc_gen_openapiv2-options-Contact) + - [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) + - [Header](#grpc-gateway-protoc_gen_openapiv2-options-Header) + - [HeaderParameter](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter) + - [Info](#grpc-gateway-protoc_gen_openapiv2-options-Info) + - [Info.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Info-ExtensionsEntry) + - [JSONSchema](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema) + - [JSONSchema.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-ExtensionsEntry) + - [JSONSchema.FieldConfiguration](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-FieldConfiguration) + - [License](#grpc-gateway-protoc_gen_openapiv2-options-License) + - [Operation](#grpc-gateway-protoc_gen_openapiv2-options-Operation) + - [Operation.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ExtensionsEntry) + - [Operation.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ResponsesEntry) + - [Parameters](#grpc-gateway-protoc_gen_openapiv2-options-Parameters) + - [Response](#grpc-gateway-protoc_gen_openapiv2-options-Response) + - [Response.ExamplesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExamplesEntry) + - [Response.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExtensionsEntry) + - [Response.HeadersEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-HeadersEntry) + - [Schema](#grpc-gateway-protoc_gen_openapiv2-options-Schema) + - [Scopes](#grpc-gateway-protoc_gen_openapiv2-options-Scopes) + - [Scopes.ScopeEntry](#grpc-gateway-protoc_gen_openapiv2-options-Scopes-ScopeEntry) + - [SecurityDefinitions](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions) + - [SecurityDefinitions.SecurityEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions-SecurityEntry) + - [SecurityRequirement](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement) + - [SecurityRequirement.SecurityRequirementEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementEntry) + - [SecurityRequirement.SecurityRequirementValue](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementValue) + - [SecurityScheme](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme) + - [SecurityScheme.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-ExtensionsEntry) + - [Swagger](#grpc-gateway-protoc_gen_openapiv2-options-Swagger) + - [Swagger.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ExtensionsEntry) + - [Swagger.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ResponsesEntry) + - [Tag](#grpc-gateway-protoc_gen_openapiv2-options-Tag) + - [Tag.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Tag-ExtensionsEntry) + + - [HeaderParameter.Type](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter-Type) + - [JSONSchema.JSONSchemaSimpleTypes](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-JSONSchemaSimpleTypes) + - [Scheme](#grpc-gateway-protoc_gen_openapiv2-options-Scheme) + - [SecurityScheme.Flow](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Flow) + - [SecurityScheme.In](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-In) + - [SecurityScheme.Type](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Type) + +- [protoc-gen-openapiv2/options/annotations.proto](#protoc-gen-openapiv2_options_annotations-proto) + - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) + - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) + - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) + - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) + - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) + +- [ory/keto/opl/v1alpha1/syntax_service.proto](#ory_keto_opl_v1alpha1_syntax_service-proto) + - [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) + - [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) + - [ParseError](#ory-keto-opl-v1alpha1-ParseError) + - [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) + + - [SyntaxService](#ory-keto-opl-v1alpha1-SyntaxService) + +- [google/api/visibility.proto](#google_api_visibility-proto) + - [Visibility](#google-api-Visibility) + - [VisibilityRule](#google-api-VisibilityRule) + + - [File-level Extensions](#google_api_visibility-proto-extensions) + - [File-level Extensions](#google_api_visibility-proto-extensions) + - [File-level Extensions](#google_api_visibility-proto-extensions) + - [File-level Extensions](#google_api_visibility-proto-extensions) + - [File-level Extensions](#google_api_visibility-proto-extensions) + - [File-level Extensions](#google_api_visibility-proto-extensions) + +- [google/api/field_behavior.proto](#google_api_field_behavior-proto) + - [FieldBehavior](#google-api-FieldBehavior) + + - [File-level Extensions](#google_api_field_behavior-proto-extensions) + +- [ory/keto/relation_tuples/v1alpha2/relation_tuples.proto](#ory_keto_relation_tuples_v1alpha2_relation_tuples-proto) + - [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) + - [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) + - [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) + - [SubjectQuery](#ory-keto-relation_tuples-v1alpha2-SubjectQuery) + - [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) + - [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) + +- [ory/keto/relation_tuples/v1alpha2/check_service.proto](#ory_keto_relation_tuples_v1alpha2_check_service-proto) + - [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) + - [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) + + - [CheckService](#ory-keto-relation_tuples-v1alpha2-CheckService) + +- [ory/keto/relation_tuples/v1alpha2/expand_service.proto](#ory_keto_relation_tuples_v1alpha2_expand_service-proto) + - [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) + - [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) + - [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) + + - [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) + + - [ExpandService](#ory-keto-relation_tuples-v1alpha2-ExpandService) + +- [ory/keto/relation_tuples/v1alpha2/namespaces_service.proto](#ory_keto_relation_tuples_v1alpha2_namespaces_service-proto) + - [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) + - [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) + - [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) + + - [NamespacesService](#ory-keto-relation_tuples-v1alpha2-NamespacesService) + +- [ory/keto/relation_tuples/v1alpha2/openapi.proto](#ory_keto_relation_tuples_v1alpha2_openapi-proto) + - [ErrorResponse](#ory-keto-relation_tuples-v1alpha2-ErrorResponse) + - [ErrorResponse.Error](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error) + - [ErrorResponse.Error.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error-DetailsEntry) + +- [ory/keto/relation_tuples/v1alpha2/read_service.proto](#ory_keto_relation_tuples_v1alpha2_read_service-proto) + - [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) + - [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) + - [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) + + - [ReadService](#ory-keto-relation_tuples-v1alpha2-ReadService) + +- [ory/keto/relation_tuples/v1alpha2/version.proto](#ory_keto_relation_tuples_v1alpha2_version-proto) + - [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) + - [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) + + - [VersionService](#ory-keto-relation_tuples-v1alpha2-VersionService) + +- [validate/validate.proto](#validate_validate-proto) + - [AnyRules](#validate-AnyRules) + - [BoolRules](#validate-BoolRules) + - [BytesRules](#validate-BytesRules) + - [DoubleRules](#validate-DoubleRules) + - [DurationRules](#validate-DurationRules) + - [EnumRules](#validate-EnumRules) + - [FieldRules](#validate-FieldRules) + - [Fixed32Rules](#validate-Fixed32Rules) + - [Fixed64Rules](#validate-Fixed64Rules) + - [FloatRules](#validate-FloatRules) + - [Int32Rules](#validate-Int32Rules) + - [Int64Rules](#validate-Int64Rules) + - [MapRules](#validate-MapRules) + - [MessageRules](#validate-MessageRules) + - [RepeatedRules](#validate-RepeatedRules) + - [SFixed32Rules](#validate-SFixed32Rules) + - [SFixed64Rules](#validate-SFixed64Rules) + - [SInt32Rules](#validate-SInt32Rules) + - [SInt64Rules](#validate-SInt64Rules) + - [StringRules](#validate-StringRules) + - [TimestampRules](#validate-TimestampRules) + - [UInt32Rules](#validate-UInt32Rules) + - [UInt64Rules](#validate-UInt64Rules) + + - [KnownRegex](#validate-KnownRegex) + + - [File-level Extensions](#validate_validate-proto-extensions) + - [File-level Extensions](#validate_validate-proto-extensions) + - [File-level Extensions](#validate_validate-proto-extensions) + - [File-level Extensions](#validate_validate-proto-extensions) + +- [ory/keto/relation_tuples/v1alpha2/write_service.proto](#ory_keto_relation_tuples_v1alpha2_write_service-proto) + - [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) + - [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) + - [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) + - [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) + - [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) + - [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) + - [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) + - [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) + - [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) + + - [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) + + - [WriteService](#ory-keto-relation_tuples-v1alpha2-WriteService) + +- [Scalar Value Types](#scalar-value-types) + + + + +

Top

+ +## google/api/http.proto + + + + + +### CustomHttpPattern +A custom pattern is used for defining custom HTTP verb. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| kind | [string](#string) | | The name of this custom HTTP verb. | +| path | [string](#string) | | The path matched by this custom verb. | + + + + + + + + +### Http +Defines the HTTP configuration for an API service. It contains a list of +[HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method +to one or more HTTP REST API methods. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| rules | [HttpRule](#google-api-HttpRule) | repeated | A list of HTTP configuration rules that apply to individual API methods. + +**NOTE:** All service configuration rules follow "last one wins" order. | +| fully_decode_reserved_expansion | [bool](#bool) | | When set to true, URL path parameters will be fully URI-decoded except in cases of single segment matches in reserved expansion, where "%2F" will be left encoded. + +The default behavior is to not decode RFC 6570 reserved characters in multi segment matches. | + + + + + + + + +### HttpRule +# gRPC Transcoding + +gRPC Transcoding is a feature for mapping between a gRPC method and one or +more HTTP REST endpoints. It allows developers to build a single API service +that supports both gRPC APIs and REST APIs. Many systems, including [Google +APIs](https://github.com/googleapis/googleapis), +[Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC +Gateway](https://github.com/grpc-ecosystem/grpc-gateway), +and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature +and use it for large scale production services. + +`HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies +how different portions of the gRPC request message are mapped to the URL +path, URL query parameters, and HTTP request body. It also controls how the +gRPC response message is mapped to the HTTP response body. `HttpRule` is +typically specified as an `google.api.http` annotation on the gRPC method. + +Each mapping specifies a URL path template and an HTTP method. The path +template may refer to one or more fields in the gRPC request message, as long +as each field is a non-repeated field with a primitive (non-message) type. +The path template controls how fields of the request message are mapped to +the URL path. + +Example: + + service Messaging { + rpc GetMessage(GetMessageRequest) returns (Message) { + option (google.api.http) = { + get: "/v1/{name=messages/*}" + }; + } + } + message GetMessageRequest { + string name = 1; // Mapped to URL path. + } + message Message { + string text = 1; // The resource content. + } + +This enables an HTTP REST to gRPC mapping as below: + +HTTP | gRPC +-----|----- +`GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` + +Any fields in the request message which are not bound by the path template +automatically become HTTP query parameters if there is no HTTP request body. +For example: + + service Messaging { + rpc GetMessage(GetMessageRequest) returns (Message) { + option (google.api.http) = { + get:"/v1/messages/{message_id}" + }; + } + } + message GetMessageRequest { + message SubMessage { + string subfield = 1; + } + string message_id = 1; // Mapped to URL path. + int64 revision = 2; // Mapped to URL query parameter `revision`. + SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. + } + +This enables a HTTP JSON to RPC mapping as below: + +HTTP | gRPC +-----|----- +`GET /v1/messages/123456?revision=2&sub.subfield=foo` | +`GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: +"foo"))` + +Note that fields which are mapped to URL query parameters must have a +primitive type or a repeated primitive type or a non-repeated message type. +In the case of a repeated type, the parameter can be repeated in the URL +as `...?param=A&param=B`. In the case of a message type, each field of the +message is mapped to a separate parameter, such as +`...?foo.a=A&foo.b=B&foo.c=C`. + +For HTTP methods that allow a request body, the `body` field +specifies the mapping. Consider a REST update method on the +message resource collection: + + service Messaging { + rpc UpdateMessage(UpdateMessageRequest) returns (Message) { + option (google.api.http) = { + patch: "/v1/messages/{message_id}" + body: "message" + }; + } + } + message UpdateMessageRequest { + string message_id = 1; // mapped to the URL + Message message = 2; // mapped to the body + } + +The following HTTP JSON to RPC mapping is enabled, where the +representation of the JSON in the request body is determined by +protos JSON encoding: + +HTTP | gRPC +-----|----- +`PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +"123456" message { text: "Hi!" })` + +The special name `*` can be used in the body mapping to define that +every field not bound by the path template should be mapped to the +request body. This enables the following alternative definition of +the update method: + + service Messaging { + rpc UpdateMessage(Message) returns (Message) { + option (google.api.http) = { + patch: "/v1/messages/{message_id}" + body: "*" + }; + } + } + message Message { + string message_id = 1; + string text = 2; + } + + +The following HTTP JSON to RPC mapping is enabled: + +HTTP | gRPC +-----|----- +`PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +"123456" text: "Hi!")` + +Note that when using `*` in the body mapping, it is not possible to +have HTTP parameters, as all fields not bound by the path end in +the body. This makes this option more rarely used in practice when +defining REST APIs. The common usage of `*` is in custom methods +which don't use the URL at all for transferring data. + +It is possible to define multiple HTTP methods for one RPC by using +the `additional_bindings` option. Example: + + service Messaging { + rpc GetMessage(GetMessageRequest) returns (Message) { + option (google.api.http) = { + get: "/v1/messages/{message_id}" + additional_bindings { + get: "/v1/users/{user_id}/messages/{message_id}" + } + }; + } + } + message GetMessageRequest { + string message_id = 1; + string user_id = 2; + } + +This enables the following two alternative HTTP JSON to RPC mappings: + +HTTP | gRPC +-----|----- +`GET /v1/messages/123456` | `GetMessage(message_id: "123456")` +`GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: +"123456")` + +## Rules for HTTP mapping + +1. Leaf request fields (recursive expansion nested messages in the request + message) are classified into three categories: + - Fields referred by the path template. They are passed via the URL path. + - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP + request body. + - All other fields are passed via the URL query parameters, and the + parameter name is the field path in the request message. A repeated + field can be represented as multiple query parameters under the same + name. + 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields + are passed via URL path and HTTP request body. + 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all + fields are passed via URL path and URL query parameters. + +### Path template syntax + + Template = "/" Segments [ Verb ] ; + Segments = Segment { "/" Segment } ; + Segment = "*" | "**" | LITERAL | Variable ; + Variable = "{" FieldPath [ "=" Segments ] "}" ; + FieldPath = IDENT { "." IDENT } ; + Verb = ":" LITERAL ; + +The syntax `*` matches a single URL path segment. The syntax `**` matches +zero or more URL path segments, which must be the last part of the URL path +except the `Verb`. + +The syntax `Variable` matches part of the URL path as specified by its +template. A variable template must not contain other variables. If a variable +matches a single path segment, its template may be omitted, e.g. `{var}` +is equivalent to `{var=*}`. + +The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` +contains any reserved character, such characters should be percent-encoded +before the matching. + +If a variable contains exactly one path segment, such as `"{var}"` or +`"{var=*}"`, when such a variable is expanded into a URL path on the client +side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The +server side does the reverse decoding. Such variables show up in the +[Discovery +Document](https://developers.google.com/discovery/v1/reference/apis) as +`{var}`. + +If a variable contains multiple path segments, such as `"{var=foo/*}"` +or `"{var=**}"`, when such a variable is expanded into a URL path on the +client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. +The server side does the reverse decoding, except "%2F" and "%2f" are left +unchanged. Such variables show up in the +[Discovery +Document](https://developers.google.com/discovery/v1/reference/apis) as +`{+var}`. + +## Using gRPC API Service Configuration + +gRPC API Service Configuration (service config) is a configuration language +for configuring a gRPC service to become a user-facing product. The +service config is simply the YAML representation of the `google.api.Service` +proto message. + +As an alternative to annotating your proto file, you can configure gRPC +transcoding in your service config YAML files. You do this by specifying a +`HttpRule` that maps the gRPC method to a REST endpoint, achieving the same +effect as the proto annotation. This can be particularly useful if you +have a proto that is reused in multiple services. Note that any transcoding +specified in the service config will override any matching transcoding +configuration in the proto. + +Example: + + http: + rules: + # Selects a gRPC method and applies HttpRule to it. + - selector: example.v1.Messaging.GetMessage + get: /v1/messages/{message_id}/{sub.subfield} + +## Special notes + +When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the +proto to JSON conversion must follow the [proto3 +specification](https://developers.google.com/protocol-buffers/docs/proto3#json). + +While the single segment variable follows the semantics of +[RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String +Expansion, the multi segment variable **does not** follow RFC 6570 Section +3.2.3 Reserved Expansion. The reason is that the Reserved Expansion +does not expand special characters like `?` and `#`, which would lead +to invalid URLs. As the result, gRPC Transcoding uses a custom encoding +for multi segment variables. + +The path variables **must not** refer to any repeated or mapped field, +because client libraries are not capable of handling such variable expansion. + +The path variables **must not** capture the leading "/" character. The reason +is that the most common use case "{var}" does not capture the leading "/" +character. For consistency, all path variables must share the same behavior. + +Repeated message fields must not be mapped to URL query parameters, because +no client library can support such complicated mapping. + +If an API needs to use a JSON array for request or response body, it can map +the request or response body to a repeated field. However, some gRPC +Transcoding implementations may not support this feature. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| selector | [string](#string) | | Selects a method to which this rule applies. + +Refer to [selector][google.api.DocumentationRule.selector] for syntax details. | +| get | [string](#string) | | Maps to HTTP GET. Used for listing and getting information about resources. | +| put | [string](#string) | | Maps to HTTP PUT. Used for replacing a resource. | +| post | [string](#string) | | Maps to HTTP POST. Used for creating a resource or performing an action. | +| delete | [string](#string) | | Maps to HTTP DELETE. Used for deleting a resource. | +| patch | [string](#string) | | Maps to HTTP PATCH. Used for updating a resource. | +| custom | [CustomHttpPattern](#google-api-CustomHttpPattern) | | The custom pattern is used for specifying an HTTP method that is not included in the `pattern` field, such as HEAD, or "*" to leave the HTTP method unspecified for this rule. The wild-card rule is useful for services that provide content to Web (HTML) clients. | +| body | [string](#string) | | The name of the request field whose value is mapped to the HTTP request body, or `*` for mapping all request fields not captured by the path pattern to the HTTP body, or omitted for not having any HTTP request body. + +NOTE: the referred field must be present at the top-level of the request message type. | +| response_body | [string](#string) | | Optional. The name of the response field whose value is mapped to the HTTP response body. When omitted, the entire response message will be used as the HTTP response body. + +NOTE: The referred field must be present at the top-level of the response message type. | +| additional_bindings | [HttpRule](#google-api-HttpRule) | repeated | Additional HTTP bindings for the selector. Nested bindings must not contain an `additional_bindings` field themselves (that is, the nesting may only be one level deep). | + + + + + + + + + + + + + + + + +

Top

+ +## google/api/annotations.proto + + + + + + + + + +### File-level Extensions +| Extension | Type | Base | Number | Description | +| --------- | ---- | ---- | ------ | ----------- | +| http | HttpRule | .google.protobuf.MethodOptions | 72295728 | See `HttpRule`. | + + + + + + + + +

Top

+ +## protoc-gen-openapiv2/options/openapiv2.proto + + + + + +### Contact +`Contact` is a representation of OpenAPI v2 specification's Contact object. + +See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject + +Example: + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: { + ... + contact: { + name: "gRPC-Gateway project"; + url: "https://github.com/grpc-ecosystem/grpc-gateway"; + email: "none@example.com"; + }; + ... + }; + ... + }; + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | The identifying name of the contact person/organization. | +| url | [string](#string) | | The URL pointing to the contact information. MUST be in the format of a URL. | +| email | [string](#string) | | The email address of the contact person/organization. MUST be in the format of an email address. | + + + + + + + + +### ExternalDocumentation +`ExternalDocumentation` is a representation of OpenAPI v2 specification's +ExternalDocumentation object. + +See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject + +Example: + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + ... + external_docs: { + description: "More about gRPC-Gateway"; + url: "https://github.com/grpc-ecosystem/grpc-gateway"; + } + ... + }; + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| description | [string](#string) | | A short description of the target documentation. GFM syntax can be used for rich text representation. | +| url | [string](#string) | | The URL for the target documentation. Value MUST be in the format of a URL. | + + + + + + + + +### Header +`Header` is a representation of OpenAPI v2 specification's Header object. + +See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| description | [string](#string) | | `Description` is a short description of the header. | +| type | [string](#string) | | The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. | +| format | [string](#string) | | `Format` The extending format for the previously mentioned type. | +| default | [string](#string) | | `Default` Declares the value of the header that the server will use if none is provided. See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. Unlike JSON Schema this value MUST conform to the defined type for the header. | +| pattern | [string](#string) | | 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. | + + + + + + + + +### HeaderParameter +`HeaderParameter` a HTTP header parameter. +See: https://swagger.io/specification/v2/#parameter-object + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | `Name` is the header name. | +| description | [string](#string) | | `Description` is a short description of the header. | +| type | [HeaderParameter.Type](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter-Type) | | `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. See: https://swagger.io/specification/v2/#parameterType. | +| format | [string](#string) | | `Format` The extending format for the previously mentioned type. | +| required | [bool](#bool) | | `Required` indicates if the header is optional | + + + + + + + + +### Info +`Info` is a representation of OpenAPI v2 specification's Info object. + +See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject + +Example: + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: { + title: "Echo API"; + version: "1.0"; + description: ""; + contact: { + name: "gRPC-Gateway project"; + url: "https://github.com/grpc-ecosystem/grpc-gateway"; + email: "none@example.com"; + }; + license: { + name: "BSD 3-Clause License"; + url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; + }; + }; + ... + }; + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| title | [string](#string) | | The title of the application. | +| description | [string](#string) | | A short description of the application. GFM syntax can be used for rich text representation. | +| terms_of_service | [string](#string) | | The Terms of Service for the API. | +| contact | [Contact](#grpc-gateway-protoc_gen_openapiv2-options-Contact) | | The contact information for the exposed API. | +| license | [License](#grpc-gateway-protoc_gen_openapiv2-options-License) | | The license information for the exposed API. | +| version | [string](#string) | | Provides the version of the application API (not to be confused with the specification version). | +| extensions | [Info.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Info-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | + + + + + + + + +### Info.ExtensionsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + + + + + + + + +### JSONSchema +`JSONSchema` represents properties from JSON Schema taken, and as used, in +the OpenAPI v2 spec. + +This includes changes made by OpenAPI v2. + +See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + +See also: https://cswr.github.io/JsonSchema/spec/basic_types/, +https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json + +Example: + + message SimpleMessage { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema: { + title: "SimpleMessage" + description: "A simple message." + required: ["id"] + } + }; + + // Id represents the message identifier. + string id = 1; [ + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + description: "The unique identifier of the simple message." + }]; + } + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| ref | [string](#string) | | Ref is used to define an external reference to include in the message. This could be a fully qualified proto message reference, and that type must be imported into the protofile. If no message is identified, the Ref will be used verbatim in the output. For example: `ref: ".google.protobuf.Timestamp"`. | +| title | [string](#string) | | The title of the schema. | +| description | [string](#string) | | A short description of the schema. | +| default | [string](#string) | | | +| read_only | [bool](#bool) | | | +| example | [string](#string) | | A free-form property to include a JSON example of this field. This is copied verbatim to the output swagger.json. Quotes must be escaped. This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject | +| multiple_of | [double](#double) | | | +| maximum | [double](#double) | | Maximum represents an inclusive upper limit for a numeric instance. The value of MUST be a number, | +| exclusive_maximum | [bool](#bool) | | | +| minimum | [double](#double) | | minimum represents an inclusive lower limit for a numeric instance. The value of MUST be a number, | +| exclusive_minimum | [bool](#bool) | | | +| max_length | [uint64](#uint64) | | | +| min_length | [uint64](#uint64) | | | +| pattern | [string](#string) | | | +| max_items | [uint64](#uint64) | | | +| min_items | [uint64](#uint64) | | | +| unique_items | [bool](#bool) | | | +| max_properties | [uint64](#uint64) | | | +| min_properties | [uint64](#uint64) | | | +| required | [string](#string) | repeated | | +| array | [string](#string) | repeated | Items in 'array' must be unique. | +| type | [JSONSchema.JSONSchemaSimpleTypes](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-JSONSchemaSimpleTypes) | repeated | | +| format | [string](#string) | | `Format` | +| enum | [string](#string) | repeated | Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 | +| field_configuration | [JSONSchema.FieldConfiguration](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-FieldConfiguration) | | Additional field level properties used when generating the OpenAPI v2 file. | +| extensions | [JSONSchema.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | + + + + + + + + +### JSONSchema.ExtensionsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + + + + + + + + +### JSONSchema.FieldConfiguration +'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file. +These properties are not defined by OpenAPIv2, but they are used to control the generation. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| path_param_name | [string](#string) | | Alternative parameter name when used as path parameter. If set, this will be used as the complete parameter name when this field is used as a path parameter. Use this to avoid having auto generated path parameter names for overlapping paths. | + + + + + + + + +### License +`License` is a representation of OpenAPI v2 specification's License object. + +See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject + +Example: + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: { + ... + license: { + name: "BSD 3-Clause License"; + url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; + }; + ... + }; + ... + }; + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | The license name used for the API. | +| url | [string](#string) | | A URL to the license used for the API. MUST be in the format of a URL. | + + + + + + + + +### Operation +`Operation` is a representation of OpenAPI v2 specification's Operation object. + +See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject + +Example: + + service EchoService { + rpc Echo(SimpleMessage) returns (SimpleMessage) { + option (google.api.http) = { + get: "/v1/example/echo/{id}" + }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "Get a message."; + operation_id: "getMessage"; + tags: "echo"; + responses: { + key: "200" + value: { + description: "OK"; + } + } + }; + } + } + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| tags | [string](#string) | repeated | A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier. | +| summary | [string](#string) | | A short summary of what the operation does. For maximum readability in the swagger-ui, this field SHOULD be less than 120 characters. | +| description | [string](#string) | | A verbose explanation of the operation behavior. GFM syntax can be used for rich text representation. | +| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation for this operation. | +| operation_id | [string](#string) | | Unique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is recommended to follow common programming naming conventions. | +| consumes | [string](#string) | repeated | A list of MIME types the operation can consume. This overrides the consumes definition at the OpenAPI Object. An empty value MAY be used to clear the global definition. Value MUST be as described under Mime Types. | +| produces | [string](#string) | repeated | A list of MIME types the operation can produce. This overrides the produces definition at the OpenAPI Object. An empty value MAY be used to clear the global definition. Value MUST be as described under Mime Types. | +| responses | [Operation.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ResponsesEntry) | repeated | The list of possible responses as they are returned from executing this operation. | +| schemes | [Scheme](#grpc-gateway-protoc_gen_openapiv2-options-Scheme) | repeated | The transfer protocol for the operation. Values MUST be from the list: "http", "https", "ws", "wss". The value overrides the OpenAPI Object schemes definition. | +| deprecated | [bool](#bool) | | Declares this operation to be deprecated. Usage of the declared operation should be refrained. Default value is false. | +| security | [SecurityRequirement](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement) | repeated | A declaration of which security schemes are applied for this operation. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). This definition overrides any declared top-level security. To remove a top-level security declaration, an empty array can be used. | +| extensions | [Operation.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | +| parameters | [Parameters](#grpc-gateway-protoc_gen_openapiv2-options-Parameters) | | Custom parameters such as HTTP request headers. See: https://swagger.io/docs/specification/2-0/describing-parameters/ and https://swagger.io/specification/v2/#parameter-object. | + + + + + + + + +### Operation.ExtensionsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + + + + + + + + +### Operation.ResponsesEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Response](#grpc-gateway-protoc_gen_openapiv2-options-Response) | | | + + + + + + + + +### Parameters +`Parameters` is a representation of OpenAPI v2 specification's parameters object. +Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only +allow header parameters to be set here since we do not want users specifying custom non-header +parameters beyond those inferred from the Protobuf schema. +See: https://swagger.io/specification/v2/#parameter-object + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| headers | [HeaderParameter](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter) | repeated | `Headers` is one or more HTTP header parameter. See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters | + + + + + + + + +### Response +`Response` is a representation of OpenAPI v2 specification's Response object. + +See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| description | [string](#string) | | `Description` is a short description of the response. GFM syntax can be used for rich text representation. | +| schema | [Schema](#grpc-gateway-protoc_gen_openapiv2-options-Schema) | | `Schema` optionally defines the structure of the response. If `Schema` is not provided, it means there is no content to the response. | +| headers | [Response.HeadersEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-HeadersEntry) | repeated | `Headers` A list of headers that are sent with the response. `Header` name is expected to be a string in the canonical format of the MIME header key See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey | +| examples | [Response.ExamplesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExamplesEntry) | repeated | `Examples` gives per-mimetype response examples. See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object | +| extensions | [Response.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | + + + + + + + + +### Response.ExamplesEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + + +### Response.ExtensionsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + + + + + + + + +### Response.HeadersEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Header](#grpc-gateway-protoc_gen_openapiv2-options-Header) | | | + + + + + + + + +### Schema +`Schema` is a representation of OpenAPI v2 specification's Schema object. + +See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| json_schema | [JSONSchema](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema) | | | +| discriminator | [string](#string) | | Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. | +| read_only | [bool](#bool) | | Relevant only for Schema "properties" definitions. Declares the property as "read only". This means that it MAY be sent as part of a response but MUST NOT be sent as part of the request. Properties marked as readOnly being true SHOULD NOT be in the required list of the defined schema. Default value is false. | +| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation for this schema. | +| example | [string](#string) | | A free-form property to include an example of an instance for this schema in JSON. This is copied verbatim to the output. | + + + + + + + + +### Scopes +`Scopes` is a representation of OpenAPI v2 specification's Scopes object. + +See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject + +Lists the available scopes for an OAuth2 security scheme. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| scope | [Scopes.ScopeEntry](#grpc-gateway-protoc_gen_openapiv2-options-Scopes-ScopeEntry) | repeated | Maps between a name of a scope to a short description of it (as the value of the property). | + + + + + + + + +### Scopes.ScopeEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + + +### SecurityDefinitions +`SecurityDefinitions` is a representation of OpenAPI v2 specification's +Security Definitions object. + +See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject + +A declaration of the security schemes available to be used in the +specification. This does not enforce the security schemes on the operations +and only serves to provide the relevant details for each scheme. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| security | [SecurityDefinitions.SecurityEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions-SecurityEntry) | repeated | A single security scheme definition, mapping a "name" to the scheme it defines. | + + + + + + + + +### SecurityDefinitions.SecurityEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [SecurityScheme](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme) | | | + + + + + + + + +### SecurityRequirement +`SecurityRequirement` is a representation of OpenAPI v2 specification's +Security Requirement object. + +See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject + +Lists the required security schemes to execute this operation. The object can +have multiple security schemes declared in it which are all required (that +is, there is a logical AND between the schemes). + +The name used for each property MUST correspond to a security scheme +declared in the Security Definitions. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| security_requirement | [SecurityRequirement.SecurityRequirementEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementEntry) | repeated | Each name must correspond to a security scheme which is declared in the Security Definitions. If the security scheme is of type "oauth2", then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty. | + + + + + + + + +### SecurityRequirement.SecurityRequirementEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [SecurityRequirement.SecurityRequirementValue](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementValue) | | | + + + + + + + + +### SecurityRequirement.SecurityRequirementValue +If the security scheme is of type "oauth2", then the value is a list of +scope names required for the execution. For other security scheme types, +the array MUST be empty. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| scope | [string](#string) | repeated | | + + + + + + + + +### SecurityScheme +`SecurityScheme` is a representation of OpenAPI v2 specification's +Security Scheme object. + +See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject + +Allows the definition of a security scheme that can be used by the +operations. Supported schemes are basic authentication, an API key (either as +a header or as a query parameter) and OAuth2's common flows (implicit, +password, application and access code). + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| type | [SecurityScheme.Type](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Type) | | The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2". | +| description | [string](#string) | | A short description for security scheme. | +| name | [string](#string) | | The name of the header or query parameter to be used. Valid for apiKey. | +| in | [SecurityScheme.In](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-In) | | The location of the API key. Valid values are "query" or "header". Valid for apiKey. | +| flow | [SecurityScheme.Flow](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Flow) | | The flow used by the OAuth2 security scheme. Valid values are "implicit", "password", "application" or "accessCode". Valid for oauth2. | +| authorization_url | [string](#string) | | The authorization URL to be used for this flow. This SHOULD be in the form of a URL. Valid for oauth2/implicit and oauth2/accessCode. | +| token_url | [string](#string) | | The token URL to be used for this flow. This SHOULD be in the form of a URL. Valid for oauth2/password, oauth2/application and oauth2/accessCode. | +| scopes | [Scopes](#grpc-gateway-protoc_gen_openapiv2-options-Scopes) | | The available scopes for the OAuth2 security scheme. Valid for oauth2. | +| extensions | [SecurityScheme.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | + + + + + + + + +### SecurityScheme.ExtensionsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + + + + + + + + +### Swagger +`Swagger` is a representation of OpenAPI v2 specification's Swagger object. + +See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject + +Example: + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + info: { + title: "Echo API"; + version: "1.0"; + description: ""; + contact: { + name: "gRPC-Gateway project"; + url: "https://github.com/grpc-ecosystem/grpc-gateway"; + email: "none@example.com"; + }; + license: { + name: "BSD 3-Clause License"; + url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; + }; + }; + schemes: HTTPS; + consumes: "application/json"; + produces: "application/json"; + }; + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| swagger | [string](#string) | | Specifies the OpenAPI Specification version being used. It can be used by the OpenAPI UI and other clients to interpret the API listing. The value MUST be "2.0". | +| info | [Info](#grpc-gateway-protoc_gen_openapiv2-options-Info) | | Provides metadata about the API. The metadata can be used by the clients if needed. | +| host | [string](#string) | | The host (name or ip) serving the API. This MUST be the host only and does not include the scheme nor sub-paths. It MAY include a port. If the host is not included, the host serving the documentation is to be used (including the port). The host does not support path templating. | +| base_path | [string](#string) | | The base path on which the API is served, which is relative to the host. If it is not included, the API is served directly under the host. The value MUST start with a leading slash (/). The basePath does not support path templating. Note that using `base_path` does not change the endpoint paths that are generated in the resulting OpenAPI file. If you wish to use `base_path` with relatively generated OpenAPI paths, the `base_path` prefix must be manually removed from your `google.api.http` paths and your code changed to serve the API from the `base_path`. | +| schemes | [Scheme](#grpc-gateway-protoc_gen_openapiv2-options-Scheme) | repeated | The transfer protocol of the API. Values MUST be from the list: "http", "https", "ws", "wss". If the schemes is not included, the default scheme to be used is the one used to access the OpenAPI definition itself. | +| consumes | [string](#string) | repeated | A list of MIME types the APIs can consume. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under Mime Types. | +| produces | [string](#string) | repeated | A list of MIME types the APIs can produce. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under Mime Types. | +| responses | [Swagger.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ResponsesEntry) | repeated | An object to hold responses that can be used across operations. This property does not define global responses for all operations. | +| security_definitions | [SecurityDefinitions](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions) | | Security scheme definitions that can be used across the specification. | +| security | [SecurityRequirement](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement) | repeated | A declaration of which security schemes are applied for the API as a whole. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). Individual operations can override this definition. | +| tags | [Tag](#grpc-gateway-protoc_gen_openapiv2-options-Tag) | repeated | A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier. | +| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation. | +| extensions | [Swagger.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | + + + + + + + + +### Swagger.ExtensionsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + + + + + + + + +### Swagger.ResponsesEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Response](#grpc-gateway-protoc_gen_openapiv2-options-Response) | | | + + + + + + + + +### Tag +`Tag` is a representation of OpenAPI v2 specification's Tag object. + +See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | The name of the tag. Use it to allow override of the name of a global Tag object, then use that name to reference the tag throughout the OpenAPI file. | +| description | [string](#string) | | A short description for the tag. GFM syntax can be used for rich text representation. | +| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation for this tag. | +| extensions | [Tag.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Tag-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | + + + + + + + + +### Tag.ExtensionsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + + + + + + + + + + +### HeaderParameter.Type +`Type` is a a supported HTTP header type. +See https://swagger.io/specification/v2/#parameterType. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| UNKNOWN | 0 | | +| STRING | 1 | | +| NUMBER | 2 | | +| INTEGER | 3 | | +| BOOLEAN | 4 | | + + + + + +### JSONSchema.JSONSchemaSimpleTypes + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| UNKNOWN | 0 | | +| ARRAY | 1 | | +| BOOLEAN | 2 | | +| INTEGER | 3 | | +| NULL | 4 | | +| NUMBER | 5 | | +| OBJECT | 6 | | +| STRING | 7 | | + + + + + +### Scheme +Scheme describes the schemes supported by the OpenAPI Swagger +and Operation objects. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| UNKNOWN | 0 | | +| HTTP | 1 | | +| HTTPS | 2 | | +| WS | 3 | | +| WSS | 4 | | + + + + + +### SecurityScheme.Flow +The flow used by the OAuth2 security scheme. Valid values are +"implicit", "password", "application" or "accessCode". + +| Name | Number | Description | +| ---- | ------ | ----------- | +| FLOW_INVALID | 0 | | +| FLOW_IMPLICIT | 1 | | +| FLOW_PASSWORD | 2 | | +| FLOW_APPLICATION | 3 | | +| FLOW_ACCESS_CODE | 4 | | + + + + + +### SecurityScheme.In +The location of the API key. Valid values are "query" or "header". + +| Name | Number | Description | +| ---- | ------ | ----------- | +| IN_INVALID | 0 | | +| IN_QUERY | 1 | | +| IN_HEADER | 2 | | + + + + + +### SecurityScheme.Type +The type of the security scheme. Valid values are "basic", +"apiKey" or "oauth2". + +| Name | Number | Description | +| ---- | ------ | ----------- | +| TYPE_INVALID | 0 | | +| TYPE_BASIC | 1 | | +| TYPE_API_KEY | 2 | | +| TYPE_OAUTH2 | 3 | | + + + + + + + + + + + +

Top

+ +## protoc-gen-openapiv2/options/annotations.proto + + + + + + + + + +### File-level Extensions +| Extension | Type | Base | Number | Description | +| --------- | ---- | ---- | ------ | ----------- | +| openapiv2_field | JSONSchema | .google.protobuf.FieldOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + +All IDs are the same, as assigned. It is okay that they are the same, as they extend different descriptor messages. | +| openapiv2_swagger | Swagger | .google.protobuf.FileOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + +All IDs are the same, as assigned. It is okay that they are the same, as they extend different descriptor messages. | +| openapiv2_schema | Schema | .google.protobuf.MessageOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + +All IDs are the same, as assigned. It is okay that they are the same, as they extend different descriptor messages. | +| openapiv2_operation | Operation | .google.protobuf.MethodOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + +All IDs are the same, as assigned. It is okay that they are the same, as they extend different descriptor messages. | +| openapiv2_tag | Tag | .google.protobuf.ServiceOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + +All IDs are the same, as assigned. It is okay that they are the same, as they extend different descriptor messages. | + + + + + + + + +

Top

+ +## ory/keto/opl/v1alpha1/syntax_service.proto + + + + + +### CheckRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| content | [bytes](#bytes) | | | + + + + + + + + +### CheckResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | | + + + + + + + + +### ParseError + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| message | [string](#string) | | | +| start | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | +| end | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | + + + + + + + + +### SourcePosition + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| line | [uint32](#uint32) | | | +| column | [uint32](#uint32) | | | + + + + + + + + + + + + + + +### SyntaxService +The service that checks the syntax of an OPL file. + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| Check | [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) | [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) | Performs a syntax check request. | + + + + + + +

Top

+ +## google/api/visibility.proto + + + + + +### Visibility +`Visibility` restricts service consumer's access to service elements, +such as whether an application can call a visibility-restricted method. +The restriction is expressed by applying visibility labels on service +elements. The visibility labels are elsewhere linked to service consumers. + +A service can define multiple visibility labels, but a service consumer +should be granted at most one visibility label. Multiple visibility +labels for a single service consumer are not supported. + +If an element and all its parents have no visibility label, its visibility +is unconditionally granted. + +Example: + + visibility: + rules: + - selector: google.calendar.Calendar.EnhancedSearch + restriction: PREVIEW + - selector: google.calendar.Calendar.Delegate + restriction: INTERNAL + +Here, all methods are publicly visible except for the restricted methods +EnhancedSearch and Delegate. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| rules | [VisibilityRule](#google-api-VisibilityRule) | repeated | A list of visibility rules that apply to individual API elements. + +**NOTE:** All service configuration rules follow "last one wins" order. | + + + + + + + + +### VisibilityRule +A visibility rule provides visibility configuration for an individual API +element. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| selector | [string](#string) | | Selects methods, messages, fields, enums, etc. to which this rule applies. + +Refer to [selector][google.api.DocumentationRule.selector] for syntax details. | +| restriction | [string](#string) | | A comma-separated list of visibility labels that apply to the `selector`. Any of the listed labels can be used to grant the visibility. + +If a rule has multiple labels, removing one of the labels but not all of them can break clients. + +Example: + + visibility: rules: - selector: google.calendar.Calendar.EnhancedSearch restriction: INTERNAL, PREVIEW + +Removing INTERNAL from this restriction will break clients that rely on this method and only had access to it through INTERNAL. | + + + + + + + + + + + + +### File-level Extensions +| Extension | Type | Base | Number | Description | +| --------- | ---- | ---- | ------ | ----------- | +| enum_visibility | VisibilityRule | .google.protobuf.EnumOptions | 72295727 | See `VisibilityRule`. | +| value_visibility | VisibilityRule | .google.protobuf.EnumValueOptions | 72295727 | See `VisibilityRule`. | +| field_visibility | VisibilityRule | .google.protobuf.FieldOptions | 72295727 | See `VisibilityRule`. | +| message_visibility | VisibilityRule | .google.protobuf.MessageOptions | 72295727 | See `VisibilityRule`. | +| method_visibility | VisibilityRule | .google.protobuf.MethodOptions | 72295727 | See `VisibilityRule`. | +| api_visibility | VisibilityRule | .google.protobuf.ServiceOptions | 72295727 | See `VisibilityRule`. | + + + + + + + + +

Top

+ +## google/api/field_behavior.proto + + + + + + + +### FieldBehavior +An indicator of the behavior of a given field (for example, that a field +is required in requests, or given as output but ignored as input). +This **does not** change the behavior in protocol buffers itself; it only +denotes the behavior and may affect how API tooling handles the field. + +Note: This enum **may** receive new values in the future. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| FIELD_BEHAVIOR_UNSPECIFIED | 0 | Conventional default for enums. Do not use this. | +| OPTIONAL | 1 | Specifically denotes a field as optional. While all fields in protocol buffers are optional, this may be specified for emphasis if appropriate. | +| REQUIRED | 2 | Denotes a field as required. This indicates that the field **must** be provided as part of the request, and failure to do so will cause an error (usually `INVALID_ARGUMENT`). | +| OUTPUT_ONLY | 3 | Denotes a field as output only. This indicates that the field is provided in responses, but including the field in a request does nothing (the server *must* ignore it and *must not* throw an error as a result of the field's presence). | +| INPUT_ONLY | 4 | Denotes a field as input only. This indicates that the field is provided in requests, and the corresponding field is not included in output. | +| IMMUTABLE | 5 | Denotes a field as immutable. This indicates that the field may be set once in a request to create a resource, but may not be changed thereafter. | +| UNORDERED_LIST | 6 | Denotes that a (repeated) field is an unordered list. This indicates that the service may provide the elements of the list in any arbitrary order, rather than the order the user originally provided. Additionally, the list's order may or may not be stable. | +| NON_EMPTY_DEFAULT | 7 | Denotes that this field returns a non-empty default value if not set. This indicates that if the user provides the empty value in a request, a non-empty value will be returned. The user will not be aware of what non-empty value to expect. | + + + + + + + +### File-level Extensions +| Extension | Type | Base | Number | Description | +| --------- | ---- | ---- | ------ | ----------- | +| field_behavior | FieldBehavior | .google.protobuf.FieldOptions | 1052 | A designation of a specific field behavior (required, output only, etc.) in protobuf messages. + +Examples: + + string name = 1 [(google.api.field_behavior) = REQUIRED]; State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; google.protobuf.Duration ttl = 1 [(google.api.field_behavior) = INPUT_ONLY]; google.protobuf.Timestamp expire_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY, (google.api.field_behavior) = IMMUTABLE]; | + + + + + + + + +

Top

+ +## ory/keto/relation_tuples/v1alpha2/relation_tuples.proto + + + + + +### RelationQuery +The query for listing relationships. +Clients can specify any optional field to +partially filter for specific relationships. + +Example use cases (namespace is always required): + - object only: display a list of all permissions referring to a specific object + - relation only: get all groups that have members; get all directories that have content + - object & relation: display all subjects that have a specific permission relation + - subject & relation: display all groups a subject belongs to; display all objects a subject has access to + - object & relation & subject: check whether the relation tuple already exists + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | optional | The namespace this relation tuple lives in. | +| object | [string](#string) | optional | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | optional | The relation between an Object and a Subject. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | optional | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | + + + + + + + + +### RelationTuple +RelationTuple defines a relation between an Object and a Subject. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | The namespace this relation tuple lives in. | +| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | The relation between an Object and a Subject. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | +| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | +| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + + + + + + +### Subject +Subject is either a concrete subject id or +a `SubjectSet` expanding to more Subjects. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | A concrete id of the subject. | +| set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + + + + + + +### SubjectQuery +SubjectQuery is either a concrete subject id or +a `SubjectSet` expanding to more Subjects. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | A concrete id of the subject. | +| set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + + + + + + +### SubjectSet +SubjectSet refers to all subjects who have +the same `relation` on an `object`. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | +| object | [string](#string) | | The object related by this subject set. | +| relation | [string](#string) | | The relation between the object and the subjects. | + + + + + + + + +### SubjectSetQuery +SubjectSetQuery refers to all subjects who have +the same `relation` on an `object`. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | +| object | [string](#string) | | The object related by this subject set. | +| relation | [string](#string) | | The relation between the object and the subjects. | + + + + + + + + + + + + + + + + +

Top

+ +## ory/keto/relation_tuples/v1alpha2/check_service.proto + + + + + +### CheckRequest +The request for a CheckService.Check RPC. +Checks whether a specific subject is related to an object. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | **Deprecated.** The namespace to evaluate the check. + +Note: If you use the expand-API and the check evaluates a RelationTuple specifying a SubjectSet as subject or due to a rewrite rule in a namespace config this check request may involve other namespaces automatically. | +| object | [string](#string) | | **Deprecated.** The related object in this check. | +| relation | [string](#string) | | **Deprecated.** The relation between the Object and the Subject. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The related subject in this check. | +| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | +| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | +| tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | | +| latest | [bool](#bool) | | This field is not implemented yet and has no effect. <!-- Set this field to `true` in case your application needs to authorize depending on up to date ACLs, also called a "content-change check". + +If set to `true` the `snaptoken` field is ignored, the check is evaluated at the latest snapshot (globally consistent) and the response includes a snaptoken for clients to store along with object contents that can be used for subsequent checks of the same content version. + +Example use case: - You need to authorize a user to modify/delete some resource and it is unacceptable that if the permission to do that had just been revoked some seconds ago so that the change had not yet been fully replicated to all availability zones. --> | +| snaptoken | [string](#string) | | This field is not implemented yet and has no effect. <!-- Optional. Like reads, a check is always evaluated at a consistent snapshot no earlier than the given snaptoken. + +Leave this field blank if you want to evaluate the check based on eventually consistent ACLs, benefiting from very low latency, but possibly slightly stale results. + +If the specified token is too old and no longer known, the server falls back as if no snaptoken had been specified. + +If not specified the server tries to evaluate the check on the best snapshot version where it is very likely that ACLs had already been replicated to all availability zones. --> | +| max_depth | [int32](#int32) | | The maximum depth to search for a relation. + +If the value is less than 1 or greater than the global max-depth then the global max-depth will be used instead. | + + + + + + + + +### CheckResponse +The response for a CheckService.Check rpc. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| allowed | [bool](#bool) | | Whether the specified subject (id) is related to the requested object. + +It is false by default if no ACL matches. | +| snaptoken | [string](#string) | | This field is not implemented yet and has no effect. <!-- The last known snapshot token ONLY specified if the request had not specified a snaptoken, since this performed a "content-change request" and consistently fetched the last known snapshot token. + +This field is not set if the request had specified a snaptoken! + +If set, clients should cache and use this token for subsequent requests to have minimal latency, but allow slightly stale responses (only some milliseconds or seconds). --> | + + + + + + + + + + + + + + +### CheckService +The service that performs authorization checks +based on the stored Access Control Lists. + +This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| Check | [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) | [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) | Performs an authorization check. | + + + + + + +

Top

+ +## ory/keto/relation_tuples/v1alpha2/expand_service.proto + + + + + +### ExpandRequest +The request for an ExpandService.Expand RPC. +Expands the given subject set. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject to expand. | +| max_depth | [int32](#int32) | | The maximum depth of tree to build. + +If the value is less than 1 or greater than the global max-depth then the global max-depth will be used instead. + +It is important to set this parameter to a meaningful value. Ponder how deep you really want to display this. | +| snaptoken | [string](#string) | | This field is not implemented yet and has no effect. <!-- Optional. Like reads, a expand is always evaluated at a consistent snapshot no earlier than the given snaptoken. + +Leave this field blank if you want to expand based on eventually consistent ACLs, benefiting from very low latency, but possibly slightly stale results. + +If the specified token is too old and no longer known, the server falls back as if no snaptoken had been specified. + +If not specified the server tries to build the tree on the best snapshot version where it is very likely that ACLs had already been replicated to all availability zones. --> | +| namespace | [string](#string) | | **Deprecated.** The namespace of the object and relation referenced in this subject set. | +| object | [string](#string) | | **Deprecated.** The object related by this subject set. | +| relation | [string](#string) | | **Deprecated.** The relation between the object and the subjects. | + + + + + + + + +### ExpandResponse +The response for a ExpandService.Expand RPC. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| tree | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | | The tree the requested subject set expands to. The requested subject set is the subject of the root. + +This field can be nil in some circumstances. | + + + + + + + + +### SubjectTree + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| node_type | [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) | | The type of the node. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The subject this node represents. Deprecated: More information is now available in the tuple field. | +| tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The relation tuple this node represents. | +| children | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | repeated | The children of this node. + +This is never set if `node_type` == `NODE_TYPE_LEAF`. | + + + + + + + + + + +### NodeType + + +| Name | Number | Description | +| ---- | ------ | ----------- | +| unspecified | 0 | | +| NODE_TYPE_UNSPECIFIED | 0 | | +| union | 1 | This node expands to a union of all children. | +| NODE_TYPE_UNION | 1 | | +| exclusion | 2 | Not implemented yet. | +| NODE_TYPE_EXCLUSION | 2 | | +| intersection | 3 | Not implemented yet. | +| NODE_TYPE_INTERSECTION | 3 | | +| leaf | 4 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| NODE_TYPE_LEAF | 4 | | +| tuple_to_subject_set | 5 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| NODE_TYPE_TUPLE_TO_SUBJECT_SET | 5 | | +| computed_subject_set | 6 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| NODE_TYPE_COMPUTED_SUBJECT_SET | 6 | | +| not | 7 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| NODE_TYPE_NOT | 7 | | + + + + + + + + + +### ExpandService +The service that performs subject set expansion +based on the stored Access Control Lists. + +This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| Expand | [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) | [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) | Expands the subject set into a tree of subjects. | + + + + + + +

Top

+ +## ory/keto/relation_tuples/v1alpha2/namespaces_service.proto + + + + + +### ListNamespacesRequest +Request for ReadService.ListNamespaces RPC. + + + + + + + + +### ListNamespacesResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespaces | [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) | repeated | | + + + + + + + + +### Namespace + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | | + + + + + + + + + + + + + + +### NamespacesService +The service to query namespaces. + +This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| ListNamespaces | [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) | [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) | Lists Namespaces + +Get all namespaces. | + + + + + + +

Top

+ +## ory/keto/relation_tuples/v1alpha2/openapi.proto + + + + + +### ErrorResponse +JSON API Error Response + +The standard Ory JSON API error format. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| error | [ErrorResponse.Error](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error) | | | + + + + + + + + +### ErrorResponse.Error + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| code | [int64](#int64) | | The status code | +| debug | [string](#string) | | Debug information + +Debug information is often not exposed to protect against leaking sensitive information. | +| details | [ErrorResponse.Error.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error-DetailsEntry) | repeated | Further error details + +Further details about the error. | +| id | [string](#string) | | The error ID + +The error ID is useful when trying to identify various errors in application logic. | +| message | [string](#string) | | The error message + +The error's message (required). | +| reason | [string](#string) | | The error reason + +Reason holds a human-readable reason for the error. | +| request | [string](#string) | | The request ID + +The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. | +| status | [string](#string) | | The status description + +Status holds the human-readable HTTP status code. | + + + + + + + + +### ErrorResponse.Error.DetailsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + + + + + + + + + + +

Top

+ +## ory/keto/relation_tuples/v1alpha2/read_service.proto + + + + + +### ListRelationTuplesRequest +Request for ReadService.ListRelationTuples RPC. +See `ListRelationTuplesRequest_Query` for how to filter the query. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| query | [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) | | **Deprecated.** All query constraints are concatenated with a logical AND operator. + +The RelationTuple list from ListRelationTuplesResponse is ordered from the newest RelationTuple to the oldest. | +| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | +| expand_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | This field is not implemented yet and has no effect. <!-- Optional. The list of fields to be expanded in the RelationTuple list returned in `ListRelationTuplesResponse`. Leaving this field unspecified means all fields are expanded. + +Available fields: "object", "relation", "subject", "namespace", "subject.id", "subject.namespace", "subject.object", "subject.relation" --> | +| snaptoken | [string](#string) | | This field is not implemented yet and has no effect. <!-- Optional. The snapshot token for this read. --> | +| page_size | [int32](#int32) | | Optional. The maximum number of RelationTuples to return in the response. + +Default: 100 | +| page_token | [string](#string) | | Optional. An opaque pagination token returned from a previous call to `ListRelationTuples` that indicates where the page should start at. + +An empty token denotes the first page. All successive pages require the token from the previous page. | +| namespace | [string](#string) | | **Deprecated.** The namespace | +| object | [string](#string) | | **Deprecated.** The related object in this check. | +| relation | [string](#string) | | **Deprecated.** The relation between the Object and the Subject. | +| subject_id | [string](#string) | | A concrete id of the subject. | +| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + + + + + + +### ListRelationTuplesRequest.Query +The query for listing relationships. +Clients can specify any optional field to +partially filter for specific relationships. + +Example use cases (namespace is always required): + - object only: display a list of all permissions referring to a specific object + - relation only: get all groups that have members; get all directories that have content + - object & relation: display all subjects that have a specific permission relation + - subject & relation: display all groups a subject belongs to; display all objects a subject has access to + - object & relation & subject: check whether the relation tuple already exists + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | Required. The namespace to query. | +| object | [string](#string) | | Optional. The object to query for. | +| relation | [string](#string) | | Optional. The relation to query for. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | + + + + + + + + +### ListRelationTuplesResponse +The response of a ReadService.ListRelationTuples RPC. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| relation_tuples | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | repeated | The relationships matching the list request. | +| next_page_token | [string](#string) | | The token required to get the next page. If this is the last page, the token will be the empty string. | + + + + + + + + + + + + + + +### ReadService +The service to query relationships. + +This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| ListRelationTuples | [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) | [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) | Lists ACL relationships. | + + + + + + +

Top

+ +## ory/keto/relation_tuples/v1alpha2/version.proto + + + + + +### GetVersionRequest +Request for the VersionService.GetVersion RPC. + + + + + + + + +### GetVersionResponse +Response of the VersionService.GetVersion RPC. - -## Table of Contents +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| version | [string](#string) | | The version string of the Ory Keto instance. | -- [ory/keto/opl/v1alpha1/syntax_service.proto](#ory_keto_opl_v1alpha1_syntax_service-proto) - - [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) - - [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) - - [ParseError](#ory-keto-opl-v1alpha1-ParseError) - - [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) - - [SyntaxService](#ory-keto-opl-v1alpha1-SyntaxService) -- [ory/keto/relation_tuples/v1alpha2/relation_tuples.proto](#ory_keto_relation_tuples_v1alpha2_relation_tuples-proto) - - [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) - - [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) - - [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) - - [SubjectQuery](#ory-keto-relation_tuples-v1alpha2-SubjectQuery) - - [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) - - [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) -- [ory/keto/relation_tuples/v1alpha2/check_service.proto](#ory_keto_relation_tuples_v1alpha2_check_service-proto) - - [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) - - [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) + - - [CheckService](#ory-keto-relation_tuples-v1alpha2-CheckService) + -- [ory/keto/relation_tuples/v1alpha2/expand_service.proto](#ory_keto_relation_tuples_v1alpha2_expand_service-proto) + - - [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) - - [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) - - [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) - - [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) + - - [ExpandService](#ory-keto-relation_tuples-v1alpha2-ExpandService) +### VersionService +The service returning the specific Ory Keto instance version. -- [ory/keto/relation_tuples/v1alpha2/namespaces_service.proto](#ory_keto_relation_tuples_v1alpha2_namespaces_service-proto) +This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis) and [write-APIs](../concepts/api-overview.mdx#write-apis). - - [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) - - [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) - - [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| GetVersion | [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) | [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) | Returns the version of the Ory Keto instance. - - [NamespacesService](#ory-keto-relation_tuples-v1alpha2-NamespacesService) +This endpoint returns the service version typically notated using semantic versioning. -- [ory/keto/relation_tuples/v1alpha2/openapi.proto](#ory_keto_relation_tuples_v1alpha2_openapi-proto) - - [ErrorResponse](#ory-keto-relation_tuples-v1alpha2-ErrorResponse) - - [ErrorResponse.Error](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error) - - [ErrorResponse.Error.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error-DetailsEntry) -- [ory/keto/relation_tuples/v1alpha2/read_service.proto](#ory_keto_relation_tuples_v1alpha2_read_service-proto) +If the service supports TLS Edge Termination, this endpoint does not require the X-Forwarded-Proto header to be set. | - - [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) - - [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) - - [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) + - - [ReadService](#ory-keto-relation_tuples-v1alpha2-ReadService) -- [ory/keto/relation_tuples/v1alpha2/version.proto](#ory_keto_relation_tuples_v1alpha2_version-proto) - - [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) - - [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) + +

Top

- - [VersionService](#ory-keto-relation_tuples-v1alpha2-VersionService) +## validate/validate.proto -- [ory/keto/relation_tuples/v1alpha2/write_service.proto](#ory_keto_relation_tuples_v1alpha2_write_service-proto) - - [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) - - [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) - - [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) - - [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) - - [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) - - [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) - - [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) - - [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) - - [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) - - [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) + - - [WriteService](#ory-keto-relation_tuples-v1alpha2-WriteService) +### AnyRules +AnyRules describe constraints applied exclusively to the +`google.protobuf.Any` well-known type -- [Scalar Value Types](#scalar-value-types) - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| required | [bool](#bool) | optional | Required specifies that this field must be set | +| in | [string](#string) | repeated | In specifies that this field's `type_url` must be equal to one of the specified values. | +| not_in | [string](#string) | repeated | NotIn specifies that this field's `type_url` must not be equal to any of the specified values. | -

Top

-## ory/keto/opl/v1alpha1/syntax_service.proto - -### CheckRequest -| Field | Type | Label | Description | -| ------- | --------------- | ----- | ----------- | -| content | [bytes](#bytes) | | | - + -### CheckResponse +### BoolRules +BoolRules describes the constraints applied to `bool` values -| Field | Type | Label | Description | -| ------ | ----------------------------------------------- | -------- | ----------- | -| errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | | - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| const | [bool](#bool) | optional | Const specifies that this field must be exactly the specified value | -### ParseError -| Field | Type | Label | Description | -| ------- | ------------------------------------------------------- | ----- | ----------- | -| message | [string](#string) | | | -| start | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | -| end | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | - -### SourcePosition -| Field | Type | Label | Description | -| ------ | ----------------- | ----- | ----------- | -| line | [uint32](#uint32) | | | -| column | [uint32](#uint32) | | | - + -### SyntaxService +### BytesRules +BytesRules describe the constraints applied to `bytes` values -The service that checks the syntax of an OPL file. -| Method Name | Request Type | Response Type | Description | -| ----------- | --------------------------------------------------- | ----------------------------------------------------- | -------------------------------- | -| Check | [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) | [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) | Performs a syntax check request. | +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| const | [bytes](#bytes) | optional | Const specifies that this field must be exactly the specified value | +| len | [uint64](#uint64) | optional | Len specifies that this field must be the specified number of bytes | +| min_len | [uint64](#uint64) | optional | MinLen specifies that this field must be the specified number of bytes at a minimum | +| max_len | [uint64](#uint64) | optional | MaxLen specifies that this field must be the specified number of bytes at a maximum | +| pattern | [string](#string) | optional | Pattern specifes that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters. | +| prefix | [bytes](#bytes) | optional | Prefix specifies that this field must have the specified bytes at the beginning of the string. | +| suffix | [bytes](#bytes) | optional | Suffix specifies that this field must have the specified bytes at the end of the string. | +| contains | [bytes](#bytes) | optional | Contains specifies that this field must have the specified bytes anywhere in the string. | +| in | [bytes](#bytes) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [bytes](#bytes) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ip | [bool](#bool) | optional | Ip specifies that the field must be a valid IP (v4 or v6) address in byte format | +| ipv4 | [bool](#bool) | optional | Ipv4 specifies that the field must be a valid IPv4 address in byte format | +| ipv6 | [bool](#bool) | optional | Ipv6 specifies that the field must be a valid IPv6 address in byte format | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - -

Top

-## ory/keto/relation_tuples/v1alpha2/relation_tuples.proto - -### RelationQuery -The query for listing relationships. Clients can specify any optional field to -partially filter for specific relationships. + -Example use cases (namespace is always required): +### DoubleRules +DoubleRules describes the constraints applied to `double` values -- object only: display a list of all permissions referring to a specific object -- relation only: get all groups that have members; get all directories that have - content -- object & relation: display all subjects that have a specific permission - relation -- subject & relation: display all groups a subject belongs to; display all - objects a subject has access to -- object & relation & subject: check whether the relation tuple already - exists - -| Field | Type | Label | Description | -| --------- | ----------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| namespace | [string](#string) | optional | The namespace this relation tuple lives in. | -| object | [string](#string) | optional | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | optional | The relation between an Object and a Subject. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | optional | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| const | [double](#double) | optional | Const specifies that this field must be exactly the specified value | +| lt | [double](#double) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [double](#double) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [double](#double) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [double](#double) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [double](#double) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [double](#double) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | -### RelationTuple -RelationTuple defines a relation between an Object and a Subject. -| Field | Type | Label | Description | -| ----------- | ----------------------------------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------- | -| namespace | [string](#string) | | The namespace this relation tuple lives in. | -| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | | The relation between an Object and a Subject. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | -| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | -| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - -### Subject -Subject is either a concrete subject id or a `SubjectSet` expanding to more -Subjects. + -| Field | Type | Label | Description | -| ----- | ----------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | -| id | [string](#string) | | A concrete id of the subject. | -| set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | +### DurationRules +DurationRules describe the constraints applied exclusively to the +`google.protobuf.Duration` well-known type - -### SubjectQuery +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| required | [bool](#bool) | optional | Required specifies that this field must be set | +| const | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Const specifies that this field must be exactly the specified value | +| lt | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Lt specifies that this field must be less than the specified value, inclusive | +| gt | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Gt specifies that this field must be greater than the specified value, exclusive | +| gte | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Gte specifies that this field must be greater than the specified value, inclusive | +| in | [google.protobuf.Duration](#google-protobuf-Duration) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [google.protobuf.Duration](#google-protobuf-Duration) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -SubjectQuery is either a concrete subject id or a `SubjectSet` expanding to more -Subjects. -| Field | Type | Label | Description | -| ----- | --------------------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | -| id | [string](#string) | | A concrete id of the subject. | -| set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - -### SubjectSet -SubjectSet refers to all subjects who have the same `relation` on an `object`. -| Field | Type | Label | Description | -| --------- | ----------------- | ----- | ------------------------------------------------------------------------ | -| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | -| object | [string](#string) | | The object related by this subject set. | -| relation | [string](#string) | | The relation between the object and the subjects. | + - +### EnumRules +EnumRules describe the constraints applied to enum values -### SubjectSetQuery -SubjectSetQuery refers to all subjects who have the same `relation` on an -`object`. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| const | [int32](#int32) | optional | Const specifies that this field must be exactly the specified value | +| defined_only | [bool](#bool) | optional | DefinedOnly specifies that this field must be only one of the defined values for this enum, failing on any undefined value. | +| in | [int32](#int32) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [int32](#int32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| Field | Type | Label | Description | -| --------- | ----------------- | ----- | ------------------------------------------------------------------------ | -| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | -| object | [string](#string) | | The object related by this subject set. | -| relation | [string](#string) | | The relation between the object and the subjects. | - -

Top

-## ory/keto/relation_tuples/v1alpha2/check_service.proto - -### CheckRequest + -The request for a CheckService.Check RPC. Checks whether a specific subject is -related to an object. - -| Field | Type | Label | Description | -| --------- | ----------------- | ----- | ---------------------------------------------------- | -| namespace | [string](#string) | | **Deprecated.** The namespace to evaluate the check. | - -Note: If you use the expand-API and the check evaluates a RelationTuple -specifying a SubjectSet as subject or due to a rewrite rule in a namespace -config this check request may involve other namespaces automatically. | | object -| [string](#string) | | **Deprecated.** The related object in this check. | | -relation | [string](#string) | | **Deprecated.** The relation between the Object -and the Subject. | | subject | -[Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The -related subject in this check. | | subject_id | [string](#string) | | -**Deprecated.** A concrete id of the subject. | | subject_set | -[SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | -**Deprecated.** A subject set that expands to more Subjects. More information -are available under [concepts](../concepts/subjects.mdx). | | tuple | -[RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | | | latest -| [bool](#bool) | | This field is not implemented yet and has no effect. <!-- -Set this field to `true` in case your application needs to authorize depending -on up to date ACLs, also called a "content-change check". - -If set to `true` the `snaptoken` field is ignored, the check is evaluated at the -latest snapshot (globally consistent) and the response includes a snaptoken for -clients to store along with object contents that can be used for subsequent -checks of the same content version. - -Example use case: - You need to authorize a user to modify/delete some resource -and it is unacceptable that if the permission to do that had just been revoked -some seconds ago so that the change had not yet been fully replicated to all -availability zones. --> | | snaptoken | [string](#string) | | This field is -not implemented yet and has no effect. <!-- Optional. Like reads, a check is -always evaluated at a consistent snapshot no earlier than the given snaptoken. - -Leave this field blank if you want to evaluate the check based on eventually -consistent ACLs, benefiting from very low latency, but possibly slightly stale -results. - -If the specified token is too old and no longer known, the server falls back as -if no snaptoken had been specified. - -If not specified the server tries to evaluate the check on the best snapshot -version where it is very likely that ACLs had already been replicated to all -availability zones. --> | | max_depth | [int32](#int32) | | The maximum depth -to search for a relation. - -If the value is less than 1 or greater than the global max-depth then the global -max-depth will be used instead. | +### FieldRules +FieldRules encapsulates the rules for each type of field. Depending on the +field, the correct set should be used to ensure proper validations. - -### CheckResponse +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| message | [MessageRules](#validate-MessageRules) | optional | | +| float | [FloatRules](#validate-FloatRules) | optional | Scalar Field Types | +| double | [DoubleRules](#validate-DoubleRules) | optional | | +| int32 | [Int32Rules](#validate-Int32Rules) | optional | | +| int64 | [Int64Rules](#validate-Int64Rules) | optional | | +| uint32 | [UInt32Rules](#validate-UInt32Rules) | optional | | +| uint64 | [UInt64Rules](#validate-UInt64Rules) | optional | | +| sint32 | [SInt32Rules](#validate-SInt32Rules) | optional | | +| sint64 | [SInt64Rules](#validate-SInt64Rules) | optional | | +| fixed32 | [Fixed32Rules](#validate-Fixed32Rules) | optional | | +| fixed64 | [Fixed64Rules](#validate-Fixed64Rules) | optional | | +| sfixed32 | [SFixed32Rules](#validate-SFixed32Rules) | optional | | +| sfixed64 | [SFixed64Rules](#validate-SFixed64Rules) | optional | | +| bool | [BoolRules](#validate-BoolRules) | optional | | +| string | [StringRules](#validate-StringRules) | optional | | +| bytes | [BytesRules](#validate-BytesRules) | optional | | +| enum | [EnumRules](#validate-EnumRules) | optional | Complex Field Types | +| repeated | [RepeatedRules](#validate-RepeatedRules) | optional | | +| map | [MapRules](#validate-MapRules) | optional | | +| any | [AnyRules](#validate-AnyRules) | optional | Well-Known Field Types | +| duration | [DurationRules](#validate-DurationRules) | optional | | +| timestamp | [TimestampRules](#validate-TimestampRules) | optional | | -The response for a CheckService.Check rpc. -| Field | Type | Label | Description | -| ------- | ------------- | ----- | ---------------------------------------------------------------------- | -| allowed | [bool](#bool) | | Whether the specified subject (id) is related to the requested object. | -It is false by default if no ACL matches. | | snaptoken | [string](#string) | | -This field is not implemented yet and has no effect. <!-- The last known -snapshot token ONLY specified if the request had not specified a snaptoken, -since this performed a "content-change request" and consistently fetched -the last known snapshot token. -This field is not set if the request had specified a snaptoken! -If set, clients should cache and use this token for subsequent requests to have -minimal latency, but allow slightly stale responses (only some milliseconds or -seconds). --> | - + -### CheckService +### Fixed32Rules +Fixed32Rules describes the constraints applied to `fixed32` values -The service that performs authorization checks based on the stored Access -Control Lists. -This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| const | [fixed32](#fixed32) | optional | Const specifies that this field must be exactly the specified value | +| lt | [fixed32](#fixed32) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [fixed32](#fixed32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [fixed32](#fixed32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [fixed32](#fixed32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [fixed32](#fixed32) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [fixed32](#fixed32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | -| Method Name | Request Type | Response Type | Description | -| ----------- | --------------------------------------------------------------- | ----------------------------------------------------------------- | -------------------------------- | -| Check | [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) | [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) | Performs an authorization check. | - -

Top

-## ory/keto/relation_tuples/v1alpha2/expand_service.proto - -### ExpandRequest + -The request for an ExpandService.Expand RPC. Expands the given subject set. +### Fixed64Rules +Fixed64Rules describes the constraints applied to `fixed64` values -| Field | Type | Label | Description | -| --------- | ----------------------------------------------------- | ----- | ----------------------------------- | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject to expand. | -| max_depth | [int32](#int32) | | The maximum depth of tree to build. | -If the value is less than 1 or greater than the global max-depth then the global -max-depth will be used instead. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| const | [fixed64](#fixed64) | optional | Const specifies that this field must be exactly the specified value | +| lt | [fixed64](#fixed64) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [fixed64](#fixed64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [fixed64](#fixed64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [fixed64](#fixed64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [fixed64](#fixed64) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [fixed64](#fixed64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | -It is important to set this parameter to a meaningful value. Ponder how deep you -really want to display this. | | snaptoken | [string](#string) | | This field is -not implemented yet and has no effect. <!-- Optional. Like reads, a expand is -always evaluated at a consistent snapshot no earlier than the given snaptoken. -Leave this field blank if you want to expand based on eventually consistent -ACLs, benefiting from very low latency, but possibly slightly stale results. -If the specified token is too old and no longer known, the server falls back as -if no snaptoken had been specified. -If not specified the server tries to build the tree on the best snapshot version -where it is very likely that ACLs had already been replicated to all -availability zones. --> | | namespace | [string](#string) | | **Deprecated.** -The namespace of the object and relation referenced in this subject set. | | -object | [string](#string) | | **Deprecated.** The object related by this -subject set. | | relation | [string](#string) | | **Deprecated.** The relation -between the object and the subjects. | - -### ExpandResponse + -The response for a ExpandService.Expand RPC. +### FloatRules +FloatRules describes the constraints applied to `float` values -| Field | Type | Label | Description | -| ----- | ------------------------------------------------------------- | ----- | ---------------------------------------------------------------------------------------------------- | -| tree | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | | The tree the requested subject set expands to. The requested subject set is the subject of the root. | -This field can be nil in some circumstances. | +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| const | [float](#float) | optional | Const specifies that this field must be exactly the specified value | +| lt | [float](#float) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [float](#float) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [float](#float) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [float](#float) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [float](#float) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [float](#float) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - -### SubjectTree -| Field | Type | Label | Description | -| --------- | ----------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------- | -| node_type | [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) | | The type of the node. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The subject this node represents. Deprecated: More information is now available in the tuple field. | -| tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The relation tuple this node represents. | -| children | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | repeated | The children of this node. | -This is never set if `node_type` == `NODE_TYPE_LEAF`. | - -### NodeType + -| Name | Number | Description | -| ------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------- | -| unspecified | 0 | | -| NODE_TYPE_UNSPECIFIED | 0 | | -| union | 1 | This node expands to a union of all children. | -| NODE_TYPE_UNION | 1 | | -| exclusion | 2 | Not implemented yet. | -| NODE_TYPE_EXCLUSION | 2 | | -| intersection | 3 | Not implemented yet. | -| NODE_TYPE_INTERSECTION | 3 | | -| leaf | 4 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| NODE_TYPE_LEAF | 4 | | -| tuple_to_subject_set | 5 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| NODE_TYPE_TUPLE_TO_SUBJECT_SET | 5 | | -| computed_subject_set | 6 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| NODE_TYPE_COMPUTED_SUBJECT_SET | 6 | | -| not | 7 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| NODE_TYPE_NOT | 7 | | +### Int32Rules +Int32Rules describes the constraints applied to `int32` values - -### ExpandService +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| const | [int32](#int32) | optional | Const specifies that this field must be exactly the specified value | +| lt | [int32](#int32) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [int32](#int32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [int32](#int32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [int32](#int32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [int32](#int32) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [int32](#int32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | -The service that performs subject set expansion based on the stored Access -Control Lists. -This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). -| Method Name | Request Type | Response Type | Description | -| ----------- | ----------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------ | -| Expand | [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) | [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) | Expands the subject set into a tree of subjects. | - -

Top

-## ory/keto/relation_tuples/v1alpha2/namespaces_service.proto + - +### Int64Rules +Int64Rules describes the constraints applied to `int64` values -### ListNamespacesRequest -Request for ReadService.ListNamespaces RPC. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| const | [int64](#int64) | optional | Const specifies that this field must be exactly the specified value | +| lt | [int64](#int64) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [int64](#int64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [int64](#int64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [int64](#int64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [int64](#int64) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [int64](#int64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - -### ListNamespacesResponse -| Field | Type | Label | Description | -| ---------- | --------------------------------------------------------- | -------- | ----------- | -| namespaces | [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) | repeated | | - -### Namespace -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ----------- | -| name | [string](#string) | | | + - +### MapRules +MapRules describe the constraints applied to `map` values -### NamespacesService -The service to query namespaces. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| min_pairs | [uint64](#uint64) | optional | MinPairs specifies that this field must have the specified number of KVs at a minimum | +| max_pairs | [uint64](#uint64) | optional | MaxPairs specifies that this field must have the specified number of KVs at a maximum | +| no_sparse | [bool](#bool) | optional | NoSparse specifies values in this field cannot be unset. This only applies to map's with message value types. | +| keys | [FieldRules](#validate-FieldRules) | optional | Keys specifies the constraints to be applied to each key in the field. | +| values | [FieldRules](#validate-FieldRules) | optional | Values specifies the constraints to be applied to the value of each key in the field. Message values will still have their validations evaluated unless skip is specified here. | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | -This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). -| Method Name | Request Type | Response Type | Description | -| -------------- | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---------------- | -| ListNamespaces | [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) | [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) | Lists Namespaces | -Get all namespaces. | - -

Top

-## ory/keto/relation_tuples/v1alpha2/openapi.proto + - +### MessageRules +MessageRules describe the constraints applied to embedded message values. +For message-type fields, validation is performed recursively. -### ErrorResponse -JSON API Error Response +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| skip | [bool](#bool) | optional | Skip specifies that the validation rules of this field should not be evaluated | +| required | [bool](#bool) | optional | Required specifies that this field must be set | -The standard Ory JSON API error format. -| Field | Type | Label | Description | -| ----- | ----------------------------------------------------------------------------- | ----- | ----------- | -| error | [ErrorResponse.Error](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error) | | | - -### ErrorResponse.Error -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ----------------- | -| code | [int64](#int64) | | The status code | -| debug | [string](#string) | | Debug information | -Debug information is often not exposed to protect against leaking sensitive -information. | | details | -[ErrorResponse.Error.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error-DetailsEntry) -| repeated | Further error details + -Further details about the error. | | id | [string](#string) | | The error ID +### RepeatedRules +RepeatedRules describe the constraints applied to `repeated` values -The error ID is useful when trying to identify various errors in application -logic. | | message | [string](#string) | | The error message -The error's message (required). | | reason | [string](#string) | | The error -reason +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| min_items | [uint64](#uint64) | optional | MinItems specifies that this field must have the specified number of items at a minimum | +| max_items | [uint64](#uint64) | optional | MaxItems specifies that this field must have the specified number of items at a maximum | +| unique | [bool](#bool) | optional | Unique specifies that all elements in this field must be unique. This contraint is only applicable to scalar and enum types (messages are not supported). | +| items | [FieldRules](#validate-FieldRules) | optional | Items specifies the contraints to be applied to each item in the field. Repeated message fields will still execute validation against each item unless skip is specified here. | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | -Reason holds a human-readable reason for the error. | | request | -[string](#string) | | The request ID -The request ID is often exposed internally in order to trace errors across -service architectures. This is often a UUID. | | status | [string](#string) | | -The status description -Status holds the human-readable HTTP status code. | - -### ErrorResponse.Error.DetailsEntry -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | + - +### SFixed32Rules +SFixed32Rules describes the constraints applied to `sfixed32` values -

Top

-## ory/keto/relation_tuples/v1alpha2/read_service.proto +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| const | [sfixed32](#sfixed32) | optional | Const specifies that this field must be exactly the specified value | +| lt | [sfixed32](#sfixed32) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [sfixed32](#sfixed32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [sfixed32](#sfixed32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [sfixed32](#sfixed32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [sfixed32](#sfixed32) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [sfixed32](#sfixed32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - -### ListRelationTuplesRequest -Request for ReadService.ListRelationTuples RPC. See -`ListRelationTuplesRequest_Query` for how to filter the query. - -| Field | Type | Label | Description | -| ----- | ----------------------------------------------------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------- | -| query | [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) | | **Deprecated.** All query constraints are concatenated with a logical AND operator. | - -The RelationTuple list from ListRelationTuplesResponse is ordered from the -newest RelationTuple to the oldest. | | relation_query | -[RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | | -expand_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | This -field is not implemented yet and has no effect. <!-- Optional. The list of -fields to be expanded in the RelationTuple list returned in -`ListRelationTuplesResponse`. Leaving this field unspecified means all fields -are expanded. - -Available fields: "object", "relation", "subject", -"namespace", "subject.id", "subject.namespace", -"subject.object", "subject.relation" --> | | snaptoken | -[string](#string) | | This field is not implemented yet and has no effect. -<!-- Optional. The snapshot token for this read. --> | | page_size | -[int32](#int32) | | Optional. The maximum number of RelationTuples to return in -the response. - -Default: 100 | | page_token | [string](#string) | | Optional. An opaque -pagination token returned from a previous call to `ListRelationTuples` that -indicates where the page should start at. - -An empty token denotes the first page. All successive pages require the token -from the previous page. | | namespace | [string](#string) | | **Deprecated.** -The namespace | | object | [string](#string) | | **Deprecated.** The related -object in this check. | | relation | [string](#string) | | **Deprecated.** The -relation between the Object and the Subject. | | subject_id | [string](#string) -| | A concrete id of the subject. | | subject_set | -[SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A -subject set that expands to more Subjects. More information are available under -[concepts](../concepts/subjects.mdx). | - -### ListRelationTuplesRequest.Query -The query for listing relationships. Clients can specify any optional field to -partially filter for specific relationships. + -Example use cases (namespace is always required): +### SFixed64Rules +SFixed64Rules describes the constraints applied to `sfixed64` values -- object only: display a list of all permissions referring to a specific object -- relation only: get all groups that have members; get all directories that have - content -- object & relation: display all subjects that have a specific permission - relation -- subject & relation: display all groups a subject belongs to; display all - objects a subject has access to -- object & relation & subject: check whether the relation tuple already - exists - -| Field | Type | Label | Description | -| --------- | ----------------------------------------------------- | ----- | ------------------------------------ | -| namespace | [string](#string) | | Required. The namespace to query. | -| object | [string](#string) | | Optional. The object to query for. | -| relation | [string](#string) | | Optional. The relation to query for. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| const | [sfixed64](#sfixed64) | optional | Const specifies that this field must be exactly the specified value | +| lt | [sfixed64](#sfixed64) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [sfixed64](#sfixed64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [sfixed64](#sfixed64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [sfixed64](#sfixed64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [sfixed64](#sfixed64) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [sfixed64](#sfixed64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | -### ListRelationTuplesResponse -The response of a ReadService.ListRelationTuples RPC. -| Field | Type | Label | Description | -| --------------- | ----------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------ | -| relation_tuples | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | repeated | The relationships matching the list request. | -| next_page_token | [string](#string) | | The token required to get the next page. If this is the last page, the token will be the empty string. | - -### ReadService -The service to query relationships. + -This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). +### SInt32Rules +SInt32Rules describes the constraints applied to `sint32` values -| Method Name | Request Type | Response Type | Description | -| ------------------ | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------ | -| ListRelationTuples | [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) | [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) | Lists ACL relationships. | - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| const | [sint32](#sint32) | optional | Const specifies that this field must be exactly the specified value | +| lt | [sint32](#sint32) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [sint32](#sint32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [sint32](#sint32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [sint32](#sint32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [sint32](#sint32) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [sint32](#sint32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | -

Top

-## ory/keto/relation_tuples/v1alpha2/version.proto - -### GetVersionRequest -Request for the VersionService.GetVersion RPC. - + -### GetVersionResponse +### SInt64Rules +SInt64Rules describes the constraints applied to `sint64` values -Response of the VersionService.GetVersion RPC. -| Field | Type | Label | Description | -| ------- | ----------------- | ----- | -------------------------------------------- | -| version | [string](#string) | | The version string of the Ory Keto instance. | +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| const | [sint64](#sint64) | optional | Const specifies that this field must be exactly the specified value | +| lt | [sint64](#sint64) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [sint64](#sint64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [sint64](#sint64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [sint64](#sint64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [sint64](#sint64) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [sint64](#sint64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - -### VersionService -The service returning the specific Ory Keto instance version. -This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis) -and [write-APIs](../concepts/api-overview.mdx#write-apis). -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------- | -| GetVersion | [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) | [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) | Returns the version of the Ory Keto instance. | -This endpoint returns the service version typically notated using semantic -versioning. + -If the service supports TLS Edge Termination, this endpoint does not require the -X-Forwarded-Proto header to be set. | +### StringRules +StringRules describe the constraints applied to `string` values - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| const | [string](#string) | optional | Const specifies that this field must be exactly the specified value | +| len | [uint64](#uint64) | optional | Len specifies that this field must be the specified number of characters (Unicode code points). Note that the number of characters may differ from the number of bytes in the string. | +| min_len | [uint64](#uint64) | optional | MinLen specifies that this field must be the specified number of characters (Unicode code points) at a minimum. Note that the number of characters may differ from the number of bytes in the string. | +| max_len | [uint64](#uint64) | optional | MaxLen specifies that this field must be the specified number of characters (Unicode code points) at a maximum. Note that the number of characters may differ from the number of bytes in the string. | +| len_bytes | [uint64](#uint64) | optional | LenBytes specifies that this field must be the specified number of bytes | +| min_bytes | [uint64](#uint64) | optional | MinBytes specifies that this field must be the specified number of bytes at a minimum | +| max_bytes | [uint64](#uint64) | optional | MaxBytes specifies that this field must be the specified number of bytes at a maximum | +| pattern | [string](#string) | optional | Pattern specifes that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters. | +| prefix | [string](#string) | optional | Prefix specifies that this field must have the specified substring at the beginning of the string. | +| suffix | [string](#string) | optional | Suffix specifies that this field must have the specified substring at the end of the string. | +| contains | [string](#string) | optional | Contains specifies that this field must have the specified substring anywhere in the string. | +| not_contains | [string](#string) | optional | NotContains specifies that this field cannot have the specified substring anywhere in the string. | +| in | [string](#string) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [string](#string) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| email | [bool](#bool) | optional | Email specifies that the field must be a valid email address as defined by RFC 5322 | +| hostname | [bool](#bool) | optional | Hostname specifies that the field must be a valid hostname as defined by RFC 1034. This constraint does not support internationalized domain names (IDNs). | +| ip | [bool](#bool) | optional | Ip specifies that the field must be a valid IP (v4 or v6) address. Valid IPv6 addresses should not include surrounding square brackets. | +| ipv4 | [bool](#bool) | optional | Ipv4 specifies that the field must be a valid IPv4 address. | +| ipv6 | [bool](#bool) | optional | Ipv6 specifies that the field must be a valid IPv6 address. Valid IPv6 addresses should not include surrounding square brackets. | +| uri | [bool](#bool) | optional | Uri specifies that the field must be a valid, absolute URI as defined by RFC 3986 | +| uri_ref | [bool](#bool) | optional | UriRef specifies that the field must be a valid URI as defined by RFC 3986 and may be relative or absolute. | +| address | [bool](#bool) | optional | Address specifies that the field must be either a valid hostname as defined by RFC 1034 (which does not support internationalized domain names or IDNs), or it can be a valid IP (v4 or v6). | +| uuid | [bool](#bool) | optional | Uuid specifies that the field must be a valid UUID as defined by RFC 4122 | +| well_known_regex | [KnownRegex](#validate-KnownRegex) | optional | WellKnownRegex specifies a common well known pattern defined as a regex. | +| strict | [bool](#bool) | optional | This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable strict header validation. By default, this is true, and HTTP header validations are RFC-compliant. Setting to false will enable a looser validations that only disallows \r\n\0 characters, which can be used to bypass header matching rules. Default: true | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | + + + + + + + + +### TimestampRules +TimestampRules describe the constraints applied exclusively to the +`google.protobuf.Timestamp` well-known type + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| required | [bool](#bool) | optional | Required specifies that this field must be set | +| const | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Const specifies that this field must be exactly the specified value | +| lt | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Lte specifies that this field must be less than the specified value, inclusive | +| gt | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Gt specifies that this field must be greater than the specified value, exclusive | +| gte | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Gte specifies that this field must be greater than the specified value, inclusive | +| lt_now | [bool](#bool) | optional | LtNow specifies that this must be less than the current time. LtNow can only be used with the Within rule. | +| gt_now | [bool](#bool) | optional | GtNow specifies that this must be greater than the current time. GtNow can only be used with the Within rule. | +| within | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Within specifies that this field must be within this duration of the current time. This constraint can be used alone or with the LtNow and GtNow rules. | + + + + + + + + +### UInt32Rules +UInt32Rules describes the constraints applied to `uint32` values + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| const | [uint32](#uint32) | optional | Const specifies that this field must be exactly the specified value | +| lt | [uint32](#uint32) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [uint32](#uint32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [uint32](#uint32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [uint32](#uint32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [uint32](#uint32) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [uint32](#uint32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | + + + + + + + + +### UInt64Rules +UInt64Rules describes the constraints applied to `uint64` values + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| const | [uint64](#uint64) | optional | Const specifies that this field must be exactly the specified value | +| lt | [uint64](#uint64) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [uint64](#uint64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [uint64](#uint64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [uint64](#uint64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [uint64](#uint64) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [uint64](#uint64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | + + + + + + + + + + +### KnownRegex +WellKnownRegex contain some well-known patterns. + +| Name | Number | Description | +| ---- | ------ | ----------- | +| UNKNOWN | 0 | | +| HTTP_HEADER_NAME | 1 | HTTP header name as defined by RFC 7230. | +| HTTP_HEADER_VALUE | 2 | HTTP header value as defined by RFC 7230. | + + + + + + + +### File-level Extensions +| Extension | Type | Base | Number | Description | +| --------- | ---- | ---- | ------ | ----------- | +| rules | FieldRules | .google.protobuf.FieldOptions | 1071 | Rules specify the validations to be performed on this field. By default, no validation is performed against a field. | +| disabled | bool | .google.protobuf.MessageOptions | 1071 | Disabled nullifies any validation rules for this message, including any message fields associated with it that do support validation. | +| ignored | bool | .google.protobuf.MessageOptions | 1072 | Ignore skips generation of validation methods for this message. | +| required | bool | .google.protobuf.OneofOptions | 1071 | Required ensures that exactly one the field options in a oneof is set; validation fails if no fields in the oneof are set. | + + + + + + + +

Top

## ory/keto/relation_tuples/v1alpha2/write_service.proto + + ### CreateRelationTupleRequest - The request to create a new relationship. -| Field | Type | Label | Description | -| -------------- | --------------------------------------------------------------------------------------------------------------------- | ----- | --------------------------- | -| relation_tuple | [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) | | The relationship to create. | + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| relation_tuple | [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) | | The relationship to create. | + + + + + ### CreateRelationTupleRequest.Relationship -| Field | Type | Label | Description | -| ----------- | ----------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | -| namespace | [string](#string) | | The namespace this relation tuple lives in. | -| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | | The relation between an Object and a Subject. | -| subject_id | [string](#string) | | A concrete id of the subject. | -| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | The namespace this relation tuple lives in. | +| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | The relation between an Object and a Subject. | +| subject_id | [string](#string) | | A concrete id of the subject. | +| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + + + ### CreateRelationTupleResponse - The response from creating a new relationship. -| Field | Type | Label | Description | -| -------------- | ----------------------------------------------------------------- | ----- | ------------------------- | -| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The created relationship. | + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The created relationship. | + + + + + ### DeleteRelationTuplesRequest -| Field | Type | Label | Description | -| -------------- | --------------------------------------------------------------------------------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------- | -| query | [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) | | **Deprecated.** | -| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | -| namespace | [string](#string) | | **Deprecated.** The namespace this relation tuple lives in. | -| object | [string](#string) | | **Deprecated.** The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | | **Deprecated.** The relation between an Object and a Subject. | -| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | -| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| query | [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) | | **Deprecated.** | +| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | +| namespace | [string](#string) | | **Deprecated.** The namespace this relation tuple lives in. | +| object | [string](#string) | | **Deprecated.** The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | **Deprecated.** The relation between an Object and a Subject. | +| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | +| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + + + ### DeleteRelationTuplesRequest.Query - The query for deleting relationships -| Field | Type | Label | Description | -| --------- | ----------------------------------------------------- | ----- | ------------------------------------ | -| namespace | [string](#string) | | Optional. The namespace to query. | -| object | [string](#string) | | Optional. The object to query for. | -| relation | [string](#string) | | Optional. The relation to query for. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| namespace | [string](#string) | | Optional. The namespace to query. | +| object | [string](#string) | | Optional. The object to query for. | +| relation | [string](#string) | | Optional. The relation to query for. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | + + + + + ### DeleteRelationTuplesResponse + + + + + + ### RelationTupleDelta - Write-delta for a TransactRelationTuplesRequest. -| Field | Type | Label | Description | -| -------------- | ----------------------------------------------------------------------------------------- | ----- | -------------------------------------- | -| action | [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) | | The action to do on the RelationTuple. | -| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The target RelationTuple. | + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| action | [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) | | The action to do on the RelationTuple. | +| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The target RelationTuple. | + + + + + ### TransactRelationTuplesRequest - The request of a WriteService.TransactRelationTuples RPC. -| Field | Type | Label | Description | -| --------------------- | --------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- | + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | | relation_tuple_deltas | [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) | repeated | The write delta for the relationships operated in one single transaction. Either all actions succeed or no change takes effect on error. | + + + + + ### TransactRelationTuplesResponse - The response of a WriteService.TransactRelationTuples rpc. -| Field | Type | Label | Description | -| ---------- | ----------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| snaptokens | [string](#string) | repeated | This field is not implemented yet and has no effect. <!-- The list of the new latest snapshot tokens of the affected RelationTuple, with the same index as specified in the `relation_tuple_deltas` field of the TransactRelationTuplesRequest request. | -If the RelationTupleDelta_Action was DELETE the snaptoken is empty at the same -index. --> | +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| snaptokens | [string](#string) | repeated | This field is not implemented yet and has no effect. <!-- The list of the new latest snapshot tokens of the affected RelationTuple, with the same index as specified in the `relation_tuple_deltas` field of the TransactRelationTuplesRequest request. + +If the RelationTupleDelta_Action was DELETE the snaptoken is empty at the same index. --> | + + + + + + + ### RelationTupleDelta.Action -| Name | Number | Description | -| ------------------ | ------ | ----------------------------------------------------------------------------------------------------------- | -| ACTION_UNSPECIFIED | 0 | Unspecified. The `TransactRelationTuples` RPC ignores this RelationTupleDelta if an action was unspecified. | -| ACTION_INSERT | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | -| insert | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | -| ACTION_DELETE | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | -| delete | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | + +| Name | Number | Description | +| ---- | ------ | ----------- | +| ACTION_UNSPECIFIED | 0 | Unspecified. The `TransactRelationTuples` RPC ignores this RelationTupleDelta if an action was unspecified. | +| ACTION_INSERT | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | +| insert | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | +| ACTION_DELETE | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | +| delete | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | + + + + + + ### WriteService - The write service to create and delete Access Control Lists. -This service is part of the -[write-APIs](../concepts/api-overview.mdx#write-apis). +This service is part of the [write-APIs](../concepts/api-overview.mdx#write-apis). -| Method Name | Request Type | Response Type | Description | -| ---------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| | TransactRelationTuples | [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) | [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) | Writes one or more relationships in a single transaction. | -| CreateRelationTuple | [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) | [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) | Creates a relationship | -| DeleteRelationTuples | [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) | [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) | Deletes relationships based on relation query | +| CreateRelationTuple | [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) | [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) | Creates a relationship | +| DeleteRelationTuples | [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) | [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) | Deletes relationships based on relation query | + + + + ## Scalar Value Types -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------- | ----------- | ------- | ---------- | -------------- | ------------------------------ | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | +| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | +| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | +| double | | double | double | float | float64 | double | float | Float | +| float | | float | float | float | float32 | float | float | Float | +| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | +| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | +| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | +| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | +| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | +| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | +| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | + diff --git a/proto/google/api/annotations.pb.go b/proto/google/api/annotations.pb.go new file mode 100644 index 000000000..926bc237e --- /dev/null +++ b/proto/google/api/annotations.pb.go @@ -0,0 +1,118 @@ +// Copyright 2015 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: google/api/annotations.proto + +package annotations + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var file_google_api_annotations_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*HttpRule)(nil), + Field: 72295728, + Name: "google.api.http", + Tag: "bytes,72295728,opt,name=http", + Filename: "google/api/annotations.proto", + }, +} + +// Extension fields to descriptorpb.MethodOptions. +var ( + // See `HttpRule`. + // + // optional google.api.HttpRule http = 72295728; + E_Http = &file_google_api_annotations_proto_extTypes[0] +) + +var File_google_api_annotations_proto protoreflect.FileDescriptor + +var file_google_api_annotations_proto_rawDesc = []byte{ + 0x0a, 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, 0x12, 0x0a, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x3a, 0x4b, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb0, 0xca, 0xbc, 0x22, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, + 0x42, 0x6e, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x42, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_google_api_annotations_proto_goTypes = []interface{}{ + (*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions + (*HttpRule)(nil), // 1: google.api.HttpRule +} +var file_google_api_annotations_proto_depIdxs = []int32{ + 0, // 0: google.api.http:extendee -> google.protobuf.MethodOptions + 1, // 1: google.api.http:type_name -> google.api.HttpRule + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 1, // [1:2] is the sub-list for extension type_name + 0, // [0:1] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_api_annotations_proto_init() } +func file_google_api_annotations_proto_init() { + if File_google_api_annotations_proto != nil { + return + } + file_google_api_http_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_api_annotations_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 1, + NumServices: 0, + }, + GoTypes: file_google_api_annotations_proto_goTypes, + DependencyIndexes: file_google_api_annotations_proto_depIdxs, + ExtensionInfos: file_google_api_annotations_proto_extTypes, + }.Build() + File_google_api_annotations_proto = out.File + file_google_api_annotations_proto_rawDesc = nil + file_google_api_annotations_proto_goTypes = nil + file_google_api_annotations_proto_depIdxs = nil +} diff --git a/proto/google/api/annotations.pb.validate.go b/proto/google/api/annotations.pb.validate.go new file mode 100644 index 000000000..20d090e16 --- /dev/null +++ b/proto/google/api/annotations.pb.validate.go @@ -0,0 +1,36 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: google/api/annotations.proto + +package annotations + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) diff --git a/proto/google/api/annotations_grpc_pb.js b/proto/google/api/annotations_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/google/api/annotations_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/google/api/annotations_pb.d.ts b/proto/google/api/annotations_pb.d.ts new file mode 100644 index 000000000..06072f3bd --- /dev/null +++ b/proto/google/api/annotations_pb.d.ts @@ -0,0 +1,11 @@ +// package: google.api +// file: google/api/annotations.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_api_http_pb from "../../google/api/http_pb"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; + +export const http: jspb.ExtensionFieldInfo; diff --git a/proto/google/api/annotations_pb.js b/proto/google/api/annotations_pb.js new file mode 100644 index 000000000..53c05ed02 --- /dev/null +++ b/proto/google/api/annotations_pb.js @@ -0,0 +1,54 @@ +// source: google/api/annotations.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +var google_api_http_pb = require('../../google/api/http_pb.js'); +goog.object.extend(proto, google_api_http_pb); +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.google.api.http', null, global); + +/** + * A tuple of {field number, class constructor} for the extension + * field named `http`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.http = new jspb.ExtensionFieldInfo( + 72295728, + {http: 0}, + google_api_http_pb.HttpRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + google_api_http_pb.HttpRule.toObject), + 0); + +google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[72295728] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.http, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + google_api_http_pb.HttpRule.serializeBinaryToWriter, + google_api_http_pb.HttpRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MethodOptions.extensions[72295728] = proto.google.api.http; + +goog.object.extend(exports, proto.google.api); diff --git a/proto/google/api/field_behavior.pb.go b/proto/google/api/field_behavior.pb.go new file mode 100644 index 000000000..4ad8ac937 --- /dev/null +++ b/proto/google/api/field_behavior.pb.go @@ -0,0 +1,249 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: google/api/field_behavior.proto + +package annotations + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// An indicator of the behavior of a given field (for example, that a field +// is required in requests, or given as output but ignored as input). +// This **does not** change the behavior in protocol buffers itself; it only +// denotes the behavior and may affect how API tooling handles the field. +// +// Note: This enum **may** receive new values in the future. +type FieldBehavior int32 + +const ( + // Conventional default for enums. Do not use this. + FieldBehavior_FIELD_BEHAVIOR_UNSPECIFIED FieldBehavior = 0 + // Specifically denotes a field as optional. + // While all fields in protocol buffers are optional, this may be specified + // for emphasis if appropriate. + FieldBehavior_OPTIONAL FieldBehavior = 1 + // Denotes a field as required. + // This indicates that the field **must** be provided as part of the request, + // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + FieldBehavior_REQUIRED FieldBehavior = 2 + // Denotes a field as output only. + // This indicates that the field is provided in responses, but including the + // field in a request does nothing (the server *must* ignore it and + // *must not* throw an error as a result of the field's presence). + FieldBehavior_OUTPUT_ONLY FieldBehavior = 3 + // Denotes a field as input only. + // This indicates that the field is provided in requests, and the + // corresponding field is not included in output. + FieldBehavior_INPUT_ONLY FieldBehavior = 4 + // Denotes a field as immutable. + // This indicates that the field may be set once in a request to create a + // resource, but may not be changed thereafter. + FieldBehavior_IMMUTABLE FieldBehavior = 5 + // Denotes that a (repeated) field is an unordered list. + // This indicates that the service may provide the elements of the list + // in any arbitrary order, rather than the order the user originally + // provided. Additionally, the list's order may or may not be stable. + FieldBehavior_UNORDERED_LIST FieldBehavior = 6 + // Denotes that this field returns a non-empty default value if not set. + // This indicates that if the user provides the empty value in a request, + // a non-empty value will be returned. The user will not be aware of what + // non-empty value to expect. + FieldBehavior_NON_EMPTY_DEFAULT FieldBehavior = 7 +) + +// Enum value maps for FieldBehavior. +var ( + FieldBehavior_name = map[int32]string{ + 0: "FIELD_BEHAVIOR_UNSPECIFIED", + 1: "OPTIONAL", + 2: "REQUIRED", + 3: "OUTPUT_ONLY", + 4: "INPUT_ONLY", + 5: "IMMUTABLE", + 6: "UNORDERED_LIST", + 7: "NON_EMPTY_DEFAULT", + } + FieldBehavior_value = map[string]int32{ + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + } +) + +func (x FieldBehavior) Enum() *FieldBehavior { + p := new(FieldBehavior) + *p = x + return p +} + +func (x FieldBehavior) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FieldBehavior) Descriptor() protoreflect.EnumDescriptor { + return file_google_api_field_behavior_proto_enumTypes[0].Descriptor() +} + +func (FieldBehavior) Type() protoreflect.EnumType { + return &file_google_api_field_behavior_proto_enumTypes[0] +} + +func (x FieldBehavior) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FieldBehavior.Descriptor instead. +func (FieldBehavior) EnumDescriptor() ([]byte, []int) { + return file_google_api_field_behavior_proto_rawDescGZIP(), []int{0} +} + +var file_google_api_field_behavior_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: ([]FieldBehavior)(nil), + Field: 1052, + Name: "google.api.field_behavior", + Tag: "varint,1052,rep,name=field_behavior,enum=google.api.FieldBehavior", + Filename: "google/api/field_behavior.proto", + }, +} + +// Extension fields to descriptorpb.FieldOptions. +var ( + // A designation of a specific field behavior (required, output only, etc.) + // in protobuf messages. + // + // Examples: + // + // string name = 1 [(google.api.field_behavior) = REQUIRED]; + // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // google.protobuf.Duration ttl = 1 + // [(google.api.field_behavior) = INPUT_ONLY]; + // google.protobuf.Timestamp expire_time = 1 + // [(google.api.field_behavior) = OUTPUT_ONLY, + // (google.api.field_behavior) = IMMUTABLE]; + // + // repeated google.api.FieldBehavior field_behavior = 1052; + E_FieldBehavior = &file_google_api_field_behavior_proto_extTypes[0] +) + +var File_google_api_field_behavior_proto protoreflect.FileDescriptor + +var file_google_api_field_behavior_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, + 0xa6, 0x01, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x42, 0x45, 0x48, 0x41, 0x56, + 0x49, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, + 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0f, 0x0a, + 0x0b, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x03, 0x12, 0x0e, + 0x0a, 0x0a, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x04, 0x12, 0x0d, + 0x0a, 0x09, 0x49, 0x4d, 0x4d, 0x55, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x05, 0x12, 0x12, 0x0a, + 0x0e, 0x55, 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, + 0x06, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x4f, 0x4e, 0x5f, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x5f, 0x44, + 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x07, 0x3a, 0x60, 0x0a, 0x0e, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9c, 0x08, 0x20, 0x03, 0x28, 0x0e, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x52, 0x0d, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x70, 0x0a, 0x0e, 0x63, 0x6f, + 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x12, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, + 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_api_field_behavior_proto_rawDescOnce sync.Once + file_google_api_field_behavior_proto_rawDescData = file_google_api_field_behavior_proto_rawDesc +) + +func file_google_api_field_behavior_proto_rawDescGZIP() []byte { + file_google_api_field_behavior_proto_rawDescOnce.Do(func() { + file_google_api_field_behavior_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_field_behavior_proto_rawDescData) + }) + return file_google_api_field_behavior_proto_rawDescData +} + +var file_google_api_field_behavior_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_api_field_behavior_proto_goTypes = []interface{}{ + (FieldBehavior)(0), // 0: google.api.FieldBehavior + (*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions +} +var file_google_api_field_behavior_proto_depIdxs = []int32{ + 1, // 0: google.api.field_behavior:extendee -> google.protobuf.FieldOptions + 0, // 1: google.api.field_behavior:type_name -> google.api.FieldBehavior + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 1, // [1:2] is the sub-list for extension type_name + 0, // [0:1] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_api_field_behavior_proto_init() } +func file_google_api_field_behavior_proto_init() { + if File_google_api_field_behavior_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_api_field_behavior_proto_rawDesc, + NumEnums: 1, + NumMessages: 0, + NumExtensions: 1, + NumServices: 0, + }, + GoTypes: file_google_api_field_behavior_proto_goTypes, + DependencyIndexes: file_google_api_field_behavior_proto_depIdxs, + EnumInfos: file_google_api_field_behavior_proto_enumTypes, + ExtensionInfos: file_google_api_field_behavior_proto_extTypes, + }.Build() + File_google_api_field_behavior_proto = out.File + file_google_api_field_behavior_proto_rawDesc = nil + file_google_api_field_behavior_proto_goTypes = nil + file_google_api_field_behavior_proto_depIdxs = nil +} diff --git a/proto/google/api/field_behavior.pb.validate.go b/proto/google/api/field_behavior.pb.validate.go new file mode 100644 index 000000000..e4e9bc921 --- /dev/null +++ b/proto/google/api/field_behavior.pb.validate.go @@ -0,0 +1,36 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: google/api/field_behavior.proto + +package annotations + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) diff --git a/proto/google/api/field_behavior_grpc_pb.js b/proto/google/api/field_behavior_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/google/api/field_behavior_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/google/api/field_behavior_pb.d.ts b/proto/google/api/field_behavior_pb.d.ts new file mode 100644 index 000000000..9b853705f --- /dev/null +++ b/proto/google/api/field_behavior_pb.d.ts @@ -0,0 +1,21 @@ +// package: google.api +// file: google/api/field_behavior.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; + +export const fieldBehavior: jspb.ExtensionFieldInfo; + +export enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, +} diff --git a/proto/google/api/field_behavior_pb.js b/proto/google/api/field_behavior_pb.js new file mode 100644 index 000000000..95578d7a1 --- /dev/null +++ b/proto/google/api/field_behavior_pb.js @@ -0,0 +1,67 @@ +// source: google/api/field_behavior.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.google.api.FieldBehavior', null, global); +goog.exportSymbol('proto.google.api.fieldBehaviorList', null, global); +/** + * @enum {number} + */ +proto.google.api.FieldBehavior = { + FIELD_BEHAVIOR_UNSPECIFIED: 0, + OPTIONAL: 1, + REQUIRED: 2, + OUTPUT_ONLY: 3, + INPUT_ONLY: 4, + IMMUTABLE: 5, + UNORDERED_LIST: 6, + NON_EMPTY_DEFAULT: 7 +}; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `fieldBehaviorList`. + * @type {!jspb.ExtensionFieldInfo>} + */ +proto.google.api.fieldBehaviorList = new jspb.ExtensionFieldInfo( + 1052, + {fieldBehaviorList: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 1); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[1052] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.fieldBehaviorList, + jspb.BinaryReader.prototype.readPackedEnum, + jspb.BinaryWriter.prototype.writePackedEnum, + undefined, + undefined, + true); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[1052] = proto.google.api.fieldBehaviorList; + +goog.object.extend(exports, proto.google.api); diff --git a/proto/google/api/http.pb.go b/proto/google/api/http.pb.go new file mode 100644 index 000000000..d2c195609 --- /dev/null +++ b/proto/google/api/http.pb.go @@ -0,0 +1,777 @@ +// Copyright 2015 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: google/api/http.proto + +package annotations + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Defines the HTTP configuration for an API service. It contains a list of +// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method +// to one or more HTTP REST API methods. +type Http struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of HTTP configuration rules that apply to individual API methods. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + Rules []*HttpRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` + // When set to true, URL path parameters will be fully URI-decoded except in + // cases of single segment matches in reserved expansion, where "%2F" will be + // left encoded. + // + // The default behavior is to not decode RFC 6570 reserved characters in multi + // segment matches. + FullyDecodeReservedExpansion bool `protobuf:"varint,2,opt,name=fully_decode_reserved_expansion,json=fullyDecodeReservedExpansion,proto3" json:"fully_decode_reserved_expansion,omitempty"` +} + +func (x *Http) Reset() { + *x = Http{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_http_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Http) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Http) ProtoMessage() {} + +func (x *Http) ProtoReflect() protoreflect.Message { + mi := &file_google_api_http_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 Http.ProtoReflect.Descriptor instead. +func (*Http) Descriptor() ([]byte, []int) { + return file_google_api_http_proto_rawDescGZIP(), []int{0} +} + +func (x *Http) GetRules() []*HttpRule { + if x != nil { + return x.Rules + } + return nil +} + +func (x *Http) GetFullyDecodeReservedExpansion() bool { + if x != nil { + return x.FullyDecodeReservedExpansion + } + return false +} + +// # gRPC Transcoding +// +// gRPC Transcoding is a feature for mapping between a gRPC method and one or +// more HTTP REST endpoints. It allows developers to build a single API service +// that supports both gRPC APIs and REST APIs. Many systems, including [Google +// APIs](https://github.com/googleapis/googleapis), +// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC +// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), +// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature +// and use it for large scale production services. +// +// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies +// how different portions of the gRPC request message are mapped to the URL +// path, URL query parameters, and HTTP request body. It also controls how the +// gRPC response message is mapped to the HTTP response body. `HttpRule` is +// typically specified as an `google.api.http` annotation on the gRPC method. +// +// Each mapping specifies a URL path template and an HTTP method. The path +// template may refer to one or more fields in the gRPC request message, as long +// as each field is a non-repeated field with a primitive (non-message) type. +// The path template controls how fields of the request message are mapped to +// the URL path. +// +// Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/{name=messages/*}" +// }; +// } +// } +// message GetMessageRequest { +// string name = 1; // Mapped to URL path. +// } +// message Message { +// string text = 1; // The resource content. +// } +// +// This enables an HTTP REST to gRPC mapping as below: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` +// +// Any fields in the request message which are not bound by the path template +// automatically become HTTP query parameters if there is no HTTP request body. +// For example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get:"/v1/messages/{message_id}" +// }; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // Mapped to URL path. +// int64 revision = 2; // Mapped to URL query parameter `revision`. +// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. +// } +// +// This enables a HTTP JSON to RPC mapping as below: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | +// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: +// "foo"))` +// +// Note that fields which are mapped to URL query parameters must have a +// primitive type or a repeated primitive type or a non-repeated message type. +// In the case of a repeated type, the parameter can be repeated in the URL +// as `...?param=A¶m=B`. In the case of a message type, each field of the +// message is mapped to a separate parameter, such as +// `...?foo.a=A&foo.b=B&foo.c=C`. +// +// For HTTP methods that allow a request body, the `body` field +// specifies the mapping. Consider a REST update method on the +// message resource collection: +// +// service Messaging { +// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { +// option (google.api.http) = { +// patch: "/v1/messages/{message_id}" +// body: "message" +// }; +// } +// } +// message UpdateMessageRequest { +// string message_id = 1; // mapped to the URL +// Message message = 2; // mapped to the body +// } +// +// The following HTTP JSON to RPC mapping is enabled, where the +// representation of the JSON in the request body is determined by +// protos JSON encoding: +// +// HTTP | gRPC +// -----|----- +// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" message { text: "Hi!" })` +// +// The special name `*` can be used in the body mapping to define that +// every field not bound by the path template should be mapped to the +// request body. This enables the following alternative definition of +// the update method: +// +// service Messaging { +// rpc UpdateMessage(Message) returns (Message) { +// option (google.api.http) = { +// patch: "/v1/messages/{message_id}" +// body: "*" +// }; +// } +// } +// message Message { +// string message_id = 1; +// string text = 2; +// } +// +// The following HTTP JSON to RPC mapping is enabled: +// +// HTTP | gRPC +// -----|----- +// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" text: "Hi!")` +// +// Note that when using `*` in the body mapping, it is not possible to +// have HTTP parameters, as all fields not bound by the path end in +// the body. This makes this option more rarely used in practice when +// defining REST APIs. The common usage of `*` is in custom methods +// which don't use the URL at all for transferring data. +// +// It is possible to define multiple HTTP methods for one RPC by using +// the `additional_bindings` option. Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/messages/{message_id}" +// additional_bindings { +// get: "/v1/users/{user_id}/messages/{message_id}" +// } +// }; +// } +// } +// message GetMessageRequest { +// string message_id = 1; +// string user_id = 2; +// } +// +// This enables the following two alternative HTTP JSON to RPC mappings: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` +// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: +// "123456")` +// +// ## Rules for HTTP mapping +// +// 1. Leaf request fields (recursive expansion nested messages in the request +// message) are classified into three categories: +// - Fields referred by the path template. They are passed via the URL path. +// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP +// request body. +// - All other fields are passed via the URL query parameters, and the +// parameter name is the field path in the request message. A repeated +// field can be represented as multiple query parameters under the same +// name. +// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields +// are passed via URL path and HTTP request body. +// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all +// fields are passed via URL path and URL query parameters. +// +// ### Path template syntax +// +// Template = "/" Segments [ Verb ] ; +// Segments = Segment { "/" Segment } ; +// Segment = "*" | "**" | LITERAL | Variable ; +// Variable = "{" FieldPath [ "=" Segments ] "}" ; +// FieldPath = IDENT { "." IDENT } ; +// Verb = ":" LITERAL ; +// +// The syntax `*` matches a single URL path segment. The syntax `**` matches +// zero or more URL path segments, which must be the last part of the URL path +// except the `Verb`. +// +// The syntax `Variable` matches part of the URL path as specified by its +// template. A variable template must not contain other variables. If a variable +// matches a single path segment, its template may be omitted, e.g. `{var}` +// is equivalent to `{var=*}`. +// +// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` +// contains any reserved character, such characters should be percent-encoded +// before the matching. +// +// If a variable contains exactly one path segment, such as `"{var}"` or +// `"{var=*}"`, when such a variable is expanded into a URL path on the client +// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The +// server side does the reverse decoding. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{var}`. +// +// If a variable contains multiple path segments, such as `"{var=foo/*}"` +// or `"{var=**}"`, when such a variable is expanded into a URL path on the +// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. +// The server side does the reverse decoding, except "%2F" and "%2f" are left +// unchanged. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{+var}`. +// +// ## Using gRPC API Service Configuration +// +// gRPC API Service Configuration (service config) is a configuration language +// for configuring a gRPC service to become a user-facing product. The +// service config is simply the YAML representation of the `google.api.Service` +// proto message. +// +// As an alternative to annotating your proto file, you can configure gRPC +// transcoding in your service config YAML files. You do this by specifying a +// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same +// effect as the proto annotation. This can be particularly useful if you +// have a proto that is reused in multiple services. Note that any transcoding +// specified in the service config will override any matching transcoding +// configuration in the proto. +// +// Example: +// +// http: +// rules: +// # Selects a gRPC method and applies HttpRule to it. +// - selector: example.v1.Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// ## Special notes +// +// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the +// proto to JSON conversion must follow the [proto3 +// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). +// +// While the single segment variable follows the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String +// Expansion, the multi segment variable **does not** follow RFC 6570 Section +// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion +// does not expand special characters like `?` and `#`, which would lead +// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding +// for multi segment variables. +// +// The path variables **must not** refer to any repeated or mapped field, +// because client libraries are not capable of handling such variable expansion. +// +// The path variables **must not** capture the leading "/" character. The reason +// is that the most common use case "{var}" does not capture the leading "/" +// character. For consistency, all path variables must share the same behavior. +// +// Repeated message fields must not be mapped to URL query parameters, because +// no client library can support such complicated mapping. +// +// If an API needs to use a JSON array for request or response body, it can map +// the request or response body to a repeated field. However, some gRPC +// Transcoding implementations may not support this feature. +type HttpRule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Selects a method to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` + // Determines the URL pattern is matched by this rules. This pattern can be + // used with any of the {get|put|post|delete|patch} methods. A custom method + // can be defined using the 'custom' field. + // + // Types that are assignable to Pattern: + // + // *HttpRule_Get + // *HttpRule_Put + // *HttpRule_Post + // *HttpRule_Delete + // *HttpRule_Patch + // *HttpRule_Custom + Pattern isHttpRule_Pattern `protobuf_oneof:"pattern"` + // The name of the request field whose value is mapped to the HTTP request + // body, or `*` for mapping all request fields not captured by the path + // pattern to the HTTP body, or omitted for not having any HTTP request body. + // + // NOTE: the referred field must be present at the top-level of the request + // message type. + Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"` + // Optional. The name of the response field whose value is mapped to the HTTP + // response body. When omitted, the entire response message will be used + // as the HTTP response body. + // + // NOTE: The referred field must be present at the top-level of the response + // message type. + ResponseBody string `protobuf:"bytes,12,opt,name=response_body,json=responseBody,proto3" json:"response_body,omitempty"` + // Additional HTTP bindings for the selector. Nested bindings must + // not contain an `additional_bindings` field themselves (that is, + // the nesting may only be one level deep). + AdditionalBindings []*HttpRule `protobuf:"bytes,11,rep,name=additional_bindings,json=additionalBindings,proto3" json:"additional_bindings,omitempty"` +} + +func (x *HttpRule) Reset() { + *x = HttpRule{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_http_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HttpRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpRule) ProtoMessage() {} + +func (x *HttpRule) ProtoReflect() protoreflect.Message { + mi := &file_google_api_http_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpRule.ProtoReflect.Descriptor instead. +func (*HttpRule) Descriptor() ([]byte, []int) { + return file_google_api_http_proto_rawDescGZIP(), []int{1} +} + +func (x *HttpRule) GetSelector() string { + if x != nil { + return x.Selector + } + return "" +} + +func (m *HttpRule) GetPattern() isHttpRule_Pattern { + if m != nil { + return m.Pattern + } + return nil +} + +func (x *HttpRule) GetGet() string { + if x, ok := x.GetPattern().(*HttpRule_Get); ok { + return x.Get + } + return "" +} + +func (x *HttpRule) GetPut() string { + if x, ok := x.GetPattern().(*HttpRule_Put); ok { + return x.Put + } + return "" +} + +func (x *HttpRule) GetPost() string { + if x, ok := x.GetPattern().(*HttpRule_Post); ok { + return x.Post + } + return "" +} + +func (x *HttpRule) GetDelete() string { + if x, ok := x.GetPattern().(*HttpRule_Delete); ok { + return x.Delete + } + return "" +} + +func (x *HttpRule) GetPatch() string { + if x, ok := x.GetPattern().(*HttpRule_Patch); ok { + return x.Patch + } + return "" +} + +func (x *HttpRule) GetCustom() *CustomHttpPattern { + if x, ok := x.GetPattern().(*HttpRule_Custom); ok { + return x.Custom + } + return nil +} + +func (x *HttpRule) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +func (x *HttpRule) GetResponseBody() string { + if x != nil { + return x.ResponseBody + } + return "" +} + +func (x *HttpRule) GetAdditionalBindings() []*HttpRule { + if x != nil { + return x.AdditionalBindings + } + return nil +} + +type isHttpRule_Pattern interface { + isHttpRule_Pattern() +} + +type HttpRule_Get struct { + // Maps to HTTP GET. Used for listing and getting information about + // resources. + Get string `protobuf:"bytes,2,opt,name=get,proto3,oneof"` +} + +type HttpRule_Put struct { + // Maps to HTTP PUT. Used for replacing a resource. + Put string `protobuf:"bytes,3,opt,name=put,proto3,oneof"` +} + +type HttpRule_Post struct { + // Maps to HTTP POST. Used for creating a resource or performing an action. + Post string `protobuf:"bytes,4,opt,name=post,proto3,oneof"` +} + +type HttpRule_Delete struct { + // Maps to HTTP DELETE. Used for deleting a resource. + Delete string `protobuf:"bytes,5,opt,name=delete,proto3,oneof"` +} + +type HttpRule_Patch struct { + // Maps to HTTP PATCH. Used for updating a resource. + Patch string `protobuf:"bytes,6,opt,name=patch,proto3,oneof"` +} + +type HttpRule_Custom struct { + // The custom pattern is used for specifying an HTTP method that is not + // included in the `pattern` field, such as HEAD, or "*" to leave the + // HTTP method unspecified for this rule. The wild-card rule is useful + // for services that provide content to Web (HTML) clients. + Custom *CustomHttpPattern `protobuf:"bytes,8,opt,name=custom,proto3,oneof"` +} + +func (*HttpRule_Get) isHttpRule_Pattern() {} + +func (*HttpRule_Put) isHttpRule_Pattern() {} + +func (*HttpRule_Post) isHttpRule_Pattern() {} + +func (*HttpRule_Delete) isHttpRule_Pattern() {} + +func (*HttpRule_Patch) isHttpRule_Pattern() {} + +func (*HttpRule_Custom) isHttpRule_Pattern() {} + +// A custom pattern is used for defining custom HTTP verb. +type CustomHttpPattern struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of this custom HTTP verb. + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + // The path matched by this custom verb. + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *CustomHttpPattern) Reset() { + *x = CustomHttpPattern{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_http_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CustomHttpPattern) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomHttpPattern) ProtoMessage() {} + +func (x *CustomHttpPattern) ProtoReflect() protoreflect.Message { + mi := &file_google_api_http_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomHttpPattern.ProtoReflect.Descriptor instead. +func (*CustomHttpPattern) Descriptor() ([]byte, []int) { + return file_google_api_http_proto_rawDescGZIP(), []int{2} +} + +func (x *CustomHttpPattern) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *CustomHttpPattern) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +var File_google_api_http_proto protoreflect.FileDescriptor + +var file_google_api_http_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x22, 0x79, 0x0a, 0x04, 0x48, 0x74, 0x74, 0x70, 0x12, 0x2a, 0x0a, 0x05, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, + 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x1f, 0x66, 0x75, 0x6c, 0x6c, 0x79, + 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x5f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x1c, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xda, + 0x02, 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x03, 0x67, 0x65, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x03, 0x70, + 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x70, 0x75, 0x74, 0x12, + 0x14, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, + 0x16, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x37, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x48, 0x00, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x62, 0x6f, 0x64, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x61, 0x64, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, + 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x12, 0x61, 0x64, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, + 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x22, 0x3b, 0x0a, 0x11, 0x43, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x6a, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x09, 0x48, 0x74, 0x74, 0x70, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x04, + 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_api_http_proto_rawDescOnce sync.Once + file_google_api_http_proto_rawDescData = file_google_api_http_proto_rawDesc +) + +func file_google_api_http_proto_rawDescGZIP() []byte { + file_google_api_http_proto_rawDescOnce.Do(func() { + file_google_api_http_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_http_proto_rawDescData) + }) + return file_google_api_http_proto_rawDescData +} + +var file_google_api_http_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_google_api_http_proto_goTypes = []interface{}{ + (*Http)(nil), // 0: google.api.Http + (*HttpRule)(nil), // 1: google.api.HttpRule + (*CustomHttpPattern)(nil), // 2: google.api.CustomHttpPattern +} +var file_google_api_http_proto_depIdxs = []int32{ + 1, // 0: google.api.Http.rules:type_name -> google.api.HttpRule + 2, // 1: google.api.HttpRule.custom:type_name -> google.api.CustomHttpPattern + 1, // 2: google.api.HttpRule.additional_bindings:type_name -> google.api.HttpRule + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_google_api_http_proto_init() } +func file_google_api_http_proto_init() { + if File_google_api_http_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_api_http_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Http); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_http_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HttpRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_http_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CustomHttpPattern); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_api_http_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*HttpRule_Get)(nil), + (*HttpRule_Put)(nil), + (*HttpRule_Post)(nil), + (*HttpRule_Delete)(nil), + (*HttpRule_Patch)(nil), + (*HttpRule_Custom)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_api_http_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_api_http_proto_goTypes, + DependencyIndexes: file_google_api_http_proto_depIdxs, + MessageInfos: file_google_api_http_proto_msgTypes, + }.Build() + File_google_api_http_proto = out.File + file_google_api_http_proto_rawDesc = nil + file_google_api_http_proto_goTypes = nil + file_google_api_http_proto_depIdxs = nil +} diff --git a/proto/google/api/http.pb.validate.go b/proto/google/api/http.pb.validate.go new file mode 100644 index 000000000..d622caba4 --- /dev/null +++ b/proto/google/api/http.pb.validate.go @@ -0,0 +1,521 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: google/api/http.proto + +package annotations + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Http with the rules defined in the proto +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. +func (m *Http) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Http with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in HttpMultiError, or nil if none found. +func (m *Http) ValidateAll() error { + return m.validate(true) +} + +func (m *Http) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetRules() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for FullyDecodeReservedExpansion + + if len(errors) > 0 { + return HttpMultiError(errors) + } + + return nil +} + +// HttpMultiError is an error wrapping multiple validation errors returned by +// Http.ValidateAll() if the designated constraints aren't met. +type HttpMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpMultiError) AllErrors() []error { return m } + +// HttpValidationError is the validation error returned by Http.Validate if the +// designated constraints aren't met. +type HttpValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpValidationError) ErrorName() string { return "HttpValidationError" } + +// Error satisfies the builtin error interface +func (e HttpValidationError) 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 %sHttp.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpValidationError{} + +// Validate checks the field values on HttpRule with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *HttpRule) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HttpRule with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in HttpRuleMultiError, or nil +// if none found. +func (m *HttpRule) ValidateAll() error { + return m.validate(true) +} + +func (m *HttpRule) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Selector + + // no validation rules for Body + + // no validation rules for ResponseBody + + for idx, item := range m.GetAdditionalBindings() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpRuleValidationError{ + field: fmt.Sprintf("AdditionalBindings[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpRuleValidationError{ + field: fmt.Sprintf("AdditionalBindings[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpRuleValidationError{ + field: fmt.Sprintf("AdditionalBindings[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + switch v := m.Pattern.(type) { + case *HttpRule_Get: + if v == nil { + err := HttpRuleValidationError{ + field: "Pattern", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Get + case *HttpRule_Put: + if v == nil { + err := HttpRuleValidationError{ + field: "Pattern", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Put + case *HttpRule_Post: + if v == nil { + err := HttpRuleValidationError{ + field: "Pattern", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Post + case *HttpRule_Delete: + if v == nil { + err := HttpRuleValidationError{ + field: "Pattern", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Delete + case *HttpRule_Patch: + if v == nil { + err := HttpRuleValidationError{ + field: "Pattern", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Patch + case *HttpRule_Custom: + if v == nil { + err := HttpRuleValidationError{ + field: "Pattern", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetCustom()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, HttpRuleValidationError{ + field: "Custom", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, HttpRuleValidationError{ + field: "Custom", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCustom()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return HttpRuleValidationError{ + field: "Custom", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return HttpRuleMultiError(errors) + } + + return nil +} + +// HttpRuleMultiError is an error wrapping multiple validation errors returned +// by HttpRule.ValidateAll() if the designated constraints aren't met. +type HttpRuleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HttpRuleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HttpRuleMultiError) AllErrors() []error { return m } + +// HttpRuleValidationError is the validation error returned by +// HttpRule.Validate if the designated constraints aren't met. +type HttpRuleValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HttpRuleValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HttpRuleValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HttpRuleValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HttpRuleValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HttpRuleValidationError) ErrorName() string { return "HttpRuleValidationError" } + +// Error satisfies the builtin error interface +func (e HttpRuleValidationError) 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 %sHttpRule.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HttpRuleValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HttpRuleValidationError{} + +// Validate checks the field values on CustomHttpPattern with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *CustomHttpPattern) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on CustomHttpPattern with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// CustomHttpPatternMultiError, or nil if none found. +func (m *CustomHttpPattern) ValidateAll() error { + return m.validate(true) +} + +func (m *CustomHttpPattern) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Kind + + // no validation rules for Path + + if len(errors) > 0 { + return CustomHttpPatternMultiError(errors) + } + + return nil +} + +// CustomHttpPatternMultiError is an error wrapping multiple validation errors +// returned by CustomHttpPattern.ValidateAll() if the designated constraints +// aren't met. +type CustomHttpPatternMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m CustomHttpPatternMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m CustomHttpPatternMultiError) AllErrors() []error { return m } + +// CustomHttpPatternValidationError is the validation error returned by +// CustomHttpPattern.Validate if the designated constraints aren't met. +type CustomHttpPatternValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e CustomHttpPatternValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e CustomHttpPatternValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e CustomHttpPatternValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e CustomHttpPatternValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e CustomHttpPatternValidationError) ErrorName() string { + return "CustomHttpPatternValidationError" +} + +// Error satisfies the builtin error interface +func (e CustomHttpPatternValidationError) 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 %sCustomHttpPattern.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = CustomHttpPatternValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = CustomHttpPatternValidationError{} diff --git a/proto/google/api/http_grpc_pb.js b/proto/google/api/http_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/google/api/http_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/google/api/http_pb.d.ts b/proto/google/api/http_pb.d.ts new file mode 100644 index 000000000..02c3b1ece --- /dev/null +++ b/proto/google/api/http_pb.d.ts @@ -0,0 +1,135 @@ +// package: google.api +// file: google/api/http.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Http extends jspb.Message { + clearRulesList(): void; + getRulesList(): Array; + setRulesList(value: Array): Http; + addRules(value?: HttpRule, index?: number): HttpRule; + getFullyDecodeReservedExpansion(): boolean; + setFullyDecodeReservedExpansion(value: boolean): Http; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Http.AsObject; + static toObject(includeInstance: boolean, msg: Http): Http.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Http, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Http; + static deserializeBinaryFromReader(message: Http, reader: jspb.BinaryReader): Http; +} + +export namespace Http { + export type AsObject = { + rulesList: Array, + fullyDecodeReservedExpansion: boolean, + } +} + +export class HttpRule extends jspb.Message { + getSelector(): string; + setSelector(value: string): HttpRule; + + hasGet(): boolean; + clearGet(): void; + getGet(): string; + setGet(value: string): HttpRule; + + hasPut(): boolean; + clearPut(): void; + getPut(): string; + setPut(value: string): HttpRule; + + hasPost(): boolean; + clearPost(): void; + getPost(): string; + setPost(value: string): HttpRule; + + hasDelete(): boolean; + clearDelete(): void; + getDelete(): string; + setDelete(value: string): HttpRule; + + hasPatch(): boolean; + clearPatch(): void; + getPatch(): string; + setPatch(value: string): HttpRule; + + hasCustom(): boolean; + clearCustom(): void; + getCustom(): CustomHttpPattern | undefined; + setCustom(value?: CustomHttpPattern): HttpRule; + getBody(): string; + setBody(value: string): HttpRule; + getResponseBody(): string; + setResponseBody(value: string): HttpRule; + clearAdditionalBindingsList(): void; + getAdditionalBindingsList(): Array; + setAdditionalBindingsList(value: Array): HttpRule; + addAdditionalBindings(value?: HttpRule, index?: number): HttpRule; + + getPatternCase(): HttpRule.PatternCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HttpRule.AsObject; + static toObject(includeInstance: boolean, msg: HttpRule): HttpRule.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HttpRule, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HttpRule; + static deserializeBinaryFromReader(message: HttpRule, reader: jspb.BinaryReader): HttpRule; +} + +export namespace HttpRule { + export type AsObject = { + selector: string, + get: string, + put: string, + post: string, + pb_delete: string, + patch: string, + custom?: CustomHttpPattern.AsObject, + body: string, + responseBody: string, + additionalBindingsList: Array, + } + + export enum PatternCase { + PATTERN_NOT_SET = 0, + GET = 2, + PUT = 3, + POST = 4, + DELETE = 5, + PATCH = 6, + CUSTOM = 8, + } + +} + +export class CustomHttpPattern extends jspb.Message { + getKind(): string; + setKind(value: string): CustomHttpPattern; + getPath(): string; + setPath(value: string): CustomHttpPattern; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CustomHttpPattern.AsObject; + static toObject(includeInstance: boolean, msg: CustomHttpPattern): CustomHttpPattern.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CustomHttpPattern, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CustomHttpPattern; + static deserializeBinaryFromReader(message: CustomHttpPattern, reader: jspb.BinaryReader): CustomHttpPattern; +} + +export namespace CustomHttpPattern { + export type AsObject = { + kind: string, + path: string, + } +} diff --git a/proto/google/api/http_pb.js b/proto/google/api/http_pb.js new file mode 100644 index 000000000..9fc6ee730 --- /dev/null +++ b/proto/google/api/http_pb.js @@ -0,0 +1,1012 @@ +// source: google/api/http.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +goog.exportSymbol('proto.google.api.CustomHttpPattern', null, global); +goog.exportSymbol('proto.google.api.Http', null, global); +goog.exportSymbol('proto.google.api.HttpRule', null, global); +goog.exportSymbol('proto.google.api.HttpRule.PatternCase', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.Http = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Http.repeatedFields_, null); +}; +goog.inherits(proto.google.api.Http, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.Http.displayName = 'proto.google.api.Http'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.HttpRule = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.HttpRule.repeatedFields_, proto.google.api.HttpRule.oneofGroups_); +}; +goog.inherits(proto.google.api.HttpRule, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.HttpRule.displayName = 'proto.google.api.HttpRule'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.CustomHttpPattern = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.CustomHttpPattern, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.CustomHttpPattern.displayName = 'proto.google.api.CustomHttpPattern'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.Http.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.Http.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.Http.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.Http} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Http.toObject = function(includeInstance, msg) { + var f, obj = { + rulesList: jspb.Message.toObjectList(msg.getRulesList(), + proto.google.api.HttpRule.toObject, includeInstance), + fullyDecodeReservedExpansion: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.Http} + */ +proto.google.api.Http.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.Http; + return proto.google.api.Http.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.Http} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.Http} + */ +proto.google.api.Http.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.HttpRule; + reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); + msg.addRules(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFullyDecodeReservedExpansion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.Http.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.Http.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.Http} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Http.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRulesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.HttpRule.serializeBinaryToWriter + ); + } + f = message.getFullyDecodeReservedExpansion(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * repeated HttpRule rules = 1; + * @return {!Array} + */ +proto.google.api.Http.prototype.getRulesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.Http} returns this +*/ +proto.google.api.Http.prototype.setRulesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.HttpRule=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.Http.prototype.addRules = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.HttpRule, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.Http} returns this + */ +proto.google.api.Http.prototype.clearRulesList = function() { + return this.setRulesList([]); +}; + + +/** + * optional bool fully_decode_reserved_expansion = 2; + * @return {boolean} + */ +proto.google.api.Http.prototype.getFullyDecodeReservedExpansion = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.api.Http} returns this + */ +proto.google.api.Http.prototype.setFullyDecodeReservedExpansion = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.HttpRule.repeatedFields_ = [11]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.api.HttpRule.oneofGroups_ = [[2,3,4,5,6,8]]; + +/** + * @enum {number} + */ +proto.google.api.HttpRule.PatternCase = { + PATTERN_NOT_SET: 0, + GET: 2, + PUT: 3, + POST: 4, + DELETE: 5, + PATCH: 6, + CUSTOM: 8 +}; + +/** + * @return {proto.google.api.HttpRule.PatternCase} + */ +proto.google.api.HttpRule.prototype.getPatternCase = function() { + return /** @type {proto.google.api.HttpRule.PatternCase} */(jspb.Message.computeOneofCase(this, proto.google.api.HttpRule.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.HttpRule.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.HttpRule.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.HttpRule} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpRule.toObject = function(includeInstance, msg) { + var f, obj = { + selector: jspb.Message.getFieldWithDefault(msg, 1, ""), + get: jspb.Message.getFieldWithDefault(msg, 2, ""), + put: jspb.Message.getFieldWithDefault(msg, 3, ""), + post: jspb.Message.getFieldWithDefault(msg, 4, ""), + pb_delete: jspb.Message.getFieldWithDefault(msg, 5, ""), + patch: jspb.Message.getFieldWithDefault(msg, 6, ""), + custom: (f = msg.getCustom()) && proto.google.api.CustomHttpPattern.toObject(includeInstance, f), + body: jspb.Message.getFieldWithDefault(msg, 7, ""), + responseBody: jspb.Message.getFieldWithDefault(msg, 12, ""), + additionalBindingsList: jspb.Message.toObjectList(msg.getAdditionalBindingsList(), + proto.google.api.HttpRule.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.HttpRule.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.HttpRule; + return proto.google.api.HttpRule.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.HttpRule} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.HttpRule.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSelector(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setGet(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPut(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPost(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDelete(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setPatch(value); + break; + case 8: + var value = new proto.google.api.CustomHttpPattern; + reader.readMessage(value,proto.google.api.CustomHttpPattern.deserializeBinaryFromReader); + msg.setCustom(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setBody(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setResponseBody(value); + break; + case 11: + var value = new proto.google.api.HttpRule; + reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); + msg.addAdditionalBindings(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.HttpRule.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.HttpRule.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.HttpRule} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpRule.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSelector(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeString( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = message.getCustom(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.google.api.CustomHttpPattern.serializeBinaryToWriter + ); + } + f = message.getBody(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getResponseBody(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getAdditionalBindingsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + proto.google.api.HttpRule.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string selector = 1; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getSelector = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setSelector = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string get = 2; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getGet = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setGet = function(value) { + return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearGet = function() { + return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasGet = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string put = 3; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPut = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPut = function(value) { + return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPut = function() { + return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPut = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string post = 4; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPost = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPost = function(value) { + return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPost = function() { + return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPost = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string delete = 5; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getDelete = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setDelete = function(value) { + return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearDelete = function() { + return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasDelete = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string patch = 6; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPatch = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPatch = function(value) { + return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPatch = function() { + return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPatch = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional CustomHttpPattern custom = 8; + * @return {?proto.google.api.CustomHttpPattern} + */ +proto.google.api.HttpRule.prototype.getCustom = function() { + return /** @type{?proto.google.api.CustomHttpPattern} */ ( + jspb.Message.getWrapperField(this, proto.google.api.CustomHttpPattern, 8)); +}; + + +/** + * @param {?proto.google.api.CustomHttpPattern|undefined} value + * @return {!proto.google.api.HttpRule} returns this +*/ +proto.google.api.HttpRule.prototype.setCustom = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearCustom = function() { + return this.setCustom(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasCustom = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string body = 7; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getBody = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setBody = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string response_body = 12; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getResponseBody = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setResponseBody = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * repeated HttpRule additional_bindings = 11; + * @return {!Array} + */ +proto.google.api.HttpRule.prototype.getAdditionalBindingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 11)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.HttpRule} returns this +*/ +proto.google.api.HttpRule.prototype.setAdditionalBindingsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); +}; + + +/** + * @param {!proto.google.api.HttpRule=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.HttpRule.prototype.addAdditionalBindings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.google.api.HttpRule, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearAdditionalBindingsList = function() { + return this.setAdditionalBindingsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.CustomHttpPattern.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.CustomHttpPattern.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.CustomHttpPattern} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.CustomHttpPattern.toObject = function(includeInstance, msg) { + var f, obj = { + kind: jspb.Message.getFieldWithDefault(msg, 1, ""), + path: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.CustomHttpPattern} + */ +proto.google.api.CustomHttpPattern.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.CustomHttpPattern; + return proto.google.api.CustomHttpPattern.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.CustomHttpPattern} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.CustomHttpPattern} + */ +proto.google.api.CustomHttpPattern.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKind(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPath(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.CustomHttpPattern.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.CustomHttpPattern.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.CustomHttpPattern} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.CustomHttpPattern.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKind(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string kind = 1; + * @return {string} + */ +proto.google.api.CustomHttpPattern.prototype.getKind = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.CustomHttpPattern} returns this + */ +proto.google.api.CustomHttpPattern.prototype.setKind = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string path = 2; + * @return {string} + */ +proto.google.api.CustomHttpPattern.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.CustomHttpPattern} returns this + */ +proto.google.api.CustomHttpPattern.prototype.setPath = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.api); diff --git a/proto/google/api/visibility.pb.go b/proto/google/api/visibility.pb.go new file mode 100644 index 000000000..bb80df833 --- /dev/null +++ b/proto/google/api/visibility.pb.go @@ -0,0 +1,447 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: google/api/visibility.proto + +package visibility + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// `Visibility` restricts service consumer's access to service elements, +// such as whether an application can call a visibility-restricted method. +// The restriction is expressed by applying visibility labels on service +// elements. The visibility labels are elsewhere linked to service consumers. +// +// A service can define multiple visibility labels, but a service consumer +// should be granted at most one visibility label. Multiple visibility +// labels for a single service consumer are not supported. +// +// If an element and all its parents have no visibility label, its visibility +// is unconditionally granted. +// +// Example: +// +// visibility: +// rules: +// - selector: google.calendar.Calendar.EnhancedSearch +// restriction: PREVIEW +// - selector: google.calendar.Calendar.Delegate +// restriction: INTERNAL +// +// Here, all methods are publicly visible except for the restricted methods +// EnhancedSearch and Delegate. +type Visibility struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of visibility rules that apply to individual API elements. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + Rules []*VisibilityRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` +} + +func (x *Visibility) Reset() { + *x = Visibility{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_visibility_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Visibility) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Visibility) ProtoMessage() {} + +func (x *Visibility) ProtoReflect() protoreflect.Message { + mi := &file_google_api_visibility_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 Visibility.ProtoReflect.Descriptor instead. +func (*Visibility) Descriptor() ([]byte, []int) { + return file_google_api_visibility_proto_rawDescGZIP(), []int{0} +} + +func (x *Visibility) GetRules() []*VisibilityRule { + if x != nil { + return x.Rules + } + return nil +} + +// A visibility rule provides visibility configuration for an individual API +// element. +type VisibilityRule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Selects methods, messages, fields, enums, etc. to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax + // details. + Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` + // A comma-separated list of visibility labels that apply to the `selector`. + // Any of the listed labels can be used to grant the visibility. + // + // If a rule has multiple labels, removing one of the labels but not all of + // them can break clients. + // + // Example: + // + // visibility: + // rules: + // - selector: google.calendar.Calendar.EnhancedSearch + // restriction: INTERNAL, PREVIEW + // + // Removing INTERNAL from this restriction will break clients that rely on + // this method and only had access to it through INTERNAL. + Restriction string `protobuf:"bytes,2,opt,name=restriction,proto3" json:"restriction,omitempty"` +} + +func (x *VisibilityRule) Reset() { + *x = VisibilityRule{} + if protoimpl.UnsafeEnabled { + mi := &file_google_api_visibility_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VisibilityRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VisibilityRule) ProtoMessage() {} + +func (x *VisibilityRule) ProtoReflect() protoreflect.Message { + mi := &file_google_api_visibility_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VisibilityRule.ProtoReflect.Descriptor instead. +func (*VisibilityRule) Descriptor() ([]byte, []int) { + return file_google_api_visibility_proto_rawDescGZIP(), []int{1} +} + +func (x *VisibilityRule) GetSelector() string { + if x != nil { + return x.Selector + } + return "" +} + +func (x *VisibilityRule) GetRestriction() string { + if x != nil { + return x.Restriction + } + return "" +} + +var file_google_api_visibility_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.EnumOptions)(nil), + ExtensionType: (*VisibilityRule)(nil), + Field: 72295727, + Name: "google.api.enum_visibility", + Tag: "bytes,72295727,opt,name=enum_visibility", + Filename: "google/api/visibility.proto", + }, + { + ExtendedType: (*descriptorpb.EnumValueOptions)(nil), + ExtensionType: (*VisibilityRule)(nil), + Field: 72295727, + Name: "google.api.value_visibility", + Tag: "bytes,72295727,opt,name=value_visibility", + Filename: "google/api/visibility.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*VisibilityRule)(nil), + Field: 72295727, + Name: "google.api.field_visibility", + Tag: "bytes,72295727,opt,name=field_visibility", + Filename: "google/api/visibility.proto", + }, + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*VisibilityRule)(nil), + Field: 72295727, + Name: "google.api.message_visibility", + Tag: "bytes,72295727,opt,name=message_visibility", + Filename: "google/api/visibility.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*VisibilityRule)(nil), + Field: 72295727, + Name: "google.api.method_visibility", + Tag: "bytes,72295727,opt,name=method_visibility", + Filename: "google/api/visibility.proto", + }, + { + ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtensionType: (*VisibilityRule)(nil), + Field: 72295727, + Name: "google.api.api_visibility", + Tag: "bytes,72295727,opt,name=api_visibility", + Filename: "google/api/visibility.proto", + }, +} + +// Extension fields to descriptorpb.EnumOptions. +var ( + // See `VisibilityRule`. + // + // optional google.api.VisibilityRule enum_visibility = 72295727; + E_EnumVisibility = &file_google_api_visibility_proto_extTypes[0] +) + +// Extension fields to descriptorpb.EnumValueOptions. +var ( + // See `VisibilityRule`. + // + // optional google.api.VisibilityRule value_visibility = 72295727; + E_ValueVisibility = &file_google_api_visibility_proto_extTypes[1] +) + +// Extension fields to descriptorpb.FieldOptions. +var ( + // See `VisibilityRule`. + // + // optional google.api.VisibilityRule field_visibility = 72295727; + E_FieldVisibility = &file_google_api_visibility_proto_extTypes[2] +) + +// Extension fields to descriptorpb.MessageOptions. +var ( + // See `VisibilityRule`. + // + // optional google.api.VisibilityRule message_visibility = 72295727; + E_MessageVisibility = &file_google_api_visibility_proto_extTypes[3] +) + +// Extension fields to descriptorpb.MethodOptions. +var ( + // See `VisibilityRule`. + // + // optional google.api.VisibilityRule method_visibility = 72295727; + E_MethodVisibility = &file_google_api_visibility_proto_extTypes[4] +) + +// Extension fields to descriptorpb.ServiceOptions. +var ( + // See `VisibilityRule`. + // + // optional google.api.VisibilityRule api_visibility = 72295727; + E_ApiVisibility = &file_google_api_visibility_proto_extTypes[5] +) + +var File_google_api_visibility_proto protoreflect.FileDescriptor + +var file_google_api_visibility_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, + 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x0a, 0x56, + 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x4e, 0x0a, 0x0e, 0x56, + 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x73, + 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x64, 0x0a, 0x0f, 0x65, + 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0xca, 0xbc, + 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, + 0x65, 0x52, 0x0e, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x3a, 0x6b, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0xca, 0xbc, 0x22, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, + 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x67, + 0x0a, 0x10, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0xaf, 0xca, 0xbc, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x73, + 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x6d, 0x0a, 0x12, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, + 0xca, 0xbc, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, + 0x75, 0x6c, 0x65, 0x52, 0x11, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x56, 0x69, 0x73, 0x69, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x6a, 0x0a, 0x11, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0xca, 0xbc, 0x22, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, + 0x52, 0x10, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x3a, 0x65, 0x0a, 0x0e, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0xca, 0xbc, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0d, 0x61, 0x70, 0x69, 0x56, + 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x42, 0x6e, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0f, 0x56, 0x69, 0x73, + 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, + 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x3b, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0xf8, + 0x01, 0x01, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_google_api_visibility_proto_rawDescOnce sync.Once + file_google_api_visibility_proto_rawDescData = file_google_api_visibility_proto_rawDesc +) + +func file_google_api_visibility_proto_rawDescGZIP() []byte { + file_google_api_visibility_proto_rawDescOnce.Do(func() { + file_google_api_visibility_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_visibility_proto_rawDescData) + }) + return file_google_api_visibility_proto_rawDescData +} + +var file_google_api_visibility_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_google_api_visibility_proto_goTypes = []interface{}{ + (*Visibility)(nil), // 0: google.api.Visibility + (*VisibilityRule)(nil), // 1: google.api.VisibilityRule + (*descriptorpb.EnumOptions)(nil), // 2: google.protobuf.EnumOptions + (*descriptorpb.EnumValueOptions)(nil), // 3: google.protobuf.EnumValueOptions + (*descriptorpb.FieldOptions)(nil), // 4: google.protobuf.FieldOptions + (*descriptorpb.MessageOptions)(nil), // 5: google.protobuf.MessageOptions + (*descriptorpb.MethodOptions)(nil), // 6: google.protobuf.MethodOptions + (*descriptorpb.ServiceOptions)(nil), // 7: google.protobuf.ServiceOptions +} +var file_google_api_visibility_proto_depIdxs = []int32{ + 1, // 0: google.api.Visibility.rules:type_name -> google.api.VisibilityRule + 2, // 1: google.api.enum_visibility:extendee -> google.protobuf.EnumOptions + 3, // 2: google.api.value_visibility:extendee -> google.protobuf.EnumValueOptions + 4, // 3: google.api.field_visibility:extendee -> google.protobuf.FieldOptions + 5, // 4: google.api.message_visibility:extendee -> google.protobuf.MessageOptions + 6, // 5: google.api.method_visibility:extendee -> google.protobuf.MethodOptions + 7, // 6: google.api.api_visibility:extendee -> google.protobuf.ServiceOptions + 1, // 7: google.api.enum_visibility:type_name -> google.api.VisibilityRule + 1, // 8: google.api.value_visibility:type_name -> google.api.VisibilityRule + 1, // 9: google.api.field_visibility:type_name -> google.api.VisibilityRule + 1, // 10: google.api.message_visibility:type_name -> google.api.VisibilityRule + 1, // 11: google.api.method_visibility:type_name -> google.api.VisibilityRule + 1, // 12: google.api.api_visibility:type_name -> google.api.VisibilityRule + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 7, // [7:13] is the sub-list for extension type_name + 1, // [1:7] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_google_api_visibility_proto_init() } +func file_google_api_visibility_proto_init() { + if File_google_api_visibility_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_api_visibility_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Visibility); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_api_visibility_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VisibilityRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_api_visibility_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 6, + NumServices: 0, + }, + GoTypes: file_google_api_visibility_proto_goTypes, + DependencyIndexes: file_google_api_visibility_proto_depIdxs, + MessageInfos: file_google_api_visibility_proto_msgTypes, + ExtensionInfos: file_google_api_visibility_proto_extTypes, + }.Build() + File_google_api_visibility_proto = out.File + file_google_api_visibility_proto_rawDesc = nil + file_google_api_visibility_proto_goTypes = nil + file_google_api_visibility_proto_depIdxs = nil +} diff --git a/proto/google/api/visibility.pb.validate.go b/proto/google/api/visibility.pb.validate.go new file mode 100644 index 000000000..0147dc1e2 --- /dev/null +++ b/proto/google/api/visibility.pb.validate.go @@ -0,0 +1,273 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: google/api/visibility.proto + +package visibility + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Visibility with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Visibility) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Visibility with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in VisibilityMultiError, or +// nil if none found. +func (m *Visibility) ValidateAll() error { + return m.validate(true) +} + +func (m *Visibility) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetRules() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, VisibilityValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, VisibilityValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return VisibilityValidationError{ + field: fmt.Sprintf("Rules[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return VisibilityMultiError(errors) + } + + return nil +} + +// VisibilityMultiError is an error wrapping multiple validation errors +// returned by Visibility.ValidateAll() if the designated constraints aren't met. +type VisibilityMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m VisibilityMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m VisibilityMultiError) AllErrors() []error { return m } + +// VisibilityValidationError is the validation error returned by +// Visibility.Validate if the designated constraints aren't met. +type VisibilityValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e VisibilityValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e VisibilityValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e VisibilityValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e VisibilityValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e VisibilityValidationError) ErrorName() string { return "VisibilityValidationError" } + +// Error satisfies the builtin error interface +func (e VisibilityValidationError) 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 %sVisibility.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = VisibilityValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = VisibilityValidationError{} + +// Validate checks the field values on VisibilityRule with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *VisibilityRule) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on VisibilityRule with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in VisibilityRuleMultiError, +// or nil if none found. +func (m *VisibilityRule) ValidateAll() error { + return m.validate(true) +} + +func (m *VisibilityRule) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Selector + + // no validation rules for Restriction + + if len(errors) > 0 { + return VisibilityRuleMultiError(errors) + } + + return nil +} + +// VisibilityRuleMultiError is an error wrapping multiple validation errors +// returned by VisibilityRule.ValidateAll() if the designated constraints +// aren't met. +type VisibilityRuleMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m VisibilityRuleMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m VisibilityRuleMultiError) AllErrors() []error { return m } + +// VisibilityRuleValidationError is the validation error returned by +// VisibilityRule.Validate if the designated constraints aren't met. +type VisibilityRuleValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e VisibilityRuleValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e VisibilityRuleValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e VisibilityRuleValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e VisibilityRuleValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e VisibilityRuleValidationError) ErrorName() string { return "VisibilityRuleValidationError" } + +// Error satisfies the builtin error interface +func (e VisibilityRuleValidationError) 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 %sVisibilityRule.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = VisibilityRuleValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = VisibilityRuleValidationError{} diff --git a/proto/google/api/visibility_grpc_pb.js b/proto/google/api/visibility_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/google/api/visibility_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/google/api/visibility_pb.d.ts b/proto/google/api/visibility_pb.d.ts new file mode 100644 index 000000000..5efefe7d7 --- /dev/null +++ b/proto/google/api/visibility_pb.d.ts @@ -0,0 +1,65 @@ +// package: google.api +// file: google/api/visibility.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; + +export class Visibility extends jspb.Message { + clearRulesList(): void; + getRulesList(): Array; + setRulesList(value: Array): Visibility; + addRules(value?: VisibilityRule, index?: number): VisibilityRule; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Visibility.AsObject; + static toObject(includeInstance: boolean, msg: Visibility): Visibility.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Visibility, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Visibility; + static deserializeBinaryFromReader(message: Visibility, reader: jspb.BinaryReader): Visibility; +} + +export namespace Visibility { + export type AsObject = { + rulesList: Array, + } +} + +export class VisibilityRule extends jspb.Message { + getSelector(): string; + setSelector(value: string): VisibilityRule; + getRestriction(): string; + setRestriction(value: string): VisibilityRule; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VisibilityRule.AsObject; + static toObject(includeInstance: boolean, msg: VisibilityRule): VisibilityRule.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: VisibilityRule, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VisibilityRule; + static deserializeBinaryFromReader(message: VisibilityRule, reader: jspb.BinaryReader): VisibilityRule; +} + +export namespace VisibilityRule { + export type AsObject = { + selector: string, + restriction: string, + } +} + +export const enumVisibility: jspb.ExtensionFieldInfo; + +export const valueVisibility: jspb.ExtensionFieldInfo; + +export const fieldVisibility: jspb.ExtensionFieldInfo; + +export const messageVisibility: jspb.ExtensionFieldInfo; + +export const methodVisibility: jspb.ExtensionFieldInfo; + +export const apiVisibility: jspb.ExtensionFieldInfo; diff --git a/proto/google/api/visibility_pb.js b/proto/google/api/visibility_pb.js new file mode 100644 index 000000000..bc9a3ccb8 --- /dev/null +++ b/proto/google/api/visibility_pb.js @@ -0,0 +1,546 @@ +// source: google/api/visibility.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.google.api.Visibility', null, global); +goog.exportSymbol('proto.google.api.VisibilityRule', null, global); +goog.exportSymbol('proto.google.api.apiVisibility', null, global); +goog.exportSymbol('proto.google.api.enumVisibility', null, global); +goog.exportSymbol('proto.google.api.fieldVisibility', null, global); +goog.exportSymbol('proto.google.api.messageVisibility', null, global); +goog.exportSymbol('proto.google.api.methodVisibility', null, global); +goog.exportSymbol('proto.google.api.valueVisibility', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.Visibility = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Visibility.repeatedFields_, null); +}; +goog.inherits(proto.google.api.Visibility, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.Visibility.displayName = 'proto.google.api.Visibility'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.VisibilityRule = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.VisibilityRule, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.VisibilityRule.displayName = 'proto.google.api.VisibilityRule'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.Visibility.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.Visibility.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.Visibility.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.Visibility} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Visibility.toObject = function(includeInstance, msg) { + var f, obj = { + rulesList: jspb.Message.toObjectList(msg.getRulesList(), + proto.google.api.VisibilityRule.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.Visibility} + */ +proto.google.api.Visibility.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.Visibility; + return proto.google.api.Visibility.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.Visibility} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.Visibility} + */ +proto.google.api.Visibility.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.VisibilityRule; + reader.readMessage(value,proto.google.api.VisibilityRule.deserializeBinaryFromReader); + msg.addRules(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.Visibility.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.Visibility.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.Visibility} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Visibility.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRulesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.VisibilityRule.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated VisibilityRule rules = 1; + * @return {!Array} + */ +proto.google.api.Visibility.prototype.getRulesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.VisibilityRule, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.Visibility} returns this +*/ +proto.google.api.Visibility.prototype.setRulesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.VisibilityRule=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.VisibilityRule} + */ +proto.google.api.Visibility.prototype.addRules = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.VisibilityRule, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.Visibility} returns this + */ +proto.google.api.Visibility.prototype.clearRulesList = function() { + return this.setRulesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.VisibilityRule.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.VisibilityRule.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.VisibilityRule} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.VisibilityRule.toObject = function(includeInstance, msg) { + var f, obj = { + selector: jspb.Message.getFieldWithDefault(msg, 1, ""), + restriction: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.VisibilityRule} + */ +proto.google.api.VisibilityRule.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.VisibilityRule; + return proto.google.api.VisibilityRule.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.VisibilityRule} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.VisibilityRule} + */ +proto.google.api.VisibilityRule.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSelector(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRestriction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.VisibilityRule.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.VisibilityRule.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.VisibilityRule} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.VisibilityRule.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSelector(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRestriction(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string selector = 1; + * @return {string} + */ +proto.google.api.VisibilityRule.prototype.getSelector = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.VisibilityRule} returns this + */ +proto.google.api.VisibilityRule.prototype.setSelector = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string restriction = 2; + * @return {string} + */ +proto.google.api.VisibilityRule.prototype.getRestriction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.VisibilityRule} returns this + */ +proto.google.api.VisibilityRule.prototype.setRestriction = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.enumVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {enumVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.enumVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumOptions.extensions[72295727] = proto.google.api.enumVisibility; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `valueVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.valueVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {valueVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.EnumValueOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.valueVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumValueOptions.extensions[72295727] = proto.google.api.valueVisibility; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `fieldVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.fieldVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {fieldVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.fieldVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[72295727] = proto.google.api.fieldVisibility; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `messageVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.messageVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {messageVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.messageVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[72295727] = proto.google.api.messageVisibility; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `methodVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.methodVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {methodVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.methodVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MethodOptions.extensions[72295727] = proto.google.api.methodVisibility; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `apiVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.apiVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {apiVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.ServiceOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.apiVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.ServiceOptions.extensions[72295727] = proto.google.api.apiVisibility; + +goog.object.extend(exports, proto.google.api); diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.proto b/proto/ory/keto/opl/v1alpha1/syntax_service.proto index 1c0d2f0c3..55ff245c4 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.proto +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.proto @@ -1,11 +1,11 @@ syntax = "proto3"; +package ory.keto.opl.v1alpha1; import "google/api/annotations.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; -package ory.keto.opl.v1alpha1; -option go_package = "github.com/ory/keto/proto/ory/keto/opl/v1alpha1;opl"; option csharp_namespace = "Ory.Keto.Opl.v1alpha1"; +option go_package = "github.com/ory/keto/proto/ory/keto/opl/v1alpha1;opl"; option java_multiple_files = true; option java_outer_classname = "SyntaxServiceProto"; option java_package = "sh.ory.keto.opl.v1alpha1"; @@ -27,15 +27,13 @@ service SyntaxService { key: "200" value: { description: "The result of the syntax checker" - schema:{ - json_schema: { - ref: ".ory.keto.opl.v1alpha1.CheckResponse"; - } + schema: { + json_schema: {ref: ".ory.keto.opl.v1alpha1.CheckResponse"} } } } }; - }; + } } message CheckRequest { @@ -53,6 +51,6 @@ message ParseError { } message SourcePosition { - uint32 line = 1 [json_name="Line"]; + uint32 line = 1 [json_name = "Line"]; uint32 column = 2; -} \ No newline at end of file +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go index c075d079c..e0844827c 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go @@ -325,13 +325,13 @@ var file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDesc = []byte{ 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, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 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, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb6, + 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 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, 0xb6, 0x04, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/check_service.proto index ce6151ab4..c75aa366a 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.proto @@ -4,8 +4,8 @@ package ory.keto.relation_tuples.v1alpha2; import "google/api/annotations.proto"; import "google/api/visibility.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; import "ory/keto/relation_tuples/v1alpha2/relation_tuples.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; @@ -23,9 +23,7 @@ service CheckService { rpc Check(CheckRequest) returns (CheckResponse) { option (google.api.http) = { get: "/relation-tuples/check" - additional_bindings: { - get: "/relation-tuples/check/openapi" - } + additional_bindings: {get: "/relation-tuples/check/openapi"} additional_bindings: { post: "/relation-tuples/check" body: "*" @@ -44,9 +42,7 @@ service CheckService { value: { description: "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200." schema: { - json_schema: { - ref: ".ory.keto.relation_tuples.v1alpha2.CheckResponse"; - } + json_schema: {ref: ".ory.keto.relation_tuples.v1alpha2.CheckResponse"} } } } @@ -55,9 +51,7 @@ service CheckService { value: { description: "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200." schema: { - json_schema: { - ref: ".ory.keto.relation_tuples.v1alpha2.CheckResponse"; - } + json_schema: {ref: ".ory.keto.relation_tuples.v1alpha2.CheckResponse"} } } } @@ -80,14 +74,23 @@ message CheckRequest { // The relation between the Object and the Subject. string relation = 3 [deprecated = true]; // The related subject in this check. - Subject subject = 4 [deprecated = true, (google.api.field_visibility).restriction = "NO_SWAGGER"]; + Subject subject = 4 [ + deprecated = true, + (google.api.field_visibility).restriction = "NO_SWAGGER" + ]; oneof rest_api_subject { // A concrete id of the subject. - string subject_id = 9 [deprecated = true, json_name="subject_id"]; + string subject_id = 9 [ + deprecated = true, + json_name = "subject_id" + ]; // A subject set that expands to more Subjects. // More information are available under [concepts](../concepts/subjects.mdx). - SubjectSetQuery subject_set = 10 [deprecated = true, json_name="subject_set"]; + SubjectSetQuery subject_set = 10 [ + deprecated = true, + json_name = "subject_set" + ]; } RelationTuple tuple = 8 [(google.api.field_visibility).restriction = "NO_SWAGGER"]; @@ -133,7 +136,7 @@ message CheckRequest { // // If the value is less than 1 or greater than the global // max-depth then the global max-depth will be used instead. - int32 max_depth = 7 [json_name="max-depth"]; + int32 max_depth = 7 [json_name = "max-depth"]; } // The response for a CheckService.Check rpc. diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts index 20a2d2e0d..834333246 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.d.ts @@ -7,8 +7,8 @@ import * as grpc from "grpc"; import * as ory_keto_relation_tuples_v1alpha2_check_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/check_service_pb"; import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; -import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; interface ICheckServiceService extends grpc.ServiceDefinition { check: ICheckServiceService_ICheck; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js index 3c77a8144..53d639e72 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc_pb.js @@ -5,8 +5,8 @@ var grpc = require('@grpc/grpc-js'); var ory_keto_relation_tuples_v1alpha2_check_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/check_service_pb.js'); var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); -var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); function serialize_ory_keto_relation_tuples_v1alpha2_CheckRequest(arg) { if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_check_service_pb.CheckRequest)) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts index 66545eadd..39fc8e75f 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.d.ts @@ -6,8 +6,8 @@ import * as jspb from "google-protobuf"; import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; -import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; export class CheckRequest extends jspb.Message { getNamespace(): string; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js index d766a6aa1..fa456826f 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js @@ -25,10 +25,10 @@ var google_api_annotations_pb = require('../../../../google/api/annotations_pb.j goog.object.extend(proto, google_api_annotations_pb); var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); goog.object.extend(proto, google_api_visibility_pb); -var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); -goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); +goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CheckRequest', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.RestApiSubjectCase', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CheckResponse', null, global); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go index a0c12bd83..a8e5fdd9c 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go @@ -391,17 +391,17 @@ var file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDesc = []byte 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 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, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, - 0x72, 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, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 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, 0xa0, 0x02, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x58, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.proto index 8fe344bfb..98f32b945 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.proto @@ -3,13 +3,13 @@ syntax = "proto3"; package ory.keto.relation_tuples.v1alpha2; import "google/api/annotations.proto"; -import "google/api/visibility.proto"; import "google/api/field_behavior.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; +import "google/api/visibility.proto"; import "ory/keto/relation_tuples/v1alpha2/relation_tuples.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; +option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option java_multiple_files = true; option java_outer_classname = "ExpandServiceProto"; option java_package = "sh.ory.keto.relation_tuples.v1alpha2"; @@ -35,14 +35,12 @@ service ExpandService { value: { description: "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200." schema: { - json_schema: { - ref: ".ory.keto.relation_tuples.v1alpha2.SubjectTree"; - } + json_schema: {ref: ".ory.keto.relation_tuples.v1alpha2.SubjectTree"} } } } }; - }; + } } // The request for an ExpandService.Expand RPC. @@ -82,12 +80,20 @@ message ExpandRequest { // The namespace of the object and relation // referenced in this subject set. - string namespace = 4 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + string namespace = 4 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; // The object related by this subject set. - string object = 5 [deprecated = true, (google.api.field_behavior) = REQUIRED]; + string object = 5 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; // The relation between the object and the subjects. - string relation = 6 [deprecated = true, (google.api.field_behavior) = REQUIRED]; - + string relation = 6 [ + deprecated = true, + (google.api.field_behavior) = REQUIRED + ]; } // The response for a ExpandService.Expand RPC. @@ -140,7 +146,10 @@ enum NodeType { message SubjectTree { // The type of the node. - NodeType node_type = 1 [json_name = "type", (google.api.field_behavior) = REQUIRED]; + NodeType node_type = 1 [ + json_name = "type", + (google.api.field_behavior) = REQUIRED + ]; // The subject this node represents. // Deprecated: More information is now available in the tuple field. diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.d.ts index 0b351ba10..51d7d6213 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.d.ts @@ -6,10 +6,10 @@ import * as grpc from "grpc"; import * as ory_keto_relation_tuples_v1alpha2_expand_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/expand_service_pb"; -import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; import * as google_api_field_behavior_pb from "../../../../google/api/field_behavior_pb"; -import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; +import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; interface IExpandServiceService extends grpc.ServiceDefinition { expand: IExpandServiceService_IExpand; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.js index b68774a1d..127a631d7 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc_pb.js @@ -4,10 +4,10 @@ var grpc = require('@grpc/grpc-js'); var ory_keto_relation_tuples_v1alpha2_expand_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/expand_service_pb.js'); var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); -var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); var google_api_field_behavior_pb = require('../../../../google/api/field_behavior_pb.js'); -var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); +var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); function serialize_ory_keto_relation_tuples_v1alpha2_ExpandRequest(arg) { if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_expand_service_pb.ExpandRequest)) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts index 47ee39753..f0be64824 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.d.ts @@ -5,10 +5,10 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; import * as google_api_field_behavior_pb from "../../../../google/api/field_behavior_pb"; -import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; +import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; export class ExpandRequest extends jspb.Message { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js index 6b6c2e15b..dd2b726ef 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js @@ -23,14 +23,14 @@ var global = var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); -var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); -goog.object.extend(proto, google_api_visibility_pb); var google_api_field_behavior_pb = require('../../../../google/api/field_behavior_pb.js'); goog.object.extend(proto, google_api_field_behavior_pb); -var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); -goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); +var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); +goog.object.extend(proto, google_api_visibility_pb); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); +goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.NodeType', null, global); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.proto index 5e4535044..10449e22c 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.proto @@ -1,11 +1,11 @@ syntax = "proto3"; +package ory.keto.relation_tuples.v1alpha2; import "google/api/annotations.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; -package ory.keto.relation_tuples.v1alpha2; -option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; +option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option java_multiple_files = true; option java_outer_classname = "NamespacesServiceProto"; option java_package = "sh.ory.keto.relation_tuples.v1alpha2"; @@ -19,9 +19,7 @@ service NamespacesService { // // Get all namespaces. rpc ListNamespaces(ListNamespacesRequest) returns (ListNamespacesResponse) { - option (google.api.http) = { - get: "/namespaces" - }; + option (google.api.http) = {get: "/namespaces"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { consumes: "application/x-www-form-urlencoded"; tags: "relationship"; @@ -34,19 +32,17 @@ service NamespacesService { key: "application/json" value: "{ \"namespaces\": [ { \"name\": \"my namespace\" } ] }" } - schema:{ - json_schema: { - ref: ".ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse"; - } + schema: { + json_schema: {ref: ".ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse"} } } } }; - }; + } } // Request for ReadService.ListNamespaces RPC. -message ListNamespacesRequest { } +message ListNamespacesRequest {} message ListNamespacesResponse { repeated Namespace namespaces = 1; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go index 263a3da18..fbcc37d01 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go @@ -206,11 +206,11 @@ var file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDesc = []byte{ 0x68, 0x61, 0x32, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 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, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x70, 0x68, 0x61, 0x32, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 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, 0xa4, 0x04, 0x0a, 0x0d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/openapi.proto b/proto/ory/keto/relation_tuples/v1alpha2/openapi.proto index f34ffb56f..ce1cadbc9 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/openapi.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/openapi.proto @@ -2,16 +2,15 @@ syntax = "proto3"; package ory.keto.relation_tuples.v1alpha2; -import "protoc-gen-openapiv2/options/annotations.proto"; import "google/api/field_behavior.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; +option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option java_multiple_files = true; option java_outer_classname = "OpenapiProto"; option java_package = "sh.ory.keto.relation_tuples.v1alpha2"; option php_namespace = "Ory\\Keto\\RelationTuples\\v1alpha2"; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { title: "ORY Keto"; @@ -28,7 +27,10 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { version: "Latest"; }; base_path: "/"; - schemes: [HTTP, HTTPS]; + schemes: [ + HTTP, + HTTPS + ]; consumes: ["application/json"]; produces: ["application/json"]; responses: { @@ -36,9 +38,7 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { value: { description: "errorGeneric"; schema: { - json_schema: { - ref: ".ory.keto.relation_tuples.v1alpha2.ErrorResponse" - } + json_schema: {ref: ".ory.keto.relation_tuples.v1alpha2.ErrorResponse"} } }; }; @@ -50,9 +50,7 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { message ErrorResponse { message Error { // The status code - int64 code = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - example: "404"; - }]; + int64 code = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "404"}]; // Debug information // @@ -62,7 +60,7 @@ message ErrorResponse { // Further error details // // Further details about the error. - map details = 3; + map details = 3; // The error ID // @@ -72,9 +70,10 @@ message ErrorResponse { // The error message // // The error's message (required). - string message = 5 [(google.api.field_behavior) = REQUIRED, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - example: "\"The requested resource could not be found.\""; - }]; + string message = 5 [ + (google.api.field_behavior) = REQUIRED, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"The requested resource could not be found.\""} + ]; // The error reason // @@ -85,17 +84,13 @@ message ErrorResponse { // // The request ID is often exposed internally in order to trace // errors across service architectures. This is often a UUID. - string request = 7 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - example: "\"d7ef54b1-ec15-46e6-bccb-524b82c035e6\""; - }]; + string request = 7 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"d7ef54b1-ec15-46e6-bccb-524b82c035e6\""}]; // The status description // // Status holds the human-readable HTTP status code. - string status = 8 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - example: "\"Not Found\""; - }]; + string status = 8 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"Not Found\""}]; } Error error = 1 [(google.api.field_behavior) = REQUIRED]; -} \ No newline at end of file +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.d.ts index 58ee89b67..b2a2d11c7 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.d.ts @@ -5,8 +5,8 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; import * as google_api_field_behavior_pb from "../../../../google/api/field_behavior_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; export class ErrorResponse extends jspb.Message { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.js index fc39a357c..cf12badd6 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.js @@ -21,10 +21,10 @@ var global = (function () { return this; }).call(null) || Function('return this')(); -var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); -goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); var google_api_field_behavior_pb = require('../../../../google/api/field_behavior_pb.js'); goog.object.extend(proto, google_api_field_behavior_pb); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); +goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error', null, global); /** diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go index 6186f13c7..7f0f36068 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go @@ -383,15 +383,15 @@ var file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDesc = []byte{ 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 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, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 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, 0xc7, 0x06, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x6e, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x6f, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/read_service.proto index 7062394c2..55826b654 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.proto @@ -4,12 +4,12 @@ package ory.keto.relation_tuples.v1alpha2; import "google/api/annotations.proto"; import "google/api/visibility.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; import "google/protobuf/field_mask.proto"; import "ory/keto/relation_tuples/v1alpha2/relation_tuples.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; -option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; +option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option java_multiple_files = true; option java_outer_classname = "ReadServiceProto"; option java_package = "sh.ory.keto.relation_tuples.v1alpha2"; @@ -21,9 +21,7 @@ option php_namespace = "Ory\\Keto\\RelationTuples\\v1alpha2"; service ReadService { // Lists ACL relationships. rpc ListRelationTuples(ListRelationTuplesRequest) returns (ListRelationTuplesResponse) { - option (google.api.http) = { - get: "/relation-tuples" - }; + option (google.api.http) = {get: "/relation-tuples"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { consumes: "application/x-www-form-urlencoded"; tags: "relationship"; @@ -32,15 +30,13 @@ service ReadService { key: "200" value: { description: "The list of relationships." - schema:{ - json_schema: { - ref: ".ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse"; - } + schema: { + json_schema: {ref: ".ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse"} } } } }; - }; + } } // Request for ReadService.ListRelationTuples RPC. @@ -73,7 +69,10 @@ message ListRelationTuplesRequest { // // The RelationTuple list from ListRelationTuplesResponse // is ordered from the newest RelationTuple to the oldest. - Query query = 1 [deprecated = true, (google.api.field_visibility).restriction = "NO_SWAGGER"]; + Query query = 1 [ + deprecated = true, + (google.api.field_visibility).restriction = "NO_SWAGGER" + ]; RelationQuery relation_query = 6 [(google.api.field_visibility).restriction = "NO_SWAGGER"]; // This field is not implemented yet and has no effect. @@ -99,7 +98,7 @@ message ListRelationTuplesRequest { // RelationTuples to return in the response. // // Default: 100 - int32 page_size = 4 [json_name="page_size"]; + int32 page_size = 4 [json_name = "page_size"]; // Optional. An opaque pagination token returned from // a previous call to `ListRelationTuples` that @@ -107,7 +106,7 @@ message ListRelationTuplesRequest { // // An empty token denotes the first page. All successive // pages require the token from the previous page. - string page_token = 5 [json_name="page_token"]; + string page_token = 5 [json_name = "page_token"]; // The namespace string namespace = 7 [deprecated = true]; @@ -118,18 +117,18 @@ message ListRelationTuplesRequest { oneof rest_api_subject { // A concrete id of the subject. - string subject_id = 10 [json_name="subject_id"]; + string subject_id = 10 [json_name = "subject_id"]; // A subject set that expands to more Subjects. // More information are available under [concepts](../concepts/subjects.mdx). - SubjectSetQuery subject_set = 11 [json_name="subject_set"]; + SubjectSetQuery subject_set = 11 [json_name = "subject_set"]; } } // The response of a ReadService.ListRelationTuples RPC. message ListRelationTuplesResponse { // The relationships matching the list request. - repeated RelationTuple relation_tuples = 1 [json_name="relation_tuples"]; + repeated RelationTuple relation_tuples = 1 [json_name = "relation_tuples"]; // The token required to get the next page. // If this is the last page, the token will be the empty string. - string next_page_token = 2 [json_name="next_page_token"]; + string next_page_token = 2 [json_name = "next_page_token"]; } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.d.ts index 82bdcccc9..822bbda17 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.d.ts @@ -7,9 +7,9 @@ import * as grpc from "grpc"; import * as ory_keto_relation_tuples_v1alpha2_read_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/read_service_pb"; import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; -import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; import * as google_protobuf_field_mask_pb from "google-protobuf/google/protobuf/field_mask_pb"; import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; interface IReadServiceService extends grpc.ServiceDefinition { listRelationTuples: IReadServiceService_IListRelationTuples; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js index 00f9b2c6e..302076b9f 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc_pb.js @@ -5,9 +5,9 @@ var grpc = require('@grpc/grpc-js'); var ory_keto_relation_tuples_v1alpha2_read_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/read_service_pb.js'); var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); -var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); var google_protobuf_field_mask_pb = require('google-protobuf/google/protobuf/field_mask_pb.js'); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); function serialize_ory_keto_relation_tuples_v1alpha2_ListRelationTuplesRequest(arg) { if (!(arg instanceof ory_keto_relation_tuples_v1alpha2_read_service_pb.ListRelationTuplesRequest)) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.d.ts index 681749238..3064c3042 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.d.ts @@ -6,9 +6,9 @@ import * as jspb from "google-protobuf"; import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; -import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; import * as google_protobuf_field_mask_pb from "google-protobuf/google/protobuf/field_mask_pb"; import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; export class ListRelationTuplesRequest extends jspb.Message { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js index 71e732edd..447946a0b 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js @@ -25,12 +25,12 @@ var google_api_annotations_pb = require('../../../../google/api/annotations_pb.j goog.object.extend(proto, google_api_annotations_pb); var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); goog.object.extend(proto, google_api_visibility_pb); -var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); -goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); var google_protobuf_field_mask_pb = require('google-protobuf/google/protobuf/field_mask_pb.js'); goog.object.extend(proto, google_protobuf_field_mask_pb); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); +goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.RestApiSubjectCase', null, global); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go index b133f7919..ed6d069a6 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go @@ -562,11 +562,11 @@ var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDesc = []byt 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x1a, 0x1b, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, - 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x02, 0x0a, 0x0d, 0x52, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, + 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x02, 0x0a, 0x0d, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.proto b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.proto index 4b2dc0dfb..56ebbe9a1 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.proto @@ -1,11 +1,11 @@ syntax = "proto3"; +package ory.keto.relation_tuples.v1alpha2; -import "google/api/visibility.proto"; import "google/api/field_behavior.proto"; -package ory.keto.relation_tuples.v1alpha2; +import "google/api/visibility.proto"; -option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; +option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option java_multiple_files = true; option java_outer_classname = "RelationTuplesProto"; option java_package = "sh.ory.keto.relation_tuples.v1alpha2"; @@ -18,7 +18,7 @@ message RelationTuple { // The object related by this tuple. // It is an object in the namespace of the tuple. - string object = 2 [(google.api.field_behavior) = REQUIRED] ; + string object = 2 [(google.api.field_behavior) = REQUIRED]; // The relation between an Object and a Subject. string relation = 3 [(google.api.field_behavior) = REQUIRED]; @@ -30,10 +30,16 @@ message RelationTuple { oneof rest_api_subject { // A concrete id of the subject. - string subject_id = 5 [deprecated=true, json_name="subject_id"]; + string subject_id = 5 [ + deprecated = true, + json_name = "subject_id" + ]; // A subject set that expands to more Subjects. // More information are available under [concepts](../concepts/subjects.mdx). - SubjectSet subject_set = 6 [deprecated=true, json_name="subject_set"]; + SubjectSet subject_set = 6 [ + deprecated = true, + json_name = "subject_set" + ]; } } @@ -109,4 +115,4 @@ message SubjectSetQuery { string object = 2 [(google.api.field_behavior) = OPTIONAL]; // The relation between the object and the subjects. string relation = 3 [(google.api.field_behavior) = OPTIONAL]; -} \ No newline at end of file +} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.d.ts index 7cb8824bf..03ffeca9c 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.d.ts @@ -5,8 +5,8 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; import * as google_api_field_behavior_pb from "../../../../google/api/field_behavior_pb"; +import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; export class RelationTuple extends jspb.Message { getNamespace(): string; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js index cf1d1d3c4..040b272c5 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js @@ -21,10 +21,10 @@ var global = (function () { return this; }).call(null) || Function('return this')(); -var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); -goog.object.extend(proto, google_api_visibility_pb); var google_api_field_behavior_pb = require('../../../../google/api/field_behavior_pb.js'); goog.object.extend(proto, google_api_field_behavior_pb); +var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); +goog.object.extend(proto, google_api_visibility_pb); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.RelationQuery', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.RelationTuple', null, global); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.RestApiSubjectCase', null, global); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version.proto b/proto/ory/keto/relation_tuples/v1alpha2/version.proto index dde27f037..67c3f4abf 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/version.proto @@ -1,11 +1,11 @@ syntax = "proto3"; +package ory.keto.relation_tuples.v1alpha2; import "google/api/annotations.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; -package ory.keto.relation_tuples.v1alpha2; -option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; +option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option java_multiple_files = true; option java_outer_classname = "VersionServiceProto"; option java_package = "sh.ory.keto.relation_tuples.v1alpha2"; @@ -22,9 +22,7 @@ service VersionService { // If the service supports TLS Edge Termination, this endpoint does not require the // X-Forwarded-Proto header to be set. rpc GetVersion(GetVersionRequest) returns (GetVersionResponse) { - option (google.api.http) = { - get: "/version" - }; + option (google.api.http) = {get: "/version"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { tags: "version"; operation_id: "getVersion"; @@ -32,15 +30,13 @@ service VersionService { key: "200" value: { description: "The version of the instance." - schema:{ - json_schema: { - ref: ".ory.keto.relation_tuples.v1alpha2.GetVersionResponse"; - } + schema: { + json_schema: {ref: ".ory.keto.relation_tuples.v1alpha2.GetVersionResponse"} } } } }; - }; + } } // Request for the VersionService.GetVersion RPC. diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go index 2005ee838..4527f7880 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go @@ -736,17 +736,17 @@ var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDesc = []byte{ 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 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, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, - 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, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, + 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 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, 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, 0x8a, 0x01, 0x0a, 0x1d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto index d00513171..20eb81274 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto @@ -3,15 +3,14 @@ syntax = "proto3"; package ory.keto.relation_tuples.v1alpha2; import "google/api/annotations.proto"; -import "google/api/visibility.proto"; import "google/api/field_behavior.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; +import "google/api/visibility.proto"; import "ory/keto/relation_tuples/v1alpha2/relation_tuples.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; import "validate/validate.proto"; - -option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option csharp_namespace = "Ory.Keto.RelationTuples.v1alpha2"; +option go_package = "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2;rts"; option java_multiple_files = true; option java_outer_classname = "WriteServiceProto"; option java_package = "sh.ory.keto.relation_tuples.v1alpha2"; @@ -41,7 +40,7 @@ service WriteService { } } }; - }; + } // Creates a relationship rpc CreateRelationTuple(CreateRelationTupleRequest) returns (CreateRelationTupleResponse) { @@ -58,32 +57,26 @@ service WriteService { value: { description: "The created relationship." schema: { - json_schema: { - ref: ".ory.keto.relation_tuples.v1alpha2.RelationTuple"; - } + json_schema: {ref: ".ory.keto.relation_tuples.v1alpha2.RelationTuple"} } } } }; - }; + } // Deletes relationships based on relation query rpc DeleteRelationTuples(DeleteRelationTuplesRequest) returns (DeleteRelationTuplesResponse) { - option (google.api.http) = { - delete: "/admin/relation-tuples" - }; + option (google.api.http) = {delete: "/admin/relation-tuples"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { consumes: "application/x-www-form-urlencoded"; tags: "relationship"; operation_id: "deleteRelationships"; responses: { key: "204" - value: { - description: "An empty response." - } + value: {description: "An empty response."} } }; - }; + } } // The request of a WriteService.TransactRelationTuples RPC. @@ -122,7 +115,12 @@ message RelationTupleDelta { // The action to do on the RelationTuple. Action action = 1 [ (google.api.field_behavior) = REQUIRED, - (validate.rules).enum = {in: [1, 2]} + (validate.rules).enum = { + in: [ + 1, + 2 + ] + } ]; // The target RelationTuple. @@ -162,10 +160,10 @@ message CreateRelationTupleRequest { oneof subject { // A concrete id of the subject. - string subject_id = 5 [json_name="subject_id"]; + string subject_id = 5 [json_name = "subject_id"]; // A subject set that expands to more Subjects. // More information are available under [concepts](../concepts/subjects.mdx). - SubjectSet subject_set = 6 [json_name="subject_set"]; + SubjectSet subject_set = 6 [json_name = "subject_set"]; } } // The relationship to create. @@ -191,30 +189,36 @@ message DeleteRelationTuplesRequest { Subject subject = 4; } - Query query = 1 [deprecated=true, (google.api.field_visibility).restriction="NO_SWAGGER"]; + Query query = 1 [ + deprecated = true, + (google.api.field_visibility).restriction = "NO_SWAGGER" + ]; - RelationQuery relation_query = 2 [(google.api.field_visibility).restriction="NO_SWAGGER"]; + RelationQuery relation_query = 2 [(google.api.field_visibility).restriction = "NO_SWAGGER"]; - // The namespace this relation tuple lives in. - string namespace = 3 [deprecated=true]; + // The namespace this relation tuple lives in. + string namespace = 3 [deprecated = true]; // The object related by this tuple. // It is an object in the namespace of the tuple. - string object = 4 [deprecated=true]; + string object = 4 [deprecated = true]; // The relation between an Object and a Subject. - string relation = 5 [deprecated=true]; + string relation = 5 [deprecated = true]; oneof rest_api_subject { // A concrete id of the subject. - string subject_id = 6 [deprecated=true, json_name="subject_id"]; + string subject_id = 6 [ + deprecated = true, + json_name = "subject_id" + ]; // A subject set that expands to more Subjects. // More information are available under [concepts](../concepts/subjects.mdx). - SubjectSetQuery subject_set = 7 [deprecated=true, json_name="subject_set"]; + SubjectSetQuery subject_set = 7 [ + deprecated = true, + json_name = "subject_set" + ]; } - } -message DeleteRelationTuplesResponse { - -} +message DeleteRelationTuplesResponse {} diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts index d80d08510..82f957f6b 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.d.ts @@ -6,10 +6,10 @@ import * as grpc from "grpc"; import * as ory_keto_relation_tuples_v1alpha2_write_service_pb from "../../../../ory/keto/relation_tuples/v1alpha2/write_service_pb"; -import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; import * as google_api_field_behavior_pb from "../../../../google/api/field_behavior_pb"; -import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; +import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; import * as validate_validate_pb from "../../../../validate/validate_pb"; interface IWriteServiceService extends grpc.ServiceDefinition { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js index 3f7bd19f8..a9db943ed 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc_pb.js @@ -4,10 +4,10 @@ var grpc = require('@grpc/grpc-js'); var ory_keto_relation_tuples_v1alpha2_write_service_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/write_service_pb.js'); var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); -var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); var google_api_field_behavior_pb = require('../../../../google/api/field_behavior_pb.js'); -var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); +var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); var validate_validate_pb = require('../../../../validate/validate_pb.js'); function serialize_ory_keto_relation_tuples_v1alpha2_CreateRelationTupleRequest(arg) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts index 7fe7f3e36..54b0cb585 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.d.ts @@ -5,10 +5,10 @@ /* eslint-disable */ import * as jspb from "google-protobuf"; -import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; import * as google_api_field_behavior_pb from "../../../../google/api/field_behavior_pb"; -import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; +import * as google_api_visibility_pb from "../../../../google/api/visibility_pb"; import * as ory_keto_relation_tuples_v1alpha2_relation_tuples_pb from "../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb"; +import * as protoc_gen_openapiv2_options_annotations_pb from "../../../../protoc-gen-openapiv2/options/annotations_pb"; import * as validate_validate_pb from "../../../../validate/validate_pb"; export class TransactRelationTuplesRequest extends jspb.Message { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js index 072d74947..bd9ed46ba 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js @@ -23,14 +23,14 @@ var global = var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); -var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); -goog.object.extend(proto, google_api_visibility_pb); var google_api_field_behavior_pb = require('../../../../google/api/field_behavior_pb.js'); goog.object.extend(proto, google_api_field_behavior_pb); -var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); -goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); +var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); +goog.object.extend(proto, google_api_visibility_pb); var ory_keto_relation_tuples_v1alpha2_relation_tuples_pb = require('../../../../ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js'); goog.object.extend(proto, ory_keto_relation_tuples_v1alpha2_relation_tuples_pb); +var protoc$gen$openapiv2_options_annotations_pb = require('../../../../protoc-gen-openapiv2/options/annotations_pb.js'); +goog.object.extend(proto, protoc$gen$openapiv2_options_annotations_pb); var validate_validate_pb = require('../../../../validate/validate_pb.js'); goog.object.extend(proto, validate_validate_pb); goog.exportSymbol('proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest', null, global); diff --git a/proto/protoc-gen-openapiv2/options/annotations.pb.go b/proto/protoc-gen-openapiv2/options/annotations.pb.go new file mode 100644 index 000000000..52b1def95 --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/annotations.pb.go @@ -0,0 +1,236 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: protoc-gen-openapiv2/options/annotations.proto + +package options + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var file_protoc_gen_openapiv2_options_annotations_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.FileOptions)(nil), + ExtensionType: (*Swagger)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger", + Tag: "bytes,1042,opt,name=openapiv2_swagger", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*Operation)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation", + Tag: "bytes,1042,opt,name=openapiv2_operation", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*Schema)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema", + Tag: "bytes,1042,opt,name=openapiv2_schema", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtensionType: (*Tag)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag", + Tag: "bytes,1042,opt,name=openapiv2_tag", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*JSONSchema)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field", + Tag: "bytes,1042,opt,name=openapiv2_field", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, +} + +// Extension fields to descriptorpb.FileOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Swagger openapiv2_swagger = 1042; + E_Openapiv2Swagger = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[0] +) + +// Extension fields to descriptorpb.MethodOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Operation openapiv2_operation = 1042; + E_Openapiv2Operation = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[1] +) + +// Extension fields to descriptorpb.MessageOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Schema openapiv2_schema = 1042; + E_Openapiv2Schema = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[2] +) + +// Extension fields to descriptorpb.ServiceOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Tag openapiv2_tag = 1042; + E_Openapiv2Tag = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[3] +) + +// Extension fields to descriptorpb.FieldOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.JSONSchema openapiv2_field = 1042; + E_Openapiv2Field = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[4] +) + +var File_protoc_gen_openapiv2_options_annotations_proto protoreflect.FileDescriptor + +var file_protoc_gen_openapiv2_options_annotations_proto_rawDesc = []byte{ + 0x0a, 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, + 0x12, 0x29, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 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, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x7e, 0x0a, 0x11, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, + 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x52, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x3a, 0x86, 0x01, 0x0a, 0x13, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x12, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x7e, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x3a, 0x75, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x5f, 0x74, 0x61, 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x0c, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x54, 0x61, 0x67, 0x3a, 0x7e, 0x0a, 0x0f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0e, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x48, 0x5a, 0x46, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, + 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x76, 0x32, 0x2f, 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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_protoc_gen_openapiv2_options_annotations_proto_goTypes = []interface{}{ + (*descriptorpb.FileOptions)(nil), // 0: google.protobuf.FileOptions + (*descriptorpb.MethodOptions)(nil), // 1: google.protobuf.MethodOptions + (*descriptorpb.MessageOptions)(nil), // 2: google.protobuf.MessageOptions + (*descriptorpb.ServiceOptions)(nil), // 3: google.protobuf.ServiceOptions + (*descriptorpb.FieldOptions)(nil), // 4: google.protobuf.FieldOptions + (*Swagger)(nil), // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger + (*Operation)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Operation + (*Schema)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Schema + (*Tag)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Tag + (*JSONSchema)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema +} +var file_protoc_gen_openapiv2_options_annotations_proto_depIdxs = []int32{ + 0, // 0: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger:extendee -> google.protobuf.FileOptions + 1, // 1: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation:extendee -> google.protobuf.MethodOptions + 2, // 2: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema:extendee -> google.protobuf.MessageOptions + 3, // 3: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag:extendee -> google.protobuf.ServiceOptions + 4, // 4: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field:extendee -> google.protobuf.FieldOptions + 5, // 5: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger + 6, // 6: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation + 7, // 7: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Schema + 8, // 8: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Tag + 9, // 9: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 5, // [5:10] is the sub-list for extension type_name + 0, // [0:5] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_protoc_gen_openapiv2_options_annotations_proto_init() } +func file_protoc_gen_openapiv2_options_annotations_proto_init() { + if File_protoc_gen_openapiv2_options_annotations_proto != nil { + return + } + file_protoc_gen_openapiv2_options_openapiv2_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_protoc_gen_openapiv2_options_annotations_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 5, + NumServices: 0, + }, + GoTypes: file_protoc_gen_openapiv2_options_annotations_proto_goTypes, + DependencyIndexes: file_protoc_gen_openapiv2_options_annotations_proto_depIdxs, + ExtensionInfos: file_protoc_gen_openapiv2_options_annotations_proto_extTypes, + }.Build() + File_protoc_gen_openapiv2_options_annotations_proto = out.File + file_protoc_gen_openapiv2_options_annotations_proto_rawDesc = nil + file_protoc_gen_openapiv2_options_annotations_proto_goTypes = nil + file_protoc_gen_openapiv2_options_annotations_proto_depIdxs = nil +} diff --git a/proto/protoc-gen-openapiv2/options/annotations.pb.validate.go b/proto/protoc-gen-openapiv2/options/annotations.pb.validate.go new file mode 100644 index 000000000..303a12cab --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/annotations.pb.validate.go @@ -0,0 +1,36 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: protoc-gen-openapiv2/options/annotations.proto + +package options + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) diff --git a/proto/protoc-gen-openapiv2/options/annotations_grpc_pb.js b/proto/protoc-gen-openapiv2/options/annotations_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/annotations_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/protoc-gen-openapiv2/options/annotations_pb.d.ts b/proto/protoc-gen-openapiv2/options/annotations_pb.d.ts new file mode 100644 index 000000000..8e3a35012 --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/annotations_pb.d.ts @@ -0,0 +1,19 @@ +// package: grpc.gateway.protoc_gen_openapiv2.options +// file: protoc-gen-openapiv2/options/annotations.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; +import * as protoc_gen_openapiv2_options_openapiv2_pb from "../../protoc-gen-openapiv2/options/openapiv2_pb"; + +export const openapiv2Swagger: jspb.ExtensionFieldInfo; + +export const openapiv2Operation: jspb.ExtensionFieldInfo; + +export const openapiv2Schema: jspb.ExtensionFieldInfo; + +export const openapiv2Tag: jspb.ExtensionFieldInfo; + +export const openapiv2Field: jspb.ExtensionFieldInfo; diff --git a/proto/protoc-gen-openapiv2/options/annotations_pb.js b/proto/protoc-gen-openapiv2/options/annotations_pb.js new file mode 100644 index 000000000..e7259613e --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/annotations_pb.js @@ -0,0 +1,158 @@ +// source: protoc-gen-openapiv2/options/annotations.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +var protoc$gen$openapiv2_options_openapiv2_pb = require('../../protoc-gen-openapiv2/options/openapiv2_pb.js'); +goog.object.extend(proto, protoc$gen$openapiv2_options_openapiv2_pb); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Field', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Operation', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Schema', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Swagger', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Tag', null, global); + +/** + * A tuple of {field number, class constructor} for the extension + * field named `openapiv2Swagger`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Swagger = new jspb.ExtensionFieldInfo( + 1042, + {openapiv2Swagger: 0}, + protoc$gen$openapiv2_options_openapiv2_pb.Swagger, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + protoc$gen$openapiv2_options_openapiv2_pb.Swagger.toObject), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[1042] = new jspb.ExtensionFieldBinaryInfo( + proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Swagger, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + protoc$gen$openapiv2_options_openapiv2_pb.Swagger.serializeBinaryToWriter, + protoc$gen$openapiv2_options_openapiv2_pb.Swagger.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[1042] = proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Swagger; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `openapiv2Operation`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Operation = new jspb.ExtensionFieldInfo( + 1042, + {openapiv2Operation: 0}, + protoc$gen$openapiv2_options_openapiv2_pb.Operation, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + protoc$gen$openapiv2_options_openapiv2_pb.Operation.toObject), + 0); + +google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[1042] = new jspb.ExtensionFieldBinaryInfo( + proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Operation, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + protoc$gen$openapiv2_options_openapiv2_pb.Operation.serializeBinaryToWriter, + protoc$gen$openapiv2_options_openapiv2_pb.Operation.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MethodOptions.extensions[1042] = proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Operation; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `openapiv2Schema`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Schema = new jspb.ExtensionFieldInfo( + 1042, + {openapiv2Schema: 0}, + protoc$gen$openapiv2_options_openapiv2_pb.Schema, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + protoc$gen$openapiv2_options_openapiv2_pb.Schema.toObject), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[1042] = new jspb.ExtensionFieldBinaryInfo( + proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Schema, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + protoc$gen$openapiv2_options_openapiv2_pb.Schema.serializeBinaryToWriter, + protoc$gen$openapiv2_options_openapiv2_pb.Schema.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[1042] = proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Schema; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `openapiv2Tag`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Tag = new jspb.ExtensionFieldInfo( + 1042, + {openapiv2Tag: 0}, + protoc$gen$openapiv2_options_openapiv2_pb.Tag, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + protoc$gen$openapiv2_options_openapiv2_pb.Tag.toObject), + 0); + +google_protobuf_descriptor_pb.ServiceOptions.extensionsBinary[1042] = new jspb.ExtensionFieldBinaryInfo( + proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Tag, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + protoc$gen$openapiv2_options_openapiv2_pb.Tag.serializeBinaryToWriter, + protoc$gen$openapiv2_options_openapiv2_pb.Tag.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.ServiceOptions.extensions[1042] = proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Tag; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `openapiv2Field`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Field = new jspb.ExtensionFieldInfo( + 1042, + {openapiv2Field: 0}, + protoc$gen$openapiv2_options_openapiv2_pb.JSONSchema, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + protoc$gen$openapiv2_options_openapiv2_pb.JSONSchema.toObject), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[1042] = new jspb.ExtensionFieldBinaryInfo( + proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Field, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + protoc$gen$openapiv2_options_openapiv2_pb.JSONSchema.serializeBinaryToWriter, + protoc$gen$openapiv2_options_openapiv2_pb.JSONSchema.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[1042] = proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Field; + +goog.object.extend(exports, proto.grpc.gateway.protoc_gen_openapiv2.options); diff --git a/proto/protoc-gen-openapiv2/options/openapiv2.pb.go b/proto/protoc-gen-openapiv2/options/openapiv2.pb.go new file mode 100644 index 000000000..ad780fc7b --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/openapiv2.pb.go @@ -0,0 +1,3226 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: protoc-gen-openapiv2/options/openapiv2.proto + +package options + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Scheme describes the schemes supported by the OpenAPI Swagger +// and Operation objects. +type Scheme int32 + +const ( + Scheme_UNKNOWN Scheme = 0 + Scheme_HTTP Scheme = 1 + Scheme_HTTPS Scheme = 2 + Scheme_WS Scheme = 3 + Scheme_WSS Scheme = 4 +) + +// Enum value maps for Scheme. +var ( + Scheme_name = map[int32]string{ + 0: "UNKNOWN", + 1: "HTTP", + 2: "HTTPS", + 3: "WS", + 4: "WSS", + } + Scheme_value = map[string]int32{ + "UNKNOWN": 0, + "HTTP": 1, + "HTTPS": 2, + "WS": 3, + "WSS": 4, + } +) + +func (x Scheme) Enum() *Scheme { + p := new(Scheme) + *p = x + return p +} + +func (x Scheme) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Scheme) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[0].Descriptor() +} + +func (Scheme) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[0] +} + +func (x Scheme) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Scheme.Descriptor instead. +func (Scheme) EnumDescriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{0} +} + +// `Type` is a a supported HTTP header type. +// See https://swagger.io/specification/v2/#parameterType. +type HeaderParameter_Type int32 + +const ( + HeaderParameter_UNKNOWN HeaderParameter_Type = 0 + HeaderParameter_STRING HeaderParameter_Type = 1 + HeaderParameter_NUMBER HeaderParameter_Type = 2 + HeaderParameter_INTEGER HeaderParameter_Type = 3 + HeaderParameter_BOOLEAN HeaderParameter_Type = 4 +) + +// Enum value maps for HeaderParameter_Type. +var ( + HeaderParameter_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "STRING", + 2: "NUMBER", + 3: "INTEGER", + 4: "BOOLEAN", + } + HeaderParameter_Type_value = map[string]int32{ + "UNKNOWN": 0, + "STRING": 1, + "NUMBER": 2, + "INTEGER": 3, + "BOOLEAN": 4, + } +) + +func (x HeaderParameter_Type) Enum() *HeaderParameter_Type { + p := new(HeaderParameter_Type) + *p = x + return p +} + +func (x HeaderParameter_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HeaderParameter_Type) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1].Descriptor() +} + +func (HeaderParameter_Type) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1] +} + +func (x HeaderParameter_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HeaderParameter_Type.Descriptor instead. +func (HeaderParameter_Type) EnumDescriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{3, 0} +} + +type JSONSchema_JSONSchemaSimpleTypes int32 + +const ( + JSONSchema_UNKNOWN JSONSchema_JSONSchemaSimpleTypes = 0 + JSONSchema_ARRAY JSONSchema_JSONSchemaSimpleTypes = 1 + JSONSchema_BOOLEAN JSONSchema_JSONSchemaSimpleTypes = 2 + JSONSchema_INTEGER JSONSchema_JSONSchemaSimpleTypes = 3 + JSONSchema_NULL JSONSchema_JSONSchemaSimpleTypes = 4 + JSONSchema_NUMBER JSONSchema_JSONSchemaSimpleTypes = 5 + JSONSchema_OBJECT JSONSchema_JSONSchemaSimpleTypes = 6 + JSONSchema_STRING JSONSchema_JSONSchemaSimpleTypes = 7 +) + +// Enum value maps for JSONSchema_JSONSchemaSimpleTypes. +var ( + JSONSchema_JSONSchemaSimpleTypes_name = map[int32]string{ + 0: "UNKNOWN", + 1: "ARRAY", + 2: "BOOLEAN", + 3: "INTEGER", + 4: "NULL", + 5: "NUMBER", + 6: "OBJECT", + 7: "STRING", + } + JSONSchema_JSONSchemaSimpleTypes_value = map[string]int32{ + "UNKNOWN": 0, + "ARRAY": 1, + "BOOLEAN": 2, + "INTEGER": 3, + "NULL": 4, + "NUMBER": 5, + "OBJECT": 6, + "STRING": 7, + } +) + +func (x JSONSchema_JSONSchemaSimpleTypes) Enum() *JSONSchema_JSONSchemaSimpleTypes { + p := new(JSONSchema_JSONSchemaSimpleTypes) + *p = x + return p +} + +func (x JSONSchema_JSONSchemaSimpleTypes) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (JSONSchema_JSONSchemaSimpleTypes) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2].Descriptor() +} + +func (JSONSchema_JSONSchemaSimpleTypes) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2] +} + +func (x JSONSchema_JSONSchemaSimpleTypes) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use JSONSchema_JSONSchemaSimpleTypes.Descriptor instead. +func (JSONSchema_JSONSchemaSimpleTypes) EnumDescriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{11, 0} +} + +// The type of the security scheme. Valid values are "basic", +// "apiKey" or "oauth2". +type SecurityScheme_Type int32 + +const ( + SecurityScheme_TYPE_INVALID SecurityScheme_Type = 0 + SecurityScheme_TYPE_BASIC SecurityScheme_Type = 1 + SecurityScheme_TYPE_API_KEY SecurityScheme_Type = 2 + SecurityScheme_TYPE_OAUTH2 SecurityScheme_Type = 3 +) + +// Enum value maps for SecurityScheme_Type. +var ( + SecurityScheme_Type_name = map[int32]string{ + 0: "TYPE_INVALID", + 1: "TYPE_BASIC", + 2: "TYPE_API_KEY", + 3: "TYPE_OAUTH2", + } + SecurityScheme_Type_value = map[string]int32{ + "TYPE_INVALID": 0, + "TYPE_BASIC": 1, + "TYPE_API_KEY": 2, + "TYPE_OAUTH2": 3, + } +) + +func (x SecurityScheme_Type) Enum() *SecurityScheme_Type { + p := new(SecurityScheme_Type) + *p = x + return p +} + +func (x SecurityScheme_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecurityScheme_Type) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3].Descriptor() +} + +func (SecurityScheme_Type) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3] +} + +func (x SecurityScheme_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SecurityScheme_Type.Descriptor instead. +func (SecurityScheme_Type) EnumDescriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{14, 0} +} + +// The location of the API key. Valid values are "query" or "header". +type SecurityScheme_In int32 + +const ( + SecurityScheme_IN_INVALID SecurityScheme_In = 0 + SecurityScheme_IN_QUERY SecurityScheme_In = 1 + SecurityScheme_IN_HEADER SecurityScheme_In = 2 +) + +// Enum value maps for SecurityScheme_In. +var ( + SecurityScheme_In_name = map[int32]string{ + 0: "IN_INVALID", + 1: "IN_QUERY", + 2: "IN_HEADER", + } + SecurityScheme_In_value = map[string]int32{ + "IN_INVALID": 0, + "IN_QUERY": 1, + "IN_HEADER": 2, + } +) + +func (x SecurityScheme_In) Enum() *SecurityScheme_In { + p := new(SecurityScheme_In) + *p = x + return p +} + +func (x SecurityScheme_In) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecurityScheme_In) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4].Descriptor() +} + +func (SecurityScheme_In) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4] +} + +func (x SecurityScheme_In) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SecurityScheme_In.Descriptor instead. +func (SecurityScheme_In) EnumDescriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{14, 1} +} + +// The flow used by the OAuth2 security scheme. Valid values are +// "implicit", "password", "application" or "accessCode". +type SecurityScheme_Flow int32 + +const ( + SecurityScheme_FLOW_INVALID SecurityScheme_Flow = 0 + SecurityScheme_FLOW_IMPLICIT SecurityScheme_Flow = 1 + SecurityScheme_FLOW_PASSWORD SecurityScheme_Flow = 2 + SecurityScheme_FLOW_APPLICATION SecurityScheme_Flow = 3 + SecurityScheme_FLOW_ACCESS_CODE SecurityScheme_Flow = 4 +) + +// Enum value maps for SecurityScheme_Flow. +var ( + SecurityScheme_Flow_name = map[int32]string{ + 0: "FLOW_INVALID", + 1: "FLOW_IMPLICIT", + 2: "FLOW_PASSWORD", + 3: "FLOW_APPLICATION", + 4: "FLOW_ACCESS_CODE", + } + SecurityScheme_Flow_value = map[string]int32{ + "FLOW_INVALID": 0, + "FLOW_IMPLICIT": 1, + "FLOW_PASSWORD": 2, + "FLOW_APPLICATION": 3, + "FLOW_ACCESS_CODE": 4, + } +) + +func (x SecurityScheme_Flow) Enum() *SecurityScheme_Flow { + p := new(SecurityScheme_Flow) + *p = x + return p +} + +func (x SecurityScheme_Flow) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecurityScheme_Flow) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[5].Descriptor() +} + +func (SecurityScheme_Flow) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[5] +} + +func (x SecurityScheme_Flow) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SecurityScheme_Flow.Descriptor instead. +func (SecurityScheme_Flow) EnumDescriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{14, 2} +} + +// `Swagger` is a representation of OpenAPI v2 specification's Swagger object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: ""; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; +// }; +// }; +// schemes: HTTPS; +// consumes: "application/json"; +// produces: "application/json"; +// }; +type Swagger struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the OpenAPI Specification version being used. It can be + // used by the OpenAPI UI and other clients to interpret the API listing. The + // value MUST be "2.0". + Swagger string `protobuf:"bytes,1,opt,name=swagger,proto3" json:"swagger,omitempty"` + // Provides metadata about the API. The metadata can be used by the + // clients if needed. + Info *Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` + // The host (name or ip) serving the API. This MUST be the host only and does + // not include the scheme nor sub-paths. It MAY include a port. If the host is + // not included, the host serving the documentation is to be used (including + // the port). The host does not support path templating. + Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` + // The base path on which the API is served, which is relative to the host. If + // it is not included, the API is served directly under the host. The value + // MUST start with a leading slash (/). The basePath does not support path + // templating. + // Note that using `base_path` does not change the endpoint paths that are + // generated in the resulting OpenAPI file. If you wish to use `base_path` + // with relatively generated OpenAPI paths, the `base_path` prefix must be + // manually removed from your `google.api.http` paths and your code changed to + // serve the API from the `base_path`. + BasePath string `protobuf:"bytes,4,opt,name=base_path,json=basePath,proto3" json:"base_path,omitempty"` + // The transfer protocol of the API. Values MUST be from the list: "http", + // "https", "ws", "wss". If the schemes is not included, the default scheme to + // be used is the one used to access the OpenAPI definition itself. + Schemes []Scheme `protobuf:"varint,5,rep,packed,name=schemes,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.Scheme" json:"schemes,omitempty"` + // A list of MIME types the APIs can consume. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"` + // A list of MIME types the APIs can produce. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"` + // An object to hold responses that can be used across operations. This + // property does not define global responses for all operations. + Responses map[string]*Response `protobuf:"bytes,10,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Security scheme definitions that can be used across the specification. + SecurityDefinitions *SecurityDefinitions `protobuf:"bytes,11,opt,name=security_definitions,json=securityDefinitions,proto3" json:"security_definitions,omitempty"` + // A declaration of which security schemes are applied for the API as a whole. + // The list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). + // Individual operations can override this definition. + Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` + // A list of tags for API documentation control. Tags can be used for logical + // grouping of operations by resources or any other qualifier. + Tags []*Tag `protobuf:"bytes,13,rep,name=tags,proto3" json:"tags,omitempty"` + // Additional external documentation. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,14,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,15,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Swagger) Reset() { + *x = Swagger{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Swagger) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Swagger) ProtoMessage() {} + +func (x *Swagger) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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 Swagger.ProtoReflect.Descriptor instead. +func (*Swagger) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{0} +} + +func (x *Swagger) GetSwagger() string { + if x != nil { + return x.Swagger + } + return "" +} + +func (x *Swagger) GetInfo() *Info { + if x != nil { + return x.Info + } + return nil +} + +func (x *Swagger) GetHost() string { + if x != nil { + return x.Host + } + return "" +} + +func (x *Swagger) GetBasePath() string { + if x != nil { + return x.BasePath + } + return "" +} + +func (x *Swagger) GetSchemes() []Scheme { + if x != nil { + return x.Schemes + } + return nil +} + +func (x *Swagger) GetConsumes() []string { + if x != nil { + return x.Consumes + } + return nil +} + +func (x *Swagger) GetProduces() []string { + if x != nil { + return x.Produces + } + return nil +} + +func (x *Swagger) GetResponses() map[string]*Response { + if x != nil { + return x.Responses + } + return nil +} + +func (x *Swagger) GetSecurityDefinitions() *SecurityDefinitions { + if x != nil { + return x.SecurityDefinitions + } + return nil +} + +func (x *Swagger) GetSecurity() []*SecurityRequirement { + if x != nil { + return x.Security + } + return nil +} + +func (x *Swagger) GetTags() []*Tag { + if x != nil { + return x.Tags + } + return nil +} + +func (x *Swagger) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +func (x *Swagger) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `Operation` is a representation of OpenAPI v2 specification's Operation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject +// +// Example: +// +// service EchoService { +// rpc Echo(SimpleMessage) returns (SimpleMessage) { +// option (google.api.http) = { +// get: "/v1/example/echo/{id}" +// }; +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { +// summary: "Get a message."; +// operation_id: "getMessage"; +// tags: "echo"; +// responses: { +// key: "200" +// value: { +// description: "OK"; +// } +// } +// }; +// } +// } +type Operation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of tags for API documentation control. Tags can be used for logical + // grouping of operations by resources or any other qualifier. + Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` + // A short summary of what the operation does. For maximum readability in the + // swagger-ui, this field SHOULD be less than 120 characters. + Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"` + // A verbose explanation of the operation behavior. GFM syntax can be used for + // rich text representation. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Additional external documentation for this operation. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,4,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + // Unique string used to identify the operation. The id MUST be unique among + // all operations described in the API. Tools and libraries MAY use the + // operationId to uniquely identify an operation, therefore, it is recommended + // to follow common programming naming conventions. + OperationId string `protobuf:"bytes,5,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` + // A list of MIME types the operation can consume. This overrides the consumes + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"` + // A list of MIME types the operation can produce. This overrides the produces + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"` + // The list of possible responses as they are returned from executing this + // operation. + Responses map[string]*Response `protobuf:"bytes,9,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The transfer protocol for the operation. Values MUST be from the list: + // "http", "https", "ws", "wss". The value overrides the OpenAPI Object + // schemes definition. + Schemes []Scheme `protobuf:"varint,10,rep,packed,name=schemes,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.Scheme" json:"schemes,omitempty"` + // Declares this operation to be deprecated. Usage of the declared operation + // should be refrained. Default value is false. + Deprecated bool `protobuf:"varint,11,opt,name=deprecated,proto3" json:"deprecated,omitempty"` + // A declaration of which security schemes are applied for this operation. The + // list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). This + // definition overrides any declared top-level security. To remove a top-level + // security declaration, an empty array can be used. + Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,13,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Custom parameters such as HTTP request headers. + // See: https://swagger.io/docs/specification/2-0/describing-parameters/ + // and https://swagger.io/specification/v2/#parameter-object. + Parameters *Parameters `protobuf:"bytes,14,opt,name=parameters,proto3" json:"parameters,omitempty"` +} + +func (x *Operation) Reset() { + *x = Operation{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Operation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Operation) ProtoMessage() {} + +func (x *Operation) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Operation.ProtoReflect.Descriptor instead. +func (*Operation) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{1} +} + +func (x *Operation) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +func (x *Operation) GetSummary() string { + if x != nil { + return x.Summary + } + return "" +} + +func (x *Operation) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Operation) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +func (x *Operation) GetOperationId() string { + if x != nil { + return x.OperationId + } + return "" +} + +func (x *Operation) GetConsumes() []string { + if x != nil { + return x.Consumes + } + return nil +} + +func (x *Operation) GetProduces() []string { + if x != nil { + return x.Produces + } + return nil +} + +func (x *Operation) GetResponses() map[string]*Response { + if x != nil { + return x.Responses + } + return nil +} + +func (x *Operation) GetSchemes() []Scheme { + if x != nil { + return x.Schemes + } + return nil +} + +func (x *Operation) GetDeprecated() bool { + if x != nil { + return x.Deprecated + } + return false +} + +func (x *Operation) GetSecurity() []*SecurityRequirement { + if x != nil { + return x.Security + } + return nil +} + +func (x *Operation) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +func (x *Operation) GetParameters() *Parameters { + if x != nil { + return x.Parameters + } + return nil +} + +// `Parameters` is a representation of OpenAPI v2 specification's parameters object. +// Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only +// allow header parameters to be set here since we do not want users specifying custom non-header +// parameters beyond those inferred from the Protobuf schema. +// See: https://swagger.io/specification/v2/#parameter-object +type Parameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // `Headers` is one or more HTTP header parameter. + // See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters + Headers []*HeaderParameter `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` +} + +func (x *Parameters) Reset() { + *x = Parameters{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Parameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Parameters) ProtoMessage() {} + +func (x *Parameters) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Parameters.ProtoReflect.Descriptor instead. +func (*Parameters) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{2} +} + +func (x *Parameters) GetHeaders() []*HeaderParameter { + if x != nil { + return x.Headers + } + return nil +} + +// `HeaderParameter` a HTTP header parameter. +// See: https://swagger.io/specification/v2/#parameter-object +type HeaderParameter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // `Name` is the header name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // `Description` is a short description of the header. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + // See: https://swagger.io/specification/v2/#parameterType. + Type HeaderParameter_Type `protobuf:"varint,3,opt,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter_Type" json:"type,omitempty"` + // `Format` The extending format for the previously mentioned type. + Format string `protobuf:"bytes,4,opt,name=format,proto3" json:"format,omitempty"` + // `Required` indicates if the header is optional + Required bool `protobuf:"varint,5,opt,name=required,proto3" json:"required,omitempty"` +} + +func (x *HeaderParameter) Reset() { + *x = HeaderParameter{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HeaderParameter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderParameter) ProtoMessage() {} + +func (x *HeaderParameter) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeaderParameter.ProtoReflect.Descriptor instead. +func (*HeaderParameter) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{3} +} + +func (x *HeaderParameter) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *HeaderParameter) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *HeaderParameter) GetType() HeaderParameter_Type { + if x != nil { + return x.Type + } + return HeaderParameter_UNKNOWN +} + +func (x *HeaderParameter) GetFormat() string { + if x != nil { + return x.Format + } + return "" +} + +func (x *HeaderParameter) GetRequired() bool { + if x != nil { + return x.Required + } + return false +} + +// `Header` is a representation of OpenAPI v2 specification's Header object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject +type Header struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // `Description` is a short description of the header. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + // `Format` The extending format for the previously mentioned type. + Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"` + // `Default` Declares the value of the header that the server will use if none is provided. + // See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. + // Unlike JSON Schema this value MUST conform to the defined type for the header. + Default string `protobuf:"bytes,6,opt,name=default,proto3" json:"default,omitempty"` + // 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. + Pattern string `protobuf:"bytes,13,opt,name=pattern,proto3" json:"pattern,omitempty"` +} + +func (x *Header) Reset() { + *x = Header{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Header) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Header) ProtoMessage() {} + +func (x *Header) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Header.ProtoReflect.Descriptor instead. +func (*Header) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{4} +} + +func (x *Header) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Header) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Header) GetFormat() string { + if x != nil { + return x.Format + } + return "" +} + +func (x *Header) GetDefault() string { + if x != nil { + return x.Default + } + return "" +} + +func (x *Header) GetPattern() string { + if x != nil { + return x.Pattern + } + return "" +} + +// `Response` is a representation of OpenAPI v2 specification's Response object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject +type Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // `Description` is a short description of the response. + // GFM syntax can be used for rich text representation. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // `Schema` optionally defines the structure of the response. + // If `Schema` is not provided, it means there is no content to the response. + Schema *Schema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` + // `Headers` A list of headers that are sent with the response. + // `Header` name is expected to be a string in the canonical format of the MIME header key + // See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey + Headers map[string]*Header `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // `Examples` gives per-mimetype response examples. + // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object + Examples map[string]string `protobuf:"bytes,4,rep,name=examples,proto3" json:"examples,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,5,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Response) Reset() { + *x = Response{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Response) ProtoMessage() {} + +func (x *Response) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{5} +} + +func (x *Response) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Response) GetSchema() *Schema { + if x != nil { + return x.Schema + } + return nil +} + +func (x *Response) GetHeaders() map[string]*Header { + if x != nil { + return x.Headers + } + return nil +} + +func (x *Response) GetExamples() map[string]string { + if x != nil { + return x.Examples + } + return nil +} + +func (x *Response) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `Info` is a representation of OpenAPI v2 specification's Info object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: ""; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; +// }; +// }; +// ... +// }; +type Info struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The title of the application. + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // A short description of the application. GFM syntax can be used for rich + // text representation. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // The Terms of Service for the API. + TermsOfService string `protobuf:"bytes,3,opt,name=terms_of_service,json=termsOfService,proto3" json:"terms_of_service,omitempty"` + // The contact information for the exposed API. + Contact *Contact `protobuf:"bytes,4,opt,name=contact,proto3" json:"contact,omitempty"` + // The license information for the exposed API. + License *License `protobuf:"bytes,5,opt,name=license,proto3" json:"license,omitempty"` + // Provides the version of the application API (not to be confused + // with the specification version). + Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,7,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Info) Reset() { + *x = Info{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Info) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Info) ProtoMessage() {} + +func (x *Info) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Info.ProtoReflect.Descriptor instead. +func (*Info) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{6} +} + +func (x *Info) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *Info) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Info) GetTermsOfService() string { + if x != nil { + return x.TermsOfService + } + return "" +} + +func (x *Info) GetContact() *Contact { + if x != nil { + return x.Contact + } + return nil +} + +func (x *Info) GetLicense() *License { + if x != nil { + return x.License + } + return nil +} + +func (x *Info) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *Info) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `Contact` is a representation of OpenAPI v2 specification's Contact object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// ... +// }; +// ... +// }; +type Contact struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The identifying name of the contact person/organization. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The URL pointing to the contact information. MUST be in the format of a + // URL. + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + // The email address of the contact person/organization. MUST be in the format + // of an email address. + Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` +} + +func (x *Contact) Reset() { + *x = Contact{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Contact) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Contact) ProtoMessage() {} + +func (x *Contact) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Contact.ProtoReflect.Descriptor instead. +func (*Contact) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{7} +} + +func (x *Contact) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Contact) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Contact) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +// `License` is a representation of OpenAPI v2 specification's License object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; +// }; +// ... +// }; +// ... +// }; +type License struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The license name used for the API. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A URL to the license used for the API. MUST be in the format of a URL. + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *License) Reset() { + *x = License{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *License) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*License) ProtoMessage() {} + +func (x *License) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use License.ProtoReflect.Descriptor instead. +func (*License) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{8} +} + +func (x *License) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *License) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +// `ExternalDocumentation` is a representation of OpenAPI v2 specification's +// ExternalDocumentation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// ... +// external_docs: { +// description: "More about gRPC-Gateway"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// } +// ... +// }; +type ExternalDocumentation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A short description of the target documentation. GFM syntax can be used for + // rich text representation. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // The URL for the target documentation. Value MUST be in the format + // of a URL. + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *ExternalDocumentation) Reset() { + *x = ExternalDocumentation{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExternalDocumentation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExternalDocumentation) ProtoMessage() {} + +func (x *ExternalDocumentation) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExternalDocumentation.ProtoReflect.Descriptor instead. +func (*ExternalDocumentation) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{9} +} + +func (x *ExternalDocumentation) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ExternalDocumentation) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +// `Schema` is a representation of OpenAPI v2 specification's Schema object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +type Schema struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + JsonSchema *JSONSchema `protobuf:"bytes,1,opt,name=json_schema,json=jsonSchema,proto3" json:"json_schema,omitempty"` + // Adds support for polymorphism. The discriminator is the schema property + // name that is used to differentiate between other schema that inherit this + // schema. The property name used MUST be defined at this schema and it MUST + // be in the required property list. When used, the value MUST be the name of + // this schema or any schema that inherits it. + Discriminator string `protobuf:"bytes,2,opt,name=discriminator,proto3" json:"discriminator,omitempty"` + // Relevant only for Schema "properties" definitions. Declares the property as + // "read only". This means that it MAY be sent as part of a response but MUST + // NOT be sent as part of the request. Properties marked as readOnly being + // true SHOULD NOT be in the required list of the defined schema. Default + // value is false. + ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + // Additional external documentation for this schema. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,5,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + // A free-form property to include an example of an instance for this schema in JSON. + // This is copied verbatim to the output. + Example string `protobuf:"bytes,6,opt,name=example,proto3" json:"example,omitempty"` +} + +func (x *Schema) Reset() { + *x = Schema{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Schema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Schema) ProtoMessage() {} + +func (x *Schema) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Schema.ProtoReflect.Descriptor instead. +func (*Schema) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{10} +} + +func (x *Schema) GetJsonSchema() *JSONSchema { + if x != nil { + return x.JsonSchema + } + return nil +} + +func (x *Schema) GetDiscriminator() string { + if x != nil { + return x.Discriminator + } + return "" +} + +func (x *Schema) GetReadOnly() bool { + if x != nil { + return x.ReadOnly + } + return false +} + +func (x *Schema) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +func (x *Schema) GetExample() string { + if x != nil { + return x.Example + } + return "" +} + +// `JSONSchema` represents properties from JSON Schema taken, and as used, in +// the OpenAPI v2 spec. +// +// This includes changes made by OpenAPI v2. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +// See also: https://cswr.github.io/JsonSchema/spec/basic_types/, +// https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json +// +// Example: +// +// message SimpleMessage { +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { +// json_schema: { +// title: "SimpleMessage" +// description: "A simple message." +// required: ["id"] +// } +// }; +// +// // Id represents the message identifier. +// string id = 1; [ +// (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { +// description: "The unique identifier of the simple message." +// }]; +// } +type JSONSchema struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Ref is used to define an external reference to include in the message. + // This could be a fully qualified proto message reference, and that type must + // be imported into the protofile. If no message is identified, the Ref will + // be used verbatim in the output. + // For example: + // + // `ref: ".google.protobuf.Timestamp"`. + Ref string `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"` + // The title of the schema. + Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` + // A short description of the schema. + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + Default string `protobuf:"bytes,7,opt,name=default,proto3" json:"default,omitempty"` + ReadOnly bool `protobuf:"varint,8,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + // A free-form property to include a JSON example of this field. This is copied + // verbatim to the output swagger.json. Quotes must be escaped. + // This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + Example string `protobuf:"bytes,9,opt,name=example,proto3" json:"example,omitempty"` + MultipleOf float64 `protobuf:"fixed64,10,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` + // Maximum represents an inclusive upper limit for a numeric instance. The + // value of MUST be a number, + Maximum float64 `protobuf:"fixed64,11,opt,name=maximum,proto3" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` + // minimum represents an inclusive lower limit for a numeric instance. The + // value of MUST be a number, + Minimum float64 `protobuf:"fixed64,13,opt,name=minimum,proto3" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` + MaxLength uint64 `protobuf:"varint,15,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` + MinLength uint64 `protobuf:"varint,16,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,17,opt,name=pattern,proto3" json:"pattern,omitempty"` + MaxItems uint64 `protobuf:"varint,20,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` + MinItems uint64 `protobuf:"varint,21,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,22,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` + MaxProperties uint64 `protobuf:"varint,24,opt,name=max_properties,json=maxProperties,proto3" json:"max_properties,omitempty"` + MinProperties uint64 `protobuf:"varint,25,opt,name=min_properties,json=minProperties,proto3" json:"min_properties,omitempty"` + Required []string `protobuf:"bytes,26,rep,name=required,proto3" json:"required,omitempty"` + // Items in 'array' must be unique. + Array []string `protobuf:"bytes,34,rep,name=array,proto3" json:"array,omitempty"` + Type []JSONSchema_JSONSchemaSimpleTypes `protobuf:"varint,35,rep,packed,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.JSONSchema_JSONSchemaSimpleTypes" json:"type,omitempty"` + // `Format` + Format string `protobuf:"bytes,36,opt,name=format,proto3" json:"format,omitempty"` + // Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 + Enum []string `protobuf:"bytes,46,rep,name=enum,proto3" json:"enum,omitempty"` + // Additional field level properties used when generating the OpenAPI v2 file. + FieldConfiguration *JSONSchema_FieldConfiguration `protobuf:"bytes,1001,opt,name=field_configuration,json=fieldConfiguration,proto3" json:"field_configuration,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,48,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *JSONSchema) Reset() { + *x = JSONSchema{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JSONSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JSONSchema) ProtoMessage() {} + +func (x *JSONSchema) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JSONSchema.ProtoReflect.Descriptor instead. +func (*JSONSchema) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{11} +} + +func (x *JSONSchema) GetRef() string { + if x != nil { + return x.Ref + } + return "" +} + +func (x *JSONSchema) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *JSONSchema) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *JSONSchema) GetDefault() string { + if x != nil { + return x.Default + } + return "" +} + +func (x *JSONSchema) GetReadOnly() bool { + if x != nil { + return x.ReadOnly + } + return false +} + +func (x *JSONSchema) GetExample() string { + if x != nil { + return x.Example + } + return "" +} + +func (x *JSONSchema) GetMultipleOf() float64 { + if x != nil { + return x.MultipleOf + } + return 0 +} + +func (x *JSONSchema) GetMaximum() float64 { + if x != nil { + return x.Maximum + } + return 0 +} + +func (x *JSONSchema) GetExclusiveMaximum() bool { + if x != nil { + return x.ExclusiveMaximum + } + return false +} + +func (x *JSONSchema) GetMinimum() float64 { + if x != nil { + return x.Minimum + } + return 0 +} + +func (x *JSONSchema) GetExclusiveMinimum() bool { + if x != nil { + return x.ExclusiveMinimum + } + return false +} + +func (x *JSONSchema) GetMaxLength() uint64 { + if x != nil { + return x.MaxLength + } + return 0 +} + +func (x *JSONSchema) GetMinLength() uint64 { + if x != nil { + return x.MinLength + } + return 0 +} + +func (x *JSONSchema) GetPattern() string { + if x != nil { + return x.Pattern + } + return "" +} + +func (x *JSONSchema) GetMaxItems() uint64 { + if x != nil { + return x.MaxItems + } + return 0 +} + +func (x *JSONSchema) GetMinItems() uint64 { + if x != nil { + return x.MinItems + } + return 0 +} + +func (x *JSONSchema) GetUniqueItems() bool { + if x != nil { + return x.UniqueItems + } + return false +} + +func (x *JSONSchema) GetMaxProperties() uint64 { + if x != nil { + return x.MaxProperties + } + return 0 +} + +func (x *JSONSchema) GetMinProperties() uint64 { + if x != nil { + return x.MinProperties + } + return 0 +} + +func (x *JSONSchema) GetRequired() []string { + if x != nil { + return x.Required + } + return nil +} + +func (x *JSONSchema) GetArray() []string { + if x != nil { + return x.Array + } + return nil +} + +func (x *JSONSchema) GetType() []JSONSchema_JSONSchemaSimpleTypes { + if x != nil { + return x.Type + } + return nil +} + +func (x *JSONSchema) GetFormat() string { + if x != nil { + return x.Format + } + return "" +} + +func (x *JSONSchema) GetEnum() []string { + if x != nil { + return x.Enum + } + return nil +} + +func (x *JSONSchema) GetFieldConfiguration() *JSONSchema_FieldConfiguration { + if x != nil { + return x.FieldConfiguration + } + return nil +} + +func (x *JSONSchema) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `Tag` is a representation of OpenAPI v2 specification's Tag object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject +type Tag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the tag. Use it to allow override of the name of a + // global Tag object, then use that name to reference the tag throughout the + // OpenAPI file. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A short description for the tag. GFM syntax can be used for rich text + // representation. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Additional external documentation for this tag. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,4,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Tag) Reset() { + *x = Tag{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tag) ProtoMessage() {} + +func (x *Tag) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Tag.ProtoReflect.Descriptor instead. +func (*Tag) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12} +} + +func (x *Tag) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Tag) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Tag) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +func (x *Tag) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `SecurityDefinitions` is a representation of OpenAPI v2 specification's +// Security Definitions object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject +// +// A declaration of the security schemes available to be used in the +// specification. This does not enforce the security schemes on the operations +// and only serves to provide the relevant details for each scheme. +type SecurityDefinitions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A single security scheme definition, mapping a "name" to the scheme it + // defines. + Security map[string]*SecurityScheme `protobuf:"bytes,1,rep,name=security,proto3" json:"security,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *SecurityDefinitions) Reset() { + *x = SecurityDefinitions{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecurityDefinitions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityDefinitions) ProtoMessage() {} + +func (x *SecurityDefinitions) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SecurityDefinitions.ProtoReflect.Descriptor instead. +func (*SecurityDefinitions) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{13} +} + +func (x *SecurityDefinitions) GetSecurity() map[string]*SecurityScheme { + if x != nil { + return x.Security + } + return nil +} + +// `SecurityScheme` is a representation of OpenAPI v2 specification's +// Security Scheme object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject +// +// Allows the definition of a security scheme that can be used by the +// operations. Supported schemes are basic authentication, an API key (either as +// a header or as a query parameter) and OAuth2's common flows (implicit, +// password, application and access code). +type SecurityScheme struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The type of the security scheme. Valid values are "basic", + // "apiKey" or "oauth2". + Type SecurityScheme_Type `protobuf:"varint,1,opt,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_Type" json:"type,omitempty"` + // A short description for security scheme. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // The name of the header or query parameter to be used. + // Valid for apiKey. + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + // The location of the API key. Valid values are "query" or + // "header". + // Valid for apiKey. + In SecurityScheme_In `protobuf:"varint,4,opt,name=in,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_In" json:"in,omitempty"` + // The flow used by the OAuth2 security scheme. Valid values are + // "implicit", "password", "application" or "accessCode". + // Valid for oauth2. + Flow SecurityScheme_Flow `protobuf:"varint,5,opt,name=flow,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_Flow" json:"flow,omitempty"` + // The authorization URL to be used for this flow. This SHOULD be in + // the form of a URL. + // Valid for oauth2/implicit and oauth2/accessCode. + AuthorizationUrl string `protobuf:"bytes,6,opt,name=authorization_url,json=authorizationUrl,proto3" json:"authorization_url,omitempty"` + // The token URL to be used for this flow. This SHOULD be in the + // form of a URL. + // Valid for oauth2/password, oauth2/application and oauth2/accessCode. + TokenUrl string `protobuf:"bytes,7,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"` + // The available scopes for the OAuth2 security scheme. + // Valid for oauth2. + Scopes *Scopes `protobuf:"bytes,8,opt,name=scopes,proto3" json:"scopes,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,9,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *SecurityScheme) Reset() { + *x = SecurityScheme{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecurityScheme) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityScheme) ProtoMessage() {} + +func (x *SecurityScheme) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SecurityScheme.ProtoReflect.Descriptor instead. +func (*SecurityScheme) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{14} +} + +func (x *SecurityScheme) GetType() SecurityScheme_Type { + if x != nil { + return x.Type + } + return SecurityScheme_TYPE_INVALID +} + +func (x *SecurityScheme) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *SecurityScheme) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SecurityScheme) GetIn() SecurityScheme_In { + if x != nil { + return x.In + } + return SecurityScheme_IN_INVALID +} + +func (x *SecurityScheme) GetFlow() SecurityScheme_Flow { + if x != nil { + return x.Flow + } + return SecurityScheme_FLOW_INVALID +} + +func (x *SecurityScheme) GetAuthorizationUrl() string { + if x != nil { + return x.AuthorizationUrl + } + return "" +} + +func (x *SecurityScheme) GetTokenUrl() string { + if x != nil { + return x.TokenUrl + } + return "" +} + +func (x *SecurityScheme) GetScopes() *Scopes { + if x != nil { + return x.Scopes + } + return nil +} + +func (x *SecurityScheme) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `SecurityRequirement` is a representation of OpenAPI v2 specification's +// Security Requirement object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject +// +// Lists the required security schemes to execute this operation. The object can +// have multiple security schemes declared in it which are all required (that +// is, there is a logical AND between the schemes). +// +// The name used for each property MUST correspond to a security scheme +// declared in the Security Definitions. +type SecurityRequirement struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Each name must correspond to a security scheme which is declared in + // the Security Definitions. If the security scheme is of type "oauth2", + // then the value is a list of scope names required for the execution. + // For other security scheme types, the array MUST be empty. + SecurityRequirement map[string]*SecurityRequirement_SecurityRequirementValue `protobuf:"bytes,1,rep,name=security_requirement,json=securityRequirement,proto3" json:"security_requirement,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *SecurityRequirement) Reset() { + *x = SecurityRequirement{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecurityRequirement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityRequirement) ProtoMessage() {} + +func (x *SecurityRequirement) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SecurityRequirement.ProtoReflect.Descriptor instead. +func (*SecurityRequirement) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{15} +} + +func (x *SecurityRequirement) GetSecurityRequirement() map[string]*SecurityRequirement_SecurityRequirementValue { + if x != nil { + return x.SecurityRequirement + } + return nil +} + +// `Scopes` is a representation of OpenAPI v2 specification's Scopes object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject +// +// Lists the available scopes for an OAuth2 security scheme. +type Scopes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Maps between a name of a scope to a short description of it (as the value + // of the property). + Scope map[string]string `protobuf:"bytes,1,rep,name=scope,proto3" json:"scope,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Scopes) Reset() { + *x = Scopes{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Scopes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Scopes) ProtoMessage() {} + +func (x *Scopes) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Scopes.ProtoReflect.Descriptor instead. +func (*Scopes) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{16} +} + +func (x *Scopes) GetScope() map[string]string { + if x != nil { + return x.Scope + } + return nil +} + +// 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file. +// These properties are not defined by OpenAPIv2, but they are used to control the generation. +type JSONSchema_FieldConfiguration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Alternative parameter name when used as path parameter. If set, this will + // be used as the complete parameter name when this field is used as a path + // parameter. Use this to avoid having auto generated path parameter names + // for overlapping paths. + PathParamName string `protobuf:"bytes,47,opt,name=path_param_name,json=pathParamName,proto3" json:"path_param_name,omitempty"` +} + +func (x *JSONSchema_FieldConfiguration) Reset() { + *x = JSONSchema_FieldConfiguration{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JSONSchema_FieldConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JSONSchema_FieldConfiguration) ProtoMessage() {} + +func (x *JSONSchema_FieldConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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 JSONSchema_FieldConfiguration.ProtoReflect.Descriptor instead. +func (*JSONSchema_FieldConfiguration) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{11, 0} +} + +func (x *JSONSchema_FieldConfiguration) GetPathParamName() string { + if x != nil { + return x.PathParamName + } + return "" +} + +// If the security scheme is of type "oauth2", then the value is a list of +// scope names required for the execution. For other security scheme types, +// the array MUST be empty. +type SecurityRequirement_SecurityRequirementValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Scope []string `protobuf:"bytes,1,rep,name=scope,proto3" json:"scope,omitempty"` +} + +func (x *SecurityRequirement_SecurityRequirementValue) Reset() { + *x = SecurityRequirement_SecurityRequirementValue{} + if protoimpl.UnsafeEnabled { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SecurityRequirement_SecurityRequirementValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityRequirement_SecurityRequirementValue) ProtoMessage() {} + +func (x *SecurityRequirement_SecurityRequirementValue) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_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 SecurityRequirement_SecurityRequirementValue.ProtoReflect.Descriptor instead. +func (*SecurityRequirement_SecurityRequirementValue) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{15, 0} +} + +func (x *SecurityRequirement_SecurityRequirementValue) GetScope() []string { + if x != nil { + return x.Scope + } + return nil +} + +var File_protoc_gen_openapiv2_options_openapiv2_proto protoreflect.FileDescriptor + +var file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc = []byte{ + 0x0a, 0x2c, 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, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x22, 0xb3, 0x08, 0x0a, 0x07, 0x53, 0x77, 0x61, 0x67, + 0x67, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x12, 0x43, 0x0a, + 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, + 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x50, + 0x61, 0x74, 0x68, 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, + 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x71, 0x0a, 0x14, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x08, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x65, 0x0a, 0x0d, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, + 0x6f, 0x63, 0x73, 0x12, 0x62, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 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, 0x49, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 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, + 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0xd6, 0x07, + 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a, 0x0d, 0x65, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, + 0x63, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, 0x61, 0x0a, + 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, + 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x12, 0x1e, 0x0a, + 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x5a, 0x0a, + 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x64, 0x0a, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x55, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 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, 0x49, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, + 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 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, 0x2c, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x22, 0x62, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x54, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0xa3, 0x02, 0x0a, 0x0f, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x53, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x45, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0a, + 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, + 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, + 0x41, 0x4e, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, + 0x22, 0xd8, 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x4a, 0x04, 0x08, + 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, + 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0a, 0x10, + 0x0b, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, + 0x0e, 0x10, 0x0f, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11, 0x4a, + 0x04, 0x08, 0x11, 0x10, 0x12, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0x9a, 0x05, 0x0a, 0x08, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x06, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x5a, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x5d, 0x0a, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, + 0x12, 0x63, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x6d, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 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, 0x47, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 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, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd6, 0x03, 0x0a, 0x04, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x65, 0x72, + 0x6d, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x4f, 0x66, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, + 0x74, 0x12, 0x4c, 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c, + 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 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, + 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x45, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x2f, 0x0a, 0x07, 0x4c, 0x69, 0x63, 0x65, + 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x4b, 0x0a, 0x15, 0x45, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0xaa, 0x02, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x12, 0x56, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0a, 0x6a, + 0x73, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x69, 0x73, + 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x65, 0x0a, 0x0d, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, + 0x6f, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4a, 0x04, 0x08, + 0x04, 0x10, 0x05, 0x22, 0xd7, 0x0a, 0x0a, 0x0a, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x72, 0x65, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, + 0x6e, 0x6c, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, + 0x6e, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x0a, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, 0x66, 0x12, 0x18, + 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x07, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, + 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x61, + 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, + 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, 0x6e, + 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, + 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, + 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, + 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, + 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, + 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x15, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x21, + 0x0a, 0x0c, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x16, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, + 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x50, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x69, 0x6e, 0x5f, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, + 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x1a, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, + 0x72, 0x72, 0x61, 0x79, 0x18, 0x22, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x72, 0x72, 0x61, + 0x79, 0x12, 0x5f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x23, 0x20, 0x03, 0x28, 0x0e, 0x32, + 0x4b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x24, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x6e, + 0x75, 0x6d, 0x18, 0x2e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x7a, + 0x0a, 0x13, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, + 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a, 0x0a, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x30, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x1a, 0x3c, 0x0a, 0x12, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x61, 0x74, 0x68, 0x5f, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x1a, + 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 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, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x77, 0x0a, 0x15, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, + 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, + 0x41, 0x52, 0x52, 0x41, 0x59, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, + 0x41, 0x4e, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, + 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x55, 0x4c, 0x4c, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x4e, + 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x42, 0x4a, 0x45, 0x43, + 0x54, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x4a, + 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x04, 0x10, + 0x05, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, + 0x17, 0x10, 0x18, 0x4a, 0x04, 0x08, 0x1b, 0x10, 0x1c, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x4a, + 0x04, 0x08, 0x1d, 0x10, 0x1e, 0x4a, 0x04, 0x08, 0x1e, 0x10, 0x22, 0x4a, 0x04, 0x08, 0x25, 0x10, + 0x2a, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x2b, 0x10, 0x2e, 0x22, 0xd9, 0x02, + 0x0a, 0x03, 0x54, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a, 0x0d, 0x65, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, + 0x63, 0x73, 0x12, 0x5e, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x54, 0x61, 0x67, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 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, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf7, 0x01, 0x0a, 0x13, 0x53, 0x65, + 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x68, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x1a, 0x76, 0x0a, 0x0d, 0x53, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4f, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0xff, 0x06, 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x4c, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, + 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x49, 0x6e, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x52, + 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, + 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x04, 0x66, 0x6c, + 0x6f, 0x77, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x12, + 0x1b, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x49, 0x0a, 0x06, + 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, + 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x52, + 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x69, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 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, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x04, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, + 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x41, 0x53, 0x49, + 0x43, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x50, 0x49, 0x5f, + 0x4b, 0x45, 0x59, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x41, + 0x55, 0x54, 0x48, 0x32, 0x10, 0x03, 0x22, 0x31, 0x0a, 0x02, 0x49, 0x6e, 0x12, 0x0e, 0x0a, 0x0a, + 0x49, 0x4e, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, + 0x49, 0x4e, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, + 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x02, 0x22, 0x6a, 0x0a, 0x04, 0x46, 0x6c, 0x6f, + 0x77, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, + 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x4d, 0x50, 0x4c, + 0x49, 0x43, 0x49, 0x54, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x50, + 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x4f, + 0x57, 0x5f, 0x41, 0x50, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, + 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x43, + 0x4f, 0x44, 0x45, 0x10, 0x04, 0x22, 0xf6, 0x02, 0x0a, 0x13, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x8a, 0x01, + 0x0a, 0x14, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, + 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, + 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x30, 0x0a, 0x18, 0x53, 0x65, + 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x1a, 0x9f, 0x01, 0x0a, + 0x18, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x6d, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x96, + 0x01, 0x0a, 0x06, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x05, 0x73, 0x63, 0x6f, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, + 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, + 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x1a, 0x38, 0x0a, + 0x0a, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x3b, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, + 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, + 0x53, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x57, 0x53, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x57, + 0x53, 0x53, 0x10, 0x04, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x76, + 0x32, 0x2f, 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, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescOnce sync.Once + file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData = file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc +) + +func file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP() []byte { + file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescOnce.Do(func() { + file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData = protoimpl.X.CompressGZIP(file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData) + }) + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData +} + +var file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes = make([]protoimpl.MessageInfo, 33) +var file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes = []interface{}{ + (Scheme)(0), // 0: grpc.gateway.protoc_gen_openapiv2.options.Scheme + (HeaderParameter_Type)(0), // 1: grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type + (JSONSchema_JSONSchemaSimpleTypes)(0), // 2: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes + (SecurityScheme_Type)(0), // 3: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type + (SecurityScheme_In)(0), // 4: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In + (SecurityScheme_Flow)(0), // 5: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow + (*Swagger)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Swagger + (*Operation)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Operation + (*Parameters)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Parameters + (*HeaderParameter)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter + (*Header)(nil), // 10: grpc.gateway.protoc_gen_openapiv2.options.Header + (*Response)(nil), // 11: grpc.gateway.protoc_gen_openapiv2.options.Response + (*Info)(nil), // 12: grpc.gateway.protoc_gen_openapiv2.options.Info + (*Contact)(nil), // 13: grpc.gateway.protoc_gen_openapiv2.options.Contact + (*License)(nil), // 14: grpc.gateway.protoc_gen_openapiv2.options.License + (*ExternalDocumentation)(nil), // 15: grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + (*Schema)(nil), // 16: grpc.gateway.protoc_gen_openapiv2.options.Schema + (*JSONSchema)(nil), // 17: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema + (*Tag)(nil), // 18: grpc.gateway.protoc_gen_openapiv2.options.Tag + (*SecurityDefinitions)(nil), // 19: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions + (*SecurityScheme)(nil), // 20: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme + (*SecurityRequirement)(nil), // 21: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement + (*Scopes)(nil), // 22: grpc.gateway.protoc_gen_openapiv2.options.Scopes + nil, // 23: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry + nil, // 24: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry + nil, // 25: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry + nil, // 26: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry + nil, // 27: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry + nil, // 28: grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry + nil, // 29: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry + nil, // 30: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry + (*JSONSchema_FieldConfiguration)(nil), // 31: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration + nil, // 32: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.ExtensionsEntry + nil, // 33: grpc.gateway.protoc_gen_openapiv2.options.Tag.ExtensionsEntry + nil, // 34: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry + nil, // 35: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry + (*SecurityRequirement_SecurityRequirementValue)(nil), // 36: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue + nil, // 37: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry + nil, // 38: grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry + (*structpb.Value)(nil), // 39: google.protobuf.Value +} +var file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs = []int32{ + 12, // 0: grpc.gateway.protoc_gen_openapiv2.options.Swagger.info:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info + 0, // 1: grpc.gateway.protoc_gen_openapiv2.options.Swagger.schemes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scheme + 23, // 2: grpc.gateway.protoc_gen_openapiv2.options.Swagger.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry + 19, // 3: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security_definitions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions + 21, // 4: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement + 18, // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger.tags:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Tag + 15, // 6: grpc.gateway.protoc_gen_openapiv2.options.Swagger.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 24, // 7: grpc.gateway.protoc_gen_openapiv2.options.Swagger.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry + 15, // 8: grpc.gateway.protoc_gen_openapiv2.options.Operation.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 25, // 9: grpc.gateway.protoc_gen_openapiv2.options.Operation.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry + 0, // 10: grpc.gateway.protoc_gen_openapiv2.options.Operation.schemes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scheme + 21, // 11: grpc.gateway.protoc_gen_openapiv2.options.Operation.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement + 26, // 12: grpc.gateway.protoc_gen_openapiv2.options.Operation.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry + 8, // 13: grpc.gateway.protoc_gen_openapiv2.options.Operation.parameters:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Parameters + 9, // 14: grpc.gateway.protoc_gen_openapiv2.options.Parameters.headers:type_name -> grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter + 1, // 15: grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type + 16, // 16: grpc.gateway.protoc_gen_openapiv2.options.Response.schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Schema + 27, // 17: grpc.gateway.protoc_gen_openapiv2.options.Response.headers:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry + 28, // 18: grpc.gateway.protoc_gen_openapiv2.options.Response.examples:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry + 29, // 19: grpc.gateway.protoc_gen_openapiv2.options.Response.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry + 13, // 20: grpc.gateway.protoc_gen_openapiv2.options.Info.contact:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Contact + 14, // 21: grpc.gateway.protoc_gen_openapiv2.options.Info.license:type_name -> grpc.gateway.protoc_gen_openapiv2.options.License + 30, // 22: grpc.gateway.protoc_gen_openapiv2.options.Info.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry + 17, // 23: grpc.gateway.protoc_gen_openapiv2.options.Schema.json_schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema + 15, // 24: grpc.gateway.protoc_gen_openapiv2.options.Schema.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 2, // 25: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes + 31, // 26: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.field_configuration:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration + 32, // 27: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.ExtensionsEntry + 15, // 28: grpc.gateway.protoc_gen_openapiv2.options.Tag.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 33, // 29: grpc.gateway.protoc_gen_openapiv2.options.Tag.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Tag.ExtensionsEntry + 34, // 30: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry + 3, // 31: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type + 4, // 32: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.in:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In + 5, // 33: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.flow:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow + 22, // 34: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.scopes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes + 35, // 35: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry + 37, // 36: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.security_requirement:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry + 38, // 37: grpc.gateway.protoc_gen_openapiv2.options.Scopes.scope:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry + 11, // 38: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response + 39, // 39: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry.value:type_name -> google.protobuf.Value + 11, // 40: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response + 39, // 41: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry.value:type_name -> google.protobuf.Value + 10, // 42: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Header + 39, // 43: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry.value:type_name -> google.protobuf.Value + 39, // 44: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry.value:type_name -> google.protobuf.Value + 39, // 45: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.ExtensionsEntry.value:type_name -> google.protobuf.Value + 39, // 46: grpc.gateway.protoc_gen_openapiv2.options.Tag.ExtensionsEntry.value:type_name -> google.protobuf.Value + 20, // 47: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme + 39, // 48: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry.value:type_name -> google.protobuf.Value + 36, // 49: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue + 50, // [50:50] is the sub-list for method output_type + 50, // [50:50] is the sub-list for method input_type + 50, // [50:50] is the sub-list for extension type_name + 50, // [50:50] is the sub-list for extension extendee + 0, // [0:50] is the sub-list for field type_name +} + +func init() { file_protoc_gen_openapiv2_options_openapiv2_proto_init() } +func file_protoc_gen_openapiv2_options_openapiv2_proto_init() { + if File_protoc_gen_openapiv2_options_openapiv2_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Swagger); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Parameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeaderParameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Header); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Info); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Contact); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*License); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExternalDocumentation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Schema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JSONSchema); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecurityDefinitions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecurityScheme); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecurityRequirement); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Scopes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JSONSchema_FieldConfiguration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SecurityRequirement_SecurityRequirementValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc, + NumEnums: 6, + NumMessages: 33, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes, + DependencyIndexes: file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs, + EnumInfos: file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes, + MessageInfos: file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes, + }.Build() + File_protoc_gen_openapiv2_options_openapiv2_proto = out.File + file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc = nil + file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes = nil + file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs = nil +} diff --git a/proto/protoc-gen-openapiv2/options/openapiv2.pb.validate.go b/proto/protoc-gen-openapiv2/options/openapiv2.pb.validate.go new file mode 100644 index 000000000..b340cd059 --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/openapiv2.pb.validate.go @@ -0,0 +1,3125 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: protoc-gen-openapiv2/options/openapiv2.proto + +package options + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on Swagger with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Swagger) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Swagger with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in SwaggerMultiError, or nil if none found. +func (m *Swagger) ValidateAll() error { + return m.validate(true) +} + +func (m *Swagger) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Swagger + + if all { + switch v := interface{}(m.GetInfo()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SwaggerValidationError{ + field: "Info", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SwaggerValidationError{ + field: "Info", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInfo()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SwaggerValidationError{ + field: "Info", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Host + + // no validation rules for BasePath + + { + sorted_keys := make([]string, len(m.GetResponses())) + i := 0 + for key := range m.GetResponses() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetResponses()[key] + _ = val + + // no validation rules for Responses[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SwaggerValidationError{ + field: fmt.Sprintf("Responses[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SwaggerValidationError{ + field: fmt.Sprintf("Responses[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SwaggerValidationError{ + field: fmt.Sprintf("Responses[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if all { + switch v := interface{}(m.GetSecurityDefinitions()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SwaggerValidationError{ + field: "SecurityDefinitions", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SwaggerValidationError{ + field: "SecurityDefinitions", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSecurityDefinitions()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SwaggerValidationError{ + field: "SecurityDefinitions", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetSecurity() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SwaggerValidationError{ + field: fmt.Sprintf("Security[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SwaggerValidationError{ + field: fmt.Sprintf("Security[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SwaggerValidationError{ + field: fmt.Sprintf("Security[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetTags() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SwaggerValidationError{ + field: fmt.Sprintf("Tags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SwaggerValidationError{ + field: fmt.Sprintf("Tags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SwaggerValidationError{ + field: fmt.Sprintf("Tags[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if all { + switch v := interface{}(m.GetExternalDocs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SwaggerValidationError{ + field: "ExternalDocs", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SwaggerValidationError{ + field: "ExternalDocs", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExternalDocs()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SwaggerValidationError{ + field: "ExternalDocs", + reason: "embedded message failed validation", + cause: err, + } + } + } + + { + sorted_keys := make([]string, len(m.GetExtensions())) + i := 0 + for key := range m.GetExtensions() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetExtensions()[key] + _ = val + + // no validation rules for Extensions[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SwaggerValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SwaggerValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SwaggerValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return SwaggerMultiError(errors) + } + + return nil +} + +// SwaggerMultiError is an error wrapping multiple validation errors returned +// by Swagger.ValidateAll() if the designated constraints aren't met. +type SwaggerMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SwaggerMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SwaggerMultiError) AllErrors() []error { return m } + +// SwaggerValidationError is the validation error returned by Swagger.Validate +// if the designated constraints aren't met. +type SwaggerValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SwaggerValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SwaggerValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SwaggerValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SwaggerValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SwaggerValidationError) ErrorName() string { return "SwaggerValidationError" } + +// Error satisfies the builtin error interface +func (e SwaggerValidationError) 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 %sSwagger.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SwaggerValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SwaggerValidationError{} + +// Validate checks the field values on Operation with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Operation) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Operation with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in OperationMultiError, or nil +// if none found. +func (m *Operation) ValidateAll() error { + return m.validate(true) +} + +func (m *Operation) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Summary + + // no validation rules for Description + + if all { + switch v := interface{}(m.GetExternalDocs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OperationValidationError{ + field: "ExternalDocs", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OperationValidationError{ + field: "ExternalDocs", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExternalDocs()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OperationValidationError{ + field: "ExternalDocs", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for OperationId + + { + sorted_keys := make([]string, len(m.GetResponses())) + i := 0 + for key := range m.GetResponses() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetResponses()[key] + _ = val + + // no validation rules for Responses[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OperationValidationError{ + field: fmt.Sprintf("Responses[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OperationValidationError{ + field: fmt.Sprintf("Responses[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OperationValidationError{ + field: fmt.Sprintf("Responses[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + // no validation rules for Deprecated + + for idx, item := range m.GetSecurity() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OperationValidationError{ + field: fmt.Sprintf("Security[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OperationValidationError{ + field: fmt.Sprintf("Security[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OperationValidationError{ + field: fmt.Sprintf("Security[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + { + sorted_keys := make([]string, len(m.GetExtensions())) + i := 0 + for key := range m.GetExtensions() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetExtensions()[key] + _ = val + + // no validation rules for Extensions[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OperationValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OperationValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OperationValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if all { + switch v := interface{}(m.GetParameters()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, OperationValidationError{ + field: "Parameters", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, OperationValidationError{ + field: "Parameters", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetParameters()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return OperationValidationError{ + field: "Parameters", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return OperationMultiError(errors) + } + + return nil +} + +// OperationMultiError is an error wrapping multiple validation errors returned +// by Operation.ValidateAll() if the designated constraints aren't met. +type OperationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OperationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OperationMultiError) AllErrors() []error { return m } + +// OperationValidationError is the validation error returned by +// Operation.Validate if the designated constraints aren't met. +type OperationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OperationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OperationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OperationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OperationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OperationValidationError) ErrorName() string { return "OperationValidationError" } + +// Error satisfies the builtin error interface +func (e OperationValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sOperation.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OperationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OperationValidationError{} + +// Validate checks the field values on Parameters with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Parameters) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Parameters with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ParametersMultiError, or +// nil if none found. +func (m *Parameters) ValidateAll() error { + return m.validate(true) +} + +func (m *Parameters) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetHeaders() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ParametersValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ParametersValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ParametersValidationError{ + field: fmt.Sprintf("Headers[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ParametersMultiError(errors) + } + + return nil +} + +// ParametersMultiError is an error wrapping multiple validation errors +// returned by Parameters.ValidateAll() if the designated constraints aren't met. +type ParametersMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ParametersMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ParametersMultiError) AllErrors() []error { return m } + +// ParametersValidationError is the validation error returned by +// Parameters.Validate if the designated constraints aren't met. +type ParametersValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ParametersValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ParametersValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ParametersValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ParametersValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ParametersValidationError) ErrorName() string { return "ParametersValidationError" } + +// Error satisfies the builtin error interface +func (e ParametersValidationError) 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 %sParameters.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ParametersValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ParametersValidationError{} + +// Validate checks the field values on HeaderParameter with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *HeaderParameter) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on HeaderParameter with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// HeaderParameterMultiError, or nil if none found. +func (m *HeaderParameter) ValidateAll() error { + return m.validate(true) +} + +func (m *HeaderParameter) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for Description + + // no validation rules for Type + + // no validation rules for Format + + // no validation rules for Required + + if len(errors) > 0 { + return HeaderParameterMultiError(errors) + } + + return nil +} + +// HeaderParameterMultiError is an error wrapping multiple validation errors +// returned by HeaderParameter.ValidateAll() if the designated constraints +// aren't met. +type HeaderParameterMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderParameterMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderParameterMultiError) AllErrors() []error { return m } + +// HeaderParameterValidationError is the validation error returned by +// HeaderParameter.Validate if the designated constraints aren't met. +type HeaderParameterValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeaderParameterValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HeaderParameterValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HeaderParameterValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HeaderParameterValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeaderParameterValidationError) ErrorName() string { return "HeaderParameterValidationError" } + +// Error satisfies the builtin error interface +func (e HeaderParameterValidationError) 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 %sHeaderParameter.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeaderParameterValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeaderParameterValidationError{} + +// Validate checks the field values on Header with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Header) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Header with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in HeaderMultiError, or nil if none found. +func (m *Header) ValidateAll() error { + return m.validate(true) +} + +func (m *Header) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Description + + // no validation rules for Type + + // no validation rules for Format + + // no validation rules for Default + + // no validation rules for Pattern + + if len(errors) > 0 { + return HeaderMultiError(errors) + } + + return nil +} + +// HeaderMultiError is an error wrapping multiple validation errors returned by +// Header.ValidateAll() if the designated constraints aren't met. +type HeaderMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m HeaderMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m HeaderMultiError) AllErrors() []error { return m } + +// HeaderValidationError is the validation error returned by Header.Validate if +// the designated constraints aren't met. +type HeaderValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e HeaderValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e HeaderValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e HeaderValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e HeaderValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e HeaderValidationError) ErrorName() string { return "HeaderValidationError" } + +// Error satisfies the builtin error interface +func (e HeaderValidationError) 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 %sHeader.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = HeaderValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = HeaderValidationError{} + +// Validate checks the field values on Response with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Response) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Response with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ResponseMultiError, or nil +// if none found. +func (m *Response) ValidateAll() error { + return m.validate(true) +} + +func (m *Response) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Description + + if all { + switch v := interface{}(m.GetSchema()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseValidationError{ + field: "Schema", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseValidationError{ + field: "Schema", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSchema()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResponseValidationError{ + field: "Schema", + reason: "embedded message failed validation", + cause: err, + } + } + } + + { + sorted_keys := make([]string, len(m.GetHeaders())) + i := 0 + for key := range m.GetHeaders() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetHeaders()[key] + _ = val + + // no validation rules for Headers[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResponseValidationError{ + field: fmt.Sprintf("Headers[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + // no validation rules for Examples + + { + sorted_keys := make([]string, len(m.GetExtensions())) + i := 0 + for key := range m.GetExtensions() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetExtensions()[key] + _ = val + + // no validation rules for Extensions[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ResponseValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ResponseValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ResponseValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return ResponseMultiError(errors) + } + + return nil +} + +// ResponseMultiError is an error wrapping multiple validation errors returned +// by Response.ValidateAll() if the designated constraints aren't met. +type ResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ResponseMultiError) AllErrors() []error { return m } + +// ResponseValidationError is the validation error returned by +// Response.Validate if the designated constraints aren't met. +type ResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ResponseValidationError) ErrorName() string { return "ResponseValidationError" } + +// Error satisfies the builtin error interface +func (e ResponseValidationError) 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 %sResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ResponseValidationError{} + +// Validate checks the field values on Info with the rules defined in the proto +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. +func (m *Info) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Info with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in InfoMultiError, or nil if none found. +func (m *Info) ValidateAll() error { + return m.validate(true) +} + +func (m *Info) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Title + + // no validation rules for Description + + // no validation rules for TermsOfService + + if all { + switch v := interface{}(m.GetContact()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, InfoValidationError{ + field: "Contact", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, InfoValidationError{ + field: "Contact", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetContact()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return InfoValidationError{ + field: "Contact", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLicense()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, InfoValidationError{ + field: "License", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, InfoValidationError{ + field: "License", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLicense()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return InfoValidationError{ + field: "License", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Version + + { + sorted_keys := make([]string, len(m.GetExtensions())) + i := 0 + for key := range m.GetExtensions() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetExtensions()[key] + _ = val + + // no validation rules for Extensions[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, InfoValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, InfoValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return InfoValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return InfoMultiError(errors) + } + + return nil +} + +// InfoMultiError is an error wrapping multiple validation errors returned by +// Info.ValidateAll() if the designated constraints aren't met. +type InfoMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m InfoMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m InfoMultiError) AllErrors() []error { return m } + +// InfoValidationError is the validation error returned by Info.Validate if the +// designated constraints aren't met. +type InfoValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e InfoValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e InfoValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e InfoValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e InfoValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e InfoValidationError) ErrorName() string { return "InfoValidationError" } + +// Error satisfies the builtin error interface +func (e InfoValidationError) 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 %sInfo.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = InfoValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = InfoValidationError{} + +// Validate checks the field values on Contact with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Contact) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Contact with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ContactMultiError, or nil if none found. +func (m *Contact) ValidateAll() error { + return m.validate(true) +} + +func (m *Contact) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for Url + + // no validation rules for Email + + if len(errors) > 0 { + return ContactMultiError(errors) + } + + return nil +} + +// ContactMultiError is an error wrapping multiple validation errors returned +// by Contact.ValidateAll() if the designated constraints aren't met. +type ContactMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ContactMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ContactMultiError) AllErrors() []error { return m } + +// ContactValidationError is the validation error returned by Contact.Validate +// if the designated constraints aren't met. +type ContactValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ContactValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ContactValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ContactValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ContactValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ContactValidationError) ErrorName() string { return "ContactValidationError" } + +// Error satisfies the builtin error interface +func (e ContactValidationError) 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 %sContact.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ContactValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ContactValidationError{} + +// Validate checks the field values on License with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *License) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on License with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in LicenseMultiError, or nil if none found. +func (m *License) ValidateAll() error { + return m.validate(true) +} + +func (m *License) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for Url + + if len(errors) > 0 { + return LicenseMultiError(errors) + } + + return nil +} + +// LicenseMultiError is an error wrapping multiple validation errors returned +// by License.ValidateAll() if the designated constraints aren't met. +type LicenseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LicenseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LicenseMultiError) AllErrors() []error { return m } + +// LicenseValidationError is the validation error returned by License.Validate +// if the designated constraints aren't met. +type LicenseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LicenseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LicenseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LicenseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LicenseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LicenseValidationError) ErrorName() string { return "LicenseValidationError" } + +// Error satisfies the builtin error interface +func (e LicenseValidationError) 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 %sLicense.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LicenseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LicenseValidationError{} + +// Validate checks the field values on ExternalDocumentation with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ExternalDocumentation) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ExternalDocumentation with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ExternalDocumentationMultiError, or nil if none found. +func (m *ExternalDocumentation) ValidateAll() error { + return m.validate(true) +} + +func (m *ExternalDocumentation) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Description + + // no validation rules for Url + + if len(errors) > 0 { + return ExternalDocumentationMultiError(errors) + } + + return nil +} + +// ExternalDocumentationMultiError is an error wrapping multiple validation +// errors returned by ExternalDocumentation.ValidateAll() if the designated +// constraints aren't met. +type ExternalDocumentationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ExternalDocumentationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ExternalDocumentationMultiError) AllErrors() []error { return m } + +// ExternalDocumentationValidationError is the validation error returned by +// ExternalDocumentation.Validate if the designated constraints aren't met. +type ExternalDocumentationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ExternalDocumentationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ExternalDocumentationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ExternalDocumentationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ExternalDocumentationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ExternalDocumentationValidationError) ErrorName() string { + return "ExternalDocumentationValidationError" +} + +// Error satisfies the builtin error interface +func (e ExternalDocumentationValidationError) 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 %sExternalDocumentation.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ExternalDocumentationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ExternalDocumentationValidationError{} + +// Validate checks the field values on Schema with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Schema) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Schema with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in SchemaMultiError, or nil if none found. +func (m *Schema) ValidateAll() error { + return m.validate(true) +} + +func (m *Schema) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetJsonSchema()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SchemaValidationError{ + field: "JsonSchema", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SchemaValidationError{ + field: "JsonSchema", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetJsonSchema()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SchemaValidationError{ + field: "JsonSchema", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Discriminator + + // no validation rules for ReadOnly + + if all { + switch v := interface{}(m.GetExternalDocs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SchemaValidationError{ + field: "ExternalDocs", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SchemaValidationError{ + field: "ExternalDocs", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExternalDocs()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SchemaValidationError{ + field: "ExternalDocs", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Example + + if len(errors) > 0 { + return SchemaMultiError(errors) + } + + return nil +} + +// SchemaMultiError is an error wrapping multiple validation errors returned by +// Schema.ValidateAll() if the designated constraints aren't met. +type SchemaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SchemaMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SchemaMultiError) AllErrors() []error { return m } + +// SchemaValidationError is the validation error returned by Schema.Validate if +// the designated constraints aren't met. +type SchemaValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SchemaValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SchemaValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SchemaValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SchemaValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SchemaValidationError) ErrorName() string { return "SchemaValidationError" } + +// Error satisfies the builtin error interface +func (e SchemaValidationError) 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 %sSchema.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SchemaValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SchemaValidationError{} + +// Validate checks the field values on JSONSchema with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *JSONSchema) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JSONSchema with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in JSONSchemaMultiError, or +// nil if none found. +func (m *JSONSchema) ValidateAll() error { + return m.validate(true) +} + +func (m *JSONSchema) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Ref + + // no validation rules for Title + + // no validation rules for Description + + // no validation rules for Default + + // no validation rules for ReadOnly + + // no validation rules for Example + + // no validation rules for MultipleOf + + // no validation rules for Maximum + + // no validation rules for ExclusiveMaximum + + // no validation rules for Minimum + + // no validation rules for ExclusiveMinimum + + // no validation rules for MaxLength + + // no validation rules for MinLength + + // no validation rules for Pattern + + // no validation rules for MaxItems + + // no validation rules for MinItems + + // no validation rules for UniqueItems + + // no validation rules for MaxProperties + + // no validation rules for MinProperties + + // no validation rules for Format + + if all { + switch v := interface{}(m.GetFieldConfiguration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JSONSchemaValidationError{ + field: "FieldConfiguration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JSONSchemaValidationError{ + field: "FieldConfiguration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFieldConfiguration()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return JSONSchemaValidationError{ + field: "FieldConfiguration", + reason: "embedded message failed validation", + cause: err, + } + } + } + + { + sorted_keys := make([]string, len(m.GetExtensions())) + i := 0 + for key := range m.GetExtensions() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetExtensions()[key] + _ = val + + // no validation rules for Extensions[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, JSONSchemaValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, JSONSchemaValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return JSONSchemaValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return JSONSchemaMultiError(errors) + } + + return nil +} + +// JSONSchemaMultiError is an error wrapping multiple validation errors +// returned by JSONSchema.ValidateAll() if the designated constraints aren't met. +type JSONSchemaMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JSONSchemaMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JSONSchemaMultiError) AllErrors() []error { return m } + +// JSONSchemaValidationError is the validation error returned by +// JSONSchema.Validate if the designated constraints aren't met. +type JSONSchemaValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e JSONSchemaValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e JSONSchemaValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e JSONSchemaValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e JSONSchemaValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e JSONSchemaValidationError) ErrorName() string { return "JSONSchemaValidationError" } + +// Error satisfies the builtin error interface +func (e JSONSchemaValidationError) 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 %sJSONSchema.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = JSONSchemaValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = JSONSchemaValidationError{} + +// Validate checks the field values on Tag with the rules defined in the proto +// definition for this message. If any rules are violated, the first error +// encountered is returned, or nil if there are no violations. +func (m *Tag) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Tag with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in TagMultiError, or nil if none found. +func (m *Tag) ValidateAll() error { + return m.validate(true) +} + +func (m *Tag) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for Description + + if all { + switch v := interface{}(m.GetExternalDocs()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TagValidationError{ + field: "ExternalDocs", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TagValidationError{ + field: "ExternalDocs", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExternalDocs()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TagValidationError{ + field: "ExternalDocs", + reason: "embedded message failed validation", + cause: err, + } + } + } + + { + sorted_keys := make([]string, len(m.GetExtensions())) + i := 0 + for key := range m.GetExtensions() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetExtensions()[key] + _ = val + + // no validation rules for Extensions[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TagValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TagValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TagValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return TagMultiError(errors) + } + + return nil +} + +// TagMultiError is an error wrapping multiple validation errors returned by +// Tag.ValidateAll() if the designated constraints aren't met. +type TagMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TagMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TagMultiError) AllErrors() []error { return m } + +// TagValidationError is the validation error returned by Tag.Validate if the +// designated constraints aren't met. +type TagValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TagValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TagValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TagValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TagValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TagValidationError) ErrorName() string { return "TagValidationError" } + +// Error satisfies the builtin error interface +func (e TagValidationError) 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 %sTag.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TagValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TagValidationError{} + +// Validate checks the field values on SecurityDefinitions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *SecurityDefinitions) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SecurityDefinitions with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SecurityDefinitionsMultiError, or nil if none found. +func (m *SecurityDefinitions) ValidateAll() error { + return m.validate(true) +} + +func (m *SecurityDefinitions) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + { + sorted_keys := make([]string, len(m.GetSecurity())) + i := 0 + for key := range m.GetSecurity() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetSecurity()[key] + _ = val + + // no validation rules for Security[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecurityDefinitionsValidationError{ + field: fmt.Sprintf("Security[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecurityDefinitionsValidationError{ + field: fmt.Sprintf("Security[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecurityDefinitionsValidationError{ + field: fmt.Sprintf("Security[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return SecurityDefinitionsMultiError(errors) + } + + return nil +} + +// SecurityDefinitionsMultiError is an error wrapping multiple validation +// errors returned by SecurityDefinitions.ValidateAll() if the designated +// constraints aren't met. +type SecurityDefinitionsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SecurityDefinitionsMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SecurityDefinitionsMultiError) AllErrors() []error { return m } + +// SecurityDefinitionsValidationError is the validation error returned by +// SecurityDefinitions.Validate if the designated constraints aren't met. +type SecurityDefinitionsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SecurityDefinitionsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SecurityDefinitionsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SecurityDefinitionsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SecurityDefinitionsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SecurityDefinitionsValidationError) ErrorName() string { + return "SecurityDefinitionsValidationError" +} + +// Error satisfies the builtin error interface +func (e SecurityDefinitionsValidationError) 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 %sSecurityDefinitions.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SecurityDefinitionsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SecurityDefinitionsValidationError{} + +// Validate checks the field values on SecurityScheme with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *SecurityScheme) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SecurityScheme with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SecuritySchemeMultiError, +// or nil if none found. +func (m *SecurityScheme) ValidateAll() error { + return m.validate(true) +} + +func (m *SecurityScheme) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Type + + // no validation rules for Description + + // no validation rules for Name + + // no validation rules for In + + // no validation rules for Flow + + // no validation rules for AuthorizationUrl + + // no validation rules for TokenUrl + + if all { + switch v := interface{}(m.GetScopes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecuritySchemeValidationError{ + field: "Scopes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecuritySchemeValidationError{ + field: "Scopes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetScopes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecuritySchemeValidationError{ + field: "Scopes", + reason: "embedded message failed validation", + cause: err, + } + } + } + + { + sorted_keys := make([]string, len(m.GetExtensions())) + i := 0 + for key := range m.GetExtensions() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetExtensions()[key] + _ = val + + // no validation rules for Extensions[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecuritySchemeValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecuritySchemeValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecuritySchemeValidationError{ + field: fmt.Sprintf("Extensions[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return SecuritySchemeMultiError(errors) + } + + return nil +} + +// SecuritySchemeMultiError is an error wrapping multiple validation errors +// returned by SecurityScheme.ValidateAll() if the designated constraints +// aren't met. +type SecuritySchemeMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SecuritySchemeMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SecuritySchemeMultiError) AllErrors() []error { return m } + +// SecuritySchemeValidationError is the validation error returned by +// SecurityScheme.Validate if the designated constraints aren't met. +type SecuritySchemeValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SecuritySchemeValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SecuritySchemeValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SecuritySchemeValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SecuritySchemeValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SecuritySchemeValidationError) ErrorName() string { return "SecuritySchemeValidationError" } + +// Error satisfies the builtin error interface +func (e SecuritySchemeValidationError) 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 %sSecurityScheme.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SecuritySchemeValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SecuritySchemeValidationError{} + +// Validate checks the field values on SecurityRequirement with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *SecurityRequirement) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SecurityRequirement with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// SecurityRequirementMultiError, or nil if none found. +func (m *SecurityRequirement) ValidateAll() error { + return m.validate(true) +} + +func (m *SecurityRequirement) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + { + sorted_keys := make([]string, len(m.GetSecurityRequirement())) + i := 0 + for key := range m.GetSecurityRequirement() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetSecurityRequirement()[key] + _ = val + + // no validation rules for SecurityRequirement[key] + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, SecurityRequirementValidationError{ + field: fmt.Sprintf("SecurityRequirement[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, SecurityRequirementValidationError{ + field: fmt.Sprintf("SecurityRequirement[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return SecurityRequirementValidationError{ + field: fmt.Sprintf("SecurityRequirement[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return SecurityRequirementMultiError(errors) + } + + return nil +} + +// SecurityRequirementMultiError is an error wrapping multiple validation +// errors returned by SecurityRequirement.ValidateAll() if the designated +// constraints aren't met. +type SecurityRequirementMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SecurityRequirementMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SecurityRequirementMultiError) AllErrors() []error { return m } + +// SecurityRequirementValidationError is the validation error returned by +// SecurityRequirement.Validate if the designated constraints aren't met. +type SecurityRequirementValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SecurityRequirementValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SecurityRequirementValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SecurityRequirementValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SecurityRequirementValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SecurityRequirementValidationError) ErrorName() string { + return "SecurityRequirementValidationError" +} + +// Error satisfies the builtin error interface +func (e SecurityRequirementValidationError) 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 %sSecurityRequirement.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SecurityRequirementValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SecurityRequirementValidationError{} + +// Validate checks the field values on Scopes with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Scopes) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Scopes with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in ScopesMultiError, or nil if none found. +func (m *Scopes) ValidateAll() error { + return m.validate(true) +} + +func (m *Scopes) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Scope + + if len(errors) > 0 { + return ScopesMultiError(errors) + } + + return nil +} + +// ScopesMultiError is an error wrapping multiple validation errors returned by +// Scopes.ValidateAll() if the designated constraints aren't met. +type ScopesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ScopesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ScopesMultiError) AllErrors() []error { return m } + +// ScopesValidationError is the validation error returned by Scopes.Validate if +// the designated constraints aren't met. +type ScopesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ScopesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ScopesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ScopesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ScopesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ScopesValidationError) ErrorName() string { return "ScopesValidationError" } + +// Error satisfies the builtin error interface +func (e ScopesValidationError) 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 %sScopes.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ScopesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ScopesValidationError{} + +// Validate checks the field values on JSONSchema_FieldConfiguration with the +// rules defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *JSONSchema_FieldConfiguration) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on JSONSchema_FieldConfiguration with +// the rules defined in the proto definition for this message. If any rules +// are violated, the result is a list of violation errors wrapped in +// JSONSchema_FieldConfigurationMultiError, or nil if none found. +func (m *JSONSchema_FieldConfiguration) ValidateAll() error { + return m.validate(true) +} + +func (m *JSONSchema_FieldConfiguration) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for PathParamName + + if len(errors) > 0 { + return JSONSchema_FieldConfigurationMultiError(errors) + } + + return nil +} + +// JSONSchema_FieldConfigurationMultiError is an error wrapping multiple +// validation errors returned by JSONSchema_FieldConfiguration.ValidateAll() +// if the designated constraints aren't met. +type JSONSchema_FieldConfigurationMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m JSONSchema_FieldConfigurationMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m JSONSchema_FieldConfigurationMultiError) AllErrors() []error { return m } + +// JSONSchema_FieldConfigurationValidationError is the validation error +// returned by JSONSchema_FieldConfiguration.Validate if the designated +// constraints aren't met. +type JSONSchema_FieldConfigurationValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e JSONSchema_FieldConfigurationValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e JSONSchema_FieldConfigurationValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e JSONSchema_FieldConfigurationValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e JSONSchema_FieldConfigurationValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e JSONSchema_FieldConfigurationValidationError) ErrorName() string { + return "JSONSchema_FieldConfigurationValidationError" +} + +// Error satisfies the builtin error interface +func (e JSONSchema_FieldConfigurationValidationError) 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 %sJSONSchema_FieldConfiguration.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = JSONSchema_FieldConfigurationValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = JSONSchema_FieldConfigurationValidationError{} + +// Validate checks the field values on +// SecurityRequirement_SecurityRequirementValue with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *SecurityRequirement_SecurityRequirementValue) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on +// SecurityRequirement_SecurityRequirementValue with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in +// SecurityRequirement_SecurityRequirementValueMultiError, or nil if none found. +func (m *SecurityRequirement_SecurityRequirementValue) ValidateAll() error { + return m.validate(true) +} + +func (m *SecurityRequirement_SecurityRequirementValue) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return SecurityRequirement_SecurityRequirementValueMultiError(errors) + } + + return nil +} + +// SecurityRequirement_SecurityRequirementValueMultiError is an error wrapping +// multiple validation errors returned by +// SecurityRequirement_SecurityRequirementValue.ValidateAll() if the +// designated constraints aren't met. +type SecurityRequirement_SecurityRequirementValueMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SecurityRequirement_SecurityRequirementValueMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SecurityRequirement_SecurityRequirementValueMultiError) AllErrors() []error { return m } + +// SecurityRequirement_SecurityRequirementValueValidationError is the +// validation error returned by +// SecurityRequirement_SecurityRequirementValue.Validate if the designated +// constraints aren't met. +type SecurityRequirement_SecurityRequirementValueValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SecurityRequirement_SecurityRequirementValueValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SecurityRequirement_SecurityRequirementValueValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SecurityRequirement_SecurityRequirementValueValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SecurityRequirement_SecurityRequirementValueValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SecurityRequirement_SecurityRequirementValueValidationError) ErrorName() string { + return "SecurityRequirement_SecurityRequirementValueValidationError" +} + +// Error satisfies the builtin error interface +func (e SecurityRequirement_SecurityRequirementValueValidationError) 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 %sSecurityRequirement_SecurityRequirementValue.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SecurityRequirement_SecurityRequirementValueValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SecurityRequirement_SecurityRequirementValueValidationError{} diff --git a/proto/protoc-gen-openapiv2/options/openapiv2_grpc_pb.js b/proto/protoc-gen-openapiv2/options/openapiv2_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/openapiv2_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/protoc-gen-openapiv2/options/openapiv2_pb.d.ts b/proto/protoc-gen-openapiv2/options/openapiv2_pb.d.ts new file mode 100644 index 000000000..46b9e4bb7 --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/openapiv2_pb.d.ts @@ -0,0 +1,800 @@ +// package: grpc.gateway.protoc_gen_openapiv2.options +// file: protoc-gen-openapiv2/options/openapiv2.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +export class Swagger extends jspb.Message { + getSwagger(): string; + setSwagger(value: string): Swagger; + + hasInfo(): boolean; + clearInfo(): void; + getInfo(): Info | undefined; + setInfo(value?: Info): Swagger; + getHost(): string; + setHost(value: string): Swagger; + getBasePath(): string; + setBasePath(value: string): Swagger; + clearSchemesList(): void; + getSchemesList(): Array; + setSchemesList(value: Array): Swagger; + addSchemes(value: Scheme, index?: number): Scheme; + clearConsumesList(): void; + getConsumesList(): Array; + setConsumesList(value: Array): Swagger; + addConsumes(value: string, index?: number): string; + clearProducesList(): void; + getProducesList(): Array; + setProducesList(value: Array): Swagger; + addProduces(value: string, index?: number): string; + + getResponsesMap(): jspb.Map; + clearResponsesMap(): void; + + hasSecurityDefinitions(): boolean; + clearSecurityDefinitions(): void; + getSecurityDefinitions(): SecurityDefinitions | undefined; + setSecurityDefinitions(value?: SecurityDefinitions): Swagger; + clearSecurityList(): void; + getSecurityList(): Array; + setSecurityList(value: Array): Swagger; + addSecurity(value?: SecurityRequirement, index?: number): SecurityRequirement; + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): Swagger; + addTags(value?: Tag, index?: number): Tag; + + hasExternalDocs(): boolean; + clearExternalDocs(): void; + getExternalDocs(): ExternalDocumentation | undefined; + setExternalDocs(value?: ExternalDocumentation): Swagger; + + getExtensionsMap(): jspb.Map; + clearExtensionsMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Swagger.AsObject; + static toObject(includeInstance: boolean, msg: Swagger): Swagger.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Swagger, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Swagger; + static deserializeBinaryFromReader(message: Swagger, reader: jspb.BinaryReader): Swagger; +} + +export namespace Swagger { + export type AsObject = { + swagger: string, + info?: Info.AsObject, + host: string, + basePath: string, + schemesList: Array, + consumesList: Array, + producesList: Array, + + responsesMap: Array<[string, Response.AsObject]>, + securityDefinitions?: SecurityDefinitions.AsObject, + securityList: Array, + tagsList: Array, + externalDocs?: ExternalDocumentation.AsObject, + + extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, + } +} + +export class Operation extends jspb.Message { + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): Operation; + addTags(value: string, index?: number): string; + getSummary(): string; + setSummary(value: string): Operation; + getDescription(): string; + setDescription(value: string): Operation; + + hasExternalDocs(): boolean; + clearExternalDocs(): void; + getExternalDocs(): ExternalDocumentation | undefined; + setExternalDocs(value?: ExternalDocumentation): Operation; + getOperationId(): string; + setOperationId(value: string): Operation; + clearConsumesList(): void; + getConsumesList(): Array; + setConsumesList(value: Array): Operation; + addConsumes(value: string, index?: number): string; + clearProducesList(): void; + getProducesList(): Array; + setProducesList(value: Array): Operation; + addProduces(value: string, index?: number): string; + + getResponsesMap(): jspb.Map; + clearResponsesMap(): void; + clearSchemesList(): void; + getSchemesList(): Array; + setSchemesList(value: Array): Operation; + addSchemes(value: Scheme, index?: number): Scheme; + getDeprecated(): boolean; + setDeprecated(value: boolean): Operation; + clearSecurityList(): void; + getSecurityList(): Array; + setSecurityList(value: Array): Operation; + addSecurity(value?: SecurityRequirement, index?: number): SecurityRequirement; + + getExtensionsMap(): jspb.Map; + clearExtensionsMap(): void; + + hasParameters(): boolean; + clearParameters(): void; + getParameters(): Parameters | undefined; + setParameters(value?: Parameters): Operation; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Operation.AsObject; + static toObject(includeInstance: boolean, msg: Operation): Operation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Operation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Operation; + static deserializeBinaryFromReader(message: Operation, reader: jspb.BinaryReader): Operation; +} + +export namespace Operation { + export type AsObject = { + tagsList: Array, + summary: string, + description: string, + externalDocs?: ExternalDocumentation.AsObject, + operationId: string, + consumesList: Array, + producesList: Array, + + responsesMap: Array<[string, Response.AsObject]>, + schemesList: Array, + deprecated: boolean, + securityList: Array, + + extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, + parameters?: Parameters.AsObject, + } +} + +export class Parameters extends jspb.Message { + clearHeadersList(): void; + getHeadersList(): Array; + setHeadersList(value: Array): Parameters; + addHeaders(value?: HeaderParameter, index?: number): HeaderParameter; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Parameters.AsObject; + static toObject(includeInstance: boolean, msg: Parameters): Parameters.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Parameters, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Parameters; + static deserializeBinaryFromReader(message: Parameters, reader: jspb.BinaryReader): Parameters; +} + +export namespace Parameters { + export type AsObject = { + headersList: Array, + } +} + +export class HeaderParameter extends jspb.Message { + getName(): string; + setName(value: string): HeaderParameter; + getDescription(): string; + setDescription(value: string): HeaderParameter; + getType(): HeaderParameter.Type; + setType(value: HeaderParameter.Type): HeaderParameter; + getFormat(): string; + setFormat(value: string): HeaderParameter; + getRequired(): boolean; + setRequired(value: boolean): HeaderParameter; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HeaderParameter.AsObject; + static toObject(includeInstance: boolean, msg: HeaderParameter): HeaderParameter.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HeaderParameter, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HeaderParameter; + static deserializeBinaryFromReader(message: HeaderParameter, reader: jspb.BinaryReader): HeaderParameter; +} + +export namespace HeaderParameter { + export type AsObject = { + name: string, + description: string, + type: HeaderParameter.Type, + format: string, + required: boolean, + } + + export enum Type { + UNKNOWN = 0, + STRING = 1, + NUMBER = 2, + INTEGER = 3, + BOOLEAN = 4, + } + +} + +export class Header extends jspb.Message { + getDescription(): string; + setDescription(value: string): Header; + getType(): string; + setType(value: string): Header; + getFormat(): string; + setFormat(value: string): Header; + getDefault(): string; + setDefault(value: string): Header; + getPattern(): string; + setPattern(value: string): Header; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Header.AsObject; + static toObject(includeInstance: boolean, msg: Header): Header.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Header, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Header; + static deserializeBinaryFromReader(message: Header, reader: jspb.BinaryReader): Header; +} + +export namespace Header { + export type AsObject = { + description: string, + type: string, + format: string, + pb_default: string, + pattern: string, + } +} + +export class Response extends jspb.Message { + getDescription(): string; + setDescription(value: string): Response; + + hasSchema(): boolean; + clearSchema(): void; + getSchema(): Schema | undefined; + setSchema(value?: Schema): Response; + + getHeadersMap(): jspb.Map; + clearHeadersMap(): void; + + getExamplesMap(): jspb.Map; + clearExamplesMap(): void; + + getExtensionsMap(): jspb.Map; + clearExtensionsMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Response.AsObject; + static toObject(includeInstance: boolean, msg: Response): Response.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Response, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Response; + static deserializeBinaryFromReader(message: Response, reader: jspb.BinaryReader): Response; +} + +export namespace Response { + export type AsObject = { + description: string, + schema?: Schema.AsObject, + + headersMap: Array<[string, Header.AsObject]>, + + examplesMap: Array<[string, string]>, + + extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, + } +} + +export class Info extends jspb.Message { + getTitle(): string; + setTitle(value: string): Info; + getDescription(): string; + setDescription(value: string): Info; + getTermsOfService(): string; + setTermsOfService(value: string): Info; + + hasContact(): boolean; + clearContact(): void; + getContact(): Contact | undefined; + setContact(value?: Contact): Info; + + hasLicense(): boolean; + clearLicense(): void; + getLicense(): License | undefined; + setLicense(value?: License): Info; + getVersion(): string; + setVersion(value: string): Info; + + getExtensionsMap(): jspb.Map; + clearExtensionsMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Info.AsObject; + static toObject(includeInstance: boolean, msg: Info): Info.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Info, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Info; + static deserializeBinaryFromReader(message: Info, reader: jspb.BinaryReader): Info; +} + +export namespace Info { + export type AsObject = { + title: string, + description: string, + termsOfService: string, + contact?: Contact.AsObject, + license?: License.AsObject, + version: string, + + extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, + } +} + +export class Contact extends jspb.Message { + getName(): string; + setName(value: string): Contact; + getUrl(): string; + setUrl(value: string): Contact; + getEmail(): string; + setEmail(value: string): Contact; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Contact.AsObject; + static toObject(includeInstance: boolean, msg: Contact): Contact.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Contact, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Contact; + static deserializeBinaryFromReader(message: Contact, reader: jspb.BinaryReader): Contact; +} + +export namespace Contact { + export type AsObject = { + name: string, + url: string, + email: string, + } +} + +export class License extends jspb.Message { + getName(): string; + setName(value: string): License; + getUrl(): string; + setUrl(value: string): License; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): License.AsObject; + static toObject(includeInstance: boolean, msg: License): License.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: License, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): License; + static deserializeBinaryFromReader(message: License, reader: jspb.BinaryReader): License; +} + +export namespace License { + export type AsObject = { + name: string, + url: string, + } +} + +export class ExternalDocumentation extends jspb.Message { + getDescription(): string; + setDescription(value: string): ExternalDocumentation; + getUrl(): string; + setUrl(value: string): ExternalDocumentation; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExternalDocumentation.AsObject; + static toObject(includeInstance: boolean, msg: ExternalDocumentation): ExternalDocumentation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExternalDocumentation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExternalDocumentation; + static deserializeBinaryFromReader(message: ExternalDocumentation, reader: jspb.BinaryReader): ExternalDocumentation; +} + +export namespace ExternalDocumentation { + export type AsObject = { + description: string, + url: string, + } +} + +export class Schema extends jspb.Message { + + hasJsonSchema(): boolean; + clearJsonSchema(): void; + getJsonSchema(): JSONSchema | undefined; + setJsonSchema(value?: JSONSchema): Schema; + getDiscriminator(): string; + setDiscriminator(value: string): Schema; + getReadOnly(): boolean; + setReadOnly(value: boolean): Schema; + + hasExternalDocs(): boolean; + clearExternalDocs(): void; + getExternalDocs(): ExternalDocumentation | undefined; + setExternalDocs(value?: ExternalDocumentation): Schema; + getExample(): string; + setExample(value: string): Schema; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Schema.AsObject; + static toObject(includeInstance: boolean, msg: Schema): Schema.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Schema, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Schema; + static deserializeBinaryFromReader(message: Schema, reader: jspb.BinaryReader): Schema; +} + +export namespace Schema { + export type AsObject = { + jsonSchema?: JSONSchema.AsObject, + discriminator: string, + readOnly: boolean, + externalDocs?: ExternalDocumentation.AsObject, + example: string, + } +} + +export class JSONSchema extends jspb.Message { + getRef(): string; + setRef(value: string): JSONSchema; + getTitle(): string; + setTitle(value: string): JSONSchema; + getDescription(): string; + setDescription(value: string): JSONSchema; + getDefault(): string; + setDefault(value: string): JSONSchema; + getReadOnly(): boolean; + setReadOnly(value: boolean): JSONSchema; + getExample(): string; + setExample(value: string): JSONSchema; + getMultipleOf(): number; + setMultipleOf(value: number): JSONSchema; + getMaximum(): number; + setMaximum(value: number): JSONSchema; + getExclusiveMaximum(): boolean; + setExclusiveMaximum(value: boolean): JSONSchema; + getMinimum(): number; + setMinimum(value: number): JSONSchema; + getExclusiveMinimum(): boolean; + setExclusiveMinimum(value: boolean): JSONSchema; + getMaxLength(): number; + setMaxLength(value: number): JSONSchema; + getMinLength(): number; + setMinLength(value: number): JSONSchema; + getPattern(): string; + setPattern(value: string): JSONSchema; + getMaxItems(): number; + setMaxItems(value: number): JSONSchema; + getMinItems(): number; + setMinItems(value: number): JSONSchema; + getUniqueItems(): boolean; + setUniqueItems(value: boolean): JSONSchema; + getMaxProperties(): number; + setMaxProperties(value: number): JSONSchema; + getMinProperties(): number; + setMinProperties(value: number): JSONSchema; + clearRequiredList(): void; + getRequiredList(): Array; + setRequiredList(value: Array): JSONSchema; + addRequired(value: string, index?: number): string; + clearArrayList(): void; + getArrayList(): Array; + setArrayList(value: Array): JSONSchema; + addArray(value: string, index?: number): string; + clearTypeList(): void; + getTypeList(): Array; + setTypeList(value: Array): JSONSchema; + addType(value: JSONSchema.JSONSchemaSimpleTypes, index?: number): JSONSchema.JSONSchemaSimpleTypes; + getFormat(): string; + setFormat(value: string): JSONSchema; + clearEnumList(): void; + getEnumList(): Array; + setEnumList(value: Array): JSONSchema; + addEnum(value: string, index?: number): string; + + hasFieldConfiguration(): boolean; + clearFieldConfiguration(): void; + getFieldConfiguration(): JSONSchema.FieldConfiguration | undefined; + setFieldConfiguration(value?: JSONSchema.FieldConfiguration): JSONSchema; + + getExtensionsMap(): jspb.Map; + clearExtensionsMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): JSONSchema.AsObject; + static toObject(includeInstance: boolean, msg: JSONSchema): JSONSchema.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: JSONSchema, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): JSONSchema; + static deserializeBinaryFromReader(message: JSONSchema, reader: jspb.BinaryReader): JSONSchema; +} + +export namespace JSONSchema { + export type AsObject = { + ref: string, + title: string, + description: string, + pb_default: string, + readOnly: boolean, + example: string, + multipleOf: number, + maximum: number, + exclusiveMaximum: boolean, + minimum: number, + exclusiveMinimum: boolean, + maxLength: number, + minLength: number, + pattern: string, + maxItems: number, + minItems: number, + uniqueItems: boolean, + maxProperties: number, + minProperties: number, + requiredList: Array, + arrayList: Array, + typeList: Array, + format: string, + pb_enumList: Array, + fieldConfiguration?: JSONSchema.FieldConfiguration.AsObject, + + extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, + } + + + export class FieldConfiguration extends jspb.Message { + getPathParamName(): string; + setPathParamName(value: string): FieldConfiguration; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldConfiguration.AsObject; + static toObject(includeInstance: boolean, msg: FieldConfiguration): FieldConfiguration.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldConfiguration, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldConfiguration; + static deserializeBinaryFromReader(message: FieldConfiguration, reader: jspb.BinaryReader): FieldConfiguration; + } + + export namespace FieldConfiguration { + export type AsObject = { + pathParamName: string, + } + } + + + export enum JSONSchemaSimpleTypes { + UNKNOWN = 0, + ARRAY = 1, + BOOLEAN = 2, + INTEGER = 3, + NULL = 4, + NUMBER = 5, + OBJECT = 6, + STRING = 7, + } + +} + +export class Tag extends jspb.Message { + getName(): string; + setName(value: string): Tag; + getDescription(): string; + setDescription(value: string): Tag; + + hasExternalDocs(): boolean; + clearExternalDocs(): void; + getExternalDocs(): ExternalDocumentation | undefined; + setExternalDocs(value?: ExternalDocumentation): Tag; + + getExtensionsMap(): jspb.Map; + clearExtensionsMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Tag.AsObject; + static toObject(includeInstance: boolean, msg: Tag): Tag.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Tag, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Tag; + static deserializeBinaryFromReader(message: Tag, reader: jspb.BinaryReader): Tag; +} + +export namespace Tag { + export type AsObject = { + name: string, + description: string, + externalDocs?: ExternalDocumentation.AsObject, + + extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, + } +} + +export class SecurityDefinitions extends jspb.Message { + + getSecurityMap(): jspb.Map; + clearSecurityMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SecurityDefinitions.AsObject; + static toObject(includeInstance: boolean, msg: SecurityDefinitions): SecurityDefinitions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SecurityDefinitions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SecurityDefinitions; + static deserializeBinaryFromReader(message: SecurityDefinitions, reader: jspb.BinaryReader): SecurityDefinitions; +} + +export namespace SecurityDefinitions { + export type AsObject = { + + securityMap: Array<[string, SecurityScheme.AsObject]>, + } +} + +export class SecurityScheme extends jspb.Message { + getType(): SecurityScheme.Type; + setType(value: SecurityScheme.Type): SecurityScheme; + getDescription(): string; + setDescription(value: string): SecurityScheme; + getName(): string; + setName(value: string): SecurityScheme; + getIn(): SecurityScheme.In; + setIn(value: SecurityScheme.In): SecurityScheme; + getFlow(): SecurityScheme.Flow; + setFlow(value: SecurityScheme.Flow): SecurityScheme; + getAuthorizationUrl(): string; + setAuthorizationUrl(value: string): SecurityScheme; + getTokenUrl(): string; + setTokenUrl(value: string): SecurityScheme; + + hasScopes(): boolean; + clearScopes(): void; + getScopes(): Scopes | undefined; + setScopes(value?: Scopes): SecurityScheme; + + getExtensionsMap(): jspb.Map; + clearExtensionsMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SecurityScheme.AsObject; + static toObject(includeInstance: boolean, msg: SecurityScheme): SecurityScheme.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SecurityScheme, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SecurityScheme; + static deserializeBinaryFromReader(message: SecurityScheme, reader: jspb.BinaryReader): SecurityScheme; +} + +export namespace SecurityScheme { + export type AsObject = { + type: SecurityScheme.Type, + description: string, + name: string, + pb_in: SecurityScheme.In, + flow: SecurityScheme.Flow, + authorizationUrl: string, + tokenUrl: string, + scopes?: Scopes.AsObject, + + extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, + } + + export enum Type { + TYPE_INVALID = 0, + TYPE_BASIC = 1, + TYPE_API_KEY = 2, + TYPE_OAUTH2 = 3, + } + + export enum In { + IN_INVALID = 0, + IN_QUERY = 1, + IN_HEADER = 2, + } + + export enum Flow { + FLOW_INVALID = 0, + FLOW_IMPLICIT = 1, + FLOW_PASSWORD = 2, + FLOW_APPLICATION = 3, + FLOW_ACCESS_CODE = 4, + } + +} + +export class SecurityRequirement extends jspb.Message { + + getSecurityRequirementMap(): jspb.Map; + clearSecurityRequirementMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SecurityRequirement.AsObject; + static toObject(includeInstance: boolean, msg: SecurityRequirement): SecurityRequirement.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SecurityRequirement, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SecurityRequirement; + static deserializeBinaryFromReader(message: SecurityRequirement, reader: jspb.BinaryReader): SecurityRequirement; +} + +export namespace SecurityRequirement { + export type AsObject = { + + securityRequirementMap: Array<[string, SecurityRequirement.SecurityRequirementValue.AsObject]>, + } + + + export class SecurityRequirementValue extends jspb.Message { + clearScopeList(): void; + getScopeList(): Array; + setScopeList(value: Array): SecurityRequirementValue; + addScope(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SecurityRequirementValue.AsObject; + static toObject(includeInstance: boolean, msg: SecurityRequirementValue): SecurityRequirementValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SecurityRequirementValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SecurityRequirementValue; + static deserializeBinaryFromReader(message: SecurityRequirementValue, reader: jspb.BinaryReader): SecurityRequirementValue; + } + + export namespace SecurityRequirementValue { + export type AsObject = { + scopeList: Array, + } + } + +} + +export class Scopes extends jspb.Message { + + getScopeMap(): jspb.Map; + clearScopeMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Scopes.AsObject; + static toObject(includeInstance: boolean, msg: Scopes): Scopes.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Scopes, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Scopes; + static deserializeBinaryFromReader(message: Scopes, reader: jspb.BinaryReader): Scopes; +} + +export namespace Scopes { + export type AsObject = { + + scopeMap: Array<[string, string]>, + } +} + +export enum Scheme { + UNKNOWN = 0, + HTTP = 1, + HTTPS = 2, + WS = 3, + WSS = 4, +} diff --git a/proto/protoc-gen-openapiv2/options/openapiv2_pb.js b/proto/protoc-gen-openapiv2/options/openapiv2_pb.js new file mode 100644 index 000000000..453684149 --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/openapiv2_pb.js @@ -0,0 +1,6256 @@ +// source: protoc-gen-openapiv2/options/openapiv2.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Contact', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Header', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Info', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.License', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Operation', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Response', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Schema', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Scheme', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Tag', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.repeatedFields_, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.repeatedFields_, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Operation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Operation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.repeatedFields_, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Header, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Header.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Header'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Response, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Response.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Response'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Info, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Info.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Info'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Contact, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Contact'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.License, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.License.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.License'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Schema, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Schema'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.repeatedFields_, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Tag, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Tag'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.repeatedFields_, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.repeatedFields_ = [5,6,7,12,13]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.toObject = function(includeInstance, msg) { + var f, obj = { + swagger: jspb.Message.getFieldWithDefault(msg, 1, ""), + info: (f = msg.getInfo()) && proto.grpc.gateway.protoc_gen_openapiv2.options.Info.toObject(includeInstance, f), + host: jspb.Message.getFieldWithDefault(msg, 3, ""), + basePath: jspb.Message.getFieldWithDefault(msg, 4, ""), + schemesList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, + consumesList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + producesList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, + responsesMap: (f = msg.getResponsesMap()) ? f.toObject(includeInstance, proto.grpc.gateway.protoc_gen_openapiv2.options.Response.toObject) : [], + securityDefinitions: (f = msg.getSecurityDefinitions()) && proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.toObject(includeInstance, f), + securityList: jspb.Message.toObjectList(msg.getSecurityList(), + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.toObject, includeInstance), + tagsList: jspb.Message.toObjectList(msg.getTagsList(), + proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.toObject, includeInstance), + externalDocs: (f = msg.getExternalDocs()) && proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.toObject(includeInstance, f), + extensionsMap: (f = msg.getExtensionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSwagger(value); + break; + case 2: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.Info; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.Info.deserializeBinaryFromReader); + msg.setInfo(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setHost(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setBasePath(value); + break; + case 5: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addSchemes(values[i]); + } + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.addConsumes(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.addProduces(value); + break; + case 10: + var value = msg.getResponsesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.Response.deserializeBinaryFromReader, "", new proto.grpc.gateway.protoc_gen_openapiv2.options.Response()); + }); + break; + case 11: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.deserializeBinaryFromReader); + msg.setSecurityDefinitions(value); + break; + case 12: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.deserializeBinaryFromReader); + msg.addSecurity(value); + break; + case 13: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.Tag; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.deserializeBinaryFromReader); + msg.addTags(value); + break; + case 14: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.deserializeBinaryFromReader); + msg.setExternalDocs(value); + break; + case 15: + var value = msg.getExtensionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSwagger(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.Info.serializeBinaryToWriter + ); + } + f = message.getHost(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getBasePath(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getSchemesList(); + if (f.length > 0) { + writer.writePackedEnum( + 5, + f + ); + } + f = message.getConsumesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 6, + f + ); + } + f = message.getProducesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 7, + f + ); + } + f = message.getResponsesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(10, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.Response.serializeBinaryToWriter); + } + f = message.getSecurityDefinitions(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.serializeBinaryToWriter + ); + } + f = message.getSecurityList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 12, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.serializeBinaryToWriter + ); + } + f = message.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 13, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.serializeBinaryToWriter + ); + } + f = message.getExternalDocs(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.serializeBinaryToWriter + ); + } + f = message.getExtensionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(15, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } +}; + + +/** + * optional string swagger = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getSwagger = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setSwagger = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Info info = 2; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.Info} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getInfo = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.Info} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.Info, 2)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.Info|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearInfo = function() { + return this.setInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.hasInfo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string host = 3; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getHost = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setHost = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string base_path = 4; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getBasePath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setBasePath = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated Scheme schemes = 5; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getSchemesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setSchemesList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Scheme} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.addSchemes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearSchemesList = function() { + return this.setSchemesList([]); +}; + + +/** + * repeated string consumes = 6; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getConsumesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setConsumesList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.addConsumes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearConsumesList = function() { + return this.setConsumesList([]); +}; + + +/** + * repeated string produces = 7; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getProducesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setProducesList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.addProduces = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearProducesList = function() { + return this.setProducesList([]); +}; + + +/** + * map responses = 10; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getResponsesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 10, opt_noLazyCreate, + proto.grpc.gateway.protoc_gen_openapiv2.options.Response)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearResponsesMap = function() { + this.getResponsesMap().clear(); + return this; +}; + + +/** + * optional SecurityDefinitions security_definitions = 11; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getSecurityDefinitions = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions, 11)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setSecurityDefinitions = function(value) { + return jspb.Message.setWrapperField(this, 11, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearSecurityDefinitions = function() { + return this.setSecurityDefinitions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.hasSecurityDefinitions = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * repeated SecurityRequirement security = 12; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getSecurityList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, 12)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setSecurityList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement=} opt_value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.addSecurity = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearSecurityList = function() { + return this.setSecurityList([]); +}; + + +/** + * repeated Tag tags = 13; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getTagsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.Tag, 13)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setTagsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 13, value); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag=} opt_value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.addTags = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.grpc.gateway.protoc_gen_openapiv2.options.Tag, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearTagsList = function() { + return this.setTagsList([]); +}; + + +/** + * optional ExternalDocumentation external_docs = 14; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getExternalDocs = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, 14)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setExternalDocs = function(value) { + return jspb.Message.setWrapperField(this, 14, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearExternalDocs = function() { + return this.setExternalDocs(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.hasExternalDocs = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * map extensions = 15; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getExtensionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 15, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearExtensionsMap = function() { + this.getExtensionsMap().clear(); + return this; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.repeatedFields_ = [1,6,7,10,12]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.toObject = function(includeInstance, msg) { + var f, obj = { + tagsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + summary: jspb.Message.getFieldWithDefault(msg, 2, ""), + description: jspb.Message.getFieldWithDefault(msg, 3, ""), + externalDocs: (f = msg.getExternalDocs()) && proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.toObject(includeInstance, f), + operationId: jspb.Message.getFieldWithDefault(msg, 5, ""), + consumesList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + producesList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, + responsesMap: (f = msg.getResponsesMap()) ? f.toObject(includeInstance, proto.grpc.gateway.protoc_gen_openapiv2.options.Response.toObject) : [], + schemesList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, + deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), + securityList: jspb.Message.toObjectList(msg.getSecurityList(), + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.toObject, includeInstance), + extensionsMap: (f = msg.getExtensionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [], + parameters: (f = msg.getParameters()) && proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Operation; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addTags(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSummary(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 4: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.deserializeBinaryFromReader); + msg.setExternalDocs(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setOperationId(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.addConsumes(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.addProduces(value); + break; + case 9: + var value = msg.getResponsesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.Response.deserializeBinaryFromReader, "", new proto.grpc.gateway.protoc_gen_openapiv2.options.Response()); + }); + break; + case 10: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addSchemes(values[i]); + } + break; + case 11: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 12: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.deserializeBinaryFromReader); + msg.addSecurity(value); + break; + case 13: + var value = msg.getExtensionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + case 14: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.deserializeBinaryFromReader); + msg.setParameters(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } + f = message.getSummary(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getExternalDocs(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.serializeBinaryToWriter + ); + } + f = message.getOperationId(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getConsumesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 6, + f + ); + } + f = message.getProducesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 7, + f + ); + } + f = message.getResponsesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.Response.serializeBinaryToWriter); + } + f = message.getSchemesList(); + if (f.length > 0) { + writer.writePackedEnum( + 10, + f + ); + } + f = message.getDeprecated(); + if (f) { + writer.writeBool( + 11, + f + ); + } + f = message.getSecurityList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 12, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.serializeBinaryToWriter + ); + } + f = message.getExtensionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(13, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } + f = message.getParameters(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated string tags = 1; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getTagsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setTagsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.addTags = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearTagsList = function() { + return this.setTagsList([]); +}; + + +/** + * optional string summary = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getSummary = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setSummary = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional ExternalDocumentation external_docs = 4; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getExternalDocs = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, 4)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setExternalDocs = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearExternalDocs = function() { + return this.setExternalDocs(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.hasExternalDocs = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string operation_id = 5; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getOperationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setOperationId = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * repeated string consumes = 6; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getConsumesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setConsumesList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.addConsumes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearConsumesList = function() { + return this.setConsumesList([]); +}; + + +/** + * repeated string produces = 7; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getProducesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setProducesList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.addProduces = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearProducesList = function() { + return this.setProducesList([]); +}; + + +/** + * map responses = 9; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getResponsesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 9, opt_noLazyCreate, + proto.grpc.gateway.protoc_gen_openapiv2.options.Response)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearResponsesMap = function() { + this.getResponsesMap().clear(); + return this; +}; + + +/** + * repeated Scheme schemes = 10; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getSchemesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setSchemesList = function(value) { + return jspb.Message.setField(this, 10, value || []); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Scheme} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.addSchemes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearSchemesList = function() { + return this.setSchemesList([]); +}; + + +/** + * optional bool deprecated = 11; + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setDeprecated = function(value) { + return jspb.Message.setProto3BooleanField(this, 11, value); +}; + + +/** + * repeated SecurityRequirement security = 12; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getSecurityList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, 12)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setSecurityList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement=} opt_value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.addSecurity = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearSecurityList = function() { + return this.setSecurityList([]); +}; + + +/** + * map extensions = 13; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getExtensionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 13, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearExtensionsMap = function() { + this.getExtensionsMap().clear(); + return this; +}; + + +/** + * optional Parameters parameters = 14; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getParameters = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters, 14)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setParameters = function(value) { + return jspb.Message.setWrapperField(this, 14, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearParameters = function() { + return this.setParameters(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.hasParameters = function() { + return jspb.Message.getField(this, 14) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.toObject = function(includeInstance, msg) { + var f, obj = { + headersList: jspb.Message.toObjectList(msg.getHeadersList(), + proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.deserializeBinaryFromReader); + msg.addHeaders(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeadersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated HeaderParameter headers = 1; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.prototype.getHeadersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.prototype.setHeadersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter=} opt_value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.prototype.addHeaders = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.prototype.clearHeadersList = function() { + return this.setHeadersList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + type: jspb.Message.getFieldWithDefault(msg, 3, 0), + format: jspb.Message.getFieldWithDefault(msg, 4, ""), + required: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter; + return proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type} */ (reader.readEnum()); + msg.setType(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setFormat(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRequired(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getFormat(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRequired(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type = { + UNKNOWN: 0, + STRING: 1, + NUMBER: 2, + INTEGER: 3, + BOOLEAN: 4 +}; + +/** + * optional string name = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional Type type = 3; + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.getType = function() { + return /** @type {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional string format = 4; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.getFormat = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.setFormat = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional bool required = 5; + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.getRequired = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.setRequired = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Header.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.toObject = function(includeInstance, msg) { + var f, obj = { + description: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, ""), + format: jspb.Message.getFieldWithDefault(msg, 3, ""), + pb_default: jspb.Message.getFieldWithDefault(msg, 6, ""), + pattern: jspb.Message.getFieldWithDefault(msg, 13, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Header; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Header.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setFormat(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setDefault(value); + break; + case 13: + var value = /** @type {string} */ (reader.readString()); + msg.setPattern(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Header.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFormat(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDefault(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getPattern(); + if (f.length > 0) { + writer.writeString( + 13, + f + ); + } +}; + + +/** + * optional string description = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string type = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string format = 3; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.getFormat = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.setFormat = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string default = 6; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.getDefault = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.setDefault = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string pattern = 13; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.getPattern = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.setPattern = function(value) { + return jspb.Message.setProto3StringField(this, 13, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Response.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.toObject = function(includeInstance, msg) { + var f, obj = { + description: jspb.Message.getFieldWithDefault(msg, 1, ""), + schema: (f = msg.getSchema()) && proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.toObject(includeInstance, f), + headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, proto.grpc.gateway.protoc_gen_openapiv2.options.Header.toObject) : [], + examplesMap: (f = msg.getExamplesMap()) ? f.toObject(includeInstance, undefined) : [], + extensionsMap: (f = msg.getExtensionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Response; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Response.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 2: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.Schema; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.deserializeBinaryFromReader); + msg.setSchema(value); + break; + case 3: + var value = msg.getHeadersMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.Header.deserializeBinaryFromReader, "", new proto.grpc.gateway.protoc_gen_openapiv2.options.Header()); + }); + break; + case 4: + var value = msg.getExamplesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 5: + var value = msg.getExtensionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Response.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSchema(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.serializeBinaryToWriter + ); + } + f = message.getHeadersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.Header.serializeBinaryToWriter); + } + f = message.getExamplesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getExtensionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } +}; + + +/** + * optional string description = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Schema schema = 2; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.getSchema = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.Schema, 2)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.Schema|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.setSchema = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.clearSchema = function() { + return this.setSchema(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.hasSchema = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * map headers = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.getHeadersMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + proto.grpc.gateway.protoc_gen_openapiv2.options.Header)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.clearHeadersMap = function() { + this.getHeadersMap().clear(); + return this; +}; + + +/** + * map examples = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.getExamplesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.clearExamplesMap = function() { + this.getExamplesMap().clear(); + return this; +}; + + +/** + * map extensions = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.getExtensionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.clearExtensionsMap = function() { + this.getExtensionsMap().clear(); + return this; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Info.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.toObject = function(includeInstance, msg) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + termsOfService: jspb.Message.getFieldWithDefault(msg, 3, ""), + contact: (f = msg.getContact()) && proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.toObject(includeInstance, f), + license: (f = msg.getLicense()) && proto.grpc.gateway.protoc_gen_openapiv2.options.License.toObject(includeInstance, f), + version: jspb.Message.getFieldWithDefault(msg, 6, ""), + extensionsMap: (f = msg.getExtensionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Info; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Info.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTitle(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTermsOfService(value); + break; + case 4: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.Contact; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.deserializeBinaryFromReader); + msg.setContact(value); + break; + case 5: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.License; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.License.deserializeBinaryFromReader); + msg.setLicense(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 7: + var value = msg.getExtensionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Info.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTermsOfService(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getContact(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.serializeBinaryToWriter + ); + } + f = message.getLicense(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.License.serializeBinaryToWriter + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getExtensionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(7, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string terms_of_service = 3; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.getTermsOfService = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.setTermsOfService = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional Contact contact = 4; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.getContact = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.Contact, 4)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.Contact|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.setContact = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.clearContact = function() { + return this.setContact(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.hasContact = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional License license = 5; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.License} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.getLicense = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.License} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.License, 5)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.License|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.setLicense = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.clearLicense = function() { + return this.setLicense(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.hasLicense = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string version = 6; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * map extensions = 7; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.getExtensionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 7, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.clearExtensionsMap = function() { + this.getExtensionsMap().clear(); + return this; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + url: jspb.Message.getFieldWithDefault(msg, 2, ""), + email: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Contact; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setEmail(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getEmail(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string url = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string email = 3; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.prototype.getEmail = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.prototype.setEmail = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.License.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.License} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + url: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.License} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.License; + return proto.grpc.gateway.protoc_gen_openapiv2.options.License.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.License} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.License} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.License.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.License} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.License} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string url = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.License} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.toObject = function(includeInstance, msg) { + var f, obj = { + description: jspb.Message.getFieldWithDefault(msg, 1, ""), + url: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation; + return proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string description = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string url = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.toObject = function(includeInstance, msg) { + var f, obj = { + jsonSchema: (f = msg.getJsonSchema()) && proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.toObject(includeInstance, f), + discriminator: jspb.Message.getFieldWithDefault(msg, 2, ""), + readOnly: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + externalDocs: (f = msg.getExternalDocs()) && proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.toObject(includeInstance, f), + example: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Schema; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.deserializeBinaryFromReader); + msg.setJsonSchema(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDiscriminator(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReadOnly(value); + break; + case 5: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.deserializeBinaryFromReader); + msg.setExternalDocs(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setExample(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJsonSchema(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.serializeBinaryToWriter + ); + } + f = message.getDiscriminator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getReadOnly(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getExternalDocs(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.serializeBinaryToWriter + ); + } + f = message.getExample(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional JSONSchema json_schema = 1; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.getJsonSchema = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema, 1)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.setJsonSchema = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.clearJsonSchema = function() { + return this.setJsonSchema(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.hasJsonSchema = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string discriminator = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.getDiscriminator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.setDiscriminator = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool read_only = 3; + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.getReadOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.setReadOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional ExternalDocumentation external_docs = 5; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.getExternalDocs = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, 5)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.setExternalDocs = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.clearExternalDocs = function() { + return this.setExternalDocs(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.hasExternalDocs = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string example = 6; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.getExample = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.setExample = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.repeatedFields_ = [26,34,35,46]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.toObject = function(includeInstance, msg) { + var f, obj = { + ref: jspb.Message.getFieldWithDefault(msg, 3, ""), + title: jspb.Message.getFieldWithDefault(msg, 5, ""), + description: jspb.Message.getFieldWithDefault(msg, 6, ""), + pb_default: jspb.Message.getFieldWithDefault(msg, 7, ""), + readOnly: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + example: jspb.Message.getFieldWithDefault(msg, 9, ""), + multipleOf: jspb.Message.getFloatingPointFieldWithDefault(msg, 10, 0.0), + maximum: jspb.Message.getFloatingPointFieldWithDefault(msg, 11, 0.0), + exclusiveMaximum: jspb.Message.getBooleanFieldWithDefault(msg, 12, false), + minimum: jspb.Message.getFloatingPointFieldWithDefault(msg, 13, 0.0), + exclusiveMinimum: jspb.Message.getBooleanFieldWithDefault(msg, 14, false), + maxLength: jspb.Message.getFieldWithDefault(msg, 15, 0), + minLength: jspb.Message.getFieldWithDefault(msg, 16, 0), + pattern: jspb.Message.getFieldWithDefault(msg, 17, ""), + maxItems: jspb.Message.getFieldWithDefault(msg, 20, 0), + minItems: jspb.Message.getFieldWithDefault(msg, 21, 0), + uniqueItems: jspb.Message.getBooleanFieldWithDefault(msg, 22, false), + maxProperties: jspb.Message.getFieldWithDefault(msg, 24, 0), + minProperties: jspb.Message.getFieldWithDefault(msg, 25, 0), + requiredList: (f = jspb.Message.getRepeatedField(msg, 26)) == null ? undefined : f, + arrayList: (f = jspb.Message.getRepeatedField(msg, 34)) == null ? undefined : f, + typeList: (f = jspb.Message.getRepeatedField(msg, 35)) == null ? undefined : f, + format: jspb.Message.getFieldWithDefault(msg, 36, ""), + enumList: (f = jspb.Message.getRepeatedField(msg, 46)) == null ? undefined : f, + fieldConfiguration: (f = msg.getFieldConfiguration()) && proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.toObject(includeInstance, f), + extensionsMap: (f = msg.getExtensionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema; + return proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRef(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setTitle(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setDefault(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReadOnly(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setExample(value); + break; + case 10: + var value = /** @type {number} */ (reader.readDouble()); + msg.setMultipleOf(value); + break; + case 11: + var value = /** @type {number} */ (reader.readDouble()); + msg.setMaximum(value); + break; + case 12: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setExclusiveMaximum(value); + break; + case 13: + var value = /** @type {number} */ (reader.readDouble()); + msg.setMinimum(value); + break; + case 14: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setExclusiveMinimum(value); + break; + case 15: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxLength(value); + break; + case 16: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinLength(value); + break; + case 17: + var value = /** @type {string} */ (reader.readString()); + msg.setPattern(value); + break; + case 20: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxItems(value); + break; + case 21: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinItems(value); + break; + case 22: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUniqueItems(value); + break; + case 24: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxProperties(value); + break; + case 25: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinProperties(value); + break; + case 26: + var value = /** @type {string} */ (reader.readString()); + msg.addRequired(value); + break; + case 34: + var value = /** @type {string} */ (reader.readString()); + msg.addArray(value); + break; + case 35: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addType(values[i]); + } + break; + case 36: + var value = /** @type {string} */ (reader.readString()); + msg.setFormat(value); + break; + case 46: + var value = /** @type {string} */ (reader.readString()); + msg.addEnum(value); + break; + case 1001: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.deserializeBinaryFromReader); + msg.setFieldConfiguration(value); + break; + case 48: + var value = msg.getExtensionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRef(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getDefault(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getReadOnly(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getExample(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getMultipleOf(); + if (f !== 0.0) { + writer.writeDouble( + 10, + f + ); + } + f = message.getMaximum(); + if (f !== 0.0) { + writer.writeDouble( + 11, + f + ); + } + f = message.getExclusiveMaximum(); + if (f) { + writer.writeBool( + 12, + f + ); + } + f = message.getMinimum(); + if (f !== 0.0) { + writer.writeDouble( + 13, + f + ); + } + f = message.getExclusiveMinimum(); + if (f) { + writer.writeBool( + 14, + f + ); + } + f = message.getMaxLength(); + if (f !== 0) { + writer.writeUint64( + 15, + f + ); + } + f = message.getMinLength(); + if (f !== 0) { + writer.writeUint64( + 16, + f + ); + } + f = message.getPattern(); + if (f.length > 0) { + writer.writeString( + 17, + f + ); + } + f = message.getMaxItems(); + if (f !== 0) { + writer.writeUint64( + 20, + f + ); + } + f = message.getMinItems(); + if (f !== 0) { + writer.writeUint64( + 21, + f + ); + } + f = message.getUniqueItems(); + if (f) { + writer.writeBool( + 22, + f + ); + } + f = message.getMaxProperties(); + if (f !== 0) { + writer.writeUint64( + 24, + f + ); + } + f = message.getMinProperties(); + if (f !== 0) { + writer.writeUint64( + 25, + f + ); + } + f = message.getRequiredList(); + if (f.length > 0) { + writer.writeRepeatedString( + 26, + f + ); + } + f = message.getArrayList(); + if (f.length > 0) { + writer.writeRepeatedString( + 34, + f + ); + } + f = message.getTypeList(); + if (f.length > 0) { + writer.writePackedEnum( + 35, + f + ); + } + f = message.getFormat(); + if (f.length > 0) { + writer.writeString( + 36, + f + ); + } + f = message.getEnumList(); + if (f.length > 0) { + writer.writeRepeatedString( + 46, + f + ); + } + f = message.getFieldConfiguration(); + if (f != null) { + writer.writeMessage( + 1001, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.serializeBinaryToWriter + ); + } + f = message.getExtensionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(48, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } +}; + + +/** + * @enum {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes = { + UNKNOWN: 0, + ARRAY: 1, + BOOLEAN: 2, + INTEGER: 3, + NULL: 4, + NUMBER: 5, + OBJECT: 6, + STRING: 7 +}; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.toObject = function(includeInstance, msg) { + var f, obj = { + pathParamName: jspb.Message.getFieldWithDefault(msg, 47, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration; + return proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 47: + var value = /** @type {string} */ (reader.readString()); + msg.setPathParamName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPathParamName(); + if (f.length > 0) { + writer.writeString( + 47, + f + ); + } +}; + + +/** + * optional string path_param_name = 47; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.prototype.getPathParamName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 47, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.prototype.setPathParamName = function(value) { + return jspb.Message.setProto3StringField(this, 47, value); +}; + + +/** + * optional string ref = 3; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getRef = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setRef = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string title = 5; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string description = 6; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string default = 7; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getDefault = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setDefault = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional bool read_only = 8; + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getReadOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setReadOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); +}; + + +/** + * optional string example = 9; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getExample = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setExample = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional double multiple_of = 10; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMultipleOf = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 10, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMultipleOf = function(value) { + return jspb.Message.setProto3FloatField(this, 10, value); +}; + + +/** + * optional double maximum = 11; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMaximum = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 11, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMaximum = function(value) { + return jspb.Message.setProto3FloatField(this, 11, value); +}; + + +/** + * optional bool exclusive_maximum = 12; + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getExclusiveMaximum = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setExclusiveMaximum = function(value) { + return jspb.Message.setProto3BooleanField(this, 12, value); +}; + + +/** + * optional double minimum = 13; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMinimum = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 13, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMinimum = function(value) { + return jspb.Message.setProto3FloatField(this, 13, value); +}; + + +/** + * optional bool exclusive_minimum = 14; + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getExclusiveMinimum = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setExclusiveMinimum = function(value) { + return jspb.Message.setProto3BooleanField(this, 14, value); +}; + + +/** + * optional uint64 max_length = 15; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMaxLength = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMaxLength = function(value) { + return jspb.Message.setProto3IntField(this, 15, value); +}; + + +/** + * optional uint64 min_length = 16; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMinLength = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMinLength = function(value) { + return jspb.Message.setProto3IntField(this, 16, value); +}; + + +/** + * optional string pattern = 17; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getPattern = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setPattern = function(value) { + return jspb.Message.setProto3StringField(this, 17, value); +}; + + +/** + * optional uint64 max_items = 20; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMaxItems = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMaxItems = function(value) { + return jspb.Message.setProto3IntField(this, 20, value); +}; + + +/** + * optional uint64 min_items = 21; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMinItems = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMinItems = function(value) { + return jspb.Message.setProto3IntField(this, 21, value); +}; + + +/** + * optional bool unique_items = 22; + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getUniqueItems = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 22, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setUniqueItems = function(value) { + return jspb.Message.setProto3BooleanField(this, 22, value); +}; + + +/** + * optional uint64 max_properties = 24; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMaxProperties = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMaxProperties = function(value) { + return jspb.Message.setProto3IntField(this, 24, value); +}; + + +/** + * optional uint64 min_properties = 25; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMinProperties = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 25, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMinProperties = function(value) { + return jspb.Message.setProto3IntField(this, 25, value); +}; + + +/** + * repeated string required = 26; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getRequiredList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 26)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setRequiredList = function(value) { + return jspb.Message.setField(this, 26, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.addRequired = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 26, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.clearRequiredList = function() { + return this.setRequiredList([]); +}; + + +/** + * repeated string array = 34; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getArrayList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 34)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setArrayList = function(value) { + return jspb.Message.setField(this, 34, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.addArray = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 34, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.clearArrayList = function() { + return this.setArrayList([]); +}; + + +/** + * repeated JSONSchemaSimpleTypes type = 35; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getTypeList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 35)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setTypeList = function(value) { + return jspb.Message.setField(this, 35, value || []); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.addType = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 35, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.clearTypeList = function() { + return this.setTypeList([]); +}; + + +/** + * optional string format = 36; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getFormat = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 36, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setFormat = function(value) { + return jspb.Message.setProto3StringField(this, 36, value); +}; + + +/** + * repeated string enum = 46; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getEnumList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 46)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setEnumList = function(value) { + return jspb.Message.setField(this, 46, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.addEnum = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 46, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.clearEnumList = function() { + return this.setEnumList([]); +}; + + +/** + * optional FieldConfiguration field_configuration = 1001; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getFieldConfiguration = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration, 1001)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setFieldConfiguration = function(value) { + return jspb.Message.setWrapperField(this, 1001, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.clearFieldConfiguration = function() { + return this.setFieldConfiguration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.hasFieldConfiguration = function() { + return jspb.Message.getField(this, 1001) != null; +}; + + +/** + * map extensions = 48; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getExtensionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 48, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.clearExtensionsMap = function() { + this.getExtensionsMap().clear(); + return this; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + externalDocs: (f = msg.getExternalDocs()) && proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.toObject(includeInstance, f), + extensionsMap: (f = msg.getExtensionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Tag; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.deserializeBinaryFromReader); + msg.setExternalDocs(value); + break; + case 4: + var value = msg.getExtensionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getExternalDocs(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.serializeBinaryToWriter + ); + } + f = message.getExtensionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional ExternalDocumentation external_docs = 3; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.getExternalDocs = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, 3)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.setExternalDocs = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.clearExternalDocs = function() { + return this.setExternalDocs(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.hasExternalDocs = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * map extensions = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.getExtensionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.clearExtensionsMap = function() { + this.getExtensionsMap().clear(); + return this; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.toObject = function(includeInstance, msg) { + var f, obj = { + securityMap: (f = msg.getSecurityMap()) ? f.toObject(includeInstance, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions; + return proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getSecurityMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.deserializeBinaryFromReader, "", new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSecurityMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.serializeBinaryToWriter); + } +}; + + +/** + * map security = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.prototype.getSecurityMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.prototype.clearSecurityMap = function() { + this.getSecurityMap().clear(); + return this; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + pb_in: jspb.Message.getFieldWithDefault(msg, 4, 0), + flow: jspb.Message.getFieldWithDefault(msg, 5, 0), + authorizationUrl: jspb.Message.getFieldWithDefault(msg, 6, ""), + tokenUrl: jspb.Message.getFieldWithDefault(msg, 7, ""), + scopes: (f = msg.getScopes()) && proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.toObject(includeInstance, f), + extensionsMap: (f = msg.getExtensionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme; + return proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 4: + var value = /** @type {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In} */ (reader.readEnum()); + msg.setIn(value); + break; + case 5: + var value = /** @type {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow} */ (reader.readEnum()); + msg.setFlow(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthorizationUrl(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setTokenUrl(value); + break; + case 8: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.deserializeBinaryFromReader); + msg.setScopes(value); + break; + case 9: + var value = msg.getExtensionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getIn(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getFlow(); + if (f !== 0.0) { + writer.writeEnum( + 5, + f + ); + } + f = message.getAuthorizationUrl(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getTokenUrl(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getScopes(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.serializeBinaryToWriter + ); + } + f = message.getExtensionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } +}; + + +/** + * @enum {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type = { + TYPE_INVALID: 0, + TYPE_BASIC: 1, + TYPE_API_KEY: 2, + TYPE_OAUTH2: 3 +}; + +/** + * @enum {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In = { + IN_INVALID: 0, + IN_QUERY: 1, + IN_HEADER: 2 +}; + +/** + * @enum {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow = { + FLOW_INVALID: 0, + FLOW_IMPLICIT: 1, + FLOW_PASSWORD: 2, + FLOW_APPLICATION: 3, + FLOW_ACCESS_CODE: 4 +}; + +/** + * optional Type type = 1; + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getType = function() { + return /** @type {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string name = 3; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional In in = 4; + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getIn = function() { + return /** @type {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.setIn = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional Flow flow = 5; + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getFlow = function() { + return /** @type {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.setFlow = function(value) { + return jspb.Message.setProto3EnumField(this, 5, value); +}; + + +/** + * optional string authorization_url = 6; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getAuthorizationUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.setAuthorizationUrl = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string token_url = 7; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getTokenUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.setTokenUrl = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional Scopes scopes = 8; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getScopes = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes, 8)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.setScopes = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.clearScopes = function() { + return this.setScopes(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.hasScopes = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * map extensions = 9; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getExtensionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 9, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.clearExtensionsMap = function() { + this.getExtensionsMap().clear(); + return this; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.toObject = function(includeInstance, msg) { + var f, obj = { + securityRequirementMap: (f = msg.getSecurityRequirementMap()) ? f.toObject(includeInstance, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement; + return proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getSecurityRequirementMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.deserializeBinaryFromReader, "", new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSecurityRequirementMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.serializeBinaryToWriter); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.toObject = function(includeInstance, msg) { + var f, obj = { + scopeList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue; + return proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addScope(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getScopeList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string scope = 1; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.prototype.getScopeList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.prototype.setScopeList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.prototype.addScope = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.prototype.clearScopeList = function() { + return this.setScopeList([]); +}; + + +/** + * map security_requirement = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.prototype.getSecurityRequirementMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.prototype.clearSecurityRequirementMap = function() { + this.getSecurityRequirementMap().clear(); + return this; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.toObject = function(includeInstance, msg) { + var f, obj = { + scopeMap: (f = msg.getScopeMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getScopeMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getScopeMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * map scope = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.prototype.getScopeMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.prototype.clearScopeMap = function() { + this.getScopeMap().clear(); + return this; +}; + + +/** + * @enum {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scheme = { + UNKNOWN: 0, + HTTP: 1, + HTTPS: 2, + WS: 3, + WSS: 4 +}; + +goog.object.extend(exports, proto.grpc.gateway.protoc_gen_openapiv2.options); diff --git a/proto/validate/validate.pb.go b/proto/validate/validate.pb.go new file mode 100644 index 000000000..b93d1c7ae --- /dev/null +++ b/proto/validate/validate.pb.go @@ -0,0 +1,4106 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: validate/validate.proto + +package validate + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// WellKnownRegex contain some well-known patterns. +type KnownRegex int32 + +const ( + KnownRegex_UNKNOWN KnownRegex = 0 + // HTTP header name as defined by RFC 7230. + KnownRegex_HTTP_HEADER_NAME KnownRegex = 1 + // HTTP header value as defined by RFC 7230. + KnownRegex_HTTP_HEADER_VALUE KnownRegex = 2 +) + +// Enum value maps for KnownRegex. +var ( + KnownRegex_name = map[int32]string{ + 0: "UNKNOWN", + 1: "HTTP_HEADER_NAME", + 2: "HTTP_HEADER_VALUE", + } + KnownRegex_value = map[string]int32{ + "UNKNOWN": 0, + "HTTP_HEADER_NAME": 1, + "HTTP_HEADER_VALUE": 2, + } +) + +func (x KnownRegex) Enum() *KnownRegex { + p := new(KnownRegex) + *p = x + return p +} + +func (x KnownRegex) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KnownRegex) Descriptor() protoreflect.EnumDescriptor { + return file_validate_validate_proto_enumTypes[0].Descriptor() +} + +func (KnownRegex) Type() protoreflect.EnumType { + return &file_validate_validate_proto_enumTypes[0] +} + +func (x KnownRegex) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *KnownRegex) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = KnownRegex(num) + return nil +} + +// Deprecated: Use KnownRegex.Descriptor instead. +func (KnownRegex) EnumDescriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{0} +} + +// FieldRules encapsulates the rules for each type of field. Depending on the +// field, the correct set should be used to ensure proper validations. +type FieldRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message *MessageRules `protobuf:"bytes,17,opt,name=message" json:"message,omitempty"` + // Types that are assignable to Type: + // + // *FieldRules_Float + // *FieldRules_Double + // *FieldRules_Int32 + // *FieldRules_Int64 + // *FieldRules_Uint32 + // *FieldRules_Uint64 + // *FieldRules_Sint32 + // *FieldRules_Sint64 + // *FieldRules_Fixed32 + // *FieldRules_Fixed64 + // *FieldRules_Sfixed32 + // *FieldRules_Sfixed64 + // *FieldRules_Bool + // *FieldRules_String_ + // *FieldRules_Bytes + // *FieldRules_Enum + // *FieldRules_Repeated + // *FieldRules_Map + // *FieldRules_Any + // *FieldRules_Duration + // *FieldRules_Timestamp + Type isFieldRules_Type `protobuf_oneof:"type"` +} + +func (x *FieldRules) Reset() { + *x = FieldRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FieldRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldRules) ProtoMessage() {} + +func (x *FieldRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_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 FieldRules.ProtoReflect.Descriptor instead. +func (*FieldRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{0} +} + +func (x *FieldRules) GetMessage() *MessageRules { + if x != nil { + return x.Message + } + return nil +} + +func (m *FieldRules) GetType() isFieldRules_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *FieldRules) GetFloat() *FloatRules { + if x, ok := x.GetType().(*FieldRules_Float); ok { + return x.Float + } + return nil +} + +func (x *FieldRules) GetDouble() *DoubleRules { + if x, ok := x.GetType().(*FieldRules_Double); ok { + return x.Double + } + return nil +} + +func (x *FieldRules) GetInt32() *Int32Rules { + if x, ok := x.GetType().(*FieldRules_Int32); ok { + return x.Int32 + } + return nil +} + +func (x *FieldRules) GetInt64() *Int64Rules { + if x, ok := x.GetType().(*FieldRules_Int64); ok { + return x.Int64 + } + return nil +} + +func (x *FieldRules) GetUint32() *UInt32Rules { + if x, ok := x.GetType().(*FieldRules_Uint32); ok { + return x.Uint32 + } + return nil +} + +func (x *FieldRules) GetUint64() *UInt64Rules { + if x, ok := x.GetType().(*FieldRules_Uint64); ok { + return x.Uint64 + } + return nil +} + +func (x *FieldRules) GetSint32() *SInt32Rules { + if x, ok := x.GetType().(*FieldRules_Sint32); ok { + return x.Sint32 + } + return nil +} + +func (x *FieldRules) GetSint64() *SInt64Rules { + if x, ok := x.GetType().(*FieldRules_Sint64); ok { + return x.Sint64 + } + return nil +} + +func (x *FieldRules) GetFixed32() *Fixed32Rules { + if x, ok := x.GetType().(*FieldRules_Fixed32); ok { + return x.Fixed32 + } + return nil +} + +func (x *FieldRules) GetFixed64() *Fixed64Rules { + if x, ok := x.GetType().(*FieldRules_Fixed64); ok { + return x.Fixed64 + } + return nil +} + +func (x *FieldRules) GetSfixed32() *SFixed32Rules { + if x, ok := x.GetType().(*FieldRules_Sfixed32); ok { + return x.Sfixed32 + } + return nil +} + +func (x *FieldRules) GetSfixed64() *SFixed64Rules { + if x, ok := x.GetType().(*FieldRules_Sfixed64); ok { + return x.Sfixed64 + } + return nil +} + +func (x *FieldRules) GetBool() *BoolRules { + if x, ok := x.GetType().(*FieldRules_Bool); ok { + return x.Bool + } + return nil +} + +func (x *FieldRules) GetString_() *StringRules { + if x, ok := x.GetType().(*FieldRules_String_); ok { + return x.String_ + } + return nil +} + +func (x *FieldRules) GetBytes() *BytesRules { + if x, ok := x.GetType().(*FieldRules_Bytes); ok { + return x.Bytes + } + return nil +} + +func (x *FieldRules) GetEnum() *EnumRules { + if x, ok := x.GetType().(*FieldRules_Enum); ok { + return x.Enum + } + return nil +} + +func (x *FieldRules) GetRepeated() *RepeatedRules { + if x, ok := x.GetType().(*FieldRules_Repeated); ok { + return x.Repeated + } + return nil +} + +func (x *FieldRules) GetMap() *MapRules { + if x, ok := x.GetType().(*FieldRules_Map); ok { + return x.Map + } + return nil +} + +func (x *FieldRules) GetAny() *AnyRules { + if x, ok := x.GetType().(*FieldRules_Any); ok { + return x.Any + } + return nil +} + +func (x *FieldRules) GetDuration() *DurationRules { + if x, ok := x.GetType().(*FieldRules_Duration); ok { + return x.Duration + } + return nil +} + +func (x *FieldRules) GetTimestamp() *TimestampRules { + if x, ok := x.GetType().(*FieldRules_Timestamp); ok { + return x.Timestamp + } + return nil +} + +type isFieldRules_Type interface { + isFieldRules_Type() +} + +type FieldRules_Float struct { + // Scalar Field Types + Float *FloatRules `protobuf:"bytes,1,opt,name=float,oneof"` +} + +type FieldRules_Double struct { + Double *DoubleRules `protobuf:"bytes,2,opt,name=double,oneof"` +} + +type FieldRules_Int32 struct { + Int32 *Int32Rules `protobuf:"bytes,3,opt,name=int32,oneof"` +} + +type FieldRules_Int64 struct { + Int64 *Int64Rules `protobuf:"bytes,4,opt,name=int64,oneof"` +} + +type FieldRules_Uint32 struct { + Uint32 *UInt32Rules `protobuf:"bytes,5,opt,name=uint32,oneof"` +} + +type FieldRules_Uint64 struct { + Uint64 *UInt64Rules `protobuf:"bytes,6,opt,name=uint64,oneof"` +} + +type FieldRules_Sint32 struct { + Sint32 *SInt32Rules `protobuf:"bytes,7,opt,name=sint32,oneof"` +} + +type FieldRules_Sint64 struct { + Sint64 *SInt64Rules `protobuf:"bytes,8,opt,name=sint64,oneof"` +} + +type FieldRules_Fixed32 struct { + Fixed32 *Fixed32Rules `protobuf:"bytes,9,opt,name=fixed32,oneof"` +} + +type FieldRules_Fixed64 struct { + Fixed64 *Fixed64Rules `protobuf:"bytes,10,opt,name=fixed64,oneof"` +} + +type FieldRules_Sfixed32 struct { + Sfixed32 *SFixed32Rules `protobuf:"bytes,11,opt,name=sfixed32,oneof"` +} + +type FieldRules_Sfixed64 struct { + Sfixed64 *SFixed64Rules `protobuf:"bytes,12,opt,name=sfixed64,oneof"` +} + +type FieldRules_Bool struct { + Bool *BoolRules `protobuf:"bytes,13,opt,name=bool,oneof"` +} + +type FieldRules_String_ struct { + String_ *StringRules `protobuf:"bytes,14,opt,name=string,oneof"` +} + +type FieldRules_Bytes struct { + Bytes *BytesRules `protobuf:"bytes,15,opt,name=bytes,oneof"` +} + +type FieldRules_Enum struct { + // Complex Field Types + Enum *EnumRules `protobuf:"bytes,16,opt,name=enum,oneof"` +} + +type FieldRules_Repeated struct { + Repeated *RepeatedRules `protobuf:"bytes,18,opt,name=repeated,oneof"` +} + +type FieldRules_Map struct { + Map *MapRules `protobuf:"bytes,19,opt,name=map,oneof"` +} + +type FieldRules_Any struct { + // Well-Known Field Types + Any *AnyRules `protobuf:"bytes,20,opt,name=any,oneof"` +} + +type FieldRules_Duration struct { + Duration *DurationRules `protobuf:"bytes,21,opt,name=duration,oneof"` +} + +type FieldRules_Timestamp struct { + Timestamp *TimestampRules `protobuf:"bytes,22,opt,name=timestamp,oneof"` +} + +func (*FieldRules_Float) isFieldRules_Type() {} + +func (*FieldRules_Double) isFieldRules_Type() {} + +func (*FieldRules_Int32) isFieldRules_Type() {} + +func (*FieldRules_Int64) isFieldRules_Type() {} + +func (*FieldRules_Uint32) isFieldRules_Type() {} + +func (*FieldRules_Uint64) isFieldRules_Type() {} + +func (*FieldRules_Sint32) isFieldRules_Type() {} + +func (*FieldRules_Sint64) isFieldRules_Type() {} + +func (*FieldRules_Fixed32) isFieldRules_Type() {} + +func (*FieldRules_Fixed64) isFieldRules_Type() {} + +func (*FieldRules_Sfixed32) isFieldRules_Type() {} + +func (*FieldRules_Sfixed64) isFieldRules_Type() {} + +func (*FieldRules_Bool) isFieldRules_Type() {} + +func (*FieldRules_String_) isFieldRules_Type() {} + +func (*FieldRules_Bytes) isFieldRules_Type() {} + +func (*FieldRules_Enum) isFieldRules_Type() {} + +func (*FieldRules_Repeated) isFieldRules_Type() {} + +func (*FieldRules_Map) isFieldRules_Type() {} + +func (*FieldRules_Any) isFieldRules_Type() {} + +func (*FieldRules_Duration) isFieldRules_Type() {} + +func (*FieldRules_Timestamp) isFieldRules_Type() {} + +// FloatRules describes the constraints applied to `float` values +type FloatRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Const specifies that this field must be exactly the specified value + Const *float32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` + // Lt specifies that this field must be less than the specified value, + // exclusive + Lt *float32 `protobuf:"fixed32,2,opt,name=lt" json:"lt,omitempty"` + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + Lte *float32 `protobuf:"fixed32,3,opt,name=lte" json:"lte,omitempty"` + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + Gt *float32 `protobuf:"fixed32,4,opt,name=gt" json:"gt,omitempty"` + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + Gte *float32 `protobuf:"fixed32,5,opt,name=gte" json:"gte,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In []float32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn []float32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` +} + +func (x *FloatRules) Reset() { + *x = FloatRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FloatRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FloatRules) ProtoMessage() {} + +func (x *FloatRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FloatRules.ProtoReflect.Descriptor instead. +func (*FloatRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{1} +} + +func (x *FloatRules) GetConst() float32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *FloatRules) GetLt() float32 { + if x != nil && x.Lt != nil { + return *x.Lt + } + return 0 +} + +func (x *FloatRules) GetLte() float32 { + if x != nil && x.Lte != nil { + return *x.Lte + } + return 0 +} + +func (x *FloatRules) GetGt() float32 { + if x != nil && x.Gt != nil { + return *x.Gt + } + return 0 +} + +func (x *FloatRules) GetGte() float32 { + if x != nil && x.Gte != nil { + return *x.Gte + } + return 0 +} + +func (x *FloatRules) GetIn() []float32 { + if x != nil { + return x.In + } + return nil +} + +func (x *FloatRules) GetNotIn() []float32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *FloatRules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +// DoubleRules describes the constraints applied to `double` values +type DoubleRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Const specifies that this field must be exactly the specified value + Const *float64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` + // Lt specifies that this field must be less than the specified value, + // exclusive + Lt *float64 `protobuf:"fixed64,2,opt,name=lt" json:"lt,omitempty"` + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + Lte *float64 `protobuf:"fixed64,3,opt,name=lte" json:"lte,omitempty"` + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + Gt *float64 `protobuf:"fixed64,4,opt,name=gt" json:"gt,omitempty"` + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + Gte *float64 `protobuf:"fixed64,5,opt,name=gte" json:"gte,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In []float64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn []float64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` +} + +func (x *DoubleRules) Reset() { + *x = DoubleRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DoubleRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DoubleRules) ProtoMessage() {} + +func (x *DoubleRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DoubleRules.ProtoReflect.Descriptor instead. +func (*DoubleRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{2} +} + +func (x *DoubleRules) GetConst() float64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *DoubleRules) GetLt() float64 { + if x != nil && x.Lt != nil { + return *x.Lt + } + return 0 +} + +func (x *DoubleRules) GetLte() float64 { + if x != nil && x.Lte != nil { + return *x.Lte + } + return 0 +} + +func (x *DoubleRules) GetGt() float64 { + if x != nil && x.Gt != nil { + return *x.Gt + } + return 0 +} + +func (x *DoubleRules) GetGte() float64 { + if x != nil && x.Gte != nil { + return *x.Gte + } + return 0 +} + +func (x *DoubleRules) GetIn() []float64 { + if x != nil { + return x.In + } + return nil +} + +func (x *DoubleRules) GetNotIn() []float64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *DoubleRules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +// Int32Rules describes the constraints applied to `int32` values +type Int32Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Const specifies that this field must be exactly the specified value + Const *int32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` + // Lt specifies that this field must be less than the specified value, + // exclusive + Lt *int32 `protobuf:"varint,2,opt,name=lt" json:"lt,omitempty"` + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + Lte *int32 `protobuf:"varint,3,opt,name=lte" json:"lte,omitempty"` + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + Gt *int32 `protobuf:"varint,4,opt,name=gt" json:"gt,omitempty"` + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + Gte *int32 `protobuf:"varint,5,opt,name=gte" json:"gte,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In []int32 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn []int32 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` +} + +func (x *Int32Rules) Reset() { + *x = Int32Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Int32Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int32Rules) ProtoMessage() {} + +func (x *Int32Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int32Rules.ProtoReflect.Descriptor instead. +func (*Int32Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{3} +} + +func (x *Int32Rules) GetConst() int32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *Int32Rules) GetLt() int32 { + if x != nil && x.Lt != nil { + return *x.Lt + } + return 0 +} + +func (x *Int32Rules) GetLte() int32 { + if x != nil && x.Lte != nil { + return *x.Lte + } + return 0 +} + +func (x *Int32Rules) GetGt() int32 { + if x != nil && x.Gt != nil { + return *x.Gt + } + return 0 +} + +func (x *Int32Rules) GetGte() int32 { + if x != nil && x.Gte != nil { + return *x.Gte + } + return 0 +} + +func (x *Int32Rules) GetIn() []int32 { + if x != nil { + return x.In + } + return nil +} + +func (x *Int32Rules) GetNotIn() []int32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *Int32Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +// Int64Rules describes the constraints applied to `int64` values +type Int64Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Const specifies that this field must be exactly the specified value + Const *int64 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` + // Lt specifies that this field must be less than the specified value, + // exclusive + Lt *int64 `protobuf:"varint,2,opt,name=lt" json:"lt,omitempty"` + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + Lte *int64 `protobuf:"varint,3,opt,name=lte" json:"lte,omitempty"` + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + Gt *int64 `protobuf:"varint,4,opt,name=gt" json:"gt,omitempty"` + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + Gte *int64 `protobuf:"varint,5,opt,name=gte" json:"gte,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In []int64 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn []int64 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` +} + +func (x *Int64Rules) Reset() { + *x = Int64Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Int64Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int64Rules) ProtoMessage() {} + +func (x *Int64Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int64Rules.ProtoReflect.Descriptor instead. +func (*Int64Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{4} +} + +func (x *Int64Rules) GetConst() int64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *Int64Rules) GetLt() int64 { + if x != nil && x.Lt != nil { + return *x.Lt + } + return 0 +} + +func (x *Int64Rules) GetLte() int64 { + if x != nil && x.Lte != nil { + return *x.Lte + } + return 0 +} + +func (x *Int64Rules) GetGt() int64 { + if x != nil && x.Gt != nil { + return *x.Gt + } + return 0 +} + +func (x *Int64Rules) GetGte() int64 { + if x != nil && x.Gte != nil { + return *x.Gte + } + return 0 +} + +func (x *Int64Rules) GetIn() []int64 { + if x != nil { + return x.In + } + return nil +} + +func (x *Int64Rules) GetNotIn() []int64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *Int64Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +// UInt32Rules describes the constraints applied to `uint32` values +type UInt32Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Const specifies that this field must be exactly the specified value + Const *uint32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` + // Lt specifies that this field must be less than the specified value, + // exclusive + Lt *uint32 `protobuf:"varint,2,opt,name=lt" json:"lt,omitempty"` + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + Lte *uint32 `protobuf:"varint,3,opt,name=lte" json:"lte,omitempty"` + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + Gt *uint32 `protobuf:"varint,4,opt,name=gt" json:"gt,omitempty"` + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + Gte *uint32 `protobuf:"varint,5,opt,name=gte" json:"gte,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In []uint32 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn []uint32 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` +} + +func (x *UInt32Rules) Reset() { + *x = UInt32Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UInt32Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UInt32Rules) ProtoMessage() {} + +func (x *UInt32Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UInt32Rules.ProtoReflect.Descriptor instead. +func (*UInt32Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{5} +} + +func (x *UInt32Rules) GetConst() uint32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *UInt32Rules) GetLt() uint32 { + if x != nil && x.Lt != nil { + return *x.Lt + } + return 0 +} + +func (x *UInt32Rules) GetLte() uint32 { + if x != nil && x.Lte != nil { + return *x.Lte + } + return 0 +} + +func (x *UInt32Rules) GetGt() uint32 { + if x != nil && x.Gt != nil { + return *x.Gt + } + return 0 +} + +func (x *UInt32Rules) GetGte() uint32 { + if x != nil && x.Gte != nil { + return *x.Gte + } + return 0 +} + +func (x *UInt32Rules) GetIn() []uint32 { + if x != nil { + return x.In + } + return nil +} + +func (x *UInt32Rules) GetNotIn() []uint32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *UInt32Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +// UInt64Rules describes the constraints applied to `uint64` values +type UInt64Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Const specifies that this field must be exactly the specified value + Const *uint64 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` + // Lt specifies that this field must be less than the specified value, + // exclusive + Lt *uint64 `protobuf:"varint,2,opt,name=lt" json:"lt,omitempty"` + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + Lte *uint64 `protobuf:"varint,3,opt,name=lte" json:"lte,omitempty"` + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + Gt *uint64 `protobuf:"varint,4,opt,name=gt" json:"gt,omitempty"` + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + Gte *uint64 `protobuf:"varint,5,opt,name=gte" json:"gte,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In []uint64 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn []uint64 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` +} + +func (x *UInt64Rules) Reset() { + *x = UInt64Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UInt64Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UInt64Rules) ProtoMessage() {} + +func (x *UInt64Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UInt64Rules.ProtoReflect.Descriptor instead. +func (*UInt64Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{6} +} + +func (x *UInt64Rules) GetConst() uint64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *UInt64Rules) GetLt() uint64 { + if x != nil && x.Lt != nil { + return *x.Lt + } + return 0 +} + +func (x *UInt64Rules) GetLte() uint64 { + if x != nil && x.Lte != nil { + return *x.Lte + } + return 0 +} + +func (x *UInt64Rules) GetGt() uint64 { + if x != nil && x.Gt != nil { + return *x.Gt + } + return 0 +} + +func (x *UInt64Rules) GetGte() uint64 { + if x != nil && x.Gte != nil { + return *x.Gte + } + return 0 +} + +func (x *UInt64Rules) GetIn() []uint64 { + if x != nil { + return x.In + } + return nil +} + +func (x *UInt64Rules) GetNotIn() []uint64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *UInt64Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +// SInt32Rules describes the constraints applied to `sint32` values +type SInt32Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Const specifies that this field must be exactly the specified value + Const *int32 `protobuf:"zigzag32,1,opt,name=const" json:"const,omitempty"` + // Lt specifies that this field must be less than the specified value, + // exclusive + Lt *int32 `protobuf:"zigzag32,2,opt,name=lt" json:"lt,omitempty"` + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + Lte *int32 `protobuf:"zigzag32,3,opt,name=lte" json:"lte,omitempty"` + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + Gt *int32 `protobuf:"zigzag32,4,opt,name=gt" json:"gt,omitempty"` + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + Gte *int32 `protobuf:"zigzag32,5,opt,name=gte" json:"gte,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In []int32 `protobuf:"zigzag32,6,rep,name=in" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn []int32 `protobuf:"zigzag32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` +} + +func (x *SInt32Rules) Reset() { + *x = SInt32Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SInt32Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SInt32Rules) ProtoMessage() {} + +func (x *SInt32Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SInt32Rules.ProtoReflect.Descriptor instead. +func (*SInt32Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{7} +} + +func (x *SInt32Rules) GetConst() int32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *SInt32Rules) GetLt() int32 { + if x != nil && x.Lt != nil { + return *x.Lt + } + return 0 +} + +func (x *SInt32Rules) GetLte() int32 { + if x != nil && x.Lte != nil { + return *x.Lte + } + return 0 +} + +func (x *SInt32Rules) GetGt() int32 { + if x != nil && x.Gt != nil { + return *x.Gt + } + return 0 +} + +func (x *SInt32Rules) GetGte() int32 { + if x != nil && x.Gte != nil { + return *x.Gte + } + return 0 +} + +func (x *SInt32Rules) GetIn() []int32 { + if x != nil { + return x.In + } + return nil +} + +func (x *SInt32Rules) GetNotIn() []int32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *SInt32Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +// SInt64Rules describes the constraints applied to `sint64` values +type SInt64Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Const specifies that this field must be exactly the specified value + Const *int64 `protobuf:"zigzag64,1,opt,name=const" json:"const,omitempty"` + // Lt specifies that this field must be less than the specified value, + // exclusive + Lt *int64 `protobuf:"zigzag64,2,opt,name=lt" json:"lt,omitempty"` + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + Lte *int64 `protobuf:"zigzag64,3,opt,name=lte" json:"lte,omitempty"` + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + Gt *int64 `protobuf:"zigzag64,4,opt,name=gt" json:"gt,omitempty"` + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + Gte *int64 `protobuf:"zigzag64,5,opt,name=gte" json:"gte,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In []int64 `protobuf:"zigzag64,6,rep,name=in" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn []int64 `protobuf:"zigzag64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` +} + +func (x *SInt64Rules) Reset() { + *x = SInt64Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SInt64Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SInt64Rules) ProtoMessage() {} + +func (x *SInt64Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SInt64Rules.ProtoReflect.Descriptor instead. +func (*SInt64Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{8} +} + +func (x *SInt64Rules) GetConst() int64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *SInt64Rules) GetLt() int64 { + if x != nil && x.Lt != nil { + return *x.Lt + } + return 0 +} + +func (x *SInt64Rules) GetLte() int64 { + if x != nil && x.Lte != nil { + return *x.Lte + } + return 0 +} + +func (x *SInt64Rules) GetGt() int64 { + if x != nil && x.Gt != nil { + return *x.Gt + } + return 0 +} + +func (x *SInt64Rules) GetGte() int64 { + if x != nil && x.Gte != nil { + return *x.Gte + } + return 0 +} + +func (x *SInt64Rules) GetIn() []int64 { + if x != nil { + return x.In + } + return nil +} + +func (x *SInt64Rules) GetNotIn() []int64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *SInt64Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +// Fixed32Rules describes the constraints applied to `fixed32` values +type Fixed32Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Const specifies that this field must be exactly the specified value + Const *uint32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` + // Lt specifies that this field must be less than the specified value, + // exclusive + Lt *uint32 `protobuf:"fixed32,2,opt,name=lt" json:"lt,omitempty"` + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + Lte *uint32 `protobuf:"fixed32,3,opt,name=lte" json:"lte,omitempty"` + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + Gt *uint32 `protobuf:"fixed32,4,opt,name=gt" json:"gt,omitempty"` + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + Gte *uint32 `protobuf:"fixed32,5,opt,name=gte" json:"gte,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In []uint32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn []uint32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` +} + +func (x *Fixed32Rules) Reset() { + *x = Fixed32Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Fixed32Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Fixed32Rules) ProtoMessage() {} + +func (x *Fixed32Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Fixed32Rules.ProtoReflect.Descriptor instead. +func (*Fixed32Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{9} +} + +func (x *Fixed32Rules) GetConst() uint32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *Fixed32Rules) GetLt() uint32 { + if x != nil && x.Lt != nil { + return *x.Lt + } + return 0 +} + +func (x *Fixed32Rules) GetLte() uint32 { + if x != nil && x.Lte != nil { + return *x.Lte + } + return 0 +} + +func (x *Fixed32Rules) GetGt() uint32 { + if x != nil && x.Gt != nil { + return *x.Gt + } + return 0 +} + +func (x *Fixed32Rules) GetGte() uint32 { + if x != nil && x.Gte != nil { + return *x.Gte + } + return 0 +} + +func (x *Fixed32Rules) GetIn() []uint32 { + if x != nil { + return x.In + } + return nil +} + +func (x *Fixed32Rules) GetNotIn() []uint32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *Fixed32Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +// Fixed64Rules describes the constraints applied to `fixed64` values +type Fixed64Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Const specifies that this field must be exactly the specified value + Const *uint64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` + // Lt specifies that this field must be less than the specified value, + // exclusive + Lt *uint64 `protobuf:"fixed64,2,opt,name=lt" json:"lt,omitempty"` + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + Lte *uint64 `protobuf:"fixed64,3,opt,name=lte" json:"lte,omitempty"` + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + Gt *uint64 `protobuf:"fixed64,4,opt,name=gt" json:"gt,omitempty"` + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + Gte *uint64 `protobuf:"fixed64,5,opt,name=gte" json:"gte,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In []uint64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn []uint64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` +} + +func (x *Fixed64Rules) Reset() { + *x = Fixed64Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Fixed64Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Fixed64Rules) ProtoMessage() {} + +func (x *Fixed64Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Fixed64Rules.ProtoReflect.Descriptor instead. +func (*Fixed64Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{10} +} + +func (x *Fixed64Rules) GetConst() uint64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *Fixed64Rules) GetLt() uint64 { + if x != nil && x.Lt != nil { + return *x.Lt + } + return 0 +} + +func (x *Fixed64Rules) GetLte() uint64 { + if x != nil && x.Lte != nil { + return *x.Lte + } + return 0 +} + +func (x *Fixed64Rules) GetGt() uint64 { + if x != nil && x.Gt != nil { + return *x.Gt + } + return 0 +} + +func (x *Fixed64Rules) GetGte() uint64 { + if x != nil && x.Gte != nil { + return *x.Gte + } + return 0 +} + +func (x *Fixed64Rules) GetIn() []uint64 { + if x != nil { + return x.In + } + return nil +} + +func (x *Fixed64Rules) GetNotIn() []uint64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *Fixed64Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +// SFixed32Rules describes the constraints applied to `sfixed32` values +type SFixed32Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Const specifies that this field must be exactly the specified value + Const *int32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` + // Lt specifies that this field must be less than the specified value, + // exclusive + Lt *int32 `protobuf:"fixed32,2,opt,name=lt" json:"lt,omitempty"` + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + Lte *int32 `protobuf:"fixed32,3,opt,name=lte" json:"lte,omitempty"` + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + Gt *int32 `protobuf:"fixed32,4,opt,name=gt" json:"gt,omitempty"` + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + Gte *int32 `protobuf:"fixed32,5,opt,name=gte" json:"gte,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In []int32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn []int32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` +} + +func (x *SFixed32Rules) Reset() { + *x = SFixed32Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SFixed32Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SFixed32Rules) ProtoMessage() {} + +func (x *SFixed32Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SFixed32Rules.ProtoReflect.Descriptor instead. +func (*SFixed32Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{11} +} + +func (x *SFixed32Rules) GetConst() int32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *SFixed32Rules) GetLt() int32 { + if x != nil && x.Lt != nil { + return *x.Lt + } + return 0 +} + +func (x *SFixed32Rules) GetLte() int32 { + if x != nil && x.Lte != nil { + return *x.Lte + } + return 0 +} + +func (x *SFixed32Rules) GetGt() int32 { + if x != nil && x.Gt != nil { + return *x.Gt + } + return 0 +} + +func (x *SFixed32Rules) GetGte() int32 { + if x != nil && x.Gte != nil { + return *x.Gte + } + return 0 +} + +func (x *SFixed32Rules) GetIn() []int32 { + if x != nil { + return x.In + } + return nil +} + +func (x *SFixed32Rules) GetNotIn() []int32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *SFixed32Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +// SFixed64Rules describes the constraints applied to `sfixed64` values +type SFixed64Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Const specifies that this field must be exactly the specified value + Const *int64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` + // Lt specifies that this field must be less than the specified value, + // exclusive + Lt *int64 `protobuf:"fixed64,2,opt,name=lt" json:"lt,omitempty"` + // Lte specifies that this field must be less than or equal to the + // specified value, inclusive + Lte *int64 `protobuf:"fixed64,3,opt,name=lte" json:"lte,omitempty"` + // Gt specifies that this field must be greater than the specified value, + // exclusive. If the value of Gt is larger than a specified Lt or Lte, the + // range is reversed. + Gt *int64 `protobuf:"fixed64,4,opt,name=gt" json:"gt,omitempty"` + // Gte specifies that this field must be greater than or equal to the + // specified value, inclusive. If the value of Gte is larger than a + // specified Lt or Lte, the range is reversed. + Gte *int64 `protobuf:"fixed64,5,opt,name=gte" json:"gte,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In []int64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn []int64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` +} + +func (x *SFixed64Rules) Reset() { + *x = SFixed64Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SFixed64Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SFixed64Rules) ProtoMessage() {} + +func (x *SFixed64Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SFixed64Rules.ProtoReflect.Descriptor instead. +func (*SFixed64Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{12} +} + +func (x *SFixed64Rules) GetConst() int64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *SFixed64Rules) GetLt() int64 { + if x != nil && x.Lt != nil { + return *x.Lt + } + return 0 +} + +func (x *SFixed64Rules) GetLte() int64 { + if x != nil && x.Lte != nil { + return *x.Lte + } + return 0 +} + +func (x *SFixed64Rules) GetGt() int64 { + if x != nil && x.Gt != nil { + return *x.Gt + } + return 0 +} + +func (x *SFixed64Rules) GetGte() int64 { + if x != nil && x.Gte != nil { + return *x.Gte + } + return 0 +} + +func (x *SFixed64Rules) GetIn() []int64 { + if x != nil { + return x.In + } + return nil +} + +func (x *SFixed64Rules) GetNotIn() []int64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *SFixed64Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +// BoolRules describes the constraints applied to `bool` values +type BoolRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Const specifies that this field must be exactly the specified value + Const *bool `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` +} + +func (x *BoolRules) Reset() { + *x = BoolRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BoolRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoolRules) ProtoMessage() {} + +func (x *BoolRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoolRules.ProtoReflect.Descriptor instead. +func (*BoolRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{13} +} + +func (x *BoolRules) GetConst() bool { + if x != nil && x.Const != nil { + return *x.Const + } + return false +} + +// StringRules describe the constraints applied to `string` values +type StringRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Const specifies that this field must be exactly the specified value + Const *string `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"` + // Len specifies that this field must be the specified number of + // characters (Unicode code points). Note that the number of + // characters may differ from the number of bytes in the string. + Len *uint64 `protobuf:"varint,19,opt,name=len" json:"len,omitempty"` + // MinLen specifies that this field must be the specified number of + // characters (Unicode code points) at a minimum. Note that the number of + // characters may differ from the number of bytes in the string. + MinLen *uint64 `protobuf:"varint,2,opt,name=min_len,json=minLen" json:"min_len,omitempty"` + // MaxLen specifies that this field must be the specified number of + // characters (Unicode code points) at a maximum. Note that the number of + // characters may differ from the number of bytes in the string. + MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"` + // LenBytes specifies that this field must be the specified number of bytes + LenBytes *uint64 `protobuf:"varint,20,opt,name=len_bytes,json=lenBytes" json:"len_bytes,omitempty"` + // MinBytes specifies that this field must be the specified number of bytes + // at a minimum + MinBytes *uint64 `protobuf:"varint,4,opt,name=min_bytes,json=minBytes" json:"min_bytes,omitempty"` + // MaxBytes specifies that this field must be the specified number of bytes + // at a maximum + MaxBytes *uint64 `protobuf:"varint,5,opt,name=max_bytes,json=maxBytes" json:"max_bytes,omitempty"` + // Pattern specifes that this field must match against the specified + // regular expression (RE2 syntax). The included expression should elide + // any delimiters. + Pattern *string `protobuf:"bytes,6,opt,name=pattern" json:"pattern,omitempty"` + // Prefix specifies that this field must have the specified substring at + // the beginning of the string. + Prefix *string `protobuf:"bytes,7,opt,name=prefix" json:"prefix,omitempty"` + // Suffix specifies that this field must have the specified substring at + // the end of the string. + Suffix *string `protobuf:"bytes,8,opt,name=suffix" json:"suffix,omitempty"` + // Contains specifies that this field must have the specified substring + // anywhere in the string. + Contains *string `protobuf:"bytes,9,opt,name=contains" json:"contains,omitempty"` + // NotContains specifies that this field cannot have the specified substring + // anywhere in the string. + NotContains *string `protobuf:"bytes,23,opt,name=not_contains,json=notContains" json:"not_contains,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In []string `protobuf:"bytes,10,rep,name=in" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn []string `protobuf:"bytes,11,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // WellKnown rules provide advanced constraints against common string + // patterns + // + // Types that are assignable to WellKnown: + // + // *StringRules_Email + // *StringRules_Hostname + // *StringRules_Ip + // *StringRules_Ipv4 + // *StringRules_Ipv6 + // *StringRules_Uri + // *StringRules_UriRef + // *StringRules_Address + // *StringRules_Uuid + // *StringRules_WellKnownRegex + WellKnown isStringRules_WellKnown `protobuf_oneof:"well_known"` + // This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable + // strict header validation. + // By default, this is true, and HTTP header validations are RFC-compliant. + // Setting to false will enable a looser validations that only disallows + // \r\n\0 characters, which can be used to bypass header matching rules. + Strict *bool `protobuf:"varint,25,opt,name=strict,def=1" json:"strict,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,26,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` +} + +// Default values for StringRules fields. +const ( + Default_StringRules_Strict = bool(true) +) + +func (x *StringRules) Reset() { + *x = StringRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StringRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringRules) ProtoMessage() {} + +func (x *StringRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringRules.ProtoReflect.Descriptor instead. +func (*StringRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{14} +} + +func (x *StringRules) GetConst() string { + if x != nil && x.Const != nil { + return *x.Const + } + return "" +} + +func (x *StringRules) GetLen() uint64 { + if x != nil && x.Len != nil { + return *x.Len + } + return 0 +} + +func (x *StringRules) GetMinLen() uint64 { + if x != nil && x.MinLen != nil { + return *x.MinLen + } + return 0 +} + +func (x *StringRules) GetMaxLen() uint64 { + if x != nil && x.MaxLen != nil { + return *x.MaxLen + } + return 0 +} + +func (x *StringRules) GetLenBytes() uint64 { + if x != nil && x.LenBytes != nil { + return *x.LenBytes + } + return 0 +} + +func (x *StringRules) GetMinBytes() uint64 { + if x != nil && x.MinBytes != nil { + return *x.MinBytes + } + return 0 +} + +func (x *StringRules) GetMaxBytes() uint64 { + if x != nil && x.MaxBytes != nil { + return *x.MaxBytes + } + return 0 +} + +func (x *StringRules) GetPattern() string { + if x != nil && x.Pattern != nil { + return *x.Pattern + } + return "" +} + +func (x *StringRules) GetPrefix() string { + if x != nil && x.Prefix != nil { + return *x.Prefix + } + return "" +} + +func (x *StringRules) GetSuffix() string { + if x != nil && x.Suffix != nil { + return *x.Suffix + } + return "" +} + +func (x *StringRules) GetContains() string { + if x != nil && x.Contains != nil { + return *x.Contains + } + return "" +} + +func (x *StringRules) GetNotContains() string { + if x != nil && x.NotContains != nil { + return *x.NotContains + } + return "" +} + +func (x *StringRules) GetIn() []string { + if x != nil { + return x.In + } + return nil +} + +func (x *StringRules) GetNotIn() []string { + if x != nil { + return x.NotIn + } + return nil +} + +func (m *StringRules) GetWellKnown() isStringRules_WellKnown { + if m != nil { + return m.WellKnown + } + return nil +} + +func (x *StringRules) GetEmail() bool { + if x, ok := x.GetWellKnown().(*StringRules_Email); ok { + return x.Email + } + return false +} + +func (x *StringRules) GetHostname() bool { + if x, ok := x.GetWellKnown().(*StringRules_Hostname); ok { + return x.Hostname + } + return false +} + +func (x *StringRules) GetIp() bool { + if x, ok := x.GetWellKnown().(*StringRules_Ip); ok { + return x.Ip + } + return false +} + +func (x *StringRules) GetIpv4() bool { + if x, ok := x.GetWellKnown().(*StringRules_Ipv4); ok { + return x.Ipv4 + } + return false +} + +func (x *StringRules) GetIpv6() bool { + if x, ok := x.GetWellKnown().(*StringRules_Ipv6); ok { + return x.Ipv6 + } + return false +} + +func (x *StringRules) GetUri() bool { + if x, ok := x.GetWellKnown().(*StringRules_Uri); ok { + return x.Uri + } + return false +} + +func (x *StringRules) GetUriRef() bool { + if x, ok := x.GetWellKnown().(*StringRules_UriRef); ok { + return x.UriRef + } + return false +} + +func (x *StringRules) GetAddress() bool { + if x, ok := x.GetWellKnown().(*StringRules_Address); ok { + return x.Address + } + return false +} + +func (x *StringRules) GetUuid() bool { + if x, ok := x.GetWellKnown().(*StringRules_Uuid); ok { + return x.Uuid + } + return false +} + +func (x *StringRules) GetWellKnownRegex() KnownRegex { + if x, ok := x.GetWellKnown().(*StringRules_WellKnownRegex); ok { + return x.WellKnownRegex + } + return KnownRegex_UNKNOWN +} + +func (x *StringRules) GetStrict() bool { + if x != nil && x.Strict != nil { + return *x.Strict + } + return Default_StringRules_Strict +} + +func (x *StringRules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +type isStringRules_WellKnown interface { + isStringRules_WellKnown() +} + +type StringRules_Email struct { + // Email specifies that the field must be a valid email address as + // defined by RFC 5322 + Email bool `protobuf:"varint,12,opt,name=email,oneof"` +} + +type StringRules_Hostname struct { + // Hostname specifies that the field must be a valid hostname as + // defined by RFC 1034. This constraint does not support + // internationalized domain names (IDNs). + Hostname bool `protobuf:"varint,13,opt,name=hostname,oneof"` +} + +type StringRules_Ip struct { + // Ip specifies that the field must be a valid IP (v4 or v6) address. + // Valid IPv6 addresses should not include surrounding square brackets. + Ip bool `protobuf:"varint,14,opt,name=ip,oneof"` +} + +type StringRules_Ipv4 struct { + // Ipv4 specifies that the field must be a valid IPv4 address. + Ipv4 bool `protobuf:"varint,15,opt,name=ipv4,oneof"` +} + +type StringRules_Ipv6 struct { + // Ipv6 specifies that the field must be a valid IPv6 address. Valid + // IPv6 addresses should not include surrounding square brackets. + Ipv6 bool `protobuf:"varint,16,opt,name=ipv6,oneof"` +} + +type StringRules_Uri struct { + // Uri specifies that the field must be a valid, absolute URI as defined + // by RFC 3986 + Uri bool `protobuf:"varint,17,opt,name=uri,oneof"` +} + +type StringRules_UriRef struct { + // UriRef specifies that the field must be a valid URI as defined by RFC + // 3986 and may be relative or absolute. + UriRef bool `protobuf:"varint,18,opt,name=uri_ref,json=uriRef,oneof"` +} + +type StringRules_Address struct { + // Address specifies that the field must be either a valid hostname as + // defined by RFC 1034 (which does not support internationalized domain + // names or IDNs), or it can be a valid IP (v4 or v6). + Address bool `protobuf:"varint,21,opt,name=address,oneof"` +} + +type StringRules_Uuid struct { + // Uuid specifies that the field must be a valid UUID as defined by + // RFC 4122 + Uuid bool `protobuf:"varint,22,opt,name=uuid,oneof"` +} + +type StringRules_WellKnownRegex struct { + // WellKnownRegex specifies a common well known pattern defined as a regex. + WellKnownRegex KnownRegex `protobuf:"varint,24,opt,name=well_known_regex,json=wellKnownRegex,enum=validate.KnownRegex,oneof"` +} + +func (*StringRules_Email) isStringRules_WellKnown() {} + +func (*StringRules_Hostname) isStringRules_WellKnown() {} + +func (*StringRules_Ip) isStringRules_WellKnown() {} + +func (*StringRules_Ipv4) isStringRules_WellKnown() {} + +func (*StringRules_Ipv6) isStringRules_WellKnown() {} + +func (*StringRules_Uri) isStringRules_WellKnown() {} + +func (*StringRules_UriRef) isStringRules_WellKnown() {} + +func (*StringRules_Address) isStringRules_WellKnown() {} + +func (*StringRules_Uuid) isStringRules_WellKnown() {} + +func (*StringRules_WellKnownRegex) isStringRules_WellKnown() {} + +// BytesRules describe the constraints applied to `bytes` values +type BytesRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Const specifies that this field must be exactly the specified value + Const []byte `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"` + // Len specifies that this field must be the specified number of bytes + Len *uint64 `protobuf:"varint,13,opt,name=len" json:"len,omitempty"` + // MinLen specifies that this field must be the specified number of bytes + // at a minimum + MinLen *uint64 `protobuf:"varint,2,opt,name=min_len,json=minLen" json:"min_len,omitempty"` + // MaxLen specifies that this field must be the specified number of bytes + // at a maximum + MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"` + // Pattern specifes that this field must match against the specified + // regular expression (RE2 syntax). The included expression should elide + // any delimiters. + Pattern *string `protobuf:"bytes,4,opt,name=pattern" json:"pattern,omitempty"` + // Prefix specifies that this field must have the specified bytes at the + // beginning of the string. + Prefix []byte `protobuf:"bytes,5,opt,name=prefix" json:"prefix,omitempty"` + // Suffix specifies that this field must have the specified bytes at the + // end of the string. + Suffix []byte `protobuf:"bytes,6,opt,name=suffix" json:"suffix,omitempty"` + // Contains specifies that this field must have the specified bytes + // anywhere in the string. + Contains []byte `protobuf:"bytes,7,opt,name=contains" json:"contains,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In [][]byte `protobuf:"bytes,8,rep,name=in" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn [][]byte `protobuf:"bytes,9,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // WellKnown rules provide advanced constraints against common byte + // patterns + // + // Types that are assignable to WellKnown: + // + // *BytesRules_Ip + // *BytesRules_Ipv4 + // *BytesRules_Ipv6 + WellKnown isBytesRules_WellKnown `protobuf_oneof:"well_known"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,14,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` +} + +func (x *BytesRules) Reset() { + *x = BytesRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BytesRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BytesRules) ProtoMessage() {} + +func (x *BytesRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BytesRules.ProtoReflect.Descriptor instead. +func (*BytesRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{15} +} + +func (x *BytesRules) GetConst() []byte { + if x != nil { + return x.Const + } + return nil +} + +func (x *BytesRules) GetLen() uint64 { + if x != nil && x.Len != nil { + return *x.Len + } + return 0 +} + +func (x *BytesRules) GetMinLen() uint64 { + if x != nil && x.MinLen != nil { + return *x.MinLen + } + return 0 +} + +func (x *BytesRules) GetMaxLen() uint64 { + if x != nil && x.MaxLen != nil { + return *x.MaxLen + } + return 0 +} + +func (x *BytesRules) GetPattern() string { + if x != nil && x.Pattern != nil { + return *x.Pattern + } + return "" +} + +func (x *BytesRules) GetPrefix() []byte { + if x != nil { + return x.Prefix + } + return nil +} + +func (x *BytesRules) GetSuffix() []byte { + if x != nil { + return x.Suffix + } + return nil +} + +func (x *BytesRules) GetContains() []byte { + if x != nil { + return x.Contains + } + return nil +} + +func (x *BytesRules) GetIn() [][]byte { + if x != nil { + return x.In + } + return nil +} + +func (x *BytesRules) GetNotIn() [][]byte { + if x != nil { + return x.NotIn + } + return nil +} + +func (m *BytesRules) GetWellKnown() isBytesRules_WellKnown { + if m != nil { + return m.WellKnown + } + return nil +} + +func (x *BytesRules) GetIp() bool { + if x, ok := x.GetWellKnown().(*BytesRules_Ip); ok { + return x.Ip + } + return false +} + +func (x *BytesRules) GetIpv4() bool { + if x, ok := x.GetWellKnown().(*BytesRules_Ipv4); ok { + return x.Ipv4 + } + return false +} + +func (x *BytesRules) GetIpv6() bool { + if x, ok := x.GetWellKnown().(*BytesRules_Ipv6); ok { + return x.Ipv6 + } + return false +} + +func (x *BytesRules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +type isBytesRules_WellKnown interface { + isBytesRules_WellKnown() +} + +type BytesRules_Ip struct { + // Ip specifies that the field must be a valid IP (v4 or v6) address in + // byte format + Ip bool `protobuf:"varint,10,opt,name=ip,oneof"` +} + +type BytesRules_Ipv4 struct { + // Ipv4 specifies that the field must be a valid IPv4 address in byte + // format + Ipv4 bool `protobuf:"varint,11,opt,name=ipv4,oneof"` +} + +type BytesRules_Ipv6 struct { + // Ipv6 specifies that the field must be a valid IPv6 address in byte + // format + Ipv6 bool `protobuf:"varint,12,opt,name=ipv6,oneof"` +} + +func (*BytesRules_Ip) isBytesRules_WellKnown() {} + +func (*BytesRules_Ipv4) isBytesRules_WellKnown() {} + +func (*BytesRules_Ipv6) isBytesRules_WellKnown() {} + +// EnumRules describe the constraints applied to enum values +type EnumRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Const specifies that this field must be exactly the specified value + Const *int32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` + // DefinedOnly specifies that this field must be only one of the defined + // values for this enum, failing on any undefined value. + DefinedOnly *bool `protobuf:"varint,2,opt,name=defined_only,json=definedOnly" json:"defined_only,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In []int32 `protobuf:"varint,3,rep,name=in" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn []int32 `protobuf:"varint,4,rep,name=not_in,json=notIn" json:"not_in,omitempty"` +} + +func (x *EnumRules) Reset() { + *x = EnumRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnumRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnumRules) ProtoMessage() {} + +func (x *EnumRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnumRules.ProtoReflect.Descriptor instead. +func (*EnumRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{16} +} + +func (x *EnumRules) GetConst() int32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *EnumRules) GetDefinedOnly() bool { + if x != nil && x.DefinedOnly != nil { + return *x.DefinedOnly + } + return false +} + +func (x *EnumRules) GetIn() []int32 { + if x != nil { + return x.In + } + return nil +} + +func (x *EnumRules) GetNotIn() []int32 { + if x != nil { + return x.NotIn + } + return nil +} + +// MessageRules describe the constraints applied to embedded message values. +// For message-type fields, validation is performed recursively. +type MessageRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Skip specifies that the validation rules of this field should not be + // evaluated + Skip *bool `protobuf:"varint,1,opt,name=skip" json:"skip,omitempty"` + // Required specifies that this field must be set + Required *bool `protobuf:"varint,2,opt,name=required" json:"required,omitempty"` +} + +func (x *MessageRules) Reset() { + *x = MessageRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MessageRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageRules) ProtoMessage() {} + +func (x *MessageRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_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 MessageRules.ProtoReflect.Descriptor instead. +func (*MessageRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{17} +} + +func (x *MessageRules) GetSkip() bool { + if x != nil && x.Skip != nil { + return *x.Skip + } + return false +} + +func (x *MessageRules) GetRequired() bool { + if x != nil && x.Required != nil { + return *x.Required + } + return false +} + +// RepeatedRules describe the constraints applied to `repeated` values +type RepeatedRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MinItems specifies that this field must have the specified number of + // items at a minimum + MinItems *uint64 `protobuf:"varint,1,opt,name=min_items,json=minItems" json:"min_items,omitempty"` + // MaxItems specifies that this field must have the specified number of + // items at a maximum + MaxItems *uint64 `protobuf:"varint,2,opt,name=max_items,json=maxItems" json:"max_items,omitempty"` + // Unique specifies that all elements in this field must be unique. This + // contraint is only applicable to scalar and enum types (messages are not + // supported). + Unique *bool `protobuf:"varint,3,opt,name=unique" json:"unique,omitempty"` + // Items specifies the contraints to be applied to each item in the field. + // Repeated message fields will still execute validation against each item + // unless skip is specified here. + Items *FieldRules `protobuf:"bytes,4,opt,name=items" json:"items,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,5,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` +} + +func (x *RepeatedRules) Reset() { + *x = RepeatedRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RepeatedRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepeatedRules) ProtoMessage() {} + +func (x *RepeatedRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_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 RepeatedRules.ProtoReflect.Descriptor instead. +func (*RepeatedRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{18} +} + +func (x *RepeatedRules) GetMinItems() uint64 { + if x != nil && x.MinItems != nil { + return *x.MinItems + } + return 0 +} + +func (x *RepeatedRules) GetMaxItems() uint64 { + if x != nil && x.MaxItems != nil { + return *x.MaxItems + } + return 0 +} + +func (x *RepeatedRules) GetUnique() bool { + if x != nil && x.Unique != nil { + return *x.Unique + } + return false +} + +func (x *RepeatedRules) GetItems() *FieldRules { + if x != nil { + return x.Items + } + return nil +} + +func (x *RepeatedRules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +// MapRules describe the constraints applied to `map` values +type MapRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MinPairs specifies that this field must have the specified number of + // KVs at a minimum + MinPairs *uint64 `protobuf:"varint,1,opt,name=min_pairs,json=minPairs" json:"min_pairs,omitempty"` + // MaxPairs specifies that this field must have the specified number of + // KVs at a maximum + MaxPairs *uint64 `protobuf:"varint,2,opt,name=max_pairs,json=maxPairs" json:"max_pairs,omitempty"` + // NoSparse specifies values in this field cannot be unset. This only + // applies to map's with message value types. + NoSparse *bool `protobuf:"varint,3,opt,name=no_sparse,json=noSparse" json:"no_sparse,omitempty"` + // Keys specifies the constraints to be applied to each key in the field. + Keys *FieldRules `protobuf:"bytes,4,opt,name=keys" json:"keys,omitempty"` + // Values specifies the constraints to be applied to the value of each key + // in the field. Message values will still have their validations evaluated + // unless skip is specified here. + Values *FieldRules `protobuf:"bytes,5,opt,name=values" json:"values,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,6,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` +} + +func (x *MapRules) Reset() { + *x = MapRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MapRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MapRules) ProtoMessage() {} + +func (x *MapRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_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 MapRules.ProtoReflect.Descriptor instead. +func (*MapRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{19} +} + +func (x *MapRules) GetMinPairs() uint64 { + if x != nil && x.MinPairs != nil { + return *x.MinPairs + } + return 0 +} + +func (x *MapRules) GetMaxPairs() uint64 { + if x != nil && x.MaxPairs != nil { + return *x.MaxPairs + } + return 0 +} + +func (x *MapRules) GetNoSparse() bool { + if x != nil && x.NoSparse != nil { + return *x.NoSparse + } + return false +} + +func (x *MapRules) GetKeys() *FieldRules { + if x != nil { + return x.Keys + } + return nil +} + +func (x *MapRules) GetValues() *FieldRules { + if x != nil { + return x.Values + } + return nil +} + +func (x *MapRules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +// AnyRules describe constraints applied exclusively to the +// `google.protobuf.Any` well-known type +type AnyRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required specifies that this field must be set + Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` + // In specifies that this field's `type_url` must be equal to one of the + // specified values. + In []string `protobuf:"bytes,2,rep,name=in" json:"in,omitempty"` + // NotIn specifies that this field's `type_url` must not be equal to any of + // the specified values. + NotIn []string `protobuf:"bytes,3,rep,name=not_in,json=notIn" json:"not_in,omitempty"` +} + +func (x *AnyRules) Reset() { + *x = AnyRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnyRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnyRules) ProtoMessage() {} + +func (x *AnyRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_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 AnyRules.ProtoReflect.Descriptor instead. +func (*AnyRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{20} +} + +func (x *AnyRules) GetRequired() bool { + if x != nil && x.Required != nil { + return *x.Required + } + return false +} + +func (x *AnyRules) GetIn() []string { + if x != nil { + return x.In + } + return nil +} + +func (x *AnyRules) GetNotIn() []string { + if x != nil { + return x.NotIn + } + return nil +} + +// DurationRules describe the constraints applied exclusively to the +// `google.protobuf.Duration` well-known type +type DurationRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required specifies that this field must be set + Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` + // Const specifies that this field must be exactly the specified value + Const *durationpb.Duration `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` + // Lt specifies that this field must be less than the specified value, + // exclusive + Lt *durationpb.Duration `protobuf:"bytes,3,opt,name=lt" json:"lt,omitempty"` + // Lt specifies that this field must be less than the specified value, + // inclusive + Lte *durationpb.Duration `protobuf:"bytes,4,opt,name=lte" json:"lte,omitempty"` + // Gt specifies that this field must be greater than the specified value, + // exclusive + Gt *durationpb.Duration `protobuf:"bytes,5,opt,name=gt" json:"gt,omitempty"` + // Gte specifies that this field must be greater than the specified value, + // inclusive + Gte *durationpb.Duration `protobuf:"bytes,6,opt,name=gte" json:"gte,omitempty"` + // In specifies that this field must be equal to one of the specified + // values + In []*durationpb.Duration `protobuf:"bytes,7,rep,name=in" json:"in,omitempty"` + // NotIn specifies that this field cannot be equal to one of the specified + // values + NotIn []*durationpb.Duration `protobuf:"bytes,8,rep,name=not_in,json=notIn" json:"not_in,omitempty"` +} + +func (x *DurationRules) Reset() { + *x = DurationRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DurationRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DurationRules) ProtoMessage() {} + +func (x *DurationRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_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 DurationRules.ProtoReflect.Descriptor instead. +func (*DurationRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{21} +} + +func (x *DurationRules) GetRequired() bool { + if x != nil && x.Required != nil { + return *x.Required + } + return false +} + +func (x *DurationRules) GetConst() *durationpb.Duration { + if x != nil { + return x.Const + } + return nil +} + +func (x *DurationRules) GetLt() *durationpb.Duration { + if x != nil { + return x.Lt + } + return nil +} + +func (x *DurationRules) GetLte() *durationpb.Duration { + if x != nil { + return x.Lte + } + return nil +} + +func (x *DurationRules) GetGt() *durationpb.Duration { + if x != nil { + return x.Gt + } + return nil +} + +func (x *DurationRules) GetGte() *durationpb.Duration { + if x != nil { + return x.Gte + } + return nil +} + +func (x *DurationRules) GetIn() []*durationpb.Duration { + if x != nil { + return x.In + } + return nil +} + +func (x *DurationRules) GetNotIn() []*durationpb.Duration { + if x != nil { + return x.NotIn + } + return nil +} + +// TimestampRules describe the constraints applied exclusively to the +// `google.protobuf.Timestamp` well-known type +type TimestampRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required specifies that this field must be set + Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` + // Const specifies that this field must be exactly the specified value + Const *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` + // Lt specifies that this field must be less than the specified value, + // exclusive + Lt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=lt" json:"lt,omitempty"` + // Lte specifies that this field must be less than the specified value, + // inclusive + Lte *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=lte" json:"lte,omitempty"` + // Gt specifies that this field must be greater than the specified value, + // exclusive + Gt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=gt" json:"gt,omitempty"` + // Gte specifies that this field must be greater than the specified value, + // inclusive + Gte *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=gte" json:"gte,omitempty"` + // LtNow specifies that this must be less than the current time. LtNow + // can only be used with the Within rule. + LtNow *bool `protobuf:"varint,7,opt,name=lt_now,json=ltNow" json:"lt_now,omitempty"` + // GtNow specifies that this must be greater than the current time. GtNow + // can only be used with the Within rule. + GtNow *bool `protobuf:"varint,8,opt,name=gt_now,json=gtNow" json:"gt_now,omitempty"` + // Within specifies that this field must be within this duration of the + // current time. This constraint can be used alone or with the LtNow and + // GtNow rules. + Within *durationpb.Duration `protobuf:"bytes,9,opt,name=within" json:"within,omitempty"` +} + +func (x *TimestampRules) Reset() { + *x = TimestampRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TimestampRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimestampRules) ProtoMessage() {} + +func (x *TimestampRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_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 TimestampRules.ProtoReflect.Descriptor instead. +func (*TimestampRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{22} +} + +func (x *TimestampRules) GetRequired() bool { + if x != nil && x.Required != nil { + return *x.Required + } + return false +} + +func (x *TimestampRules) GetConst() *timestamppb.Timestamp { + if x != nil { + return x.Const + } + return nil +} + +func (x *TimestampRules) GetLt() *timestamppb.Timestamp { + if x != nil { + return x.Lt + } + return nil +} + +func (x *TimestampRules) GetLte() *timestamppb.Timestamp { + if x != nil { + return x.Lte + } + return nil +} + +func (x *TimestampRules) GetGt() *timestamppb.Timestamp { + if x != nil { + return x.Gt + } + return nil +} + +func (x *TimestampRules) GetGte() *timestamppb.Timestamp { + if x != nil { + return x.Gte + } + return nil +} + +func (x *TimestampRules) GetLtNow() bool { + if x != nil && x.LtNow != nil { + return *x.LtNow + } + return false +} + +func (x *TimestampRules) GetGtNow() bool { + if x != nil && x.GtNow != nil { + return *x.GtNow + } + return false +} + +func (x *TimestampRules) GetWithin() *durationpb.Duration { + if x != nil { + return x.Within + } + return nil +} + +var file_validate_validate_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 1071, + Name: "validate.disabled", + Tag: "varint,1071,opt,name=disabled", + Filename: "validate/validate.proto", + }, + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 1072, + Name: "validate.ignored", + Tag: "varint,1072,opt,name=ignored", + Filename: "validate/validate.proto", + }, + { + ExtendedType: (*descriptorpb.OneofOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 1071, + Name: "validate.required", + Tag: "varint,1071,opt,name=required", + Filename: "validate/validate.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*FieldRules)(nil), + Field: 1071, + Name: "validate.rules", + Tag: "bytes,1071,opt,name=rules", + Filename: "validate/validate.proto", + }, +} + +// Extension fields to descriptorpb.MessageOptions. +var ( + // Disabled nullifies any validation rules for this message, including any + // message fields associated with it that do support validation. + // + // optional bool disabled = 1071; + E_Disabled = &file_validate_validate_proto_extTypes[0] + // Ignore skips generation of validation methods for this message. + // + // optional bool ignored = 1072; + E_Ignored = &file_validate_validate_proto_extTypes[1] +) + +// Extension fields to descriptorpb.OneofOptions. +var ( + // Required ensures that exactly one the field options in a oneof is set; + // validation fails if no fields in the oneof are set. + // + // optional bool required = 1071; + E_Required = &file_validate_validate_proto_extTypes[2] +) + +// Extension fields to descriptorpb.FieldOptions. +var ( + // Rules specify the validations to be performed on this field. By default, + // no validation is performed against a field. + // + // optional validate.FieldRules rules = 1071; + E_Rules = &file_validate_validate_proto_extTypes[3] +) + +var File_validate_validate_proto protoreflect.FileDescriptor + +var file_validate_validate_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0xc8, 0x08, 0x0a, 0x0a, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, + 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x69, + 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2c, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x49, + 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x74, + 0x36, 0x34, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x55, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x75, 0x69, 0x6e, + 0x74, 0x33, 0x32, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x55, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x75, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x53, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, + 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x53, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, + 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x32, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, + 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, + 0x00, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x32, 0x0a, 0x07, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x35, + 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x46, 0x69, 0x78, + 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08, 0x73, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x35, 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, + 0x34, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x53, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x48, 0x00, 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x29, 0x0a, 0x04, + 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, + 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, + 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, + 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, + 0x6d, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x12, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x52, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08, + 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x4d, 0x61, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, + 0x12, 0x26, 0x0a, 0x03, 0x61, 0x6e, 0x79, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x75, 0x6c, 0x65, + 0x73, 0x48, 0x00, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x16, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x02, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x02, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x02, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, + 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x02, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, + 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, + 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, + 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x01, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, + 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x01, 0x52, 0x05, + 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb0, 0x01, 0x0a, 0x0a, 0x49, 0x6e, 0x74, + 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, + 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x67, 0x74, 0x12, + 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x67, 0x74, + 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, 0x02, 0x69, + 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x05, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, + 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb0, 0x01, 0x0a, 0x0a, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, + 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x6c, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6c, + 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, + 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x03, + 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, + 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb1, + 0x01, 0x0a, 0x0b, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, + 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, + 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, + 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, + 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x04, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, + 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x04, 0x52, 0x05, 0x6e, 0x6f, + 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, + 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x53, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x11, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, 0x67, 0x74, 0x65, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x11, 0x52, 0x02, 0x69, 0x6e, + 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x11, + 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, + 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, + 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x53, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, + 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x02, 0x6c, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x03, 0x6c, + 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x12, 0x52, 0x02, + 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x12, 0x52, + 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x12, + 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x12, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, + 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb2, + 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x07, 0x52, 0x05, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x07, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x07, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x07, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x07, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x07, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, + 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x07, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, + 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0xb2, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, + 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x06, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x06, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x06, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x06, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x06, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x06, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, + 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x06, 0x52, 0x05, + 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb3, 0x01, 0x0a, 0x0d, 0x53, 0x46, 0x69, + 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, + 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x02, 0x6c, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x03, 0x6c, + 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x02, + 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0f, 0x52, + 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0f, + 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0f, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, + 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb3, + 0x01, 0x0a, 0x0d, 0x53, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x10, 0x52, + 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x10, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x10, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x10, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x10, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x10, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, + 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x10, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, + 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, + 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x21, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x75, 0x6c, 0x65, + 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x22, 0xd4, 0x05, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x6c, 0x65, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6c, 0x65, 0x6e, 0x12, + 0x17, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, + 0x6c, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x4c, 0x65, + 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x65, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x14, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x65, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, + 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, + 0x61, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, + 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, + 0x66, 0x66, 0x69, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, + 0x69, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x21, + 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x17, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x0b, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x1c, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x00, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, + 0x0a, 0x02, 0x69, 0x70, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x02, 0x69, 0x70, + 0x12, 0x14, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, + 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, 0x12, 0x14, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x69, 0x70, 0x76, 0x36, 0x12, 0x12, 0x0a, 0x03, + 0x75, 0x72, 0x69, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x03, 0x75, 0x72, 0x69, + 0x12, 0x19, 0x0a, 0x07, 0x75, 0x72, 0x69, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x12, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x00, 0x52, 0x06, 0x75, 0x72, 0x69, 0x52, 0x65, 0x66, 0x12, 0x1a, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x40, 0x0a, + 0x10, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x65, + 0x78, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x48, 0x00, 0x52, + 0x0e, 0x77, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, + 0x1c, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x3a, + 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x1a, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x42, 0x0c, 0x0a, 0x0a, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x22, 0xe2, + 0x02, 0x0a, 0x0a, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, + 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x6f, + 0x6e, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x65, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x03, 0x6c, 0x65, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x12, 0x17, + 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x06, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x66, + 0x66, 0x69, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, + 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x6e, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, + 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x6e, + 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x00, 0x52, 0x02, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, 0x12, 0x14, 0x0a, 0x04, + 0x69, 0x70, 0x76, 0x36, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x69, 0x70, + 0x76, 0x36, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x0c, 0x0a, 0x0a, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, + 0x6f, 0x77, 0x6e, 0x22, 0x6b, 0x0a, 0x09, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, + 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x64, 0x65, + 0x66, 0x69, 0x6e, 0x65, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, + 0x5f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, + 0x22, 0x3e, 0x0a, 0x0c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, + 0x73, 0x6b, 0x69, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x22, 0xb0, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x75, 0x6c, + 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, + 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x6e, + 0x69, 0x71, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0xdc, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x1b, 0x0a, + 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x08, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, + 0x5f, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, + 0x6f, 0x53, 0x70, 0x61, 0x72, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x04, 0x6b, 0x65, 0x79, + 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, + 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x4d, 0x0a, 0x08, 0x41, 0x6e, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1a, + 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, + 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, + 0x6e, 0x22, 0xe9, 0x02, 0x0a, 0x0d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, + 0x2f, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x12, 0x29, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x2b, 0x0a, 0x03, 0x6c, + 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x02, 0x67, 0x74, 0x12, 0x2b, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x67, 0x74, 0x65, + 0x12, 0x29, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x30, 0x0a, 0x06, 0x6e, + 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x22, 0xf3, 0x02, + 0x0a, 0x0e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x05, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x02, 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, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x2a, + 0x0a, 0x02, 0x6c, 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, 0x02, 0x6c, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x6c, 0x74, + 0x65, 0x18, 0x04, 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, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x05, + 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, 0x02, 0x67, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x06, 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, 0x03, 0x67, + 0x74, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6c, 0x74, 0x5f, 0x6e, 0x6f, 0x77, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x6c, 0x74, 0x4e, 0x6f, 0x77, 0x12, 0x15, 0x0a, 0x06, 0x67, 0x74, 0x5f, + 0x6e, 0x6f, 0x77, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x67, 0x74, 0x4e, 0x6f, 0x77, + 0x12, 0x31, 0x0a, 0x06, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x77, 0x69, 0x74, + 0x68, 0x69, 0x6e, 0x2a, 0x46, 0x0a, 0x0a, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x67, 0x65, + 0x78, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, + 0x0a, 0x10, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x4e, 0x41, + 0x4d, 0x45, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x48, 0x45, 0x41, + 0x44, 0x45, 0x52, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x02, 0x3a, 0x3c, 0x0a, 0x08, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x3a, 0x0a, 0x07, 0x69, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x64, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb0, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x67, + 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x3a, 0x3a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0xaf, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x3a, 0x4a, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x50, 0x0a, + 0x1a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, + 0x67, 0x76, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5a, 0x32, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, +} + +var ( + file_validate_validate_proto_rawDescOnce sync.Once + file_validate_validate_proto_rawDescData = file_validate_validate_proto_rawDesc +) + +func file_validate_validate_proto_rawDescGZIP() []byte { + file_validate_validate_proto_rawDescOnce.Do(func() { + file_validate_validate_proto_rawDescData = protoimpl.X.CompressGZIP(file_validate_validate_proto_rawDescData) + }) + return file_validate_validate_proto_rawDescData +} + +var file_validate_validate_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_validate_validate_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_validate_validate_proto_goTypes = []interface{}{ + (KnownRegex)(0), // 0: validate.KnownRegex + (*FieldRules)(nil), // 1: validate.FieldRules + (*FloatRules)(nil), // 2: validate.FloatRules + (*DoubleRules)(nil), // 3: validate.DoubleRules + (*Int32Rules)(nil), // 4: validate.Int32Rules + (*Int64Rules)(nil), // 5: validate.Int64Rules + (*UInt32Rules)(nil), // 6: validate.UInt32Rules + (*UInt64Rules)(nil), // 7: validate.UInt64Rules + (*SInt32Rules)(nil), // 8: validate.SInt32Rules + (*SInt64Rules)(nil), // 9: validate.SInt64Rules + (*Fixed32Rules)(nil), // 10: validate.Fixed32Rules + (*Fixed64Rules)(nil), // 11: validate.Fixed64Rules + (*SFixed32Rules)(nil), // 12: validate.SFixed32Rules + (*SFixed64Rules)(nil), // 13: validate.SFixed64Rules + (*BoolRules)(nil), // 14: validate.BoolRules + (*StringRules)(nil), // 15: validate.StringRules + (*BytesRules)(nil), // 16: validate.BytesRules + (*EnumRules)(nil), // 17: validate.EnumRules + (*MessageRules)(nil), // 18: validate.MessageRules + (*RepeatedRules)(nil), // 19: validate.RepeatedRules + (*MapRules)(nil), // 20: validate.MapRules + (*AnyRules)(nil), // 21: validate.AnyRules + (*DurationRules)(nil), // 22: validate.DurationRules + (*TimestampRules)(nil), // 23: validate.TimestampRules + (*durationpb.Duration)(nil), // 24: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp + (*descriptorpb.MessageOptions)(nil), // 26: google.protobuf.MessageOptions + (*descriptorpb.OneofOptions)(nil), // 27: google.protobuf.OneofOptions + (*descriptorpb.FieldOptions)(nil), // 28: google.protobuf.FieldOptions +} +var file_validate_validate_proto_depIdxs = []int32{ + 18, // 0: validate.FieldRules.message:type_name -> validate.MessageRules + 2, // 1: validate.FieldRules.float:type_name -> validate.FloatRules + 3, // 2: validate.FieldRules.double:type_name -> validate.DoubleRules + 4, // 3: validate.FieldRules.int32:type_name -> validate.Int32Rules + 5, // 4: validate.FieldRules.int64:type_name -> validate.Int64Rules + 6, // 5: validate.FieldRules.uint32:type_name -> validate.UInt32Rules + 7, // 6: validate.FieldRules.uint64:type_name -> validate.UInt64Rules + 8, // 7: validate.FieldRules.sint32:type_name -> validate.SInt32Rules + 9, // 8: validate.FieldRules.sint64:type_name -> validate.SInt64Rules + 10, // 9: validate.FieldRules.fixed32:type_name -> validate.Fixed32Rules + 11, // 10: validate.FieldRules.fixed64:type_name -> validate.Fixed64Rules + 12, // 11: validate.FieldRules.sfixed32:type_name -> validate.SFixed32Rules + 13, // 12: validate.FieldRules.sfixed64:type_name -> validate.SFixed64Rules + 14, // 13: validate.FieldRules.bool:type_name -> validate.BoolRules + 15, // 14: validate.FieldRules.string:type_name -> validate.StringRules + 16, // 15: validate.FieldRules.bytes:type_name -> validate.BytesRules + 17, // 16: validate.FieldRules.enum:type_name -> validate.EnumRules + 19, // 17: validate.FieldRules.repeated:type_name -> validate.RepeatedRules + 20, // 18: validate.FieldRules.map:type_name -> validate.MapRules + 21, // 19: validate.FieldRules.any:type_name -> validate.AnyRules + 22, // 20: validate.FieldRules.duration:type_name -> validate.DurationRules + 23, // 21: validate.FieldRules.timestamp:type_name -> validate.TimestampRules + 0, // 22: validate.StringRules.well_known_regex:type_name -> validate.KnownRegex + 1, // 23: validate.RepeatedRules.items:type_name -> validate.FieldRules + 1, // 24: validate.MapRules.keys:type_name -> validate.FieldRules + 1, // 25: validate.MapRules.values:type_name -> validate.FieldRules + 24, // 26: validate.DurationRules.const:type_name -> google.protobuf.Duration + 24, // 27: validate.DurationRules.lt:type_name -> google.protobuf.Duration + 24, // 28: validate.DurationRules.lte:type_name -> google.protobuf.Duration + 24, // 29: validate.DurationRules.gt:type_name -> google.protobuf.Duration + 24, // 30: validate.DurationRules.gte:type_name -> google.protobuf.Duration + 24, // 31: validate.DurationRules.in:type_name -> google.protobuf.Duration + 24, // 32: validate.DurationRules.not_in:type_name -> google.protobuf.Duration + 25, // 33: validate.TimestampRules.const:type_name -> google.protobuf.Timestamp + 25, // 34: validate.TimestampRules.lt:type_name -> google.protobuf.Timestamp + 25, // 35: validate.TimestampRules.lte:type_name -> google.protobuf.Timestamp + 25, // 36: validate.TimestampRules.gt:type_name -> google.protobuf.Timestamp + 25, // 37: validate.TimestampRules.gte:type_name -> google.protobuf.Timestamp + 24, // 38: validate.TimestampRules.within:type_name -> google.protobuf.Duration + 26, // 39: validate.disabled:extendee -> google.protobuf.MessageOptions + 26, // 40: validate.ignored:extendee -> google.protobuf.MessageOptions + 27, // 41: validate.required:extendee -> google.protobuf.OneofOptions + 28, // 42: validate.rules:extendee -> google.protobuf.FieldOptions + 1, // 43: validate.rules:type_name -> validate.FieldRules + 44, // [44:44] is the sub-list for method output_type + 44, // [44:44] is the sub-list for method input_type + 43, // [43:44] is the sub-list for extension type_name + 39, // [39:43] is the sub-list for extension extendee + 0, // [0:39] is the sub-list for field type_name +} + +func init() { file_validate_validate_proto_init() } +func file_validate_validate_proto_init() { + if File_validate_validate_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_validate_validate_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FieldRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FloatRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DoubleRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int32Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int64Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UInt32Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UInt64Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SInt32Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SInt64Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Fixed32Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Fixed64Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SFixed32Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SFixed64Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoolRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StringRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BytesRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnumRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MessageRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RepeatedRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MapRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnyRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DurationRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimestampRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_validate_validate_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*FieldRules_Float)(nil), + (*FieldRules_Double)(nil), + (*FieldRules_Int32)(nil), + (*FieldRules_Int64)(nil), + (*FieldRules_Uint32)(nil), + (*FieldRules_Uint64)(nil), + (*FieldRules_Sint32)(nil), + (*FieldRules_Sint64)(nil), + (*FieldRules_Fixed32)(nil), + (*FieldRules_Fixed64)(nil), + (*FieldRules_Sfixed32)(nil), + (*FieldRules_Sfixed64)(nil), + (*FieldRules_Bool)(nil), + (*FieldRules_String_)(nil), + (*FieldRules_Bytes)(nil), + (*FieldRules_Enum)(nil), + (*FieldRules_Repeated)(nil), + (*FieldRules_Map)(nil), + (*FieldRules_Any)(nil), + (*FieldRules_Duration)(nil), + (*FieldRules_Timestamp)(nil), + } + file_validate_validate_proto_msgTypes[14].OneofWrappers = []interface{}{ + (*StringRules_Email)(nil), + (*StringRules_Hostname)(nil), + (*StringRules_Ip)(nil), + (*StringRules_Ipv4)(nil), + (*StringRules_Ipv6)(nil), + (*StringRules_Uri)(nil), + (*StringRules_UriRef)(nil), + (*StringRules_Address)(nil), + (*StringRules_Uuid)(nil), + (*StringRules_WellKnownRegex)(nil), + } + file_validate_validate_proto_msgTypes[15].OneofWrappers = []interface{}{ + (*BytesRules_Ip)(nil), + (*BytesRules_Ipv4)(nil), + (*BytesRules_Ipv6)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_validate_validate_proto_rawDesc, + NumEnums: 1, + NumMessages: 23, + NumExtensions: 4, + NumServices: 0, + }, + GoTypes: file_validate_validate_proto_goTypes, + DependencyIndexes: file_validate_validate_proto_depIdxs, + EnumInfos: file_validate_validate_proto_enumTypes, + MessageInfos: file_validate_validate_proto_msgTypes, + ExtensionInfos: file_validate_validate_proto_extTypes, + }.Build() + File_validate_validate_proto = out.File + file_validate_validate_proto_rawDesc = nil + file_validate_validate_proto_goTypes = nil + file_validate_validate_proto_depIdxs = nil +} diff --git a/proto/validate/validate.pb.validate.go b/proto/validate/validate.pb.validate.go new file mode 100644 index 000000000..ba1cb838c --- /dev/null +++ b/proto/validate/validate.pb.validate.go @@ -0,0 +1,4079 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: validate/validate.proto + +package validate + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on FieldRules with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *FieldRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FieldRules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FieldRulesMultiError, or +// nil if none found. +func (m *FieldRules) ValidateAll() error { + return m.validate(true) +} + +func (m *FieldRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetMessage()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Message", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Message", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMessage()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Message", + reason: "embedded message failed validation", + cause: err, + } + } + } + + switch v := m.Type.(type) { + case *FieldRules_Float: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetFloat()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Float", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Float", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFloat()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Float", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Double: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetDouble()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Double", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Double", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDouble()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Double", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Int32: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetInt32()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Int32", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Int32", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInt32()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Int32", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Int64: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetInt64()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Int64", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Int64", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetInt64()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Int64", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Uint32: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetUint32()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Uint32", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Uint32", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUint32()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Uint32", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Uint64: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetUint64()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Uint64", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Uint64", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUint64()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Uint64", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Sint32: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetSint32()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Sint32", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Sint32", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSint32()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Sint32", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Sint64: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetSint64()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Sint64", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Sint64", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSint64()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Sint64", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Fixed32: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetFixed32()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Fixed32", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Fixed32", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFixed32()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Fixed32", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Fixed64: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetFixed64()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Fixed64", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Fixed64", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetFixed64()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Fixed64", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Sfixed32: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetSfixed32()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Sfixed32", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Sfixed32", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSfixed32()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Sfixed32", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Sfixed64: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetSfixed64()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Sfixed64", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Sfixed64", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetSfixed64()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Sfixed64", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Bool: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetBool()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Bool", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Bool", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBool()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Bool", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_String_: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetString_()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "String_", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "String_", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetString_()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "String_", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Bytes: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetBytes()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Bytes", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Bytes", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetBytes()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Bytes", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Enum: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetEnum()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Enum", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Enum", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetEnum()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Enum", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Repeated: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetRepeated()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Repeated", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Repeated", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetRepeated()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Repeated", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Map: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetMap()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Map", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Map", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMap()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Map", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Any: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetAny()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Any", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Any", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetAny()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Any", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Duration: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetDuration()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Duration", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Duration", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetDuration()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Duration", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *FieldRules_Timestamp: + if v == nil { + err := FieldRulesValidationError{ + field: "Type", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetTimestamp()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, FieldRulesValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetTimestamp()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return FieldRulesValidationError{ + field: "Timestamp", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return FieldRulesMultiError(errors) + } + + return nil +} + +// FieldRulesMultiError is an error wrapping multiple validation errors +// returned by FieldRules.ValidateAll() if the designated constraints aren't met. +type FieldRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FieldRulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FieldRulesMultiError) AllErrors() []error { return m } + +// FieldRulesValidationError is the validation error returned by +// FieldRules.Validate if the designated constraints aren't met. +type FieldRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FieldRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FieldRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FieldRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FieldRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FieldRulesValidationError) ErrorName() string { return "FieldRulesValidationError" } + +// Error satisfies the builtin error interface +func (e FieldRulesValidationError) 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 %sFieldRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FieldRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FieldRulesValidationError{} + +// Validate checks the field values on FloatRules with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *FloatRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FloatRules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FloatRulesMultiError, or +// nil if none found. +func (m *FloatRules) ValidateAll() error { + return m.validate(true) +} + +func (m *FloatRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Const + + // no validation rules for Lt + + // no validation rules for Lte + + // no validation rules for Gt + + // no validation rules for Gte + + // no validation rules for IgnoreEmpty + + if len(errors) > 0 { + return FloatRulesMultiError(errors) + } + + return nil +} + +// FloatRulesMultiError is an error wrapping multiple validation errors +// returned by FloatRules.ValidateAll() if the designated constraints aren't met. +type FloatRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FloatRulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FloatRulesMultiError) AllErrors() []error { return m } + +// FloatRulesValidationError is the validation error returned by +// FloatRules.Validate if the designated constraints aren't met. +type FloatRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FloatRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FloatRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FloatRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FloatRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FloatRulesValidationError) ErrorName() string { return "FloatRulesValidationError" } + +// Error satisfies the builtin error interface +func (e FloatRulesValidationError) 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 %sFloatRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FloatRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FloatRulesValidationError{} + +// Validate checks the field values on DoubleRules with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *DoubleRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DoubleRules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DoubleRulesMultiError, or +// nil if none found. +func (m *DoubleRules) ValidateAll() error { + return m.validate(true) +} + +func (m *DoubleRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Const + + // no validation rules for Lt + + // no validation rules for Lte + + // no validation rules for Gt + + // no validation rules for Gte + + // no validation rules for IgnoreEmpty + + if len(errors) > 0 { + return DoubleRulesMultiError(errors) + } + + return nil +} + +// DoubleRulesMultiError is an error wrapping multiple validation errors +// returned by DoubleRules.ValidateAll() if the designated constraints aren't met. +type DoubleRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DoubleRulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DoubleRulesMultiError) AllErrors() []error { return m } + +// DoubleRulesValidationError is the validation error returned by +// DoubleRules.Validate if the designated constraints aren't met. +type DoubleRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DoubleRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DoubleRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DoubleRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DoubleRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DoubleRulesValidationError) ErrorName() string { return "DoubleRulesValidationError" } + +// Error satisfies the builtin error interface +func (e DoubleRulesValidationError) 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 %sDoubleRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DoubleRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DoubleRulesValidationError{} + +// Validate checks the field values on Int32Rules with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Int32Rules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Int32Rules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in Int32RulesMultiError, or +// nil if none found. +func (m *Int32Rules) ValidateAll() error { + return m.validate(true) +} + +func (m *Int32Rules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Const + + // no validation rules for Lt + + // no validation rules for Lte + + // no validation rules for Gt + + // no validation rules for Gte + + // no validation rules for IgnoreEmpty + + if len(errors) > 0 { + return Int32RulesMultiError(errors) + } + + return nil +} + +// Int32RulesMultiError is an error wrapping multiple validation errors +// returned by Int32Rules.ValidateAll() if the designated constraints aren't met. +type Int32RulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Int32RulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Int32RulesMultiError) AllErrors() []error { return m } + +// Int32RulesValidationError is the validation error returned by +// Int32Rules.Validate if the designated constraints aren't met. +type Int32RulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Int32RulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Int32RulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Int32RulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Int32RulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Int32RulesValidationError) ErrorName() string { return "Int32RulesValidationError" } + +// Error satisfies the builtin error interface +func (e Int32RulesValidationError) 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 %sInt32Rules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Int32RulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Int32RulesValidationError{} + +// Validate checks the field values on Int64Rules with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Int64Rules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Int64Rules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in Int64RulesMultiError, or +// nil if none found. +func (m *Int64Rules) ValidateAll() error { + return m.validate(true) +} + +func (m *Int64Rules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Const + + // no validation rules for Lt + + // no validation rules for Lte + + // no validation rules for Gt + + // no validation rules for Gte + + // no validation rules for IgnoreEmpty + + if len(errors) > 0 { + return Int64RulesMultiError(errors) + } + + return nil +} + +// Int64RulesMultiError is an error wrapping multiple validation errors +// returned by Int64Rules.ValidateAll() if the designated constraints aren't met. +type Int64RulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Int64RulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Int64RulesMultiError) AllErrors() []error { return m } + +// Int64RulesValidationError is the validation error returned by +// Int64Rules.Validate if the designated constraints aren't met. +type Int64RulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Int64RulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Int64RulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Int64RulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Int64RulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Int64RulesValidationError) ErrorName() string { return "Int64RulesValidationError" } + +// Error satisfies the builtin error interface +func (e Int64RulesValidationError) 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 %sInt64Rules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Int64RulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Int64RulesValidationError{} + +// Validate checks the field values on UInt32Rules with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *UInt32Rules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UInt32Rules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in UInt32RulesMultiError, or +// nil if none found. +func (m *UInt32Rules) ValidateAll() error { + return m.validate(true) +} + +func (m *UInt32Rules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Const + + // no validation rules for Lt + + // no validation rules for Lte + + // no validation rules for Gt + + // no validation rules for Gte + + // no validation rules for IgnoreEmpty + + if len(errors) > 0 { + return UInt32RulesMultiError(errors) + } + + return nil +} + +// UInt32RulesMultiError is an error wrapping multiple validation errors +// returned by UInt32Rules.ValidateAll() if the designated constraints aren't met. +type UInt32RulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UInt32RulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UInt32RulesMultiError) AllErrors() []error { return m } + +// UInt32RulesValidationError is the validation error returned by +// UInt32Rules.Validate if the designated constraints aren't met. +type UInt32RulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UInt32RulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UInt32RulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UInt32RulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UInt32RulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UInt32RulesValidationError) ErrorName() string { return "UInt32RulesValidationError" } + +// Error satisfies the builtin error interface +func (e UInt32RulesValidationError) 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 %sUInt32Rules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UInt32RulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UInt32RulesValidationError{} + +// Validate checks the field values on UInt64Rules with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *UInt64Rules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on UInt64Rules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in UInt64RulesMultiError, or +// nil if none found. +func (m *UInt64Rules) ValidateAll() error { + return m.validate(true) +} + +func (m *UInt64Rules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Const + + // no validation rules for Lt + + // no validation rules for Lte + + // no validation rules for Gt + + // no validation rules for Gte + + // no validation rules for IgnoreEmpty + + if len(errors) > 0 { + return UInt64RulesMultiError(errors) + } + + return nil +} + +// UInt64RulesMultiError is an error wrapping multiple validation errors +// returned by UInt64Rules.ValidateAll() if the designated constraints aren't met. +type UInt64RulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m UInt64RulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m UInt64RulesMultiError) AllErrors() []error { return m } + +// UInt64RulesValidationError is the validation error returned by +// UInt64Rules.Validate if the designated constraints aren't met. +type UInt64RulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e UInt64RulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e UInt64RulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e UInt64RulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e UInt64RulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e UInt64RulesValidationError) ErrorName() string { return "UInt64RulesValidationError" } + +// Error satisfies the builtin error interface +func (e UInt64RulesValidationError) 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 %sUInt64Rules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = UInt64RulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = UInt64RulesValidationError{} + +// Validate checks the field values on SInt32Rules with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *SInt32Rules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SInt32Rules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SInt32RulesMultiError, or +// nil if none found. +func (m *SInt32Rules) ValidateAll() error { + return m.validate(true) +} + +func (m *SInt32Rules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Const + + // no validation rules for Lt + + // no validation rules for Lte + + // no validation rules for Gt + + // no validation rules for Gte + + // no validation rules for IgnoreEmpty + + if len(errors) > 0 { + return SInt32RulesMultiError(errors) + } + + return nil +} + +// SInt32RulesMultiError is an error wrapping multiple validation errors +// returned by SInt32Rules.ValidateAll() if the designated constraints aren't met. +type SInt32RulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SInt32RulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SInt32RulesMultiError) AllErrors() []error { return m } + +// SInt32RulesValidationError is the validation error returned by +// SInt32Rules.Validate if the designated constraints aren't met. +type SInt32RulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SInt32RulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SInt32RulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SInt32RulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SInt32RulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SInt32RulesValidationError) ErrorName() string { return "SInt32RulesValidationError" } + +// Error satisfies the builtin error interface +func (e SInt32RulesValidationError) 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 %sSInt32Rules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SInt32RulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SInt32RulesValidationError{} + +// Validate checks the field values on SInt64Rules with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *SInt64Rules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SInt64Rules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SInt64RulesMultiError, or +// nil if none found. +func (m *SInt64Rules) ValidateAll() error { + return m.validate(true) +} + +func (m *SInt64Rules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Const + + // no validation rules for Lt + + // no validation rules for Lte + + // no validation rules for Gt + + // no validation rules for Gte + + // no validation rules for IgnoreEmpty + + if len(errors) > 0 { + return SInt64RulesMultiError(errors) + } + + return nil +} + +// SInt64RulesMultiError is an error wrapping multiple validation errors +// returned by SInt64Rules.ValidateAll() if the designated constraints aren't met. +type SInt64RulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SInt64RulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SInt64RulesMultiError) AllErrors() []error { return m } + +// SInt64RulesValidationError is the validation error returned by +// SInt64Rules.Validate if the designated constraints aren't met. +type SInt64RulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SInt64RulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SInt64RulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SInt64RulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SInt64RulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SInt64RulesValidationError) ErrorName() string { return "SInt64RulesValidationError" } + +// Error satisfies the builtin error interface +func (e SInt64RulesValidationError) 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 %sSInt64Rules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SInt64RulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SInt64RulesValidationError{} + +// Validate checks the field values on Fixed32Rules with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Fixed32Rules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Fixed32Rules with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in Fixed32RulesMultiError, or +// nil if none found. +func (m *Fixed32Rules) ValidateAll() error { + return m.validate(true) +} + +func (m *Fixed32Rules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Const + + // no validation rules for Lt + + // no validation rules for Lte + + // no validation rules for Gt + + // no validation rules for Gte + + // no validation rules for IgnoreEmpty + + if len(errors) > 0 { + return Fixed32RulesMultiError(errors) + } + + return nil +} + +// Fixed32RulesMultiError is an error wrapping multiple validation errors +// returned by Fixed32Rules.ValidateAll() if the designated constraints aren't met. +type Fixed32RulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Fixed32RulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Fixed32RulesMultiError) AllErrors() []error { return m } + +// Fixed32RulesValidationError is the validation error returned by +// Fixed32Rules.Validate if the designated constraints aren't met. +type Fixed32RulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Fixed32RulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Fixed32RulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Fixed32RulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Fixed32RulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Fixed32RulesValidationError) ErrorName() string { return "Fixed32RulesValidationError" } + +// Error satisfies the builtin error interface +func (e Fixed32RulesValidationError) 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 %sFixed32Rules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Fixed32RulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Fixed32RulesValidationError{} + +// Validate checks the field values on Fixed64Rules with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Fixed64Rules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Fixed64Rules with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in Fixed64RulesMultiError, or +// nil if none found. +func (m *Fixed64Rules) ValidateAll() error { + return m.validate(true) +} + +func (m *Fixed64Rules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Const + + // no validation rules for Lt + + // no validation rules for Lte + + // no validation rules for Gt + + // no validation rules for Gte + + // no validation rules for IgnoreEmpty + + if len(errors) > 0 { + return Fixed64RulesMultiError(errors) + } + + return nil +} + +// Fixed64RulesMultiError is an error wrapping multiple validation errors +// returned by Fixed64Rules.ValidateAll() if the designated constraints aren't met. +type Fixed64RulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m Fixed64RulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m Fixed64RulesMultiError) AllErrors() []error { return m } + +// Fixed64RulesValidationError is the validation error returned by +// Fixed64Rules.Validate if the designated constraints aren't met. +type Fixed64RulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e Fixed64RulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e Fixed64RulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e Fixed64RulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e Fixed64RulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e Fixed64RulesValidationError) ErrorName() string { return "Fixed64RulesValidationError" } + +// Error satisfies the builtin error interface +func (e Fixed64RulesValidationError) 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 %sFixed64Rules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = Fixed64RulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = Fixed64RulesValidationError{} + +// Validate checks the field values on SFixed32Rules with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *SFixed32Rules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SFixed32Rules with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SFixed32RulesMultiError, or +// nil if none found. +func (m *SFixed32Rules) ValidateAll() error { + return m.validate(true) +} + +func (m *SFixed32Rules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Const + + // no validation rules for Lt + + // no validation rules for Lte + + // no validation rules for Gt + + // no validation rules for Gte + + // no validation rules for IgnoreEmpty + + if len(errors) > 0 { + return SFixed32RulesMultiError(errors) + } + + return nil +} + +// SFixed32RulesMultiError is an error wrapping multiple validation errors +// returned by SFixed32Rules.ValidateAll() if the designated constraints +// aren't met. +type SFixed32RulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SFixed32RulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SFixed32RulesMultiError) AllErrors() []error { return m } + +// SFixed32RulesValidationError is the validation error returned by +// SFixed32Rules.Validate if the designated constraints aren't met. +type SFixed32RulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SFixed32RulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SFixed32RulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SFixed32RulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SFixed32RulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SFixed32RulesValidationError) ErrorName() string { return "SFixed32RulesValidationError" } + +// Error satisfies the builtin error interface +func (e SFixed32RulesValidationError) 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 %sSFixed32Rules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SFixed32RulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SFixed32RulesValidationError{} + +// Validate checks the field values on SFixed64Rules with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *SFixed64Rules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on SFixed64Rules with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in SFixed64RulesMultiError, or +// nil if none found. +func (m *SFixed64Rules) ValidateAll() error { + return m.validate(true) +} + +func (m *SFixed64Rules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Const + + // no validation rules for Lt + + // no validation rules for Lte + + // no validation rules for Gt + + // no validation rules for Gte + + // no validation rules for IgnoreEmpty + + if len(errors) > 0 { + return SFixed64RulesMultiError(errors) + } + + return nil +} + +// SFixed64RulesMultiError is an error wrapping multiple validation errors +// returned by SFixed64Rules.ValidateAll() if the designated constraints +// aren't met. +type SFixed64RulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m SFixed64RulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m SFixed64RulesMultiError) AllErrors() []error { return m } + +// SFixed64RulesValidationError is the validation error returned by +// SFixed64Rules.Validate if the designated constraints aren't met. +type SFixed64RulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e SFixed64RulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e SFixed64RulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e SFixed64RulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e SFixed64RulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e SFixed64RulesValidationError) ErrorName() string { return "SFixed64RulesValidationError" } + +// Error satisfies the builtin error interface +func (e SFixed64RulesValidationError) 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 %sSFixed64Rules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = SFixed64RulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = SFixed64RulesValidationError{} + +// Validate checks the field values on BoolRules with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *BoolRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BoolRules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BoolRulesMultiError, or nil +// if none found. +func (m *BoolRules) ValidateAll() error { + return m.validate(true) +} + +func (m *BoolRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Const + + if len(errors) > 0 { + return BoolRulesMultiError(errors) + } + + return nil +} + +// BoolRulesMultiError is an error wrapping multiple validation errors returned +// by BoolRules.ValidateAll() if the designated constraints aren't met. +type BoolRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BoolRulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BoolRulesMultiError) AllErrors() []error { return m } + +// BoolRulesValidationError is the validation error returned by +// BoolRules.Validate if the designated constraints aren't met. +type BoolRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BoolRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BoolRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BoolRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BoolRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BoolRulesValidationError) ErrorName() string { return "BoolRulesValidationError" } + +// Error satisfies the builtin error interface +func (e BoolRulesValidationError) 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 %sBoolRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BoolRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BoolRulesValidationError{} + +// Validate checks the field values on StringRules with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *StringRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on StringRules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in StringRulesMultiError, or +// nil if none found. +func (m *StringRules) ValidateAll() error { + return m.validate(true) +} + +func (m *StringRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Const + + // no validation rules for Len + + // no validation rules for MinLen + + // no validation rules for MaxLen + + // no validation rules for LenBytes + + // no validation rules for MinBytes + + // no validation rules for MaxBytes + + // no validation rules for Pattern + + // no validation rules for Prefix + + // no validation rules for Suffix + + // no validation rules for Contains + + // no validation rules for NotContains + + // no validation rules for Strict + + // no validation rules for IgnoreEmpty + + switch v := m.WellKnown.(type) { + case *StringRules_Email: + if v == nil { + err := StringRulesValidationError{ + field: "WellKnown", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Email + case *StringRules_Hostname: + if v == nil { + err := StringRulesValidationError{ + field: "WellKnown", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Hostname + case *StringRules_Ip: + if v == nil { + err := StringRulesValidationError{ + field: "WellKnown", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Ip + case *StringRules_Ipv4: + if v == nil { + err := StringRulesValidationError{ + field: "WellKnown", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Ipv4 + case *StringRules_Ipv6: + if v == nil { + err := StringRulesValidationError{ + field: "WellKnown", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Ipv6 + case *StringRules_Uri: + if v == nil { + err := StringRulesValidationError{ + field: "WellKnown", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Uri + case *StringRules_UriRef: + if v == nil { + err := StringRulesValidationError{ + field: "WellKnown", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for UriRef + case *StringRules_Address: + if v == nil { + err := StringRulesValidationError{ + field: "WellKnown", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Address + case *StringRules_Uuid: + if v == nil { + err := StringRulesValidationError{ + field: "WellKnown", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Uuid + case *StringRules_WellKnownRegex: + if v == nil { + err := StringRulesValidationError{ + field: "WellKnown", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for WellKnownRegex + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return StringRulesMultiError(errors) + } + + return nil +} + +// StringRulesMultiError is an error wrapping multiple validation errors +// returned by StringRules.ValidateAll() if the designated constraints aren't met. +type StringRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m StringRulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m StringRulesMultiError) AllErrors() []error { return m } + +// StringRulesValidationError is the validation error returned by +// StringRules.Validate if the designated constraints aren't met. +type StringRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e StringRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e StringRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e StringRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e StringRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e StringRulesValidationError) ErrorName() string { return "StringRulesValidationError" } + +// Error satisfies the builtin error interface +func (e StringRulesValidationError) 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 %sStringRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = StringRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = StringRulesValidationError{} + +// Validate checks the field values on BytesRules with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *BytesRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on BytesRules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in BytesRulesMultiError, or +// nil if none found. +func (m *BytesRules) ValidateAll() error { + return m.validate(true) +} + +func (m *BytesRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Const + + // no validation rules for Len + + // no validation rules for MinLen + + // no validation rules for MaxLen + + // no validation rules for Pattern + + // no validation rules for Prefix + + // no validation rules for Suffix + + // no validation rules for Contains + + // no validation rules for IgnoreEmpty + + switch v := m.WellKnown.(type) { + case *BytesRules_Ip: + if v == nil { + err := BytesRulesValidationError{ + field: "WellKnown", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Ip + case *BytesRules_Ipv4: + if v == nil { + err := BytesRulesValidationError{ + field: "WellKnown", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Ipv4 + case *BytesRules_Ipv6: + if v == nil { + err := BytesRulesValidationError{ + field: "WellKnown", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + // no validation rules for Ipv6 + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return BytesRulesMultiError(errors) + } + + return nil +} + +// BytesRulesMultiError is an error wrapping multiple validation errors +// returned by BytesRules.ValidateAll() if the designated constraints aren't met. +type BytesRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m BytesRulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m BytesRulesMultiError) AllErrors() []error { return m } + +// BytesRulesValidationError is the validation error returned by +// BytesRules.Validate if the designated constraints aren't met. +type BytesRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e BytesRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e BytesRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e BytesRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e BytesRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e BytesRulesValidationError) ErrorName() string { return "BytesRulesValidationError" } + +// Error satisfies the builtin error interface +func (e BytesRulesValidationError) 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 %sBytesRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = BytesRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = BytesRulesValidationError{} + +// Validate checks the field values on EnumRules with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *EnumRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on EnumRules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in EnumRulesMultiError, or nil +// if none found. +func (m *EnumRules) ValidateAll() error { + return m.validate(true) +} + +func (m *EnumRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Const + + // no validation rules for DefinedOnly + + if len(errors) > 0 { + return EnumRulesMultiError(errors) + } + + return nil +} + +// EnumRulesMultiError is an error wrapping multiple validation errors returned +// by EnumRules.ValidateAll() if the designated constraints aren't met. +type EnumRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m EnumRulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m EnumRulesMultiError) AllErrors() []error { return m } + +// EnumRulesValidationError is the validation error returned by +// EnumRules.Validate if the designated constraints aren't met. +type EnumRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e EnumRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e EnumRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e EnumRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e EnumRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e EnumRulesValidationError) ErrorName() string { return "EnumRulesValidationError" } + +// Error satisfies the builtin error interface +func (e EnumRulesValidationError) 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 %sEnumRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = EnumRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = EnumRulesValidationError{} + +// Validate checks the field values on MessageRules with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *MessageRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MessageRules with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MessageRulesMultiError, or +// nil if none found. +func (m *MessageRules) ValidateAll() error { + return m.validate(true) +} + +func (m *MessageRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Skip + + // no validation rules for Required + + if len(errors) > 0 { + return MessageRulesMultiError(errors) + } + + return nil +} + +// MessageRulesMultiError is an error wrapping multiple validation errors +// returned by MessageRules.ValidateAll() if the designated constraints aren't met. +type MessageRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MessageRulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MessageRulesMultiError) AllErrors() []error { return m } + +// MessageRulesValidationError is the validation error returned by +// MessageRules.Validate if the designated constraints aren't met. +type MessageRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MessageRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MessageRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MessageRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MessageRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MessageRulesValidationError) ErrorName() string { return "MessageRulesValidationError" } + +// Error satisfies the builtin error interface +func (e MessageRulesValidationError) 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 %sMessageRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MessageRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MessageRulesValidationError{} + +// Validate checks the field values on RepeatedRules with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *RepeatedRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RepeatedRules with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in RepeatedRulesMultiError, or +// nil if none found. +func (m *RepeatedRules) ValidateAll() error { + return m.validate(true) +} + +func (m *RepeatedRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for MinItems + + // no validation rules for MaxItems + + // no validation rules for Unique + + if all { + switch v := interface{}(m.GetItems()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, RepeatedRulesValidationError{ + field: "Items", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, RepeatedRulesValidationError{ + field: "Items", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetItems()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return RepeatedRulesValidationError{ + field: "Items", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for IgnoreEmpty + + if len(errors) > 0 { + return RepeatedRulesMultiError(errors) + } + + return nil +} + +// RepeatedRulesMultiError is an error wrapping multiple validation errors +// returned by RepeatedRules.ValidateAll() if the designated constraints +// aren't met. +type RepeatedRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RepeatedRulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RepeatedRulesMultiError) AllErrors() []error { return m } + +// RepeatedRulesValidationError is the validation error returned by +// RepeatedRules.Validate if the designated constraints aren't met. +type RepeatedRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RepeatedRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RepeatedRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RepeatedRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RepeatedRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RepeatedRulesValidationError) ErrorName() string { return "RepeatedRulesValidationError" } + +// Error satisfies the builtin error interface +func (e RepeatedRulesValidationError) 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 %sRepeatedRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RepeatedRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RepeatedRulesValidationError{} + +// Validate checks the field values on MapRules with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *MapRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on MapRules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in MapRulesMultiError, or nil +// if none found. +func (m *MapRules) ValidateAll() error { + return m.validate(true) +} + +func (m *MapRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for MinPairs + + // no validation rules for MaxPairs + + // no validation rules for NoSparse + + if all { + switch v := interface{}(m.GetKeys()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MapRulesValidationError{ + field: "Keys", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MapRulesValidationError{ + field: "Keys", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetKeys()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MapRulesValidationError{ + field: "Keys", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetValues()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, MapRulesValidationError{ + field: "Values", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, MapRulesValidationError{ + field: "Values", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetValues()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return MapRulesValidationError{ + field: "Values", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for IgnoreEmpty + + if len(errors) > 0 { + return MapRulesMultiError(errors) + } + + return nil +} + +// MapRulesMultiError is an error wrapping multiple validation errors returned +// by MapRules.ValidateAll() if the designated constraints aren't met. +type MapRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m MapRulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m MapRulesMultiError) AllErrors() []error { return m } + +// MapRulesValidationError is the validation error returned by +// MapRules.Validate if the designated constraints aren't met. +type MapRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e MapRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e MapRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e MapRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e MapRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e MapRulesValidationError) ErrorName() string { return "MapRulesValidationError" } + +// Error satisfies the builtin error interface +func (e MapRulesValidationError) 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 %sMapRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = MapRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = MapRulesValidationError{} + +// Validate checks the field values on AnyRules with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *AnyRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AnyRules with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in AnyRulesMultiError, or nil +// if none found. +func (m *AnyRules) ValidateAll() error { + return m.validate(true) +} + +func (m *AnyRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Required + + if len(errors) > 0 { + return AnyRulesMultiError(errors) + } + + return nil +} + +// AnyRulesMultiError is an error wrapping multiple validation errors returned +// by AnyRules.ValidateAll() if the designated constraints aren't met. +type AnyRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AnyRulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AnyRulesMultiError) AllErrors() []error { return m } + +// AnyRulesValidationError is the validation error returned by +// AnyRules.Validate if the designated constraints aren't met. +type AnyRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AnyRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AnyRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AnyRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AnyRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AnyRulesValidationError) ErrorName() string { return "AnyRulesValidationError" } + +// Error satisfies the builtin error interface +func (e AnyRulesValidationError) 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 %sAnyRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AnyRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AnyRulesValidationError{} + +// Validate checks the field values on DurationRules with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *DurationRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on DurationRules with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in DurationRulesMultiError, or +// nil if none found. +func (m *DurationRules) ValidateAll() error { + return m.validate(true) +} + +func (m *DurationRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Required + + if all { + switch v := interface{}(m.GetConst()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DurationRulesValidationError{ + field: "Const", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DurationRulesValidationError{ + field: "Const", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConst()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DurationRulesValidationError{ + field: "Const", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DurationRulesValidationError{ + field: "Lt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DurationRulesValidationError{ + field: "Lt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLt()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DurationRulesValidationError{ + field: "Lt", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DurationRulesValidationError{ + field: "Lte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DurationRulesValidationError{ + field: "Lte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLte()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DurationRulesValidationError{ + field: "Lte", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetGt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DurationRulesValidationError{ + field: "Gt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DurationRulesValidationError{ + field: "Gt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGt()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DurationRulesValidationError{ + field: "Gt", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetGte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DurationRulesValidationError{ + field: "Gte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DurationRulesValidationError{ + field: "Gte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGte()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DurationRulesValidationError{ + field: "Gte", + reason: "embedded message failed validation", + cause: err, + } + } + } + + for idx, item := range m.GetIn() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DurationRulesValidationError{ + field: fmt.Sprintf("In[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DurationRulesValidationError{ + field: fmt.Sprintf("In[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DurationRulesValidationError{ + field: fmt.Sprintf("In[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + for idx, item := range m.GetNotIn() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, DurationRulesValidationError{ + field: fmt.Sprintf("NotIn[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, DurationRulesValidationError{ + field: fmt.Sprintf("NotIn[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return DurationRulesValidationError{ + field: fmt.Sprintf("NotIn[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return DurationRulesMultiError(errors) + } + + return nil +} + +// DurationRulesMultiError is an error wrapping multiple validation errors +// returned by DurationRules.ValidateAll() if the designated constraints +// aren't met. +type DurationRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m DurationRulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m DurationRulesMultiError) AllErrors() []error { return m } + +// DurationRulesValidationError is the validation error returned by +// DurationRules.Validate if the designated constraints aren't met. +type DurationRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e DurationRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e DurationRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e DurationRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e DurationRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e DurationRulesValidationError) ErrorName() string { return "DurationRulesValidationError" } + +// Error satisfies the builtin error interface +func (e DurationRulesValidationError) 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 %sDurationRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = DurationRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = DurationRulesValidationError{} + +// Validate checks the field values on TimestampRules with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *TimestampRules) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on TimestampRules with the rules defined +// in the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in TimestampRulesMultiError, +// or nil if none found. +func (m *TimestampRules) ValidateAll() error { + return m.validate(true) +} + +func (m *TimestampRules) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Required + + if all { + switch v := interface{}(m.GetConst()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TimestampRulesValidationError{ + field: "Const", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TimestampRulesValidationError{ + field: "Const", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetConst()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TimestampRulesValidationError{ + field: "Const", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TimestampRulesValidationError{ + field: "Lt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TimestampRulesValidationError{ + field: "Lt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLt()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TimestampRulesValidationError{ + field: "Lt", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetLte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TimestampRulesValidationError{ + field: "Lte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TimestampRulesValidationError{ + field: "Lte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetLte()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TimestampRulesValidationError{ + field: "Lte", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetGt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TimestampRulesValidationError{ + field: "Gt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TimestampRulesValidationError{ + field: "Gt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGt()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TimestampRulesValidationError{ + field: "Gt", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetGte()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TimestampRulesValidationError{ + field: "Gte", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TimestampRulesValidationError{ + field: "Gte", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetGte()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TimestampRulesValidationError{ + field: "Gte", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for LtNow + + // no validation rules for GtNow + + if all { + switch v := interface{}(m.GetWithin()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, TimestampRulesValidationError{ + field: "Within", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, TimestampRulesValidationError{ + field: "Within", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetWithin()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return TimestampRulesValidationError{ + field: "Within", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return TimestampRulesMultiError(errors) + } + + return nil +} + +// TimestampRulesMultiError is an error wrapping multiple validation errors +// returned by TimestampRules.ValidateAll() if the designated constraints +// aren't met. +type TimestampRulesMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m TimestampRulesMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m TimestampRulesMultiError) AllErrors() []error { return m } + +// TimestampRulesValidationError is the validation error returned by +// TimestampRules.Validate if the designated constraints aren't met. +type TimestampRulesValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e TimestampRulesValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e TimestampRulesValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e TimestampRulesValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e TimestampRulesValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e TimestampRulesValidationError) ErrorName() string { return "TimestampRulesValidationError" } + +// Error satisfies the builtin error interface +func (e TimestampRulesValidationError) 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 %sTimestampRules.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = TimestampRulesValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = TimestampRulesValidationError{} diff --git a/proto/validate/validate_grpc_pb.js b/proto/validate/validate_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/validate/validate_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/validate/validate_pb.d.ts b/proto/validate/validate_pb.d.ts new file mode 100644 index 000000000..377a508cc --- /dev/null +++ b/proto/validate/validate_pb.d.ts @@ -0,0 +1,1624 @@ +// package: validate +// file: validate/validate.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +export class FieldRules extends jspb.Message { + + hasMessage(): boolean; + clearMessage(): void; + getMessage(): MessageRules | undefined; + setMessage(value?: MessageRules): FieldRules; + + hasFloat(): boolean; + clearFloat(): void; + getFloat(): FloatRules | undefined; + setFloat(value?: FloatRules): FieldRules; + + hasDouble(): boolean; + clearDouble(): void; + getDouble(): DoubleRules | undefined; + setDouble(value?: DoubleRules): FieldRules; + + hasInt32(): boolean; + clearInt32(): void; + getInt32(): Int32Rules | undefined; + setInt32(value?: Int32Rules): FieldRules; + + hasInt64(): boolean; + clearInt64(): void; + getInt64(): Int64Rules | undefined; + setInt64(value?: Int64Rules): FieldRules; + + hasUint32(): boolean; + clearUint32(): void; + getUint32(): UInt32Rules | undefined; + setUint32(value?: UInt32Rules): FieldRules; + + hasUint64(): boolean; + clearUint64(): void; + getUint64(): UInt64Rules | undefined; + setUint64(value?: UInt64Rules): FieldRules; + + hasSint32(): boolean; + clearSint32(): void; + getSint32(): SInt32Rules | undefined; + setSint32(value?: SInt32Rules): FieldRules; + + hasSint64(): boolean; + clearSint64(): void; + getSint64(): SInt64Rules | undefined; + setSint64(value?: SInt64Rules): FieldRules; + + hasFixed32(): boolean; + clearFixed32(): void; + getFixed32(): Fixed32Rules | undefined; + setFixed32(value?: Fixed32Rules): FieldRules; + + hasFixed64(): boolean; + clearFixed64(): void; + getFixed64(): Fixed64Rules | undefined; + setFixed64(value?: Fixed64Rules): FieldRules; + + hasSfixed32(): boolean; + clearSfixed32(): void; + getSfixed32(): SFixed32Rules | undefined; + setSfixed32(value?: SFixed32Rules): FieldRules; + + hasSfixed64(): boolean; + clearSfixed64(): void; + getSfixed64(): SFixed64Rules | undefined; + setSfixed64(value?: SFixed64Rules): FieldRules; + + hasBool(): boolean; + clearBool(): void; + getBool(): BoolRules | undefined; + setBool(value?: BoolRules): FieldRules; + + hasString(): boolean; + clearString(): void; + getString(): StringRules | undefined; + setString(value?: StringRules): FieldRules; + + hasBytes(): boolean; + clearBytes(): void; + getBytes(): BytesRules | undefined; + setBytes(value?: BytesRules): FieldRules; + + hasEnum(): boolean; + clearEnum(): void; + getEnum(): EnumRules | undefined; + setEnum(value?: EnumRules): FieldRules; + + hasRepeated(): boolean; + clearRepeated(): void; + getRepeated(): RepeatedRules | undefined; + setRepeated(value?: RepeatedRules): FieldRules; + + hasMap(): boolean; + clearMap(): void; + getMap(): MapRules | undefined; + setMap(value?: MapRules): FieldRules; + + hasAny(): boolean; + clearAny(): void; + getAny(): AnyRules | undefined; + setAny(value?: AnyRules): FieldRules; + + hasDuration(): boolean; + clearDuration(): void; + getDuration(): DurationRules | undefined; + setDuration(value?: DurationRules): FieldRules; + + hasTimestamp(): boolean; + clearTimestamp(): void; + getTimestamp(): TimestampRules | undefined; + setTimestamp(value?: TimestampRules): FieldRules; + + getTypeCase(): FieldRules.TypeCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldRules.AsObject; + static toObject(includeInstance: boolean, msg: FieldRules): FieldRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldRules; + static deserializeBinaryFromReader(message: FieldRules, reader: jspb.BinaryReader): FieldRules; +} + +export namespace FieldRules { + export type AsObject = { + message?: MessageRules.AsObject, + pb_float?: FloatRules.AsObject, + pb_double?: DoubleRules.AsObject, + int32?: Int32Rules.AsObject, + int64?: Int64Rules.AsObject, + uint32?: UInt32Rules.AsObject, + uint64?: UInt64Rules.AsObject, + sint32?: SInt32Rules.AsObject, + sint64?: SInt64Rules.AsObject, + fixed32?: Fixed32Rules.AsObject, + fixed64?: Fixed64Rules.AsObject, + sfixed32?: SFixed32Rules.AsObject, + sfixed64?: SFixed64Rules.AsObject, + bool?: BoolRules.AsObject, + string?: StringRules.AsObject, + bytes?: BytesRules.AsObject, + pb_enum?: EnumRules.AsObject, + repeated?: RepeatedRules.AsObject, + map?: MapRules.AsObject, + any?: AnyRules.AsObject, + duration?: DurationRules.AsObject, + timestamp?: TimestampRules.AsObject, + } + + export enum TypeCase { + TYPE_NOT_SET = 0, + FLOAT = 1, + DOUBLE = 2, + INT32 = 3, + INT64 = 4, + UINT32 = 5, + UINT64 = 6, + SINT32 = 7, + SINT64 = 8, + FIXED32 = 9, + FIXED64 = 10, + SFIXED32 = 11, + SFIXED64 = 12, + BOOL = 13, + STRING = 14, + BYTES = 15, + ENUM = 16, + REPEATED = 18, + MAP = 19, + ANY = 20, + DURATION = 21, + TIMESTAMP = 22, + } + +} + +export class FloatRules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): FloatRules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): FloatRules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): FloatRules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): FloatRules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): FloatRules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): FloatRules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): FloatRules; + addNotIn(value: number, index?: number): number; + + hasIgnoreEmpty(): boolean; + clearIgnoreEmpty(): void; + getIgnoreEmpty(): boolean | undefined; + setIgnoreEmpty(value: boolean): FloatRules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FloatRules.AsObject; + static toObject(includeInstance: boolean, msg: FloatRules): FloatRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FloatRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FloatRules; + static deserializeBinaryFromReader(message: FloatRules, reader: jspb.BinaryReader): FloatRules; +} + +export namespace FloatRules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + ignoreEmpty?: boolean, + } +} + +export class DoubleRules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): DoubleRules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): DoubleRules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): DoubleRules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): DoubleRules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): DoubleRules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): DoubleRules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): DoubleRules; + addNotIn(value: number, index?: number): number; + + hasIgnoreEmpty(): boolean; + clearIgnoreEmpty(): void; + getIgnoreEmpty(): boolean | undefined; + setIgnoreEmpty(value: boolean): DoubleRules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DoubleRules.AsObject; + static toObject(includeInstance: boolean, msg: DoubleRules): DoubleRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DoubleRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DoubleRules; + static deserializeBinaryFromReader(message: DoubleRules, reader: jspb.BinaryReader): DoubleRules; +} + +export namespace DoubleRules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + ignoreEmpty?: boolean, + } +} + +export class Int32Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): Int32Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): Int32Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): Int32Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): Int32Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): Int32Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): Int32Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): Int32Rules; + addNotIn(value: number, index?: number): number; + + hasIgnoreEmpty(): boolean; + clearIgnoreEmpty(): void; + getIgnoreEmpty(): boolean | undefined; + setIgnoreEmpty(value: boolean): Int32Rules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Int32Rules.AsObject; + static toObject(includeInstance: boolean, msg: Int32Rules): Int32Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Int32Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Int32Rules; + static deserializeBinaryFromReader(message: Int32Rules, reader: jspb.BinaryReader): Int32Rules; +} + +export namespace Int32Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + ignoreEmpty?: boolean, + } +} + +export class Int64Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): Int64Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): Int64Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): Int64Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): Int64Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): Int64Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): Int64Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): Int64Rules; + addNotIn(value: number, index?: number): number; + + hasIgnoreEmpty(): boolean; + clearIgnoreEmpty(): void; + getIgnoreEmpty(): boolean | undefined; + setIgnoreEmpty(value: boolean): Int64Rules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Int64Rules.AsObject; + static toObject(includeInstance: boolean, msg: Int64Rules): Int64Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Int64Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Int64Rules; + static deserializeBinaryFromReader(message: Int64Rules, reader: jspb.BinaryReader): Int64Rules; +} + +export namespace Int64Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + ignoreEmpty?: boolean, + } +} + +export class UInt32Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): UInt32Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): UInt32Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): UInt32Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): UInt32Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): UInt32Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): UInt32Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): UInt32Rules; + addNotIn(value: number, index?: number): number; + + hasIgnoreEmpty(): boolean; + clearIgnoreEmpty(): void; + getIgnoreEmpty(): boolean | undefined; + setIgnoreEmpty(value: boolean): UInt32Rules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UInt32Rules.AsObject; + static toObject(includeInstance: boolean, msg: UInt32Rules): UInt32Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UInt32Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UInt32Rules; + static deserializeBinaryFromReader(message: UInt32Rules, reader: jspb.BinaryReader): UInt32Rules; +} + +export namespace UInt32Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + ignoreEmpty?: boolean, + } +} + +export class UInt64Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): UInt64Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): UInt64Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): UInt64Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): UInt64Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): UInt64Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): UInt64Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): UInt64Rules; + addNotIn(value: number, index?: number): number; + + hasIgnoreEmpty(): boolean; + clearIgnoreEmpty(): void; + getIgnoreEmpty(): boolean | undefined; + setIgnoreEmpty(value: boolean): UInt64Rules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UInt64Rules.AsObject; + static toObject(includeInstance: boolean, msg: UInt64Rules): UInt64Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UInt64Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UInt64Rules; + static deserializeBinaryFromReader(message: UInt64Rules, reader: jspb.BinaryReader): UInt64Rules; +} + +export namespace UInt64Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + ignoreEmpty?: boolean, + } +} + +export class SInt32Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): SInt32Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): SInt32Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): SInt32Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): SInt32Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): SInt32Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): SInt32Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): SInt32Rules; + addNotIn(value: number, index?: number): number; + + hasIgnoreEmpty(): boolean; + clearIgnoreEmpty(): void; + getIgnoreEmpty(): boolean | undefined; + setIgnoreEmpty(value: boolean): SInt32Rules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SInt32Rules.AsObject; + static toObject(includeInstance: boolean, msg: SInt32Rules): SInt32Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SInt32Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SInt32Rules; + static deserializeBinaryFromReader(message: SInt32Rules, reader: jspb.BinaryReader): SInt32Rules; +} + +export namespace SInt32Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + ignoreEmpty?: boolean, + } +} + +export class SInt64Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): SInt64Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): SInt64Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): SInt64Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): SInt64Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): SInt64Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): SInt64Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): SInt64Rules; + addNotIn(value: number, index?: number): number; + + hasIgnoreEmpty(): boolean; + clearIgnoreEmpty(): void; + getIgnoreEmpty(): boolean | undefined; + setIgnoreEmpty(value: boolean): SInt64Rules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SInt64Rules.AsObject; + static toObject(includeInstance: boolean, msg: SInt64Rules): SInt64Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SInt64Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SInt64Rules; + static deserializeBinaryFromReader(message: SInt64Rules, reader: jspb.BinaryReader): SInt64Rules; +} + +export namespace SInt64Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + ignoreEmpty?: boolean, + } +} + +export class Fixed32Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): Fixed32Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): Fixed32Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): Fixed32Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): Fixed32Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): Fixed32Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): Fixed32Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): Fixed32Rules; + addNotIn(value: number, index?: number): number; + + hasIgnoreEmpty(): boolean; + clearIgnoreEmpty(): void; + getIgnoreEmpty(): boolean | undefined; + setIgnoreEmpty(value: boolean): Fixed32Rules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Fixed32Rules.AsObject; + static toObject(includeInstance: boolean, msg: Fixed32Rules): Fixed32Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Fixed32Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Fixed32Rules; + static deserializeBinaryFromReader(message: Fixed32Rules, reader: jspb.BinaryReader): Fixed32Rules; +} + +export namespace Fixed32Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + ignoreEmpty?: boolean, + } +} + +export class Fixed64Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): Fixed64Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): Fixed64Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): Fixed64Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): Fixed64Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): Fixed64Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): Fixed64Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): Fixed64Rules; + addNotIn(value: number, index?: number): number; + + hasIgnoreEmpty(): boolean; + clearIgnoreEmpty(): void; + getIgnoreEmpty(): boolean | undefined; + setIgnoreEmpty(value: boolean): Fixed64Rules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Fixed64Rules.AsObject; + static toObject(includeInstance: boolean, msg: Fixed64Rules): Fixed64Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Fixed64Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Fixed64Rules; + static deserializeBinaryFromReader(message: Fixed64Rules, reader: jspb.BinaryReader): Fixed64Rules; +} + +export namespace Fixed64Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + ignoreEmpty?: boolean, + } +} + +export class SFixed32Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): SFixed32Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): SFixed32Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): SFixed32Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): SFixed32Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): SFixed32Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): SFixed32Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): SFixed32Rules; + addNotIn(value: number, index?: number): number; + + hasIgnoreEmpty(): boolean; + clearIgnoreEmpty(): void; + getIgnoreEmpty(): boolean | undefined; + setIgnoreEmpty(value: boolean): SFixed32Rules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SFixed32Rules.AsObject; + static toObject(includeInstance: boolean, msg: SFixed32Rules): SFixed32Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SFixed32Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SFixed32Rules; + static deserializeBinaryFromReader(message: SFixed32Rules, reader: jspb.BinaryReader): SFixed32Rules; +} + +export namespace SFixed32Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + ignoreEmpty?: boolean, + } +} + +export class SFixed64Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): SFixed64Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): SFixed64Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): SFixed64Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): SFixed64Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): SFixed64Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): SFixed64Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): SFixed64Rules; + addNotIn(value: number, index?: number): number; + + hasIgnoreEmpty(): boolean; + clearIgnoreEmpty(): void; + getIgnoreEmpty(): boolean | undefined; + setIgnoreEmpty(value: boolean): SFixed64Rules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SFixed64Rules.AsObject; + static toObject(includeInstance: boolean, msg: SFixed64Rules): SFixed64Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SFixed64Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SFixed64Rules; + static deserializeBinaryFromReader(message: SFixed64Rules, reader: jspb.BinaryReader): SFixed64Rules; +} + +export namespace SFixed64Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + ignoreEmpty?: boolean, + } +} + +export class BoolRules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): boolean | undefined; + setConst(value: boolean): BoolRules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BoolRules.AsObject; + static toObject(includeInstance: boolean, msg: BoolRules): BoolRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BoolRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BoolRules; + static deserializeBinaryFromReader(message: BoolRules, reader: jspb.BinaryReader): BoolRules; +} + +export namespace BoolRules { + export type AsObject = { + pb_const?: boolean, + } +} + +export class StringRules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): string | undefined; + setConst(value: string): StringRules; + + hasLen(): boolean; + clearLen(): void; + getLen(): number | undefined; + setLen(value: number): StringRules; + + hasMinLen(): boolean; + clearMinLen(): void; + getMinLen(): number | undefined; + setMinLen(value: number): StringRules; + + hasMaxLen(): boolean; + clearMaxLen(): void; + getMaxLen(): number | undefined; + setMaxLen(value: number): StringRules; + + hasLenBytes(): boolean; + clearLenBytes(): void; + getLenBytes(): number | undefined; + setLenBytes(value: number): StringRules; + + hasMinBytes(): boolean; + clearMinBytes(): void; + getMinBytes(): number | undefined; + setMinBytes(value: number): StringRules; + + hasMaxBytes(): boolean; + clearMaxBytes(): void; + getMaxBytes(): number | undefined; + setMaxBytes(value: number): StringRules; + + hasPattern(): boolean; + clearPattern(): void; + getPattern(): string | undefined; + setPattern(value: string): StringRules; + + hasPrefix(): boolean; + clearPrefix(): void; + getPrefix(): string | undefined; + setPrefix(value: string): StringRules; + + hasSuffix(): boolean; + clearSuffix(): void; + getSuffix(): string | undefined; + setSuffix(value: string): StringRules; + + hasContains(): boolean; + clearContains(): void; + getContains(): string | undefined; + setContains(value: string): StringRules; + + hasNotContains(): boolean; + clearNotContains(): void; + getNotContains(): string | undefined; + setNotContains(value: string): StringRules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): StringRules; + addIn(value: string, index?: number): string; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): StringRules; + addNotIn(value: string, index?: number): string; + + hasEmail(): boolean; + clearEmail(): void; + getEmail(): boolean | undefined; + setEmail(value: boolean): StringRules; + + hasHostname(): boolean; + clearHostname(): void; + getHostname(): boolean | undefined; + setHostname(value: boolean): StringRules; + + hasIp(): boolean; + clearIp(): void; + getIp(): boolean | undefined; + setIp(value: boolean): StringRules; + + hasIpv4(): boolean; + clearIpv4(): void; + getIpv4(): boolean | undefined; + setIpv4(value: boolean): StringRules; + + hasIpv6(): boolean; + clearIpv6(): void; + getIpv6(): boolean | undefined; + setIpv6(value: boolean): StringRules; + + hasUri(): boolean; + clearUri(): void; + getUri(): boolean | undefined; + setUri(value: boolean): StringRules; + + hasUriRef(): boolean; + clearUriRef(): void; + getUriRef(): boolean | undefined; + setUriRef(value: boolean): StringRules; + + hasAddress(): boolean; + clearAddress(): void; + getAddress(): boolean | undefined; + setAddress(value: boolean): StringRules; + + hasUuid(): boolean; + clearUuid(): void; + getUuid(): boolean | undefined; + setUuid(value: boolean): StringRules; + + hasWellKnownRegex(): boolean; + clearWellKnownRegex(): void; + getWellKnownRegex(): KnownRegex | undefined; + setWellKnownRegex(value: KnownRegex): StringRules; + + hasStrict(): boolean; + clearStrict(): void; + getStrict(): boolean | undefined; + setStrict(value: boolean): StringRules; + + hasIgnoreEmpty(): boolean; + clearIgnoreEmpty(): void; + getIgnoreEmpty(): boolean | undefined; + setIgnoreEmpty(value: boolean): StringRules; + + getWellKnownCase(): StringRules.WellKnownCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StringRules.AsObject; + static toObject(includeInstance: boolean, msg: StringRules): StringRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StringRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StringRules; + static deserializeBinaryFromReader(message: StringRules, reader: jspb.BinaryReader): StringRules; +} + +export namespace StringRules { + export type AsObject = { + pb_const?: string, + len?: number, + minLen?: number, + maxLen?: number, + lenBytes?: number, + minBytes?: number, + maxBytes?: number, + pattern?: string, + prefix?: string, + suffix?: string, + contains?: string, + notContains?: string, + pb_inList: Array, + notInList: Array, + email?: boolean, + hostname?: boolean, + ip?: boolean, + ipv4?: boolean, + ipv6?: boolean, + uri?: boolean, + uriRef?: boolean, + address?: boolean, + uuid?: boolean, + wellKnownRegex?: KnownRegex, + strict?: boolean, + ignoreEmpty?: boolean, + } + + export enum WellKnownCase { + WELL_KNOWN_NOT_SET = 0, + EMAIL = 12, + HOSTNAME = 13, + IP = 14, + IPV4 = 15, + IPV6 = 16, + URI = 17, + URI_REF = 18, + ADDRESS = 21, + UUID = 22, + WELL_KNOWN_REGEX = 24, + } + +} + +export class BytesRules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): Uint8Array | string; + getConst_asU8(): Uint8Array; + getConst_asB64(): string; + setConst(value: Uint8Array | string): BytesRules; + + hasLen(): boolean; + clearLen(): void; + getLen(): number | undefined; + setLen(value: number): BytesRules; + + hasMinLen(): boolean; + clearMinLen(): void; + getMinLen(): number | undefined; + setMinLen(value: number): BytesRules; + + hasMaxLen(): boolean; + clearMaxLen(): void; + getMaxLen(): number | undefined; + setMaxLen(value: number): BytesRules; + + hasPattern(): boolean; + clearPattern(): void; + getPattern(): string | undefined; + setPattern(value: string): BytesRules; + + hasPrefix(): boolean; + clearPrefix(): void; + getPrefix(): Uint8Array | string; + getPrefix_asU8(): Uint8Array; + getPrefix_asB64(): string; + setPrefix(value: Uint8Array | string): BytesRules; + + hasSuffix(): boolean; + clearSuffix(): void; + getSuffix(): Uint8Array | string; + getSuffix_asU8(): Uint8Array; + getSuffix_asB64(): string; + setSuffix(value: Uint8Array | string): BytesRules; + + hasContains(): boolean; + clearContains(): void; + getContains(): Uint8Array | string; + getContains_asU8(): Uint8Array; + getContains_asB64(): string; + setContains(value: Uint8Array | string): BytesRules; + clearInList(): void; + getInList(): Array; + getInList_asU8(): Array; + getInList_asB64(): Array; + setInList(value: Array): BytesRules; + addIn(value: Uint8Array | string, index?: number): Uint8Array | string; + clearNotInList(): void; + getNotInList(): Array; + getNotInList_asU8(): Array; + getNotInList_asB64(): Array; + setNotInList(value: Array): BytesRules; + addNotIn(value: Uint8Array | string, index?: number): Uint8Array | string; + + hasIp(): boolean; + clearIp(): void; + getIp(): boolean | undefined; + setIp(value: boolean): BytesRules; + + hasIpv4(): boolean; + clearIpv4(): void; + getIpv4(): boolean | undefined; + setIpv4(value: boolean): BytesRules; + + hasIpv6(): boolean; + clearIpv6(): void; + getIpv6(): boolean | undefined; + setIpv6(value: boolean): BytesRules; + + hasIgnoreEmpty(): boolean; + clearIgnoreEmpty(): void; + getIgnoreEmpty(): boolean | undefined; + setIgnoreEmpty(value: boolean): BytesRules; + + getWellKnownCase(): BytesRules.WellKnownCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BytesRules.AsObject; + static toObject(includeInstance: boolean, msg: BytesRules): BytesRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BytesRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BytesRules; + static deserializeBinaryFromReader(message: BytesRules, reader: jspb.BinaryReader): BytesRules; +} + +export namespace BytesRules { + export type AsObject = { + pb_const: Uint8Array | string, + len?: number, + minLen?: number, + maxLen?: number, + pattern?: string, + prefix: Uint8Array | string, + suffix: Uint8Array | string, + contains: Uint8Array | string, + pb_inList: Array, + notInList: Array, + ip?: boolean, + ipv4?: boolean, + ipv6?: boolean, + ignoreEmpty?: boolean, + } + + export enum WellKnownCase { + WELL_KNOWN_NOT_SET = 0, + IP = 10, + IPV4 = 11, + IPV6 = 12, + } + +} + +export class EnumRules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): EnumRules; + + hasDefinedOnly(): boolean; + clearDefinedOnly(): void; + getDefinedOnly(): boolean | undefined; + setDefinedOnly(value: boolean): EnumRules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): EnumRules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): EnumRules; + addNotIn(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumRules.AsObject; + static toObject(includeInstance: boolean, msg: EnumRules): EnumRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumRules; + static deserializeBinaryFromReader(message: EnumRules, reader: jspb.BinaryReader): EnumRules; +} + +export namespace EnumRules { + export type AsObject = { + pb_const?: number, + definedOnly?: boolean, + pb_inList: Array, + notInList: Array, + } +} + +export class MessageRules extends jspb.Message { + + hasSkip(): boolean; + clearSkip(): void; + getSkip(): boolean | undefined; + setSkip(value: boolean): MessageRules; + + hasRequired(): boolean; + clearRequired(): void; + getRequired(): boolean | undefined; + setRequired(value: boolean): MessageRules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MessageRules.AsObject; + static toObject(includeInstance: boolean, msg: MessageRules): MessageRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MessageRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MessageRules; + static deserializeBinaryFromReader(message: MessageRules, reader: jspb.BinaryReader): MessageRules; +} + +export namespace MessageRules { + export type AsObject = { + skip?: boolean, + required?: boolean, + } +} + +export class RepeatedRules extends jspb.Message { + + hasMinItems(): boolean; + clearMinItems(): void; + getMinItems(): number | undefined; + setMinItems(value: number): RepeatedRules; + + hasMaxItems(): boolean; + clearMaxItems(): void; + getMaxItems(): number | undefined; + setMaxItems(value: number): RepeatedRules; + + hasUnique(): boolean; + clearUnique(): void; + getUnique(): boolean | undefined; + setUnique(value: boolean): RepeatedRules; + + hasItems(): boolean; + clearItems(): void; + getItems(): FieldRules | undefined; + setItems(value?: FieldRules): RepeatedRules; + + hasIgnoreEmpty(): boolean; + clearIgnoreEmpty(): void; + getIgnoreEmpty(): boolean | undefined; + setIgnoreEmpty(value: boolean): RepeatedRules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RepeatedRules.AsObject; + static toObject(includeInstance: boolean, msg: RepeatedRules): RepeatedRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RepeatedRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RepeatedRules; + static deserializeBinaryFromReader(message: RepeatedRules, reader: jspb.BinaryReader): RepeatedRules; +} + +export namespace RepeatedRules { + export type AsObject = { + minItems?: number, + maxItems?: number, + unique?: boolean, + items?: FieldRules.AsObject, + ignoreEmpty?: boolean, + } +} + +export class MapRules extends jspb.Message { + + hasMinPairs(): boolean; + clearMinPairs(): void; + getMinPairs(): number | undefined; + setMinPairs(value: number): MapRules; + + hasMaxPairs(): boolean; + clearMaxPairs(): void; + getMaxPairs(): number | undefined; + setMaxPairs(value: number): MapRules; + + hasNoSparse(): boolean; + clearNoSparse(): void; + getNoSparse(): boolean | undefined; + setNoSparse(value: boolean): MapRules; + + hasKeys(): boolean; + clearKeys(): void; + getKeys(): FieldRules | undefined; + setKeys(value?: FieldRules): MapRules; + + hasValues(): boolean; + clearValues(): void; + getValues(): FieldRules | undefined; + setValues(value?: FieldRules): MapRules; + + hasIgnoreEmpty(): boolean; + clearIgnoreEmpty(): void; + getIgnoreEmpty(): boolean | undefined; + setIgnoreEmpty(value: boolean): MapRules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MapRules.AsObject; + static toObject(includeInstance: boolean, msg: MapRules): MapRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MapRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MapRules; + static deserializeBinaryFromReader(message: MapRules, reader: jspb.BinaryReader): MapRules; +} + +export namespace MapRules { + export type AsObject = { + minPairs?: number, + maxPairs?: number, + noSparse?: boolean, + keys?: FieldRules.AsObject, + values?: FieldRules.AsObject, + ignoreEmpty?: boolean, + } +} + +export class AnyRules extends jspb.Message { + + hasRequired(): boolean; + clearRequired(): void; + getRequired(): boolean | undefined; + setRequired(value: boolean): AnyRules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): AnyRules; + addIn(value: string, index?: number): string; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): AnyRules; + addNotIn(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AnyRules.AsObject; + static toObject(includeInstance: boolean, msg: AnyRules): AnyRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AnyRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AnyRules; + static deserializeBinaryFromReader(message: AnyRules, reader: jspb.BinaryReader): AnyRules; +} + +export namespace AnyRules { + export type AsObject = { + required?: boolean, + pb_inList: Array, + notInList: Array, + } +} + +export class DurationRules extends jspb.Message { + + hasRequired(): boolean; + clearRequired(): void; + getRequired(): boolean | undefined; + setRequired(value: boolean): DurationRules; + + hasConst(): boolean; + clearConst(): void; + getConst(): google_protobuf_duration_pb.Duration | undefined; + setConst(value?: google_protobuf_duration_pb.Duration): DurationRules; + + hasLt(): boolean; + clearLt(): void; + getLt(): google_protobuf_duration_pb.Duration | undefined; + setLt(value?: google_protobuf_duration_pb.Duration): DurationRules; + + hasLte(): boolean; + clearLte(): void; + getLte(): google_protobuf_duration_pb.Duration | undefined; + setLte(value?: google_protobuf_duration_pb.Duration): DurationRules; + + hasGt(): boolean; + clearGt(): void; + getGt(): google_protobuf_duration_pb.Duration | undefined; + setGt(value?: google_protobuf_duration_pb.Duration): DurationRules; + + hasGte(): boolean; + clearGte(): void; + getGte(): google_protobuf_duration_pb.Duration | undefined; + setGte(value?: google_protobuf_duration_pb.Duration): DurationRules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): DurationRules; + addIn(value?: google_protobuf_duration_pb.Duration, index?: number): google_protobuf_duration_pb.Duration; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): DurationRules; + addNotIn(value?: google_protobuf_duration_pb.Duration, index?: number): google_protobuf_duration_pb.Duration; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DurationRules.AsObject; + static toObject(includeInstance: boolean, msg: DurationRules): DurationRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DurationRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DurationRules; + static deserializeBinaryFromReader(message: DurationRules, reader: jspb.BinaryReader): DurationRules; +} + +export namespace DurationRules { + export type AsObject = { + required?: boolean, + pb_const?: google_protobuf_duration_pb.Duration.AsObject, + lt?: google_protobuf_duration_pb.Duration.AsObject, + lte?: google_protobuf_duration_pb.Duration.AsObject, + gt?: google_protobuf_duration_pb.Duration.AsObject, + gte?: google_protobuf_duration_pb.Duration.AsObject, + pb_inList: Array, + notInList: Array, + } +} + +export class TimestampRules extends jspb.Message { + + hasRequired(): boolean; + clearRequired(): void; + getRequired(): boolean | undefined; + setRequired(value: boolean): TimestampRules; + + hasConst(): boolean; + clearConst(): void; + getConst(): google_protobuf_timestamp_pb.Timestamp | undefined; + setConst(value?: google_protobuf_timestamp_pb.Timestamp): TimestampRules; + + hasLt(): boolean; + clearLt(): void; + getLt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLt(value?: google_protobuf_timestamp_pb.Timestamp): TimestampRules; + + hasLte(): boolean; + clearLte(): void; + getLte(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLte(value?: google_protobuf_timestamp_pb.Timestamp): TimestampRules; + + hasGt(): boolean; + clearGt(): void; + getGt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setGt(value?: google_protobuf_timestamp_pb.Timestamp): TimestampRules; + + hasGte(): boolean; + clearGte(): void; + getGte(): google_protobuf_timestamp_pb.Timestamp | undefined; + setGte(value?: google_protobuf_timestamp_pb.Timestamp): TimestampRules; + + hasLtNow(): boolean; + clearLtNow(): void; + getLtNow(): boolean | undefined; + setLtNow(value: boolean): TimestampRules; + + hasGtNow(): boolean; + clearGtNow(): void; + getGtNow(): boolean | undefined; + setGtNow(value: boolean): TimestampRules; + + hasWithin(): boolean; + clearWithin(): void; + getWithin(): google_protobuf_duration_pb.Duration | undefined; + setWithin(value?: google_protobuf_duration_pb.Duration): TimestampRules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TimestampRules.AsObject; + static toObject(includeInstance: boolean, msg: TimestampRules): TimestampRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TimestampRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TimestampRules; + static deserializeBinaryFromReader(message: TimestampRules, reader: jspb.BinaryReader): TimestampRules; +} + +export namespace TimestampRules { + export type AsObject = { + required?: boolean, + pb_const?: google_protobuf_timestamp_pb.Timestamp.AsObject, + lt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + lte?: google_protobuf_timestamp_pb.Timestamp.AsObject, + gt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + gte?: google_protobuf_timestamp_pb.Timestamp.AsObject, + ltNow?: boolean, + gtNow?: boolean, + within?: google_protobuf_duration_pb.Duration.AsObject, + } +} + +export const disabled: jspb.ExtensionFieldInfo; + +export const ignored: jspb.ExtensionFieldInfo; + +export const required: jspb.ExtensionFieldInfo; + +export const rules: jspb.ExtensionFieldInfo; + +export enum KnownRegex { + UNKNOWN = 0, + HTTP_HEADER_NAME = 1, + HTTP_HEADER_VALUE = 2, +} diff --git a/proto/validate/validate_pb.js b/proto/validate/validate_pb.js new file mode 100644 index 000000000..04c718691 --- /dev/null +++ b/proto/validate/validate_pb.js @@ -0,0 +1,12932 @@ +// source: validate/validate.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.validate.AnyRules', null, global); +goog.exportSymbol('proto.validate.BoolRules', null, global); +goog.exportSymbol('proto.validate.BytesRules', null, global); +goog.exportSymbol('proto.validate.BytesRules.WellKnownCase', null, global); +goog.exportSymbol('proto.validate.DoubleRules', null, global); +goog.exportSymbol('proto.validate.DurationRules', null, global); +goog.exportSymbol('proto.validate.EnumRules', null, global); +goog.exportSymbol('proto.validate.FieldRules', null, global); +goog.exportSymbol('proto.validate.FieldRules.TypeCase', null, global); +goog.exportSymbol('proto.validate.Fixed32Rules', null, global); +goog.exportSymbol('proto.validate.Fixed64Rules', null, global); +goog.exportSymbol('proto.validate.FloatRules', null, global); +goog.exportSymbol('proto.validate.Int32Rules', null, global); +goog.exportSymbol('proto.validate.Int64Rules', null, global); +goog.exportSymbol('proto.validate.KnownRegex', null, global); +goog.exportSymbol('proto.validate.MapRules', null, global); +goog.exportSymbol('proto.validate.MessageRules', null, global); +goog.exportSymbol('proto.validate.RepeatedRules', null, global); +goog.exportSymbol('proto.validate.SFixed32Rules', null, global); +goog.exportSymbol('proto.validate.SFixed64Rules', null, global); +goog.exportSymbol('proto.validate.SInt32Rules', null, global); +goog.exportSymbol('proto.validate.SInt64Rules', null, global); +goog.exportSymbol('proto.validate.StringRules', null, global); +goog.exportSymbol('proto.validate.StringRules.WellKnownCase', null, global); +goog.exportSymbol('proto.validate.TimestampRules', null, global); +goog.exportSymbol('proto.validate.UInt32Rules', null, global); +goog.exportSymbol('proto.validate.UInt64Rules', null, global); +goog.exportSymbol('proto.validate.disabled', null, global); +goog.exportSymbol('proto.validate.ignored', null, global); +goog.exportSymbol('proto.validate.required', null, global); +goog.exportSymbol('proto.validate.rules', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.FieldRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.validate.FieldRules.oneofGroups_); +}; +goog.inherits(proto.validate.FieldRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.FieldRules.displayName = 'proto.validate.FieldRules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.FloatRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.validate.FloatRules.repeatedFields_, null); +}; +goog.inherits(proto.validate.FloatRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.FloatRules.displayName = 'proto.validate.FloatRules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.DoubleRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.validate.DoubleRules.repeatedFields_, null); +}; +goog.inherits(proto.validate.DoubleRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.DoubleRules.displayName = 'proto.validate.DoubleRules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.Int32Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.validate.Int32Rules.repeatedFields_, null); +}; +goog.inherits(proto.validate.Int32Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.Int32Rules.displayName = 'proto.validate.Int32Rules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.Int64Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.validate.Int64Rules.repeatedFields_, null); +}; +goog.inherits(proto.validate.Int64Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.Int64Rules.displayName = 'proto.validate.Int64Rules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.UInt32Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.validate.UInt32Rules.repeatedFields_, null); +}; +goog.inherits(proto.validate.UInt32Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.UInt32Rules.displayName = 'proto.validate.UInt32Rules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.UInt64Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.validate.UInt64Rules.repeatedFields_, null); +}; +goog.inherits(proto.validate.UInt64Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.UInt64Rules.displayName = 'proto.validate.UInt64Rules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.SInt32Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.validate.SInt32Rules.repeatedFields_, null); +}; +goog.inherits(proto.validate.SInt32Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.SInt32Rules.displayName = 'proto.validate.SInt32Rules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.SInt64Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.validate.SInt64Rules.repeatedFields_, null); +}; +goog.inherits(proto.validate.SInt64Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.SInt64Rules.displayName = 'proto.validate.SInt64Rules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.Fixed32Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.validate.Fixed32Rules.repeatedFields_, null); +}; +goog.inherits(proto.validate.Fixed32Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.Fixed32Rules.displayName = 'proto.validate.Fixed32Rules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.Fixed64Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.validate.Fixed64Rules.repeatedFields_, null); +}; +goog.inherits(proto.validate.Fixed64Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.Fixed64Rules.displayName = 'proto.validate.Fixed64Rules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.SFixed32Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.validate.SFixed32Rules.repeatedFields_, null); +}; +goog.inherits(proto.validate.SFixed32Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.SFixed32Rules.displayName = 'proto.validate.SFixed32Rules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.SFixed64Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.validate.SFixed64Rules.repeatedFields_, null); +}; +goog.inherits(proto.validate.SFixed64Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.SFixed64Rules.displayName = 'proto.validate.SFixed64Rules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.BoolRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.validate.BoolRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.BoolRules.displayName = 'proto.validate.BoolRules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.StringRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.validate.StringRules.repeatedFields_, proto.validate.StringRules.oneofGroups_); +}; +goog.inherits(proto.validate.StringRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.StringRules.displayName = 'proto.validate.StringRules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.BytesRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.validate.BytesRules.repeatedFields_, proto.validate.BytesRules.oneofGroups_); +}; +goog.inherits(proto.validate.BytesRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.BytesRules.displayName = 'proto.validate.BytesRules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.EnumRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.validate.EnumRules.repeatedFields_, null); +}; +goog.inherits(proto.validate.EnumRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.EnumRules.displayName = 'proto.validate.EnumRules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.MessageRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.validate.MessageRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.MessageRules.displayName = 'proto.validate.MessageRules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.RepeatedRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.validate.RepeatedRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.RepeatedRules.displayName = 'proto.validate.RepeatedRules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.MapRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.validate.MapRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.MapRules.displayName = 'proto.validate.MapRules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.AnyRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.validate.AnyRules.repeatedFields_, null); +}; +goog.inherits(proto.validate.AnyRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.AnyRules.displayName = 'proto.validate.AnyRules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.DurationRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.validate.DurationRules.repeatedFields_, null); +}; +goog.inherits(proto.validate.DurationRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.DurationRules.displayName = 'proto.validate.DurationRules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.validate.TimestampRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.validate.TimestampRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.validate.TimestampRules.displayName = 'proto.validate.TimestampRules'; +} + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.validate.FieldRules.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20,21,22]]; + +/** + * @enum {number} + */ +proto.validate.FieldRules.TypeCase = { + TYPE_NOT_SET: 0, + FLOAT: 1, + DOUBLE: 2, + INT32: 3, + INT64: 4, + UINT32: 5, + UINT64: 6, + SINT32: 7, + SINT64: 8, + FIXED32: 9, + FIXED64: 10, + SFIXED32: 11, + SFIXED64: 12, + BOOL: 13, + STRING: 14, + BYTES: 15, + ENUM: 16, + REPEATED: 18, + MAP: 19, + ANY: 20, + DURATION: 21, + TIMESTAMP: 22 +}; + +/** + * @return {proto.validate.FieldRules.TypeCase} + */ +proto.validate.FieldRules.prototype.getTypeCase = function() { + return /** @type {proto.validate.FieldRules.TypeCase} */(jspb.Message.computeOneofCase(this, proto.validate.FieldRules.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.FieldRules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.FieldRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.FieldRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.FieldRules.toObject = function(includeInstance, msg) { + var f, obj = { + message: (f = msg.getMessage()) && proto.validate.MessageRules.toObject(includeInstance, f), + pb_float: (f = msg.getFloat()) && proto.validate.FloatRules.toObject(includeInstance, f), + pb_double: (f = msg.getDouble()) && proto.validate.DoubleRules.toObject(includeInstance, f), + int32: (f = msg.getInt32()) && proto.validate.Int32Rules.toObject(includeInstance, f), + int64: (f = msg.getInt64()) && proto.validate.Int64Rules.toObject(includeInstance, f), + uint32: (f = msg.getUint32()) && proto.validate.UInt32Rules.toObject(includeInstance, f), + uint64: (f = msg.getUint64()) && proto.validate.UInt64Rules.toObject(includeInstance, f), + sint32: (f = msg.getSint32()) && proto.validate.SInt32Rules.toObject(includeInstance, f), + sint64: (f = msg.getSint64()) && proto.validate.SInt64Rules.toObject(includeInstance, f), + fixed32: (f = msg.getFixed32()) && proto.validate.Fixed32Rules.toObject(includeInstance, f), + fixed64: (f = msg.getFixed64()) && proto.validate.Fixed64Rules.toObject(includeInstance, f), + sfixed32: (f = msg.getSfixed32()) && proto.validate.SFixed32Rules.toObject(includeInstance, f), + sfixed64: (f = msg.getSfixed64()) && proto.validate.SFixed64Rules.toObject(includeInstance, f), + bool: (f = msg.getBool()) && proto.validate.BoolRules.toObject(includeInstance, f), + string: (f = msg.getString()) && proto.validate.StringRules.toObject(includeInstance, f), + bytes: (f = msg.getBytes()) && proto.validate.BytesRules.toObject(includeInstance, f), + pb_enum: (f = msg.getEnum()) && proto.validate.EnumRules.toObject(includeInstance, f), + repeated: (f = msg.getRepeated()) && proto.validate.RepeatedRules.toObject(includeInstance, f), + map: (f = msg.getMap()) && proto.validate.MapRules.toObject(includeInstance, f), + any: (f = msg.getAny()) && proto.validate.AnyRules.toObject(includeInstance, f), + duration: (f = msg.getDuration()) && proto.validate.DurationRules.toObject(includeInstance, f), + timestamp: (f = msg.getTimestamp()) && proto.validate.TimestampRules.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.FieldRules} + */ +proto.validate.FieldRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.FieldRules; + return proto.validate.FieldRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.FieldRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.FieldRules} + */ +proto.validate.FieldRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 17: + var value = new proto.validate.MessageRules; + reader.readMessage(value,proto.validate.MessageRules.deserializeBinaryFromReader); + msg.setMessage(value); + break; + case 1: + var value = new proto.validate.FloatRules; + reader.readMessage(value,proto.validate.FloatRules.deserializeBinaryFromReader); + msg.setFloat(value); + break; + case 2: + var value = new proto.validate.DoubleRules; + reader.readMessage(value,proto.validate.DoubleRules.deserializeBinaryFromReader); + msg.setDouble(value); + break; + case 3: + var value = new proto.validate.Int32Rules; + reader.readMessage(value,proto.validate.Int32Rules.deserializeBinaryFromReader); + msg.setInt32(value); + break; + case 4: + var value = new proto.validate.Int64Rules; + reader.readMessage(value,proto.validate.Int64Rules.deserializeBinaryFromReader); + msg.setInt64(value); + break; + case 5: + var value = new proto.validate.UInt32Rules; + reader.readMessage(value,proto.validate.UInt32Rules.deserializeBinaryFromReader); + msg.setUint32(value); + break; + case 6: + var value = new proto.validate.UInt64Rules; + reader.readMessage(value,proto.validate.UInt64Rules.deserializeBinaryFromReader); + msg.setUint64(value); + break; + case 7: + var value = new proto.validate.SInt32Rules; + reader.readMessage(value,proto.validate.SInt32Rules.deserializeBinaryFromReader); + msg.setSint32(value); + break; + case 8: + var value = new proto.validate.SInt64Rules; + reader.readMessage(value,proto.validate.SInt64Rules.deserializeBinaryFromReader); + msg.setSint64(value); + break; + case 9: + var value = new proto.validate.Fixed32Rules; + reader.readMessage(value,proto.validate.Fixed32Rules.deserializeBinaryFromReader); + msg.setFixed32(value); + break; + case 10: + var value = new proto.validate.Fixed64Rules; + reader.readMessage(value,proto.validate.Fixed64Rules.deserializeBinaryFromReader); + msg.setFixed64(value); + break; + case 11: + var value = new proto.validate.SFixed32Rules; + reader.readMessage(value,proto.validate.SFixed32Rules.deserializeBinaryFromReader); + msg.setSfixed32(value); + break; + case 12: + var value = new proto.validate.SFixed64Rules; + reader.readMessage(value,proto.validate.SFixed64Rules.deserializeBinaryFromReader); + msg.setSfixed64(value); + break; + case 13: + var value = new proto.validate.BoolRules; + reader.readMessage(value,proto.validate.BoolRules.deserializeBinaryFromReader); + msg.setBool(value); + break; + case 14: + var value = new proto.validate.StringRules; + reader.readMessage(value,proto.validate.StringRules.deserializeBinaryFromReader); + msg.setString(value); + break; + case 15: + var value = new proto.validate.BytesRules; + reader.readMessage(value,proto.validate.BytesRules.deserializeBinaryFromReader); + msg.setBytes(value); + break; + case 16: + var value = new proto.validate.EnumRules; + reader.readMessage(value,proto.validate.EnumRules.deserializeBinaryFromReader); + msg.setEnum(value); + break; + case 18: + var value = new proto.validate.RepeatedRules; + reader.readMessage(value,proto.validate.RepeatedRules.deserializeBinaryFromReader); + msg.setRepeated(value); + break; + case 19: + var value = new proto.validate.MapRules; + reader.readMessage(value,proto.validate.MapRules.deserializeBinaryFromReader); + msg.setMap(value); + break; + case 20: + var value = new proto.validate.AnyRules; + reader.readMessage(value,proto.validate.AnyRules.deserializeBinaryFromReader); + msg.setAny(value); + break; + case 21: + var value = new proto.validate.DurationRules; + reader.readMessage(value,proto.validate.DurationRules.deserializeBinaryFromReader); + msg.setDuration(value); + break; + case 22: + var value = new proto.validate.TimestampRules; + reader.readMessage(value,proto.validate.TimestampRules.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.FieldRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.FieldRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.FieldRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.FieldRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessage(); + if (f != null) { + writer.writeMessage( + 17, + f, + proto.validate.MessageRules.serializeBinaryToWriter + ); + } + f = message.getFloat(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.validate.FloatRules.serializeBinaryToWriter + ); + } + f = message.getDouble(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.validate.DoubleRules.serializeBinaryToWriter + ); + } + f = message.getInt32(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.validate.Int32Rules.serializeBinaryToWriter + ); + } + f = message.getInt64(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.validate.Int64Rules.serializeBinaryToWriter + ); + } + f = message.getUint32(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.validate.UInt32Rules.serializeBinaryToWriter + ); + } + f = message.getUint64(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.validate.UInt64Rules.serializeBinaryToWriter + ); + } + f = message.getSint32(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.validate.SInt32Rules.serializeBinaryToWriter + ); + } + f = message.getSint64(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.validate.SInt64Rules.serializeBinaryToWriter + ); + } + f = message.getFixed32(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.validate.Fixed32Rules.serializeBinaryToWriter + ); + } + f = message.getFixed64(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.validate.Fixed64Rules.serializeBinaryToWriter + ); + } + f = message.getSfixed32(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.validate.SFixed32Rules.serializeBinaryToWriter + ); + } + f = message.getSfixed64(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.validate.SFixed64Rules.serializeBinaryToWriter + ); + } + f = message.getBool(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.validate.BoolRules.serializeBinaryToWriter + ); + } + f = message.getString(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.validate.StringRules.serializeBinaryToWriter + ); + } + f = message.getBytes(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.validate.BytesRules.serializeBinaryToWriter + ); + } + f = message.getEnum(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.validate.EnumRules.serializeBinaryToWriter + ); + } + f = message.getRepeated(); + if (f != null) { + writer.writeMessage( + 18, + f, + proto.validate.RepeatedRules.serializeBinaryToWriter + ); + } + f = message.getMap(); + if (f != null) { + writer.writeMessage( + 19, + f, + proto.validate.MapRules.serializeBinaryToWriter + ); + } + f = message.getAny(); + if (f != null) { + writer.writeMessage( + 20, + f, + proto.validate.AnyRules.serializeBinaryToWriter + ); + } + f = message.getDuration(); + if (f != null) { + writer.writeMessage( + 21, + f, + proto.validate.DurationRules.serializeBinaryToWriter + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 22, + f, + proto.validate.TimestampRules.serializeBinaryToWriter + ); + } +}; + + +/** + * optional MessageRules message = 17; + * @return {?proto.validate.MessageRules} + */ +proto.validate.FieldRules.prototype.getMessage = function() { + return /** @type{?proto.validate.MessageRules} */ ( + jspb.Message.getWrapperField(this, proto.validate.MessageRules, 17)); +}; + + +/** + * @param {?proto.validate.MessageRules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setMessage = function(value) { + return jspb.Message.setWrapperField(this, 17, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearMessage = function() { + return this.setMessage(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasMessage = function() { + return jspb.Message.getField(this, 17) != null; +}; + + +/** + * optional FloatRules float = 1; + * @return {?proto.validate.FloatRules} + */ +proto.validate.FieldRules.prototype.getFloat = function() { + return /** @type{?proto.validate.FloatRules} */ ( + jspb.Message.getWrapperField(this, proto.validate.FloatRules, 1)); +}; + + +/** + * @param {?proto.validate.FloatRules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setFloat = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearFloat = function() { + return this.setFloat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasFloat = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional DoubleRules double = 2; + * @return {?proto.validate.DoubleRules} + */ +proto.validate.FieldRules.prototype.getDouble = function() { + return /** @type{?proto.validate.DoubleRules} */ ( + jspb.Message.getWrapperField(this, proto.validate.DoubleRules, 2)); +}; + + +/** + * @param {?proto.validate.DoubleRules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setDouble = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearDouble = function() { + return this.setDouble(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasDouble = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Int32Rules int32 = 3; + * @return {?proto.validate.Int32Rules} + */ +proto.validate.FieldRules.prototype.getInt32 = function() { + return /** @type{?proto.validate.Int32Rules} */ ( + jspb.Message.getWrapperField(this, proto.validate.Int32Rules, 3)); +}; + + +/** + * @param {?proto.validate.Int32Rules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setInt32 = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearInt32 = function() { + return this.setInt32(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasInt32 = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Int64Rules int64 = 4; + * @return {?proto.validate.Int64Rules} + */ +proto.validate.FieldRules.prototype.getInt64 = function() { + return /** @type{?proto.validate.Int64Rules} */ ( + jspb.Message.getWrapperField(this, proto.validate.Int64Rules, 4)); +}; + + +/** + * @param {?proto.validate.Int64Rules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setInt64 = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearInt64 = function() { + return this.setInt64(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasInt64 = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional UInt32Rules uint32 = 5; + * @return {?proto.validate.UInt32Rules} + */ +proto.validate.FieldRules.prototype.getUint32 = function() { + return /** @type{?proto.validate.UInt32Rules} */ ( + jspb.Message.getWrapperField(this, proto.validate.UInt32Rules, 5)); +}; + + +/** + * @param {?proto.validate.UInt32Rules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setUint32 = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearUint32 = function() { + return this.setUint32(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasUint32 = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional UInt64Rules uint64 = 6; + * @return {?proto.validate.UInt64Rules} + */ +proto.validate.FieldRules.prototype.getUint64 = function() { + return /** @type{?proto.validate.UInt64Rules} */ ( + jspb.Message.getWrapperField(this, proto.validate.UInt64Rules, 6)); +}; + + +/** + * @param {?proto.validate.UInt64Rules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setUint64 = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearUint64 = function() { + return this.setUint64(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasUint64 = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional SInt32Rules sint32 = 7; + * @return {?proto.validate.SInt32Rules} + */ +proto.validate.FieldRules.prototype.getSint32 = function() { + return /** @type{?proto.validate.SInt32Rules} */ ( + jspb.Message.getWrapperField(this, proto.validate.SInt32Rules, 7)); +}; + + +/** + * @param {?proto.validate.SInt32Rules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setSint32 = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearSint32 = function() { + return this.setSint32(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasSint32 = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional SInt64Rules sint64 = 8; + * @return {?proto.validate.SInt64Rules} + */ +proto.validate.FieldRules.prototype.getSint64 = function() { + return /** @type{?proto.validate.SInt64Rules} */ ( + jspb.Message.getWrapperField(this, proto.validate.SInt64Rules, 8)); +}; + + +/** + * @param {?proto.validate.SInt64Rules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setSint64 = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearSint64 = function() { + return this.setSint64(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasSint64 = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional Fixed32Rules fixed32 = 9; + * @return {?proto.validate.Fixed32Rules} + */ +proto.validate.FieldRules.prototype.getFixed32 = function() { + return /** @type{?proto.validate.Fixed32Rules} */ ( + jspb.Message.getWrapperField(this, proto.validate.Fixed32Rules, 9)); +}; + + +/** + * @param {?proto.validate.Fixed32Rules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setFixed32 = function(value) { + return jspb.Message.setOneofWrapperField(this, 9, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearFixed32 = function() { + return this.setFixed32(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasFixed32 = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional Fixed64Rules fixed64 = 10; + * @return {?proto.validate.Fixed64Rules} + */ +proto.validate.FieldRules.prototype.getFixed64 = function() { + return /** @type{?proto.validate.Fixed64Rules} */ ( + jspb.Message.getWrapperField(this, proto.validate.Fixed64Rules, 10)); +}; + + +/** + * @param {?proto.validate.Fixed64Rules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setFixed64 = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearFixed64 = function() { + return this.setFixed64(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasFixed64 = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional SFixed32Rules sfixed32 = 11; + * @return {?proto.validate.SFixed32Rules} + */ +proto.validate.FieldRules.prototype.getSfixed32 = function() { + return /** @type{?proto.validate.SFixed32Rules} */ ( + jspb.Message.getWrapperField(this, proto.validate.SFixed32Rules, 11)); +}; + + +/** + * @param {?proto.validate.SFixed32Rules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setSfixed32 = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearSfixed32 = function() { + return this.setSfixed32(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasSfixed32 = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional SFixed64Rules sfixed64 = 12; + * @return {?proto.validate.SFixed64Rules} + */ +proto.validate.FieldRules.prototype.getSfixed64 = function() { + return /** @type{?proto.validate.SFixed64Rules} */ ( + jspb.Message.getWrapperField(this, proto.validate.SFixed64Rules, 12)); +}; + + +/** + * @param {?proto.validate.SFixed64Rules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setSfixed64 = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearSfixed64 = function() { + return this.setSfixed64(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasSfixed64 = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional BoolRules bool = 13; + * @return {?proto.validate.BoolRules} + */ +proto.validate.FieldRules.prototype.getBool = function() { + return /** @type{?proto.validate.BoolRules} */ ( + jspb.Message.getWrapperField(this, proto.validate.BoolRules, 13)); +}; + + +/** + * @param {?proto.validate.BoolRules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setBool = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearBool = function() { + return this.setBool(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasBool = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional StringRules string = 14; + * @return {?proto.validate.StringRules} + */ +proto.validate.FieldRules.prototype.getString = function() { + return /** @type{?proto.validate.StringRules} */ ( + jspb.Message.getWrapperField(this, proto.validate.StringRules, 14)); +}; + + +/** + * @param {?proto.validate.StringRules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setString = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearString = function() { + return this.setString(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasString = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional BytesRules bytes = 15; + * @return {?proto.validate.BytesRules} + */ +proto.validate.FieldRules.prototype.getBytes = function() { + return /** @type{?proto.validate.BytesRules} */ ( + jspb.Message.getWrapperField(this, proto.validate.BytesRules, 15)); +}; + + +/** + * @param {?proto.validate.BytesRules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setBytes = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearBytes = function() { + return this.setBytes(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasBytes = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional EnumRules enum = 16; + * @return {?proto.validate.EnumRules} + */ +proto.validate.FieldRules.prototype.getEnum = function() { + return /** @type{?proto.validate.EnumRules} */ ( + jspb.Message.getWrapperField(this, proto.validate.EnumRules, 16)); +}; + + +/** + * @param {?proto.validate.EnumRules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setEnum = function(value) { + return jspb.Message.setOneofWrapperField(this, 16, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearEnum = function() { + return this.setEnum(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasEnum = function() { + return jspb.Message.getField(this, 16) != null; +}; + + +/** + * optional RepeatedRules repeated = 18; + * @return {?proto.validate.RepeatedRules} + */ +proto.validate.FieldRules.prototype.getRepeated = function() { + return /** @type{?proto.validate.RepeatedRules} */ ( + jspb.Message.getWrapperField(this, proto.validate.RepeatedRules, 18)); +}; + + +/** + * @param {?proto.validate.RepeatedRules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setRepeated = function(value) { + return jspb.Message.setOneofWrapperField(this, 18, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearRepeated = function() { + return this.setRepeated(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasRepeated = function() { + return jspb.Message.getField(this, 18) != null; +}; + + +/** + * optional MapRules map = 19; + * @return {?proto.validate.MapRules} + */ +proto.validate.FieldRules.prototype.getMap = function() { + return /** @type{?proto.validate.MapRules} */ ( + jspb.Message.getWrapperField(this, proto.validate.MapRules, 19)); +}; + + +/** + * @param {?proto.validate.MapRules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setMap = function(value) { + return jspb.Message.setOneofWrapperField(this, 19, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearMap = function() { + return this.setMap(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasMap = function() { + return jspb.Message.getField(this, 19) != null; +}; + + +/** + * optional AnyRules any = 20; + * @return {?proto.validate.AnyRules} + */ +proto.validate.FieldRules.prototype.getAny = function() { + return /** @type{?proto.validate.AnyRules} */ ( + jspb.Message.getWrapperField(this, proto.validate.AnyRules, 20)); +}; + + +/** + * @param {?proto.validate.AnyRules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setAny = function(value) { + return jspb.Message.setOneofWrapperField(this, 20, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearAny = function() { + return this.setAny(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasAny = function() { + return jspb.Message.getField(this, 20) != null; +}; + + +/** + * optional DurationRules duration = 21; + * @return {?proto.validate.DurationRules} + */ +proto.validate.FieldRules.prototype.getDuration = function() { + return /** @type{?proto.validate.DurationRules} */ ( + jspb.Message.getWrapperField(this, proto.validate.DurationRules, 21)); +}; + + +/** + * @param {?proto.validate.DurationRules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setDuration = function(value) { + return jspb.Message.setOneofWrapperField(this, 21, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearDuration = function() { + return this.setDuration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasDuration = function() { + return jspb.Message.getField(this, 21) != null; +}; + + +/** + * optional TimestampRules timestamp = 22; + * @return {?proto.validate.TimestampRules} + */ +proto.validate.FieldRules.prototype.getTimestamp = function() { + return /** @type{?proto.validate.TimestampRules} */ ( + jspb.Message.getWrapperField(this, proto.validate.TimestampRules, 22)); +}; + + +/** + * @param {?proto.validate.TimestampRules|undefined} value + * @return {!proto.validate.FieldRules} returns this +*/ +proto.validate.FieldRules.prototype.setTimestamp = function(value) { + return jspb.Message.setOneofWrapperField(this, 22, proto.validate.FieldRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.FieldRules} returns this + */ +proto.validate.FieldRules.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FieldRules.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 22) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.validate.FloatRules.repeatedFields_ = [6,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.FloatRules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.FloatRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.FloatRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.FloatRules.toObject = function(includeInstance, msg) { + var f, obj = { + pb_const: (f = jspb.Message.getOptionalFloatingPointField(msg, 1)) == null ? undefined : f, + lt: (f = jspb.Message.getOptionalFloatingPointField(msg, 2)) == null ? undefined : f, + lte: (f = jspb.Message.getOptionalFloatingPointField(msg, 3)) == null ? undefined : f, + gt: (f = jspb.Message.getOptionalFloatingPointField(msg, 4)) == null ? undefined : f, + gte: (f = jspb.Message.getOptionalFloatingPointField(msg, 5)) == null ? undefined : f, + inList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 6)) == null ? undefined : f, + notInList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 7)) == null ? undefined : f, + ignoreEmpty: (f = jspb.Message.getBooleanField(msg, 8)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.FloatRules} + */ +proto.validate.FloatRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.FloatRules; + return proto.validate.FloatRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.FloatRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.FloatRules} + */ +proto.validate.FloatRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readFloat()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readFloat()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readFloat()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readFloat()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readFloat()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFloat() : [reader.readFloat()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFloat() : [reader.readFloat()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreEmpty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.FloatRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.FloatRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.FloatRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.FloatRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeFloat( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeFloat( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeFloat( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeFloat( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeFloat( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedFloat( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedFloat( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional float const = 1; + * @return {number} + */ +proto.validate.FloatRules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FloatRules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional float lt = 2; + * @return {number} + */ +proto.validate.FloatRules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.setLt = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.clearLt = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FloatRules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional float lte = 3; + * @return {number} + */ +proto.validate.FloatRules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.setLte = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.clearLte = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FloatRules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional float gt = 4; + * @return {number} + */ +proto.validate.FloatRules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.setGt = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.clearGt = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FloatRules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional float gte = 5; + * @return {number} + */ +proto.validate.FloatRules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.setGte = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.clearGte = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FloatRules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated float in = 6; + * @return {!Array} + */ +proto.validate.FloatRules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated float not_in = 7; + * @return {!Array} + */ +proto.validate.FloatRules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool ignore_empty = 8; + * @return {boolean} + */ +proto.validate.FloatRules.prototype.getIgnoreEmpty = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.setIgnoreEmpty = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.FloatRules} returns this + */ +proto.validate.FloatRules.prototype.clearIgnoreEmpty = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.FloatRules.prototype.hasIgnoreEmpty = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.validate.DoubleRules.repeatedFields_ = [6,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.DoubleRules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.DoubleRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.DoubleRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.DoubleRules.toObject = function(includeInstance, msg) { + var f, obj = { + pb_const: (f = jspb.Message.getOptionalFloatingPointField(msg, 1)) == null ? undefined : f, + lt: (f = jspb.Message.getOptionalFloatingPointField(msg, 2)) == null ? undefined : f, + lte: (f = jspb.Message.getOptionalFloatingPointField(msg, 3)) == null ? undefined : f, + gt: (f = jspb.Message.getOptionalFloatingPointField(msg, 4)) == null ? undefined : f, + gte: (f = jspb.Message.getOptionalFloatingPointField(msg, 5)) == null ? undefined : f, + inList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 6)) == null ? undefined : f, + notInList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 7)) == null ? undefined : f, + ignoreEmpty: (f = jspb.Message.getBooleanField(msg, 8)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.DoubleRules} + */ +proto.validate.DoubleRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.DoubleRules; + return proto.validate.DoubleRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.DoubleRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.DoubleRules} + */ +proto.validate.DoubleRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readDouble()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreEmpty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.DoubleRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.DoubleRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.DoubleRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.DoubleRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeDouble( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeDouble( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeDouble( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeDouble( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeDouble( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedDouble( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedDouble( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional double const = 1; + * @return {number} + */ +proto.validate.DoubleRules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.DoubleRules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional double lt = 2; + * @return {number} + */ +proto.validate.DoubleRules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.setLt = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.clearLt = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.DoubleRules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional double lte = 3; + * @return {number} + */ +proto.validate.DoubleRules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.setLte = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.clearLte = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.DoubleRules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional double gt = 4; + * @return {number} + */ +proto.validate.DoubleRules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.setGt = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.clearGt = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.DoubleRules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional double gte = 5; + * @return {number} + */ +proto.validate.DoubleRules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.setGte = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.clearGte = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.DoubleRules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated double in = 6; + * @return {!Array} + */ +proto.validate.DoubleRules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated double not_in = 7; + * @return {!Array} + */ +proto.validate.DoubleRules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool ignore_empty = 8; + * @return {boolean} + */ +proto.validate.DoubleRules.prototype.getIgnoreEmpty = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.setIgnoreEmpty = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.DoubleRules} returns this + */ +proto.validate.DoubleRules.prototype.clearIgnoreEmpty = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.DoubleRules.prototype.hasIgnoreEmpty = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.validate.Int32Rules.repeatedFields_ = [6,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.Int32Rules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.Int32Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.Int32Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.Int32Rules.toObject = function(includeInstance, msg) { + var f, obj = { + pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, + ignoreEmpty: (f = jspb.Message.getBooleanField(msg, 8)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.Int32Rules} + */ +proto.validate.Int32Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.Int32Rules; + return proto.validate.Int32Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.Int32Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.Int32Rules} + */ +proto.validate.Int32Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreEmpty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.Int32Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.Int32Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.Int32Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.Int32Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt32( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeInt32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeInt32( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeInt32( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedInt32( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedInt32( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional int32 const = 1; + * @return {number} + */ +proto.validate.Int32Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Int32Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 lt = 2; + * @return {number} + */ +proto.validate.Int32Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.setLt = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.clearLt = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Int32Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int32 lte = 3; + * @return {number} + */ +proto.validate.Int32Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.setLte = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.clearLte = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Int32Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional int32 gt = 4; + * @return {number} + */ +proto.validate.Int32Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.setGt = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.clearGt = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Int32Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional int32 gte = 5; + * @return {number} + */ +proto.validate.Int32Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.setGte = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.clearGte = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Int32Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated int32 in = 6; + * @return {!Array} + */ +proto.validate.Int32Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated int32 not_in = 7; + * @return {!Array} + */ +proto.validate.Int32Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool ignore_empty = 8; + * @return {boolean} + */ +proto.validate.Int32Rules.prototype.getIgnoreEmpty = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.setIgnoreEmpty = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Int32Rules} returns this + */ +proto.validate.Int32Rules.prototype.clearIgnoreEmpty = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Int32Rules.prototype.hasIgnoreEmpty = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.validate.Int64Rules.repeatedFields_ = [6,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.Int64Rules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.Int64Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.Int64Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.Int64Rules.toObject = function(includeInstance, msg) { + var f, obj = { + pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, + ignoreEmpty: (f = jspb.Message.getBooleanField(msg, 8)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.Int64Rules} + */ +proto.validate.Int64Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.Int64Rules; + return proto.validate.Int64Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.Int64Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.Int64Rules} + */ +proto.validate.Int64Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreEmpty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.Int64Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.Int64Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.Int64Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.Int64Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeInt64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeInt64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeInt64( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedInt64( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedInt64( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional int64 const = 1; + * @return {number} + */ +proto.validate.Int64Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Int64Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 lt = 2; + * @return {number} + */ +proto.validate.Int64Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.setLt = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.clearLt = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Int64Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 lte = 3; + * @return {number} + */ +proto.validate.Int64Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.setLte = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.clearLte = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Int64Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional int64 gt = 4; + * @return {number} + */ +proto.validate.Int64Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.setGt = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.clearGt = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Int64Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional int64 gte = 5; + * @return {number} + */ +proto.validate.Int64Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.setGte = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.clearGte = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Int64Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated int64 in = 6; + * @return {!Array} + */ +proto.validate.Int64Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated int64 not_in = 7; + * @return {!Array} + */ +proto.validate.Int64Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool ignore_empty = 8; + * @return {boolean} + */ +proto.validate.Int64Rules.prototype.getIgnoreEmpty = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.setIgnoreEmpty = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Int64Rules} returns this + */ +proto.validate.Int64Rules.prototype.clearIgnoreEmpty = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Int64Rules.prototype.hasIgnoreEmpty = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.validate.UInt32Rules.repeatedFields_ = [6,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.UInt32Rules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.UInt32Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.UInt32Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.UInt32Rules.toObject = function(includeInstance, msg) { + var f, obj = { + pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, + ignoreEmpty: (f = jspb.Message.getBooleanField(msg, 8)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.UInt32Rules} + */ +proto.validate.UInt32Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.UInt32Rules; + return proto.validate.UInt32Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.UInt32Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.UInt32Rules} + */ +proto.validate.UInt32Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreEmpty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.UInt32Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.UInt32Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.UInt32Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.UInt32Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint32( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint32( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint32( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedUint32( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedUint32( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional uint32 const = 1; + * @return {number} + */ +proto.validate.UInt32Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.UInt32Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint32 lt = 2; + * @return {number} + */ +proto.validate.UInt32Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.setLt = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.clearLt = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.UInt32Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 lte = 3; + * @return {number} + */ +proto.validate.UInt32Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.setLte = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.clearLte = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.UInt32Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint32 gt = 4; + * @return {number} + */ +proto.validate.UInt32Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.setGt = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.clearGt = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.UInt32Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint32 gte = 5; + * @return {number} + */ +proto.validate.UInt32Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.setGte = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.clearGte = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.UInt32Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated uint32 in = 6; + * @return {!Array} + */ +proto.validate.UInt32Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated uint32 not_in = 7; + * @return {!Array} + */ +proto.validate.UInt32Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool ignore_empty = 8; + * @return {boolean} + */ +proto.validate.UInt32Rules.prototype.getIgnoreEmpty = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.setIgnoreEmpty = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.UInt32Rules} returns this + */ +proto.validate.UInt32Rules.prototype.clearIgnoreEmpty = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.UInt32Rules.prototype.hasIgnoreEmpty = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.validate.UInt64Rules.repeatedFields_ = [6,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.UInt64Rules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.UInt64Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.UInt64Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.UInt64Rules.toObject = function(includeInstance, msg) { + var f, obj = { + pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, + ignoreEmpty: (f = jspb.Message.getBooleanField(msg, 8)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.UInt64Rules} + */ +proto.validate.UInt64Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.UInt64Rules; + return proto.validate.UInt64Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.UInt64Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.UInt64Rules} + */ +proto.validate.UInt64Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreEmpty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.UInt64Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.UInt64Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.UInt64Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.UInt64Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint64( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedUint64( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedUint64( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional uint64 const = 1; + * @return {number} + */ +proto.validate.UInt64Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.UInt64Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 lt = 2; + * @return {number} + */ +proto.validate.UInt64Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.setLt = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.clearLt = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.UInt64Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 lte = 3; + * @return {number} + */ +proto.validate.UInt64Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.setLte = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.clearLte = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.UInt64Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 gt = 4; + * @return {number} + */ +proto.validate.UInt64Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.setGt = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.clearGt = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.UInt64Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint64 gte = 5; + * @return {number} + */ +proto.validate.UInt64Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.setGte = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.clearGte = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.UInt64Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated uint64 in = 6; + * @return {!Array} + */ +proto.validate.UInt64Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated uint64 not_in = 7; + * @return {!Array} + */ +proto.validate.UInt64Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool ignore_empty = 8; + * @return {boolean} + */ +proto.validate.UInt64Rules.prototype.getIgnoreEmpty = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.setIgnoreEmpty = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.UInt64Rules} returns this + */ +proto.validate.UInt64Rules.prototype.clearIgnoreEmpty = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.UInt64Rules.prototype.hasIgnoreEmpty = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.validate.SInt32Rules.repeatedFields_ = [6,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.SInt32Rules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.SInt32Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.SInt32Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.SInt32Rules.toObject = function(includeInstance, msg) { + var f, obj = { + pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, + ignoreEmpty: (f = jspb.Message.getBooleanField(msg, 8)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.SInt32Rules} + */ +proto.validate.SInt32Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.SInt32Rules; + return proto.validate.SInt32Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.SInt32Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.SInt32Rules} + */ +proto.validate.SInt32Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readSint32()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readSint32()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readSint32()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readSint32()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readSint32()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSint32() : [reader.readSint32()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSint32() : [reader.readSint32()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreEmpty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.SInt32Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.SInt32Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.SInt32Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.SInt32Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeSint32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeSint32( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeSint32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeSint32( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeSint32( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedSint32( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedSint32( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional sint32 const = 1; + * @return {number} + */ +proto.validate.SInt32Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SInt32Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional sint32 lt = 2; + * @return {number} + */ +proto.validate.SInt32Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.setLt = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.clearLt = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SInt32Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional sint32 lte = 3; + * @return {number} + */ +proto.validate.SInt32Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.setLte = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.clearLte = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SInt32Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional sint32 gt = 4; + * @return {number} + */ +proto.validate.SInt32Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.setGt = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.clearGt = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SInt32Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional sint32 gte = 5; + * @return {number} + */ +proto.validate.SInt32Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.setGte = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.clearGte = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SInt32Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated sint32 in = 6; + * @return {!Array} + */ +proto.validate.SInt32Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated sint32 not_in = 7; + * @return {!Array} + */ +proto.validate.SInt32Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool ignore_empty = 8; + * @return {boolean} + */ +proto.validate.SInt32Rules.prototype.getIgnoreEmpty = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.setIgnoreEmpty = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SInt32Rules} returns this + */ +proto.validate.SInt32Rules.prototype.clearIgnoreEmpty = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SInt32Rules.prototype.hasIgnoreEmpty = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.validate.SInt64Rules.repeatedFields_ = [6,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.SInt64Rules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.SInt64Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.SInt64Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.SInt64Rules.toObject = function(includeInstance, msg) { + var f, obj = { + pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, + ignoreEmpty: (f = jspb.Message.getBooleanField(msg, 8)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.SInt64Rules} + */ +proto.validate.SInt64Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.SInt64Rules; + return proto.validate.SInt64Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.SInt64Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.SInt64Rules} + */ +proto.validate.SInt64Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readSint64()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readSint64()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readSint64()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readSint64()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readSint64()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSint64() : [reader.readSint64()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSint64() : [reader.readSint64()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreEmpty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.SInt64Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.SInt64Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.SInt64Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.SInt64Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeSint64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeSint64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeSint64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeSint64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeSint64( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedSint64( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedSint64( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional sint64 const = 1; + * @return {number} + */ +proto.validate.SInt64Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SInt64Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional sint64 lt = 2; + * @return {number} + */ +proto.validate.SInt64Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.setLt = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.clearLt = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SInt64Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional sint64 lte = 3; + * @return {number} + */ +proto.validate.SInt64Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.setLte = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.clearLte = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SInt64Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional sint64 gt = 4; + * @return {number} + */ +proto.validate.SInt64Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.setGt = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.clearGt = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SInt64Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional sint64 gte = 5; + * @return {number} + */ +proto.validate.SInt64Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.setGte = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.clearGte = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SInt64Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated sint64 in = 6; + * @return {!Array} + */ +proto.validate.SInt64Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated sint64 not_in = 7; + * @return {!Array} + */ +proto.validate.SInt64Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool ignore_empty = 8; + * @return {boolean} + */ +proto.validate.SInt64Rules.prototype.getIgnoreEmpty = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.setIgnoreEmpty = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SInt64Rules} returns this + */ +proto.validate.SInt64Rules.prototype.clearIgnoreEmpty = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SInt64Rules.prototype.hasIgnoreEmpty = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.validate.Fixed32Rules.repeatedFields_ = [6,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.Fixed32Rules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.Fixed32Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.Fixed32Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.Fixed32Rules.toObject = function(includeInstance, msg) { + var f, obj = { + pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, + ignoreEmpty: (f = jspb.Message.getBooleanField(msg, 8)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.Fixed32Rules} + */ +proto.validate.Fixed32Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.Fixed32Rules; + return proto.validate.Fixed32Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.Fixed32Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.Fixed32Rules} + */ +proto.validate.Fixed32Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readFixed32()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readFixed32()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readFixed32()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readFixed32()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readFixed32()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFixed32() : [reader.readFixed32()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFixed32() : [reader.readFixed32()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreEmpty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.Fixed32Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.Fixed32Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.Fixed32Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.Fixed32Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeFixed32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeFixed32( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeFixed32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeFixed32( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeFixed32( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedFixed32( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedFixed32( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional fixed32 const = 1; + * @return {number} + */ +proto.validate.Fixed32Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Fixed32Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional fixed32 lt = 2; + * @return {number} + */ +proto.validate.Fixed32Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.setLt = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.clearLt = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Fixed32Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional fixed32 lte = 3; + * @return {number} + */ +proto.validate.Fixed32Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.setLte = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.clearLte = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Fixed32Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional fixed32 gt = 4; + * @return {number} + */ +proto.validate.Fixed32Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.setGt = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.clearGt = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Fixed32Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional fixed32 gte = 5; + * @return {number} + */ +proto.validate.Fixed32Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.setGte = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.clearGte = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Fixed32Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated fixed32 in = 6; + * @return {!Array} + */ +proto.validate.Fixed32Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated fixed32 not_in = 7; + * @return {!Array} + */ +proto.validate.Fixed32Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool ignore_empty = 8; + * @return {boolean} + */ +proto.validate.Fixed32Rules.prototype.getIgnoreEmpty = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.setIgnoreEmpty = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Fixed32Rules} returns this + */ +proto.validate.Fixed32Rules.prototype.clearIgnoreEmpty = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Fixed32Rules.prototype.hasIgnoreEmpty = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.validate.Fixed64Rules.repeatedFields_ = [6,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.Fixed64Rules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.Fixed64Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.Fixed64Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.Fixed64Rules.toObject = function(includeInstance, msg) { + var f, obj = { + pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, + ignoreEmpty: (f = jspb.Message.getBooleanField(msg, 8)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.Fixed64Rules} + */ +proto.validate.Fixed64Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.Fixed64Rules; + return proto.validate.Fixed64Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.Fixed64Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.Fixed64Rules} + */ +proto.validate.Fixed64Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readFixed64()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readFixed64()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readFixed64()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readFixed64()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readFixed64()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFixed64() : [reader.readFixed64()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFixed64() : [reader.readFixed64()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreEmpty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.Fixed64Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.Fixed64Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.Fixed64Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.Fixed64Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeFixed64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeFixed64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeFixed64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeFixed64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeFixed64( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedFixed64( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedFixed64( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional fixed64 const = 1; + * @return {number} + */ +proto.validate.Fixed64Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Fixed64Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional fixed64 lt = 2; + * @return {number} + */ +proto.validate.Fixed64Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.setLt = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.clearLt = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Fixed64Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional fixed64 lte = 3; + * @return {number} + */ +proto.validate.Fixed64Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.setLte = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.clearLte = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Fixed64Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional fixed64 gt = 4; + * @return {number} + */ +proto.validate.Fixed64Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.setGt = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.clearGt = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Fixed64Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional fixed64 gte = 5; + * @return {number} + */ +proto.validate.Fixed64Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.setGte = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.clearGte = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Fixed64Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated fixed64 in = 6; + * @return {!Array} + */ +proto.validate.Fixed64Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated fixed64 not_in = 7; + * @return {!Array} + */ +proto.validate.Fixed64Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool ignore_empty = 8; + * @return {boolean} + */ +proto.validate.Fixed64Rules.prototype.getIgnoreEmpty = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.setIgnoreEmpty = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.Fixed64Rules} returns this + */ +proto.validate.Fixed64Rules.prototype.clearIgnoreEmpty = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.Fixed64Rules.prototype.hasIgnoreEmpty = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.validate.SFixed32Rules.repeatedFields_ = [6,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.SFixed32Rules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.SFixed32Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.SFixed32Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.SFixed32Rules.toObject = function(includeInstance, msg) { + var f, obj = { + pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, + ignoreEmpty: (f = jspb.Message.getBooleanField(msg, 8)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.SFixed32Rules} + */ +proto.validate.SFixed32Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.SFixed32Rules; + return proto.validate.SFixed32Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.SFixed32Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.SFixed32Rules} + */ +proto.validate.SFixed32Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readSfixed32()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readSfixed32()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readSfixed32()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readSfixed32()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readSfixed32()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSfixed32() : [reader.readSfixed32()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSfixed32() : [reader.readSfixed32()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreEmpty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.SFixed32Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.SFixed32Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.SFixed32Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.SFixed32Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeSfixed32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeSfixed32( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeSfixed32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeSfixed32( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeSfixed32( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedSfixed32( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedSfixed32( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional sfixed32 const = 1; + * @return {number} + */ +proto.validate.SFixed32Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SFixed32Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional sfixed32 lt = 2; + * @return {number} + */ +proto.validate.SFixed32Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.setLt = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.clearLt = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SFixed32Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional sfixed32 lte = 3; + * @return {number} + */ +proto.validate.SFixed32Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.setLte = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.clearLte = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SFixed32Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional sfixed32 gt = 4; + * @return {number} + */ +proto.validate.SFixed32Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.setGt = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.clearGt = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SFixed32Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional sfixed32 gte = 5; + * @return {number} + */ +proto.validate.SFixed32Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.setGte = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.clearGte = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SFixed32Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated sfixed32 in = 6; + * @return {!Array} + */ +proto.validate.SFixed32Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated sfixed32 not_in = 7; + * @return {!Array} + */ +proto.validate.SFixed32Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool ignore_empty = 8; + * @return {boolean} + */ +proto.validate.SFixed32Rules.prototype.getIgnoreEmpty = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.setIgnoreEmpty = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SFixed32Rules} returns this + */ +proto.validate.SFixed32Rules.prototype.clearIgnoreEmpty = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SFixed32Rules.prototype.hasIgnoreEmpty = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.validate.SFixed64Rules.repeatedFields_ = [6,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.SFixed64Rules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.SFixed64Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.SFixed64Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.SFixed64Rules.toObject = function(includeInstance, msg) { + var f, obj = { + pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, + ignoreEmpty: (f = jspb.Message.getBooleanField(msg, 8)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.SFixed64Rules} + */ +proto.validate.SFixed64Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.SFixed64Rules; + return proto.validate.SFixed64Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.SFixed64Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.SFixed64Rules} + */ +proto.validate.SFixed64Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readSfixed64()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readSfixed64()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readSfixed64()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readSfixed64()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readSfixed64()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSfixed64() : [reader.readSfixed64()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSfixed64() : [reader.readSfixed64()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreEmpty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.SFixed64Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.SFixed64Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.SFixed64Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.SFixed64Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeSfixed64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeSfixed64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeSfixed64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeSfixed64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeSfixed64( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedSfixed64( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedSfixed64( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional sfixed64 const = 1; + * @return {number} + */ +proto.validate.SFixed64Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SFixed64Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional sfixed64 lt = 2; + * @return {number} + */ +proto.validate.SFixed64Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.setLt = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.clearLt = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SFixed64Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional sfixed64 lte = 3; + * @return {number} + */ +proto.validate.SFixed64Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.setLte = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.clearLte = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SFixed64Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional sfixed64 gt = 4; + * @return {number} + */ +proto.validate.SFixed64Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.setGt = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.clearGt = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SFixed64Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional sfixed64 gte = 5; + * @return {number} + */ +proto.validate.SFixed64Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.setGte = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.clearGte = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SFixed64Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated sfixed64 in = 6; + * @return {!Array} + */ +proto.validate.SFixed64Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated sfixed64 not_in = 7; + * @return {!Array} + */ +proto.validate.SFixed64Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool ignore_empty = 8; + * @return {boolean} + */ +proto.validate.SFixed64Rules.prototype.getIgnoreEmpty = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.setIgnoreEmpty = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.SFixed64Rules} returns this + */ +proto.validate.SFixed64Rules.prototype.clearIgnoreEmpty = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.SFixed64Rules.prototype.hasIgnoreEmpty = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.BoolRules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.BoolRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.BoolRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.BoolRules.toObject = function(includeInstance, msg) { + var f, obj = { + pb_const: (f = jspb.Message.getBooleanField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.BoolRules} + */ +proto.validate.BoolRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.BoolRules; + return proto.validate.BoolRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.BoolRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.BoolRules} + */ +proto.validate.BoolRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setConst(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.BoolRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.BoolRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.BoolRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.BoolRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool const = 1; + * @return {boolean} + */ +proto.validate.BoolRules.prototype.getConst = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.BoolRules} returns this + */ +proto.validate.BoolRules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.BoolRules} returns this + */ +proto.validate.BoolRules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.BoolRules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.validate.StringRules.repeatedFields_ = [10,11]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.validate.StringRules.oneofGroups_ = [[12,13,14,15,16,17,18,21,22,24]]; + +/** + * @enum {number} + */ +proto.validate.StringRules.WellKnownCase = { + WELL_KNOWN_NOT_SET: 0, + EMAIL: 12, + HOSTNAME: 13, + IP: 14, + IPV4: 15, + IPV6: 16, + URI: 17, + URI_REF: 18, + ADDRESS: 21, + UUID: 22, + WELL_KNOWN_REGEX: 24 +}; + +/** + * @return {proto.validate.StringRules.WellKnownCase} + */ +proto.validate.StringRules.prototype.getWellKnownCase = function() { + return /** @type {proto.validate.StringRules.WellKnownCase} */(jspb.Message.computeOneofCase(this, proto.validate.StringRules.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.StringRules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.StringRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.StringRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.StringRules.toObject = function(includeInstance, msg) { + var f, obj = { + pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + len: (f = jspb.Message.getField(msg, 19)) == null ? undefined : f, + minLen: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + maxLen: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + lenBytes: (f = jspb.Message.getField(msg, 20)) == null ? undefined : f, + minBytes: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + maxBytes: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, + pattern: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f, + prefix: (f = jspb.Message.getField(msg, 7)) == null ? undefined : f, + suffix: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f, + contains: (f = jspb.Message.getField(msg, 9)) == null ? undefined : f, + notContains: (f = jspb.Message.getField(msg, 23)) == null ? undefined : f, + inList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, + notInList: (f = jspb.Message.getRepeatedField(msg, 11)) == null ? undefined : f, + email: (f = jspb.Message.getBooleanField(msg, 12)) == null ? undefined : f, + hostname: (f = jspb.Message.getBooleanField(msg, 13)) == null ? undefined : f, + ip: (f = jspb.Message.getBooleanField(msg, 14)) == null ? undefined : f, + ipv4: (f = jspb.Message.getBooleanField(msg, 15)) == null ? undefined : f, + ipv6: (f = jspb.Message.getBooleanField(msg, 16)) == null ? undefined : f, + uri: (f = jspb.Message.getBooleanField(msg, 17)) == null ? undefined : f, + uriRef: (f = jspb.Message.getBooleanField(msg, 18)) == null ? undefined : f, + address: (f = jspb.Message.getBooleanField(msg, 21)) == null ? undefined : f, + uuid: (f = jspb.Message.getBooleanField(msg, 22)) == null ? undefined : f, + wellKnownRegex: (f = jspb.Message.getField(msg, 24)) == null ? undefined : f, + strict: jspb.Message.getBooleanFieldWithDefault(msg, 25, true), + ignoreEmpty: (f = jspb.Message.getBooleanField(msg, 26)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.StringRules} + */ +proto.validate.StringRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.StringRules; + return proto.validate.StringRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.StringRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.StringRules} + */ +proto.validate.StringRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setConst(value); + break; + case 19: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLen(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinLen(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxLen(value); + break; + case 20: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLenBytes(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinBytes(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxBytes(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setPattern(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setPrefix(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setSuffix(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setContains(value); + break; + case 23: + var value = /** @type {string} */ (reader.readString()); + msg.setNotContains(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.addIn(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.addNotIn(value); + break; + case 12: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setEmail(value); + break; + case 13: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setHostname(value); + break; + case 14: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIp(value); + break; + case 15: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIpv4(value); + break; + case 16: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIpv6(value); + break; + case 17: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUri(value); + break; + case 18: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUriRef(value); + break; + case 21: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAddress(value); + break; + case 22: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUuid(value); + break; + case 24: + var value = /** @type {!proto.validate.KnownRegex} */ (reader.readEnum()); + msg.setWellKnownRegex(value); + break; + case 25: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStrict(value); + break; + case 26: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreEmpty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.StringRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.StringRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.StringRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.StringRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 19)); + if (f != null) { + writer.writeUint64( + 19, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 20)); + if (f != null) { + writer.writeUint64( + 20, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint64( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeString( + 7, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeString( + 9, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 23)); + if (f != null) { + writer.writeString( + 23, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedString( + 10, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedString( + 11, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeBool( + 12, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 13)); + if (f != null) { + writer.writeBool( + 13, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 14)); + if (f != null) { + writer.writeBool( + 14, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 15)); + if (f != null) { + writer.writeBool( + 15, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 16)); + if (f != null) { + writer.writeBool( + 16, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 17)); + if (f != null) { + writer.writeBool( + 17, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 18)); + if (f != null) { + writer.writeBool( + 18, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 21)); + if (f != null) { + writer.writeBool( + 21, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 22)); + if (f != null) { + writer.writeBool( + 22, + f + ); + } + f = /** @type {!proto.validate.KnownRegex} */ (jspb.Message.getField(message, 24)); + if (f != null) { + writer.writeEnum( + 24, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 25)); + if (f != null) { + writer.writeBool( + 25, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 26)); + if (f != null) { + writer.writeBool( + 26, + f + ); + } +}; + + +/** + * optional string const = 1; + * @return {string} + */ +proto.validate.StringRules.prototype.getConst = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 len = 19; + * @return {number} + */ +proto.validate.StringRules.prototype.getLen = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setLen = function(value) { + return jspb.Message.setField(this, 19, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearLen = function() { + return jspb.Message.setField(this, 19, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasLen = function() { + return jspb.Message.getField(this, 19) != null; +}; + + +/** + * optional uint64 min_len = 2; + * @return {number} + */ +proto.validate.StringRules.prototype.getMinLen = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setMinLen = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearMinLen = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasMinLen = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 max_len = 3; + * @return {number} + */ +proto.validate.StringRules.prototype.getMaxLen = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setMaxLen = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearMaxLen = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasMaxLen = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 len_bytes = 20; + * @return {number} + */ +proto.validate.StringRules.prototype.getLenBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setLenBytes = function(value) { + return jspb.Message.setField(this, 20, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearLenBytes = function() { + return jspb.Message.setField(this, 20, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasLenBytes = function() { + return jspb.Message.getField(this, 20) != null; +}; + + +/** + * optional uint64 min_bytes = 4; + * @return {number} + */ +proto.validate.StringRules.prototype.getMinBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setMinBytes = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearMinBytes = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasMinBytes = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint64 max_bytes = 5; + * @return {number} + */ +proto.validate.StringRules.prototype.getMaxBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setMaxBytes = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearMaxBytes = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasMaxBytes = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string pattern = 6; + * @return {string} + */ +proto.validate.StringRules.prototype.getPattern = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setPattern = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearPattern = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasPattern = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string prefix = 7; + * @return {string} + */ +proto.validate.StringRules.prototype.getPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setPrefix = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearPrefix = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasPrefix = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional string suffix = 8; + * @return {string} + */ +proto.validate.StringRules.prototype.getSuffix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setSuffix = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearSuffix = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasSuffix = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string contains = 9; + * @return {string} + */ +proto.validate.StringRules.prototype.getContains = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setContains = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearContains = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasContains = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string not_contains = 23; + * @return {string} + */ +proto.validate.StringRules.prototype.getNotContains = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 23, "")); +}; + + +/** + * @param {string} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setNotContains = function(value) { + return jspb.Message.setField(this, 23, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearNotContains = function() { + return jspb.Message.setField(this, 23, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasNotContains = function() { + return jspb.Message.getField(this, 23) != null; +}; + + +/** + * repeated string in = 10; + * @return {!Array} + */ +proto.validate.StringRules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 10, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated string not_in = 11; + * @return {!Array} + */ +proto.validate.StringRules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 11)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 11, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 11, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool email = 12; + * @return {boolean} + */ +proto.validate.StringRules.prototype.getEmail = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setEmail = function(value) { + return jspb.Message.setOneofField(this, 12, proto.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearEmail = function() { + return jspb.Message.setOneofField(this, 12, proto.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasEmail = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional bool hostname = 13; + * @return {boolean} + */ +proto.validate.StringRules.prototype.getHostname = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 13, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setHostname = function(value) { + return jspb.Message.setOneofField(this, 13, proto.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearHostname = function() { + return jspb.Message.setOneofField(this, 13, proto.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasHostname = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional bool ip = 14; + * @return {boolean} + */ +proto.validate.StringRules.prototype.getIp = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setIp = function(value) { + return jspb.Message.setOneofField(this, 14, proto.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearIp = function() { + return jspb.Message.setOneofField(this, 14, proto.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasIp = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional bool ipv4 = 15; + * @return {boolean} + */ +proto.validate.StringRules.prototype.getIpv4 = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setIpv4 = function(value) { + return jspb.Message.setOneofField(this, 15, proto.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearIpv4 = function() { + return jspb.Message.setOneofField(this, 15, proto.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasIpv4 = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional bool ipv6 = 16; + * @return {boolean} + */ +proto.validate.StringRules.prototype.getIpv6 = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 16, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setIpv6 = function(value) { + return jspb.Message.setOneofField(this, 16, proto.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearIpv6 = function() { + return jspb.Message.setOneofField(this, 16, proto.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasIpv6 = function() { + return jspb.Message.getField(this, 16) != null; +}; + + +/** + * optional bool uri = 17; + * @return {boolean} + */ +proto.validate.StringRules.prototype.getUri = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setUri = function(value) { + return jspb.Message.setOneofField(this, 17, proto.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearUri = function() { + return jspb.Message.setOneofField(this, 17, proto.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasUri = function() { + return jspb.Message.getField(this, 17) != null; +}; + + +/** + * optional bool uri_ref = 18; + * @return {boolean} + */ +proto.validate.StringRules.prototype.getUriRef = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setUriRef = function(value) { + return jspb.Message.setOneofField(this, 18, proto.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearUriRef = function() { + return jspb.Message.setOneofField(this, 18, proto.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasUriRef = function() { + return jspb.Message.getField(this, 18) != null; +}; + + +/** + * optional bool address = 21; + * @return {boolean} + */ +proto.validate.StringRules.prototype.getAddress = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 21, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setAddress = function(value) { + return jspb.Message.setOneofField(this, 21, proto.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearAddress = function() { + return jspb.Message.setOneofField(this, 21, proto.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasAddress = function() { + return jspb.Message.getField(this, 21) != null; +}; + + +/** + * optional bool uuid = 22; + * @return {boolean} + */ +proto.validate.StringRules.prototype.getUuid = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 22, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setUuid = function(value) { + return jspb.Message.setOneofField(this, 22, proto.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearUuid = function() { + return jspb.Message.setOneofField(this, 22, proto.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasUuid = function() { + return jspb.Message.getField(this, 22) != null; +}; + + +/** + * optional KnownRegex well_known_regex = 24; + * @return {!proto.validate.KnownRegex} + */ +proto.validate.StringRules.prototype.getWellKnownRegex = function() { + return /** @type {!proto.validate.KnownRegex} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); +}; + + +/** + * @param {!proto.validate.KnownRegex} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setWellKnownRegex = function(value) { + return jspb.Message.setOneofField(this, 24, proto.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearWellKnownRegex = function() { + return jspb.Message.setOneofField(this, 24, proto.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasWellKnownRegex = function() { + return jspb.Message.getField(this, 24) != null; +}; + + +/** + * optional bool strict = 25; + * @return {boolean} + */ +proto.validate.StringRules.prototype.getStrict = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 25, true)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setStrict = function(value) { + return jspb.Message.setField(this, 25, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearStrict = function() { + return jspb.Message.setField(this, 25, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasStrict = function() { + return jspb.Message.getField(this, 25) != null; +}; + + +/** + * optional bool ignore_empty = 26; + * @return {boolean} + */ +proto.validate.StringRules.prototype.getIgnoreEmpty = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 26, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.setIgnoreEmpty = function(value) { + return jspb.Message.setField(this, 26, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.StringRules} returns this + */ +proto.validate.StringRules.prototype.clearIgnoreEmpty = function() { + return jspb.Message.setField(this, 26, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.StringRules.prototype.hasIgnoreEmpty = function() { + return jspb.Message.getField(this, 26) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.validate.BytesRules.repeatedFields_ = [8,9]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.validate.BytesRules.oneofGroups_ = [[10,11,12]]; + +/** + * @enum {number} + */ +proto.validate.BytesRules.WellKnownCase = { + WELL_KNOWN_NOT_SET: 0, + IP: 10, + IPV4: 11, + IPV6: 12 +}; + +/** + * @return {proto.validate.BytesRules.WellKnownCase} + */ +proto.validate.BytesRules.prototype.getWellKnownCase = function() { + return /** @type {proto.validate.BytesRules.WellKnownCase} */(jspb.Message.computeOneofCase(this, proto.validate.BytesRules.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.BytesRules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.BytesRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.BytesRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.BytesRules.toObject = function(includeInstance, msg) { + var f, obj = { + pb_const: msg.getConst_asB64(), + len: (f = jspb.Message.getField(msg, 13)) == null ? undefined : f, + minLen: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + maxLen: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, + pattern: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, + prefix: msg.getPrefix_asB64(), + suffix: msg.getSuffix_asB64(), + contains: msg.getContains_asB64(), + inList: msg.getInList_asB64(), + notInList: msg.getNotInList_asB64(), + ip: (f = jspb.Message.getBooleanField(msg, 10)) == null ? undefined : f, + ipv4: (f = jspb.Message.getBooleanField(msg, 11)) == null ? undefined : f, + ipv6: (f = jspb.Message.getBooleanField(msg, 12)) == null ? undefined : f, + ignoreEmpty: (f = jspb.Message.getBooleanField(msg, 14)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.BytesRules} + */ +proto.validate.BytesRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.BytesRules; + return proto.validate.BytesRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.BytesRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.BytesRules} + */ +proto.validate.BytesRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setConst(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLen(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinLen(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxLen(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPattern(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPrefix(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSuffix(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContains(value); + break; + case 8: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIn(value); + break; + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addNotIn(value); + break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIp(value); + break; + case 11: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIpv4(value); + break; + case 12: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIpv6(value); + break; + case 14: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreEmpty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.BytesRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.BytesRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.BytesRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.BytesRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 13)); + if (f != null) { + writer.writeUint64( + 13, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint64( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBytes( + 5, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBytes( + 6, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBytes( + 7, + f + ); + } + f = message.getInList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 8, + f + ); + } + f = message.getNotInList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 9, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeBool( + 10, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeBool( + 11, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeBool( + 12, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 14)); + if (f != null) { + writer.writeBool( + 14, + f + ); + } +}; + + +/** + * optional bytes const = 1; + * @return {!(string|Uint8Array)} + */ +proto.validate.BytesRules.prototype.getConst = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes const = 1; + * This is a type-conversion wrapper around `getConst()` + * @return {string} + */ +proto.validate.BytesRules.prototype.getConst_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getConst())); +}; + + +/** + * optional bytes const = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getConst()` + * @return {!Uint8Array} + */ +proto.validate.BytesRules.prototype.getConst_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getConst())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.BytesRules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 len = 13; + * @return {number} + */ +proto.validate.BytesRules.prototype.getLen = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.setLen = function(value) { + return jspb.Message.setField(this, 13, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.clearLen = function() { + return jspb.Message.setField(this, 13, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.BytesRules.prototype.hasLen = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional uint64 min_len = 2; + * @return {number} + */ +proto.validate.BytesRules.prototype.getMinLen = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.setMinLen = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.clearMinLen = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.BytesRules.prototype.hasMinLen = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 max_len = 3; + * @return {number} + */ +proto.validate.BytesRules.prototype.getMaxLen = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.setMaxLen = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.clearMaxLen = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.BytesRules.prototype.hasMaxLen = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string pattern = 4; + * @return {string} + */ +proto.validate.BytesRules.prototype.getPattern = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.setPattern = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.clearPattern = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.BytesRules.prototype.hasPattern = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bytes prefix = 5; + * @return {!(string|Uint8Array)} + */ +proto.validate.BytesRules.prototype.getPrefix = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes prefix = 5; + * This is a type-conversion wrapper around `getPrefix()` + * @return {string} + */ +proto.validate.BytesRules.prototype.getPrefix_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPrefix())); +}; + + +/** + * optional bytes prefix = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPrefix()` + * @return {!Uint8Array} + */ +proto.validate.BytesRules.prototype.getPrefix_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPrefix())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.setPrefix = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.clearPrefix = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.BytesRules.prototype.hasPrefix = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes suffix = 6; + * @return {!(string|Uint8Array)} + */ +proto.validate.BytesRules.prototype.getSuffix = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes suffix = 6; + * This is a type-conversion wrapper around `getSuffix()` + * @return {string} + */ +proto.validate.BytesRules.prototype.getSuffix_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSuffix())); +}; + + +/** + * optional bytes suffix = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSuffix()` + * @return {!Uint8Array} + */ +proto.validate.BytesRules.prototype.getSuffix_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSuffix())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.setSuffix = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.clearSuffix = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.BytesRules.prototype.hasSuffix = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes contains = 7; + * @return {!(string|Uint8Array)} + */ +proto.validate.BytesRules.prototype.getContains = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes contains = 7; + * This is a type-conversion wrapper around `getContains()` + * @return {string} + */ +proto.validate.BytesRules.prototype.getContains_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContains())); +}; + + +/** + * optional bytes contains = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContains()` + * @return {!Uint8Array} + */ +proto.validate.BytesRules.prototype.getContains_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContains())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.setContains = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.clearContains = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.BytesRules.prototype.hasContains = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * repeated bytes in = 8; + * @return {!(Array|Array)} + */ +proto.validate.BytesRules.prototype.getInList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * repeated bytes in = 8; + * This is a type-conversion wrapper around `getInList()` + * @return {!Array} + */ +proto.validate.BytesRules.prototype.getInList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getInList())); +}; + + +/** + * repeated bytes in = 8; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getInList()` + * @return {!Array} + */ +proto.validate.BytesRules.prototype.getInList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getInList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated bytes not_in = 9; + * @return {!(Array|Array)} + */ +proto.validate.BytesRules.prototype.getNotInList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 9)); +}; + + +/** + * repeated bytes not_in = 9; + * This is a type-conversion wrapper around `getNotInList()` + * @return {!Array} + */ +proto.validate.BytesRules.prototype.getNotInList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getNotInList())); +}; + + +/** + * repeated bytes not_in = 9; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNotInList()` + * @return {!Array} + */ +proto.validate.BytesRules.prototype.getNotInList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getNotInList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 9, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 9, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool ip = 10; + * @return {boolean} + */ +proto.validate.BytesRules.prototype.getIp = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.setIp = function(value) { + return jspb.Message.setOneofField(this, 10, proto.validate.BytesRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.clearIp = function() { + return jspb.Message.setOneofField(this, 10, proto.validate.BytesRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.BytesRules.prototype.hasIp = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional bool ipv4 = 11; + * @return {boolean} + */ +proto.validate.BytesRules.prototype.getIpv4 = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.setIpv4 = function(value) { + return jspb.Message.setOneofField(this, 11, proto.validate.BytesRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.clearIpv4 = function() { + return jspb.Message.setOneofField(this, 11, proto.validate.BytesRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.BytesRules.prototype.hasIpv4 = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional bool ipv6 = 12; + * @return {boolean} + */ +proto.validate.BytesRules.prototype.getIpv6 = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.setIpv6 = function(value) { + return jspb.Message.setOneofField(this, 12, proto.validate.BytesRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.clearIpv6 = function() { + return jspb.Message.setOneofField(this, 12, proto.validate.BytesRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.BytesRules.prototype.hasIpv6 = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional bool ignore_empty = 14; + * @return {boolean} + */ +proto.validate.BytesRules.prototype.getIgnoreEmpty = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.setIgnoreEmpty = function(value) { + return jspb.Message.setField(this, 14, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.BytesRules} returns this + */ +proto.validate.BytesRules.prototype.clearIgnoreEmpty = function() { + return jspb.Message.setField(this, 14, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.BytesRules.prototype.hasIgnoreEmpty = function() { + return jspb.Message.getField(this, 14) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.validate.EnumRules.repeatedFields_ = [3,4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.EnumRules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.EnumRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.EnumRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.EnumRules.toObject = function(includeInstance, msg) { + var f, obj = { + pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + definedOnly: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f, + inList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + notInList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.EnumRules} + */ +proto.validate.EnumRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.EnumRules; + return proto.validate.EnumRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.EnumRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.EnumRules} + */ +proto.validate.EnumRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setConst(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDefinedOnly(value); + break; + case 3: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 4: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.EnumRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.EnumRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.EnumRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.EnumRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt32( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedInt32( + 3, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedInt32( + 4, + f + ); + } +}; + + +/** + * optional int32 const = 1; + * @return {number} + */ +proto.validate.EnumRules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.EnumRules} returns this + */ +proto.validate.EnumRules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.EnumRules} returns this + */ +proto.validate.EnumRules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.EnumRules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool defined_only = 2; + * @return {boolean} + */ +proto.validate.EnumRules.prototype.getDefinedOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.EnumRules} returns this + */ +proto.validate.EnumRules.prototype.setDefinedOnly = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.EnumRules} returns this + */ +proto.validate.EnumRules.prototype.clearDefinedOnly = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.EnumRules.prototype.hasDefinedOnly = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated int32 in = 3; + * @return {!Array} + */ +proto.validate.EnumRules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.EnumRules} returns this + */ +proto.validate.EnumRules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.EnumRules} returns this + */ +proto.validate.EnumRules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.EnumRules} returns this + */ +proto.validate.EnumRules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated int32 not_in = 4; + * @return {!Array} + */ +proto.validate.EnumRules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.EnumRules} returns this + */ +proto.validate.EnumRules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.validate.EnumRules} returns this + */ +proto.validate.EnumRules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.EnumRules} returns this + */ +proto.validate.EnumRules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.MessageRules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.MessageRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.MessageRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.MessageRules.toObject = function(includeInstance, msg) { + var f, obj = { + skip: (f = jspb.Message.getBooleanField(msg, 1)) == null ? undefined : f, + required: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.MessageRules} + */ +proto.validate.MessageRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.MessageRules; + return proto.validate.MessageRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.MessageRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.MessageRules} + */ +proto.validate.MessageRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSkip(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRequired(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.MessageRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.MessageRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.MessageRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.MessageRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional bool skip = 1; + * @return {boolean} + */ +proto.validate.MessageRules.prototype.getSkip = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.MessageRules} returns this + */ +proto.validate.MessageRules.prototype.setSkip = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.MessageRules} returns this + */ +proto.validate.MessageRules.prototype.clearSkip = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.MessageRules.prototype.hasSkip = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool required = 2; + * @return {boolean} + */ +proto.validate.MessageRules.prototype.getRequired = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.MessageRules} returns this + */ +proto.validate.MessageRules.prototype.setRequired = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.MessageRules} returns this + */ +proto.validate.MessageRules.prototype.clearRequired = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.MessageRules.prototype.hasRequired = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.RepeatedRules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.RepeatedRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.RepeatedRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.RepeatedRules.toObject = function(includeInstance, msg) { + var f, obj = { + minItems: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + maxItems: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + unique: (f = jspb.Message.getBooleanField(msg, 3)) == null ? undefined : f, + items: (f = msg.getItems()) && proto.validate.FieldRules.toObject(includeInstance, f), + ignoreEmpty: (f = jspb.Message.getBooleanField(msg, 5)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.RepeatedRules} + */ +proto.validate.RepeatedRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.RepeatedRules; + return proto.validate.RepeatedRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.RepeatedRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.RepeatedRules} + */ +proto.validate.RepeatedRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinItems(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxItems(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUnique(value); + break; + case 4: + var value = new proto.validate.FieldRules; + reader.readMessage(value,proto.validate.FieldRules.deserializeBinaryFromReader); + msg.setItems(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreEmpty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.RepeatedRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.RepeatedRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.RepeatedRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.RepeatedRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } + f = message.getItems(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.validate.FieldRules.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional uint64 min_items = 1; + * @return {number} + */ +proto.validate.RepeatedRules.prototype.getMinItems = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.RepeatedRules} returns this + */ +proto.validate.RepeatedRules.prototype.setMinItems = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.RepeatedRules} returns this + */ +proto.validate.RepeatedRules.prototype.clearMinItems = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.RepeatedRules.prototype.hasMinItems = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 max_items = 2; + * @return {number} + */ +proto.validate.RepeatedRules.prototype.getMaxItems = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.RepeatedRules} returns this + */ +proto.validate.RepeatedRules.prototype.setMaxItems = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.RepeatedRules} returns this + */ +proto.validate.RepeatedRules.prototype.clearMaxItems = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.RepeatedRules.prototype.hasMaxItems = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool unique = 3; + * @return {boolean} + */ +proto.validate.RepeatedRules.prototype.getUnique = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.RepeatedRules} returns this + */ +proto.validate.RepeatedRules.prototype.setUnique = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.RepeatedRules} returns this + */ +proto.validate.RepeatedRules.prototype.clearUnique = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.RepeatedRules.prototype.hasUnique = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional FieldRules items = 4; + * @return {?proto.validate.FieldRules} + */ +proto.validate.RepeatedRules.prototype.getItems = function() { + return /** @type{?proto.validate.FieldRules} */ ( + jspb.Message.getWrapperField(this, proto.validate.FieldRules, 4)); +}; + + +/** + * @param {?proto.validate.FieldRules|undefined} value + * @return {!proto.validate.RepeatedRules} returns this +*/ +proto.validate.RepeatedRules.prototype.setItems = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.RepeatedRules} returns this + */ +proto.validate.RepeatedRules.prototype.clearItems = function() { + return this.setItems(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.RepeatedRules.prototype.hasItems = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bool ignore_empty = 5; + * @return {boolean} + */ +proto.validate.RepeatedRules.prototype.getIgnoreEmpty = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.RepeatedRules} returns this + */ +proto.validate.RepeatedRules.prototype.setIgnoreEmpty = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.RepeatedRules} returns this + */ +proto.validate.RepeatedRules.prototype.clearIgnoreEmpty = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.RepeatedRules.prototype.hasIgnoreEmpty = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.MapRules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.MapRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.MapRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.MapRules.toObject = function(includeInstance, msg) { + var f, obj = { + minPairs: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, + maxPairs: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, + noSparse: (f = jspb.Message.getBooleanField(msg, 3)) == null ? undefined : f, + keys: (f = msg.getKeys()) && proto.validate.FieldRules.toObject(includeInstance, f), + values: (f = msg.getValues()) && proto.validate.FieldRules.toObject(includeInstance, f), + ignoreEmpty: (f = jspb.Message.getBooleanField(msg, 6)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.MapRules} + */ +proto.validate.MapRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.MapRules; + return proto.validate.MapRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.MapRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.MapRules} + */ +proto.validate.MapRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinPairs(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxPairs(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setNoSparse(value); + break; + case 4: + var value = new proto.validate.FieldRules; + reader.readMessage(value,proto.validate.FieldRules.deserializeBinaryFromReader); + msg.setKeys(value); + break; + case 5: + var value = new proto.validate.FieldRules; + reader.readMessage(value,proto.validate.FieldRules.deserializeBinaryFromReader); + msg.setValues(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreEmpty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.MapRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.MapRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.MapRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.MapRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } + f = message.getKeys(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.validate.FieldRules.serializeBinaryToWriter + ); + } + f = message.getValues(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.validate.FieldRules.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBool( + 6, + f + ); + } +}; + + +/** + * optional uint64 min_pairs = 1; + * @return {number} + */ +proto.validate.MapRules.prototype.getMinPairs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.MapRules} returns this + */ +proto.validate.MapRules.prototype.setMinPairs = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.MapRules} returns this + */ +proto.validate.MapRules.prototype.clearMinPairs = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.MapRules.prototype.hasMinPairs = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 max_pairs = 2; + * @return {number} + */ +proto.validate.MapRules.prototype.getMaxPairs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.validate.MapRules} returns this + */ +proto.validate.MapRules.prototype.setMaxPairs = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.MapRules} returns this + */ +proto.validate.MapRules.prototype.clearMaxPairs = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.MapRules.prototype.hasMaxPairs = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool no_sparse = 3; + * @return {boolean} + */ +proto.validate.MapRules.prototype.getNoSparse = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.MapRules} returns this + */ +proto.validate.MapRules.prototype.setNoSparse = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.MapRules} returns this + */ +proto.validate.MapRules.prototype.clearNoSparse = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.MapRules.prototype.hasNoSparse = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional FieldRules keys = 4; + * @return {?proto.validate.FieldRules} + */ +proto.validate.MapRules.prototype.getKeys = function() { + return /** @type{?proto.validate.FieldRules} */ ( + jspb.Message.getWrapperField(this, proto.validate.FieldRules, 4)); +}; + + +/** + * @param {?proto.validate.FieldRules|undefined} value + * @return {!proto.validate.MapRules} returns this +*/ +proto.validate.MapRules.prototype.setKeys = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.MapRules} returns this + */ +proto.validate.MapRules.prototype.clearKeys = function() { + return this.setKeys(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.MapRules.prototype.hasKeys = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional FieldRules values = 5; + * @return {?proto.validate.FieldRules} + */ +proto.validate.MapRules.prototype.getValues = function() { + return /** @type{?proto.validate.FieldRules} */ ( + jspb.Message.getWrapperField(this, proto.validate.FieldRules, 5)); +}; + + +/** + * @param {?proto.validate.FieldRules|undefined} value + * @return {!proto.validate.MapRules} returns this +*/ +proto.validate.MapRules.prototype.setValues = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.MapRules} returns this + */ +proto.validate.MapRules.prototype.clearValues = function() { + return this.setValues(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.MapRules.prototype.hasValues = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bool ignore_empty = 6; + * @return {boolean} + */ +proto.validate.MapRules.prototype.getIgnoreEmpty = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.MapRules} returns this + */ +proto.validate.MapRules.prototype.setIgnoreEmpty = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.MapRules} returns this + */ +proto.validate.MapRules.prototype.clearIgnoreEmpty = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.MapRules.prototype.hasIgnoreEmpty = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.validate.AnyRules.repeatedFields_ = [2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.AnyRules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.AnyRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.AnyRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.AnyRules.toObject = function(includeInstance, msg) { + var f, obj = { + required: (f = jspb.Message.getBooleanField(msg, 1)) == null ? undefined : f, + inList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + notInList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.AnyRules} + */ +proto.validate.AnyRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.AnyRules; + return proto.validate.AnyRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.AnyRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.AnyRules} + */ +proto.validate.AnyRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRequired(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addIn(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addNotIn(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.AnyRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.AnyRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.AnyRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.AnyRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( + 1, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } +}; + + +/** + * optional bool required = 1; + * @return {boolean} + */ +proto.validate.AnyRules.prototype.getRequired = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.AnyRules} returns this + */ +proto.validate.AnyRules.prototype.setRequired = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.AnyRules} returns this + */ +proto.validate.AnyRules.prototype.clearRequired = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.AnyRules.prototype.hasRequired = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated string in = 2; + * @return {!Array} + */ +proto.validate.AnyRules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.AnyRules} returns this + */ +proto.validate.AnyRules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.validate.AnyRules} returns this + */ +proto.validate.AnyRules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.AnyRules} returns this + */ +proto.validate.AnyRules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated string not_in = 3; + * @return {!Array} + */ +proto.validate.AnyRules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.AnyRules} returns this + */ +proto.validate.AnyRules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.validate.AnyRules} returns this + */ +proto.validate.AnyRules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.AnyRules} returns this + */ +proto.validate.AnyRules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.validate.DurationRules.repeatedFields_ = [7,8]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.DurationRules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.DurationRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.DurationRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.DurationRules.toObject = function(includeInstance, msg) { + var f, obj = { + required: (f = jspb.Message.getBooleanField(msg, 1)) == null ? undefined : f, + pb_const: (f = msg.getConst()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + lt: (f = msg.getLt()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + lte: (f = msg.getLte()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + gt: (f = msg.getGt()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + gte: (f = msg.getGte()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + inList: jspb.Message.toObjectList(msg.getInList(), + google_protobuf_duration_pb.Duration.toObject, includeInstance), + notInList: jspb.Message.toObjectList(msg.getNotInList(), + google_protobuf_duration_pb.Duration.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.DurationRules} + */ +proto.validate.DurationRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.DurationRules; + return proto.validate.DurationRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.DurationRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.DurationRules} + */ +proto.validate.DurationRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRequired(value); + break; + case 2: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setConst(value); + break; + case 3: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setLt(value); + break; + case 4: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setLte(value); + break; + case 5: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setGt(value); + break; + case 6: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setGte(value); + break; + case 7: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.addIn(value); + break; + case 8: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.addNotIn(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.DurationRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.DurationRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.DurationRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.DurationRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( + 1, + f + ); + } + f = message.getConst(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getLt(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getLte(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getGt(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getGte(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bool required = 1; + * @return {boolean} + */ +proto.validate.DurationRules.prototype.getRequired = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.DurationRules} returns this + */ +proto.validate.DurationRules.prototype.setRequired = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.DurationRules} returns this + */ +proto.validate.DurationRules.prototype.clearRequired = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.DurationRules.prototype.hasRequired = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Duration const = 2; + * @return {?proto.google.protobuf.Duration} + */ +proto.validate.DurationRules.prototype.getConst = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.validate.DurationRules} returns this +*/ +proto.validate.DurationRules.prototype.setConst = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.DurationRules} returns this + */ +proto.validate.DurationRules.prototype.clearConst = function() { + return this.setConst(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.DurationRules.prototype.hasConst = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Duration lt = 3; + * @return {?proto.google.protobuf.Duration} + */ +proto.validate.DurationRules.prototype.getLt = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.validate.DurationRules} returns this +*/ +proto.validate.DurationRules.prototype.setLt = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.DurationRules} returns this + */ +proto.validate.DurationRules.prototype.clearLt = function() { + return this.setLt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.DurationRules.prototype.hasLt = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Duration lte = 4; + * @return {?proto.google.protobuf.Duration} + */ +proto.validate.DurationRules.prototype.getLte = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.validate.DurationRules} returns this +*/ +proto.validate.DurationRules.prototype.setLte = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.DurationRules} returns this + */ +proto.validate.DurationRules.prototype.clearLte = function() { + return this.setLte(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.DurationRules.prototype.hasLte = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.Duration gt = 5; + * @return {?proto.google.protobuf.Duration} + */ +proto.validate.DurationRules.prototype.getGt = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.validate.DurationRules} returns this +*/ +proto.validate.DurationRules.prototype.setGt = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.DurationRules} returns this + */ +proto.validate.DurationRules.prototype.clearGt = function() { + return this.setGt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.DurationRules.prototype.hasGt = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional google.protobuf.Duration gte = 6; + * @return {?proto.google.protobuf.Duration} + */ +proto.validate.DurationRules.prototype.getGte = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.validate.DurationRules} returns this +*/ +proto.validate.DurationRules.prototype.setGte = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.DurationRules} returns this + */ +proto.validate.DurationRules.prototype.clearGte = function() { + return this.setGte(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.DurationRules.prototype.hasGte = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * repeated google.protobuf.Duration in = 7; + * @return {!Array} + */ +proto.validate.DurationRules.prototype.getInList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_duration_pb.Duration, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.DurationRules} returns this +*/ +proto.validate.DurationRules.prototype.setInList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.google.protobuf.Duration=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Duration} + */ +proto.validate.DurationRules.prototype.addIn = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.google.protobuf.Duration, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.DurationRules} returns this + */ +proto.validate.DurationRules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated google.protobuf.Duration not_in = 8; + * @return {!Array} + */ +proto.validate.DurationRules.prototype.getNotInList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_duration_pb.Duration, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.validate.DurationRules} returns this +*/ +proto.validate.DurationRules.prototype.setNotInList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.google.protobuf.Duration=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Duration} + */ +proto.validate.DurationRules.prototype.addNotIn = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.google.protobuf.Duration, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.validate.DurationRules} returns this + */ +proto.validate.DurationRules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.validate.TimestampRules.prototype.toObject = function(opt_includeInstance) { + return proto.validate.TimestampRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.validate.TimestampRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.TimestampRules.toObject = function(includeInstance, msg) { + var f, obj = { + required: (f = jspb.Message.getBooleanField(msg, 1)) == null ? undefined : f, + pb_const: (f = msg.getConst()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + lt: (f = msg.getLt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + lte: (f = msg.getLte()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + gt: (f = msg.getGt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + gte: (f = msg.getGte()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + ltNow: (f = jspb.Message.getBooleanField(msg, 7)) == null ? undefined : f, + gtNow: (f = jspb.Message.getBooleanField(msg, 8)) == null ? undefined : f, + within: (f = msg.getWithin()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.validate.TimestampRules} + */ +proto.validate.TimestampRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.validate.TimestampRules; + return proto.validate.TimestampRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.validate.TimestampRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.validate.TimestampRules} + */ +proto.validate.TimestampRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRequired(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setConst(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLt(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLte(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setGt(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setGte(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLtNow(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setGtNow(value); + break; + case 9: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setWithin(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.validate.TimestampRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.validate.TimestampRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.validate.TimestampRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.validate.TimestampRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( + 1, + f + ); + } + f = message.getConst(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getLt(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getLte(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getGt(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getGte(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBool( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } + f = message.getWithin(); + if (f != null) { + writer.writeMessage( + 9, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bool required = 1; + * @return {boolean} + */ +proto.validate.TimestampRules.prototype.getRequired = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.TimestampRules} returns this + */ +proto.validate.TimestampRules.prototype.setRequired = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.TimestampRules} returns this + */ +proto.validate.TimestampRules.prototype.clearRequired = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.TimestampRules.prototype.hasRequired = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Timestamp const = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.validate.TimestampRules.prototype.getConst = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.validate.TimestampRules} returns this +*/ +proto.validate.TimestampRules.prototype.setConst = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.TimestampRules} returns this + */ +proto.validate.TimestampRules.prototype.clearConst = function() { + return this.setConst(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.TimestampRules.prototype.hasConst = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Timestamp lt = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.validate.TimestampRules.prototype.getLt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.validate.TimestampRules} returns this +*/ +proto.validate.TimestampRules.prototype.setLt = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.TimestampRules} returns this + */ +proto.validate.TimestampRules.prototype.clearLt = function() { + return this.setLt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.TimestampRules.prototype.hasLt = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Timestamp lte = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.validate.TimestampRules.prototype.getLte = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.validate.TimestampRules} returns this +*/ +proto.validate.TimestampRules.prototype.setLte = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.TimestampRules} returns this + */ +proto.validate.TimestampRules.prototype.clearLte = function() { + return this.setLte(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.TimestampRules.prototype.hasLte = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.Timestamp gt = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.validate.TimestampRules.prototype.getGt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.validate.TimestampRules} returns this +*/ +proto.validate.TimestampRules.prototype.setGt = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.TimestampRules} returns this + */ +proto.validate.TimestampRules.prototype.clearGt = function() { + return this.setGt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.TimestampRules.prototype.hasGt = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional google.protobuf.Timestamp gte = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.validate.TimestampRules.prototype.getGte = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.validate.TimestampRules} returns this +*/ +proto.validate.TimestampRules.prototype.setGte = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.TimestampRules} returns this + */ +proto.validate.TimestampRules.prototype.clearGte = function() { + return this.setGte(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.TimestampRules.prototype.hasGte = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bool lt_now = 7; + * @return {boolean} + */ +proto.validate.TimestampRules.prototype.getLtNow = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.TimestampRules} returns this + */ +proto.validate.TimestampRules.prototype.setLtNow = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.TimestampRules} returns this + */ +proto.validate.TimestampRules.prototype.clearLtNow = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.TimestampRules.prototype.hasLtNow = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional bool gt_now = 8; + * @return {boolean} + */ +proto.validate.TimestampRules.prototype.getGtNow = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.validate.TimestampRules} returns this + */ +proto.validate.TimestampRules.prototype.setGtNow = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.validate.TimestampRules} returns this + */ +proto.validate.TimestampRules.prototype.clearGtNow = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.TimestampRules.prototype.hasGtNow = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional google.protobuf.Duration within = 9; + * @return {?proto.google.protobuf.Duration} + */ +proto.validate.TimestampRules.prototype.getWithin = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 9)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.validate.TimestampRules} returns this +*/ +proto.validate.TimestampRules.prototype.setWithin = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.validate.TimestampRules} returns this + */ +proto.validate.TimestampRules.prototype.clearWithin = function() { + return this.setWithin(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.validate.TimestampRules.prototype.hasWithin = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * @enum {number} + */ +proto.validate.KnownRegex = { + UNKNOWN: 0, + HTTP_HEADER_NAME: 1, + HTTP_HEADER_VALUE: 2 +}; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `disabled`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.validate.disabled = new jspb.ExtensionFieldInfo( + 1071, + {disabled: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[1071] = new jspb.ExtensionFieldBinaryInfo( + proto.validate.disabled, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[1071] = proto.validate.disabled; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `ignored`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.validate.ignored = new jspb.ExtensionFieldInfo( + 1072, + {ignored: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[1072] = new jspb.ExtensionFieldBinaryInfo( + proto.validate.ignored, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[1072] = proto.validate.ignored; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `required`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.validate.required = new jspb.ExtensionFieldInfo( + 1071, + {required: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.OneofOptions.extensionsBinary[1071] = new jspb.ExtensionFieldBinaryInfo( + proto.validate.required, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.OneofOptions.extensions[1071] = proto.validate.required; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `rules`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.validate.rules = new jspb.ExtensionFieldInfo( + 1071, + {rules: 0}, + proto.validate.FieldRules, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.validate.FieldRules.toObject), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[1071] = new jspb.ExtensionFieldBinaryInfo( + proto.validate.rules, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.validate.FieldRules.serializeBinaryToWriter, + proto.validate.FieldRules.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[1071] = proto.validate.rules; + +goog.object.extend(exports, proto.validate); diff --git a/spec/api.swagger.json b/spec/api.swagger.json index 5bbb4e20c..bf2e24f40 100755 --- a/spec/api.swagger.json +++ b/spec/api.swagger.json @@ -15,9 +15,16 @@ } }, "basePath": "/", - "schemes": ["http", "https"], - "consumes": ["application/json"], - "produces": ["application/json"], + "schemes": [ + "http", + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "paths": { "/admin/relation-tuples": { "delete": { @@ -31,7 +38,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -86,8 +93,12 @@ "type": "string" } ], - "tags": ["relationship"], - "consumes": ["application/x-www-form-urlencoded"] + "tags": [ + "relationship" + ], + "consumes": [ + "application/x-www-form-urlencoded" + ] }, "put": { "summary": "Creates a relationship", @@ -96,13 +107,13 @@ "201": { "description": "The created relationship.", "schema": { - "$ref": "#/definitions/relationship" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -113,11 +124,13 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/createRelationshipBody" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship" } } ], - "tags": ["relationship"] + "tags": [ + "relationship" + ] }, "patch": { "summary": "Writes one or more relationships in a single transaction.", @@ -133,7 +146,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -146,12 +159,14 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/relationshipDelta" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta" } } } ], - "tags": ["relationship"] + "tags": [ + "relationship" + ] } }, "/namespaces": { @@ -163,7 +178,7 @@ "200": { "description": "The list of namespaces.", "schema": { - "$ref": "#/definitions/relationshipNamespaces" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse" }, "examples": { "application/json": { @@ -178,12 +193,16 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, - "tags": ["relationship"], - "consumes": ["application/x-www-form-urlencoded"] + "tags": [ + "relationship" + ], + "consumes": [ + "application/x-www-form-urlencoded" + ] } }, "/opl/syntax/check": { @@ -194,13 +213,13 @@ "200": { "description": "The result of the syntax checker", "schema": { - "$ref": "#/definitions/checkOplSyntaxResult" + "$ref": "#/definitions/ory.keto.opl.v1alpha1.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -215,8 +234,12 @@ } } ], - "tags": ["relationship"], - "consumes": ["text/plain"] + "tags": [ + "relationship" + ], + "consumes": [ + "text/plain" + ] } }, "/relation-tuples": { @@ -227,13 +250,13 @@ "200": { "description": "The list of relationships.", "schema": { - "$ref": "#/definitions/relationships" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -303,8 +326,12 @@ "type": "string" } ], - "tags": ["relationship"], - "consumes": ["application/x-www-form-urlencoded"] + "tags": [ + "relationship" + ], + "consumes": [ + "application/x-www-form-urlencoded" + ] } }, "/relation-tuples/check": { @@ -315,19 +342,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } } }, @@ -390,8 +417,13 @@ "format": "int32" } ], - "tags": ["permission"], - "consumes": ["application/x-www-form-urlencoded", "application/json"] + "tags": [ + "permission" + ], + "consumes": [ + "application/x-www-form-urlencoded", + "application/json" + ] }, "post": { "summary": "Performs an authorization check.", @@ -400,19 +432,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } } }, @@ -423,12 +455,17 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/postCheckPermissionBody" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" } } ], - "tags": ["permission"], - "consumes": ["application/x-www-form-urlencoded", "application/json"] + "tags": [ + "permission" + ], + "consumes": [ + "application/x-www-form-urlencoded", + "application/json" + ] } }, "/relation-tuples/check/openapi": { @@ -439,19 +476,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } } }, @@ -514,8 +551,13 @@ "format": "int32" } ], - "tags": ["permission"], - "consumes": ["application/x-www-form-urlencoded", "application/json"] + "tags": [ + "permission" + ], + "consumes": [ + "application/x-www-form-urlencoded", + "application/json" + ] }, "post": { "summary": "Performs an authorization check.", @@ -524,19 +566,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } } }, @@ -547,12 +589,17 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/postCheckPermissionBody" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" } } ], - "tags": ["permission"], - "consumes": ["application/x-www-form-urlencoded", "application/json"] + "tags": [ + "permission" + ], + "consumes": [ + "application/x-www-form-urlencoded", + "application/json" + ] } }, "/relation-tuples/expand": { @@ -563,13 +610,13 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/expandedPermissionTree" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -604,8 +651,12 @@ "type": "string" } ], - "tags": ["permission"], - "consumes": ["application/x-www-form-urlencoded"] + "tags": [ + "permission" + ], + "consumes": [ + "application/x-www-form-urlencoded" + ] } }, "/version": { @@ -623,16 +674,18 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, - "tags": ["version"] + "tags": [ + "version" + ] } } }, "definitions": { - "checkOplSyntaxResult": { + "ory.keto.opl.v1alpha1.CheckResponse": { "type": "object", "properties": { "errors": { @@ -670,7 +723,7 @@ } } }, - "postCheckPermissionBody": { + "ory.keto.relation_tuples.v1alpha2.CheckRequest": { "type": "object", "properties": { "namespace": { @@ -690,7 +743,7 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/subjectSetQuery", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSetQuery", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." }, "max-depth": { @@ -701,7 +754,7 @@ }, "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object." }, - "checkPermissionResult": { + "ory.keto.relation_tuples.v1alpha2.CheckResponse": { "type": "object", "properties": { "allowed": { @@ -711,7 +764,7 @@ }, "description": "The response for a CheckService.Check rpc." }, - "createRelationshipBody": { + "ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship": { "type": "object", "properties": { "namespace": { @@ -731,7 +784,7 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/subjectSet", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } } @@ -740,7 +793,7 @@ "type": "object", "properties": { "relationTuple": { - "$ref": "#/definitions/relationship", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", "description": "The created relationship." } }, @@ -749,18 +802,20 @@ "ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse": { "type": "object" }, - "errorGeneric": { + "ory.keto.relation_tuples.v1alpha2.ErrorResponse": { "type": "object", "properties": { "error": { - "$ref": "#/definitions/errorGeneric.Error" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error" } }, "description": "The standard Ory JSON API error format.", "title": "JSON API Error Response", - "required": ["error"] + "required": [ + "error" + ] }, - "errorGeneric.Error": { + "ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error": { "type": "object", "properties": { "code": { @@ -811,13 +866,15 @@ "title": "The status description" } }, - "required": ["message"] + "required": [ + "message" + ] }, "ory.keto.relation_tuples.v1alpha2.ExpandResponse": { "type": "object", "properties": { "tree": { - "$ref": "#/definitions/expandedPermissionTree", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree", "description": "The tree the requested subject set expands to.\nThe requested subject set is the subject of the root.\n\nThis field can be nil in some circumstances." } }, @@ -833,7 +890,7 @@ }, "description": "Response of the VersionService.GetVersion RPC." }, - "relationshipNamespaces": { + "ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse": { "type": "object", "properties": { "namespaces": { @@ -844,13 +901,13 @@ } } }, - "relationships": { + "ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse": { "type": "object", "properties": { "relation_tuples": { "type": "array", "items": { - "$ref": "#/definitions/relationship" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" }, "description": "The relationships matching the list request." }, @@ -884,7 +941,7 @@ "default": "unspecified", "description": " - union: This node expands to a union of all children.\n - exclusion: Not implemented yet.\n - intersection: Not implemented yet.\n - leaf: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - tuple_to_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - computed_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - not: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached." }, - "relationship": { + "ory.keto.relation_tuples.v1alpha2.RelationTuple": { "type": "object", "properties": { "namespace": { @@ -904,31 +961,42 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/subjectSet", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } }, "description": "RelationTuple defines a relation between an Object and a Subject.", - "required": ["namespace", "object", "relation"] + "required": [ + "namespace", + "object", + "relation" + ] }, - "relationshipDelta": { + "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta": { "type": "object", "properties": { "action": { - "$ref": "#/definitions/relationshipDelta.Action", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action", "description": "The action to do on the RelationTuple." }, "relation_tuple": { - "$ref": "#/definitions/relationship", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", "description": "The target RelationTuple." } }, "description": "Write-delta for a TransactRelationTuplesRequest.", - "required": ["action", "relation_tuple"] + "required": [ + "action", + "relation_tuple" + ] }, - "relationshipDelta.Action": { + "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action": { "type": "string", - "enum": ["ACTION_UNSPECIFIED", "insert", "delete"], + "enum": [ + "ACTION_UNSPECIFIED", + "insert", + "delete" + ], "default": "ACTION_UNSPECIFIED", "description": " - ACTION_UNSPECIFIED: Unspecified.\nThe `TransactRelationTuples` RPC ignores this\nRelationTupleDelta if an action was unspecified.\n - insert: Insertion of a new RelationTuple.\nIt is ignored if already existing.\n - delete: Deletion of the RelationTuple.\nIt is ignored if it does not exist." }, @@ -940,13 +1008,13 @@ "description": "A concrete id of the subject." }, "set": { - "$ref": "#/definitions/subjectSet", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } }, "description": "Subject is either a concrete subject id or\na `SubjectSet` expanding to more Subjects." }, - "subjectSet": { + "ory.keto.relation_tuples.v1alpha2.SubjectSet": { "type": "object", "properties": { "namespace": { @@ -963,9 +1031,13 @@ } }, "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`.", - "required": ["namespace", "object", "relation"] + "required": [ + "namespace", + "object", + "relation" + ] }, - "subjectSetQuery": { + "ory.keto.relation_tuples.v1alpha2.SubjectSetQuery": { "type": "object", "properties": { "namespace": { @@ -983,7 +1055,7 @@ }, "description": "SubjectSetQuery refers to all subjects who have\nthe same `relation` on an `object`." }, - "expandedPermissionTree": { + "ory.keto.relation_tuples.v1alpha2.SubjectTree": { "type": "object", "properties": { "type": { @@ -995,23 +1067,24 @@ "description": "The subject this node represents.\nDeprecated: More information is now available in the tuple field." }, "tuple": { - "$ref": "#/definitions/relationship", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", "description": "The relation tuple this node represents." }, "children": { "type": "array", "items": { - "$ref": "#/definitions/expandedPermissionTree" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" }, "description": "The children of this node.\n\nThis is never set if `node_type` == `NODE_TYPE_LEAF`." } }, - "required": ["type"] + "required": [ + "type" + ] }, "ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse": { "type": "object", "description": "The response of a WriteService.TransactRelationTuples rpc." - }, - "UUID": { "type": "string", "format": "uuid4" } + } } } From 7ec7e6b528982697346395273d9166a225868d8c Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Wed, 22 Feb 2023 12:24:43 +0100 Subject: [PATCH 09/42] chore: format --- .../01-expand-beach/expected_output.json | 2 +- proto/buf.md | 3685 +++++++---------- spec/api.swagger.json | 136 +- 3 files changed, 1554 insertions(+), 2269 deletions(-) diff --git a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/expected_output.json b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/expected_output.json index e583be78c..5affdb34e 100644 --- a/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/expected_output.json +++ b/contrib/docs-code-samples/expand-api-display-access/01-expand-beach/expected_output.json @@ -144,4 +144,4 @@ } }, "type": "union" -} \ No newline at end of file +} diff --git a/proto/buf.md b/proto/buf.md index 77c782e7c..4d67c38f0 100644 --- a/proto/buf.md +++ b/proto/buf.md @@ -1,258 +1,255 @@ # Protocol Documentation + ## Table of Contents - [google/api/http.proto](#google_api_http-proto) - - [CustomHttpPattern](#google-api-CustomHttpPattern) - - [Http](#google-api-Http) - - [HttpRule](#google-api-HttpRule) - + - [CustomHttpPattern](#google-api-CustomHttpPattern) + - [Http](#google-api-Http) + - [HttpRule](#google-api-HttpRule) - [google/api/annotations.proto](#google_api_annotations-proto) - - [File-level Extensions](#google_api_annotations-proto-extensions) - + - [File-level Extensions](#google_api_annotations-proto-extensions) - [protoc-gen-openapiv2/options/openapiv2.proto](#protoc-gen-openapiv2_options_openapiv2-proto) - - [Contact](#grpc-gateway-protoc_gen_openapiv2-options-Contact) - - [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) - - [Header](#grpc-gateway-protoc_gen_openapiv2-options-Header) - - [HeaderParameter](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter) - - [Info](#grpc-gateway-protoc_gen_openapiv2-options-Info) - - [Info.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Info-ExtensionsEntry) - - [JSONSchema](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema) - - [JSONSchema.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-ExtensionsEntry) - - [JSONSchema.FieldConfiguration](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-FieldConfiguration) - - [License](#grpc-gateway-protoc_gen_openapiv2-options-License) - - [Operation](#grpc-gateway-protoc_gen_openapiv2-options-Operation) - - [Operation.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ExtensionsEntry) - - [Operation.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ResponsesEntry) - - [Parameters](#grpc-gateway-protoc_gen_openapiv2-options-Parameters) - - [Response](#grpc-gateway-protoc_gen_openapiv2-options-Response) - - [Response.ExamplesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExamplesEntry) - - [Response.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExtensionsEntry) - - [Response.HeadersEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-HeadersEntry) - - [Schema](#grpc-gateway-protoc_gen_openapiv2-options-Schema) - - [Scopes](#grpc-gateway-protoc_gen_openapiv2-options-Scopes) - - [Scopes.ScopeEntry](#grpc-gateway-protoc_gen_openapiv2-options-Scopes-ScopeEntry) - - [SecurityDefinitions](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions) - - [SecurityDefinitions.SecurityEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions-SecurityEntry) - - [SecurityRequirement](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement) - - [SecurityRequirement.SecurityRequirementEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementEntry) - - [SecurityRequirement.SecurityRequirementValue](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementValue) - - [SecurityScheme](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme) - - [SecurityScheme.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-ExtensionsEntry) - - [Swagger](#grpc-gateway-protoc_gen_openapiv2-options-Swagger) - - [Swagger.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ExtensionsEntry) - - [Swagger.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ResponsesEntry) - - [Tag](#grpc-gateway-protoc_gen_openapiv2-options-Tag) - - [Tag.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Tag-ExtensionsEntry) - - - [HeaderParameter.Type](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter-Type) - - [JSONSchema.JSONSchemaSimpleTypes](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-JSONSchemaSimpleTypes) - - [Scheme](#grpc-gateway-protoc_gen_openapiv2-options-Scheme) - - [SecurityScheme.Flow](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Flow) - - [SecurityScheme.In](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-In) - - [SecurityScheme.Type](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Type) - + + - [Contact](#grpc-gateway-protoc_gen_openapiv2-options-Contact) + - [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) + - [Header](#grpc-gateway-protoc_gen_openapiv2-options-Header) + - [HeaderParameter](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter) + - [Info](#grpc-gateway-protoc_gen_openapiv2-options-Info) + - [Info.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Info-ExtensionsEntry) + - [JSONSchema](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema) + - [JSONSchema.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-ExtensionsEntry) + - [JSONSchema.FieldConfiguration](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-FieldConfiguration) + - [License](#grpc-gateway-protoc_gen_openapiv2-options-License) + - [Operation](#grpc-gateway-protoc_gen_openapiv2-options-Operation) + - [Operation.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ExtensionsEntry) + - [Operation.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ResponsesEntry) + - [Parameters](#grpc-gateway-protoc_gen_openapiv2-options-Parameters) + - [Response](#grpc-gateway-protoc_gen_openapiv2-options-Response) + - [Response.ExamplesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExamplesEntry) + - [Response.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExtensionsEntry) + - [Response.HeadersEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-HeadersEntry) + - [Schema](#grpc-gateway-protoc_gen_openapiv2-options-Schema) + - [Scopes](#grpc-gateway-protoc_gen_openapiv2-options-Scopes) + - [Scopes.ScopeEntry](#grpc-gateway-protoc_gen_openapiv2-options-Scopes-ScopeEntry) + - [SecurityDefinitions](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions) + - [SecurityDefinitions.SecurityEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions-SecurityEntry) + - [SecurityRequirement](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement) + - [SecurityRequirement.SecurityRequirementEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementEntry) + - [SecurityRequirement.SecurityRequirementValue](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementValue) + - [SecurityScheme](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme) + - [SecurityScheme.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-ExtensionsEntry) + - [Swagger](#grpc-gateway-protoc_gen_openapiv2-options-Swagger) + - [Swagger.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ExtensionsEntry) + - [Swagger.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ResponsesEntry) + - [Tag](#grpc-gateway-protoc_gen_openapiv2-options-Tag) + - [Tag.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Tag-ExtensionsEntry) + + - [HeaderParameter.Type](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter-Type) + - [JSONSchema.JSONSchemaSimpleTypes](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-JSONSchemaSimpleTypes) + - [Scheme](#grpc-gateway-protoc_gen_openapiv2-options-Scheme) + - [SecurityScheme.Flow](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Flow) + - [SecurityScheme.In](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-In) + - [SecurityScheme.Type](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Type) + - [protoc-gen-openapiv2/options/annotations.proto](#protoc-gen-openapiv2_options_annotations-proto) - - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) - - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) - - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) - - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) - - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) - + - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) + - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) + - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) + - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) + - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) - [ory/keto/opl/v1alpha1/syntax_service.proto](#ory_keto_opl_v1alpha1_syntax_service-proto) - - [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) - - [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) - - [ParseError](#ory-keto-opl-v1alpha1-ParseError) - - [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) - - - [SyntaxService](#ory-keto-opl-v1alpha1-SyntaxService) - + + - [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) + - [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) + - [ParseError](#ory-keto-opl-v1alpha1-ParseError) + - [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) + + - [SyntaxService](#ory-keto-opl-v1alpha1-SyntaxService) + - [google/api/visibility.proto](#google_api_visibility-proto) - - [Visibility](#google-api-Visibility) - - [VisibilityRule](#google-api-VisibilityRule) - - - [File-level Extensions](#google_api_visibility-proto-extensions) - - [File-level Extensions](#google_api_visibility-proto-extensions) - - [File-level Extensions](#google_api_visibility-proto-extensions) - - [File-level Extensions](#google_api_visibility-proto-extensions) - - [File-level Extensions](#google_api_visibility-proto-extensions) - - [File-level Extensions](#google_api_visibility-proto-extensions) - + + - [Visibility](#google-api-Visibility) + - [VisibilityRule](#google-api-VisibilityRule) + + - [File-level Extensions](#google_api_visibility-proto-extensions) + - [File-level Extensions](#google_api_visibility-proto-extensions) + - [File-level Extensions](#google_api_visibility-proto-extensions) + - [File-level Extensions](#google_api_visibility-proto-extensions) + - [File-level Extensions](#google_api_visibility-proto-extensions) + - [File-level Extensions](#google_api_visibility-proto-extensions) + - [google/api/field_behavior.proto](#google_api_field_behavior-proto) - - [FieldBehavior](#google-api-FieldBehavior) - - - [File-level Extensions](#google_api_field_behavior-proto-extensions) - + + - [FieldBehavior](#google-api-FieldBehavior) + + - [File-level Extensions](#google_api_field_behavior-proto-extensions) + - [ory/keto/relation_tuples/v1alpha2/relation_tuples.proto](#ory_keto_relation_tuples_v1alpha2_relation_tuples-proto) - - [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) - - [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) - - [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) - - [SubjectQuery](#ory-keto-relation_tuples-v1alpha2-SubjectQuery) - - [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) - - [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) - + - [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) + - [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) + - [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) + - [SubjectQuery](#ory-keto-relation_tuples-v1alpha2-SubjectQuery) + - [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) + - [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) - [ory/keto/relation_tuples/v1alpha2/check_service.proto](#ory_keto_relation_tuples_v1alpha2_check_service-proto) - - [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) - - [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) - - - [CheckService](#ory-keto-relation_tuples-v1alpha2-CheckService) - + + - [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) + - [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) + + - [CheckService](#ory-keto-relation_tuples-v1alpha2-CheckService) + - [ory/keto/relation_tuples/v1alpha2/expand_service.proto](#ory_keto_relation_tuples_v1alpha2_expand_service-proto) - - [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) - - [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) - - [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) - - - [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) - - - [ExpandService](#ory-keto-relation_tuples-v1alpha2-ExpandService) - + + - [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) + - [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) + - [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) + + - [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) + + - [ExpandService](#ory-keto-relation_tuples-v1alpha2-ExpandService) + - [ory/keto/relation_tuples/v1alpha2/namespaces_service.proto](#ory_keto_relation_tuples_v1alpha2_namespaces_service-proto) - - [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) - - [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) - - [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) - - - [NamespacesService](#ory-keto-relation_tuples-v1alpha2-NamespacesService) - + + - [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) + - [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) + - [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) + + - [NamespacesService](#ory-keto-relation_tuples-v1alpha2-NamespacesService) + - [ory/keto/relation_tuples/v1alpha2/openapi.proto](#ory_keto_relation_tuples_v1alpha2_openapi-proto) - - [ErrorResponse](#ory-keto-relation_tuples-v1alpha2-ErrorResponse) - - [ErrorResponse.Error](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error) - - [ErrorResponse.Error.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error-DetailsEntry) - + - [ErrorResponse](#ory-keto-relation_tuples-v1alpha2-ErrorResponse) + - [ErrorResponse.Error](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error) + - [ErrorResponse.Error.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error-DetailsEntry) - [ory/keto/relation_tuples/v1alpha2/read_service.proto](#ory_keto_relation_tuples_v1alpha2_read_service-proto) - - [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) - - [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) - - [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) - - - [ReadService](#ory-keto-relation_tuples-v1alpha2-ReadService) - -- [ory/keto/relation_tuples/v1alpha2/version.proto](#ory_keto_relation_tuples_v1alpha2_version-proto) - - [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) - - [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) - - - [VersionService](#ory-keto-relation_tuples-v1alpha2-VersionService) - -- [validate/validate.proto](#validate_validate-proto) - - [AnyRules](#validate-AnyRules) - - [BoolRules](#validate-BoolRules) - - [BytesRules](#validate-BytesRules) - - [DoubleRules](#validate-DoubleRules) - - [DurationRules](#validate-DurationRules) - - [EnumRules](#validate-EnumRules) - - [FieldRules](#validate-FieldRules) - - [Fixed32Rules](#validate-Fixed32Rules) - - [Fixed64Rules](#validate-Fixed64Rules) - - [FloatRules](#validate-FloatRules) - - [Int32Rules](#validate-Int32Rules) - - [Int64Rules](#validate-Int64Rules) - - [MapRules](#validate-MapRules) - - [MessageRules](#validate-MessageRules) - - [RepeatedRules](#validate-RepeatedRules) - - [SFixed32Rules](#validate-SFixed32Rules) - - [SFixed64Rules](#validate-SFixed64Rules) - - [SInt32Rules](#validate-SInt32Rules) - - [SInt64Rules](#validate-SInt64Rules) - - [StringRules](#validate-StringRules) - - [TimestampRules](#validate-TimestampRules) - - [UInt32Rules](#validate-UInt32Rules) - - [UInt64Rules](#validate-UInt64Rules) - - - [KnownRegex](#validate-KnownRegex) - - - [File-level Extensions](#validate_validate-proto-extensions) - - [File-level Extensions](#validate_validate-proto-extensions) - - [File-level Extensions](#validate_validate-proto-extensions) - - [File-level Extensions](#validate_validate-proto-extensions) - -- [ory/keto/relation_tuples/v1alpha2/write_service.proto](#ory_keto_relation_tuples_v1alpha2_write_service-proto) - - [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) - - [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) - - [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) - - [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) - - [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) - - [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) - - [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) - - [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) - - [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) - - - [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) - - - [WriteService](#ory-keto-relation_tuples-v1alpha2-WriteService) - -- [Scalar Value Types](#scalar-value-types) + - [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) + - [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) + - [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) + - [ReadService](#ory-keto-relation_tuples-v1alpha2-ReadService) - -

Top

- -## google/api/http.proto +- [ory/keto/relation_tuples/v1alpha2/version.proto](#ory_keto_relation_tuples_v1alpha2_version-proto) + - [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) + - [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) + - [VersionService](#ory-keto-relation_tuples-v1alpha2-VersionService) - +- [validate/validate.proto](#validate_validate-proto) -### CustomHttpPattern -A custom pattern is used for defining custom HTTP verb. + - [AnyRules](#validate-AnyRules) + - [BoolRules](#validate-BoolRules) + - [BytesRules](#validate-BytesRules) + - [DoubleRules](#validate-DoubleRules) + - [DurationRules](#validate-DurationRules) + - [EnumRules](#validate-EnumRules) + - [FieldRules](#validate-FieldRules) + - [Fixed32Rules](#validate-Fixed32Rules) + - [Fixed64Rules](#validate-Fixed64Rules) + - [FloatRules](#validate-FloatRules) + - [Int32Rules](#validate-Int32Rules) + - [Int64Rules](#validate-Int64Rules) + - [MapRules](#validate-MapRules) + - [MessageRules](#validate-MessageRules) + - [RepeatedRules](#validate-RepeatedRules) + - [SFixed32Rules](#validate-SFixed32Rules) + - [SFixed64Rules](#validate-SFixed64Rules) + - [SInt32Rules](#validate-SInt32Rules) + - [SInt64Rules](#validate-SInt64Rules) + - [StringRules](#validate-StringRules) + - [TimestampRules](#validate-TimestampRules) + - [UInt32Rules](#validate-UInt32Rules) + - [UInt64Rules](#validate-UInt64Rules) + + - [KnownRegex](#validate-KnownRegex) + + - [File-level Extensions](#validate_validate-proto-extensions) + - [File-level Extensions](#validate_validate-proto-extensions) + - [File-level Extensions](#validate_validate-proto-extensions) + - [File-level Extensions](#validate_validate-proto-extensions) +- [ory/keto/relation_tuples/v1alpha2/write_service.proto](#ory_keto_relation_tuples_v1alpha2_write_service-proto) -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| kind | [string](#string) | | The name of this custom HTTP verb. | -| path | [string](#string) | | The path matched by this custom verb. | + - [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) + - [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) + - [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) + - [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) + - [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) + - [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) + - [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) + - [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) + - [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) + - [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) + - [WriteService](#ory-keto-relation_tuples-v1alpha2-WriteService) +- [Scalar Value Types](#scalar-value-types) + +

Top

- +## google/api/http.proto -### Http -Defines the HTTP configuration for an API service. It contains a list of -[HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -to one or more HTTP REST API methods. + +### CustomHttpPattern -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| rules | [HttpRule](#google-api-HttpRule) | repeated | A list of HTTP configuration rules that apply to individual API methods. +A custom pattern is used for defining custom HTTP verb. -**NOTE:** All service configuration rules follow "last one wins" order. | -| fully_decode_reserved_expansion | [bool](#bool) | | When set to true, URL path parameters will be fully URI-decoded except in cases of single segment matches in reserved expansion, where "%2F" will be left encoded. +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ------------------------------------- | +| kind | [string](#string) | | The name of this custom HTTP verb. | +| path | [string](#string) | | The path matched by this custom verb. | -The default behavior is to not decode RFC 6570 reserved characters in multi segment matches. | + +### Http +Defines the HTTP configuration for an API service. It contains a list of +[HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method to +one or more HTTP REST API methods. +| Field | Type | Label | Description | +| ----- | -------------------------------- | -------- | ------------------------------------------------------------------------ | +| rules | [HttpRule](#google-api-HttpRule) | repeated | A list of HTTP configuration rules that apply to individual API methods. | +**NOTE:** All service configuration rules follow "last one wins" order. +| | fully_decode_reserved_expansion | [bool](#bool) | | When set to true, URL +path parameters will be fully URI-decoded except in cases of single segment +matches in reserved expansion, where "%2F" will be left encoded. +The default behavior is to not decode RFC 6570 reserved characters in multi +segment matches. | ### HttpRule + # gRPC Transcoding -gRPC Transcoding is a feature for mapping between a gRPC method and one or -more HTTP REST endpoints. It allows developers to build a single API service -that supports both gRPC APIs and REST APIs. Many systems, including [Google -APIs](https://github.com/googleapis/googleapis), -[Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -and use it for large scale production services. +gRPC Transcoding is a feature for mapping between a gRPC method and one or more +HTTP REST endpoints. It allows developers to build a single API service that +supports both gRPC APIs and REST APIs. Many systems, including +[Google APIs](https://github.com/googleapis/googleapis), +[Cloud Endpoints](https://cloud.google.com/endpoints), +[gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and +[Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use +it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -how different portions of the gRPC request message are mapped to the URL -path, URL query parameters, and HTTP request body. It also controls how the -gRPC response message is mapped to the HTTP response body. `HttpRule` is -typically specified as an `google.api.http` annotation on the gRPC method. +how different portions of the gRPC request message are mapped to the URL path, +URL query parameters, and HTTP request body. It also controls how the gRPC +response message is mapped to the HTTP response body. `HttpRule` is typically +specified as an `google.api.http` annotation on the gRPC method. -Each mapping specifies a URL path template and an HTTP method. The path -template may refer to one or more fields in the gRPC request message, as long -as each field is a non-repeated field with a primitive (non-message) type. -The path template controls how fields of the request message are mapped to -the URL path. +Each mapping specifies a URL path template and an HTTP method. The path template +may refer to one or more fields in the gRPC request message, as long as each +field is a non-repeated field with a primitive (non-message) type. The path +template controls how fields of the request message are mapped to the URL path. Example: @@ -272,13 +269,13 @@ Example: This enables an HTTP REST to gRPC mapping as below: -HTTP | gRPC ------|----- -`GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` +| HTTP | gRPC | +| ------------------------- | --------------------------------------------- | +| `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` | Any fields in the request message which are not bound by the path template -automatically become HTTP query parameters if there is no HTTP request body. -For example: +automatically become HTTP query parameters if there is no HTTP request body. For +example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { @@ -298,22 +295,21 @@ For example: This enables a HTTP JSON to RPC mapping as below: -HTTP | gRPC ------|----- -`GET /v1/messages/123456?revision=2&sub.subfield=foo` | -`GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -"foo"))` +| HTTP | gRPC | +| --------------------------------------------------------- | ---- | +| `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -Note that fields which are mapped to URL query parameters must have a -primitive type or a repeated primitive type or a non-repeated message type. -In the case of a repeated type, the parameter can be repeated in the URL -as `...?param=A&param=B`. In the case of a message type, each field of the +`GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` + +Note that fields which are mapped to URL query parameters must have a primitive +type or a repeated primitive type or a non-repeated message type. In the case of +a repeated type, the parameter can be repeated in the URL as +`...?param=A&param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A&foo.b=B&foo.c=C`. -For HTTP methods that allow a request body, the `body` field -specifies the mapping. Consider a REST update method on the -message resource collection: +For HTTP methods that allow a request body, the `body` field specifies the +mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { @@ -328,19 +324,18 @@ message resource collection: Message message = 2; // mapped to the body } -The following HTTP JSON to RPC mapping is enabled, where the -representation of the JSON in the request body is determined by -protos JSON encoding: +The following HTTP JSON to RPC mapping is enabled, where the representation of +the JSON in the request body is determined by protos JSON encoding: + +| HTTP | gRPC | +| ------------------------------------------------------------- | -------------------------- | +| `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: | -HTTP | gRPC ------|----- -`PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` -The special name `*` can be used in the body mapping to define that -every field not bound by the path template should be mapped to the -request body. This enables the following alternative definition of -the update method: +The special name `*` can be used in the body mapping to define that every field +not bound by the path template should be mapped to the request body. This +enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { @@ -355,22 +350,22 @@ the update method: string text = 2; } - The following HTTP JSON to RPC mapping is enabled: -HTTP | gRPC ------|----- -`PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +| HTTP | gRPC | +| ------------------------------------------------------------- | -------------------------- | +| `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: | + "123456" text: "Hi!")` -Note that when using `*` in the body mapping, it is not possible to -have HTTP parameters, as all fields not bound by the path end in -the body. This makes this option more rarely used in practice when -defining REST APIs. The common usage of `*` is in custom methods -which don't use the URL at all for transferring data. +Note that when using `*` in the body mapping, it is not possible to have HTTP +parameters, as all fields not bound by the path end in the body. This makes this +option more rarely used in practice when defining REST APIs. The common usage of +`*` is in custom methods which don't use the URL at all for transferring +data. -It is possible to define multiple HTTP methods for one RPC by using -the `additional_bindings` option. Example: +It is possible to define multiple HTTP methods for one RPC by using the +`additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { @@ -389,10 +384,11 @@ the `additional_bindings` option. Example: This enables the following two alternative HTTP JSON to RPC mappings: -HTTP | gRPC ------|----- -`GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -`GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: +| HTTP | gRPC | +| ---------------------------------- | --------------------------------------------- | +| `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` | +| `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: | + "123456")` ## Rules for HTTP mapping @@ -400,16 +396,15 @@ HTTP | gRPC 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP - request body. - - All other fields are passed via the URL query parameters, and the - parameter name is the field path in the request message. A repeated - field can be represented as multiple query parameters under the same - name. - 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields - are passed via URL path and HTTP request body. - 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all - fields are passed via URL path and URL query parameters. + - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are + passed via the HTTP request body. + - All other fields are passed via the URL query parameters, and the parameter + name is the field path in the request message. A repeated field can be + represented as multiple query parameters under the same name. +2. If [HttpRule.body][google.api.HttpRule.body] is "\*", there is no URL + query parameter, all fields are passed via URL path and HTTP request body. +3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP + request body, all fields are passed via URL path and URL query parameters. ### Path template syntax @@ -420,50 +415,47 @@ HTTP | gRPC FieldPath = IDENT { "." IDENT } ; Verb = ":" LITERAL ; -The syntax `*` matches a single URL path segment. The syntax `**` matches -zero or more URL path segments, which must be the last part of the URL path -except the `Verb`. +The syntax `*` matches a single URL path segment. The syntax `**` matches zero +or more URL path segments, which must be the last part of the URL path except +the `Verb`. -The syntax `Variable` matches part of the URL path as specified by its -template. A variable template must not contain other variables. If a variable -matches a single path segment, its template may be omitted, e.g. `{var}` -is equivalent to `{var=*}`. +The syntax `Variable` matches part of the URL path as specified by its template. +A variable template must not contain other variables. If a variable matches a +single path segment, its template may be omitted, e.g. `{var}` is equivalent to +`{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `"{var}"` or -`"{var=*}"`, when such a variable is expanded into a URL path on the client -side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The +`"{var=*}"`, when such a variable is expanded into a URL path on the +client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the -[Discovery -Document](https://developers.google.com/discovery/v1/reference/apis) as -`{var}`. +[Discovery Document](https://developers.google.com/discovery/v1/reference/apis) +as `{var}`. If a variable contains multiple path segments, such as `"{var=foo/*}"` or `"{var=**}"`, when such a variable is expanded into a URL path on the -client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -The server side does the reverse decoding, except "%2F" and "%2f" are left -unchanged. Such variables show up in the -[Discovery -Document](https://developers.google.com/discovery/v1/reference/apis) as -`{+var}`. +client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The +server side does the reverse decoding, except "%2F" and "%2f" +are left unchanged. Such variables show up in the +[Discovery Document](https://developers.google.com/discovery/v1/reference/apis) +as `{+var}`. ## Using gRPC API Service Configuration -gRPC API Service Configuration (service config) is a configuration language -for configuring a gRPC service to become a user-facing product. The -service config is simply the YAML representation of the `google.api.Service` -proto message. +gRPC API Service Configuration (service config) is a configuration language for +configuring a gRPC service to become a user-facing product. The service config +is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -effect as the proto annotation. This can be particularly useful if you -have a proto that is reused in multiple services. Note that any transcoding -specified in the service config will override any matching transcoding -configuration in the proto. +effect as the proto annotation. This can be particularly useful if you have a +proto that is reused in multiple services. Note that any transcoding specified +in the service config will override any matching transcoding configuration in +the proto. Example: @@ -475,405 +467,308 @@ Example: ## Special notes -When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -proto to JSON conversion must follow the [proto3 -specification](https://developers.google.com/protocol-buffers/docs/proto3#json). +When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to +JSON conversion must follow the +[proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -Expansion, the multi segment variable **does not** follow RFC 6570 Section -3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -does not expand special characters like `?` and `#`, which would lead -to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -for multi segment variables. - -The path variables **must not** refer to any repeated or mapped field, -because client libraries are not capable of handling such variable expansion. +Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 +Reserved Expansion. The reason is that the Reserved Expansion does not expand +special characters like `?` and `#`, which would lead to invalid URLs. As the +result, gRPC Transcoding uses a custom encoding for multi segment variables. -The path variables **must not** capture the leading "/" character. The reason -is that the most common use case "{var}" does not capture the leading "/" -character. For consistency, all path variables must share the same behavior. +The path variables **must not** refer to any repeated or mapped field, because +client libraries are not capable of handling such variable expansion. -Repeated message fields must not be mapped to URL query parameters, because -no client library can support such complicated mapping. +The path variables **must not** capture the leading "/" character. The +reason is that the most common use case "{var}" does not capture the +leading "/" character. For consistency, all path variables must share +the same behavior. -If an API needs to use a JSON array for request or response body, it can map -the request or response body to a repeated field. However, some gRPC -Transcoding implementations may not support this feature. +Repeated message fields must not be mapped to URL query parameters, because no +client library can support such complicated mapping. +If an API needs to use a JSON array for request or response body, it can map the +request or response body to a repeated field. However, some gRPC Transcoding +implementations may not support this feature. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| selector | [string](#string) | | Selects a method to which this rule applies. +| Field | Type | Label | Description | +| -------- | ----------------- | ----- | -------------------------------------------- | +| selector | [string](#string) | | Selects a method to which this rule applies. | Refer to [selector][google.api.DocumentationRule.selector] for syntax details. | -| get | [string](#string) | | Maps to HTTP GET. Used for listing and getting information about resources. | -| put | [string](#string) | | Maps to HTTP PUT. Used for replacing a resource. | -| post | [string](#string) | | Maps to HTTP POST. Used for creating a resource or performing an action. | -| delete | [string](#string) | | Maps to HTTP DELETE. Used for deleting a resource. | -| patch | [string](#string) | | Maps to HTTP PATCH. Used for updating a resource. | -| custom | [CustomHttpPattern](#google-api-CustomHttpPattern) | | The custom pattern is used for specifying an HTTP method that is not included in the `pattern` field, such as HEAD, or "*" to leave the HTTP method unspecified for this rule. The wild-card rule is useful for services that provide content to Web (HTML) clients. | -| body | [string](#string) | | The name of the request field whose value is mapped to the HTTP request body, or `*` for mapping all request fields not captured by the path pattern to the HTTP body, or omitted for not having any HTTP request body. - -NOTE: the referred field must be present at the top-level of the request message type. | -| response_body | [string](#string) | | Optional. The name of the response field whose value is mapped to the HTTP response body. When omitted, the entire response message will be used as the HTTP response body. - -NOTE: The referred field must be present at the top-level of the response message type. | -| additional_bindings | [HttpRule](#google-api-HttpRule) | repeated | Additional HTTP bindings for the selector. Nested bindings must not contain an `additional_bindings` field themselves (that is, the nesting may only be one level deep). | - - - - - - - - - - - - - - +| get | [string](#string) | | Maps to HTTP GET. Used for listing and getting +information about resources. | | put | [string](#string) | | Maps to HTTP PUT. +Used for replacing a resource. | | post | [string](#string) | | Maps to HTTP +POST. Used for creating a resource or performing an action. | | delete | +[string](#string) | | Maps to HTTP DELETE. Used for deleting a resource. | | +patch | [string](#string) | | Maps to HTTP PATCH. Used for updating a resource. +| | custom | [CustomHttpPattern](#google-api-CustomHttpPattern) | | The custom +pattern is used for specifying an HTTP method that is not included in the +`pattern` field, such as HEAD, or "_" to leave the HTTP method +unspecified for this rule. The wild-card rule is useful for services that +provide content to Web (HTML) clients. | | body | [string](#string) | | The name +of the request field whose value is mapped to the HTTP request body, or `_` for +mapping all request fields not captured by the path pattern to the HTTP body, or +omitted for not having any HTTP request body. + +NOTE: the referred field must be present at the top-level of the request message +type. | | response_body | [string](#string) | | Optional. The name of the +response field whose value is mapped to the HTTP response body. When omitted, +the entire response message will be used as the HTTP response body. + +NOTE: The referred field must be present at the top-level of the response +message type. | | additional_bindings | [HttpRule](#google-api-HttpRule) | +repeated | Additional HTTP bindings for the selector. Nested bindings must not +contain an `additional_bindings` field themselves (that is, the nesting may only +be one level deep). | +

Top

## google/api/annotations.proto - - - - - - ### File-level Extensions -| Extension | Type | Base | Number | Description | -| --------- | ---- | ---- | ------ | ----------- | -| http | HttpRule | .google.protobuf.MethodOptions | 72295728 | See `HttpRule`. | - - - - - +| Extension | Type | Base | Number | Description | +| --------- | -------- | ------------------------------ | -------- | --------------- | +| http | HttpRule | .google.protobuf.MethodOptions | 72295728 | See `HttpRule`. | +

Top

## protoc-gen-openapiv2/options/openapiv2.proto - - ### Contact + `Contact` is a representation of OpenAPI v2 specification's Contact object. -See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject Example: - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - info: { - ... - contact: { - name: "gRPC-Gateway project"; - url: "https://github.com/grpc-ecosystem/grpc-gateway"; - email: "none@example.com"; - }; - ... - }; - ... - }; - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The identifying name of the contact person/organization. | -| url | [string](#string) | | The URL pointing to the contact information. MUST be in the format of a URL. | -| email | [string](#string) | | The email address of the contact person/organization. MUST be in the format of an email address. | - - - - +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { +... contact: { name: "gRPC-Gateway project"; url: +"https://github.com/grpc-ecosystem/grpc-gateway"; email: +"none@example.com"; }; ... }; ... }; +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ------------------------------------------------------------------------------------------------ | +| name | [string](#string) | | The identifying name of the contact person/organization. | +| url | [string](#string) | | The URL pointing to the contact information. MUST be in the format of a URL. | +| email | [string](#string) | | The email address of the contact person/organization. MUST be in the format of an email address. | ### ExternalDocumentation + `ExternalDocumentation` is a representation of OpenAPI v2 specification's ExternalDocumentation object. -See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject Example: - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - ... - external_docs: { - description: "More about gRPC-Gateway"; - url: "https://github.com/grpc-ecosystem/grpc-gateway"; - } - ... - }; - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| description | [string](#string) | | A short description of the target documentation. GFM syntax can be used for rich text representation. | -| url | [string](#string) | | The URL for the target documentation. Value MUST be in the format of a URL. | - - - - +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { ... +external_docs: { description: "More about gRPC-Gateway"; url: +"https://github.com/grpc-ecosystem/grpc-gateway"; } ... }; +| Field | Type | Label | Description | +| ----------- | ----------------- | ----- | ----------------------------------------------------------------------------------------------------- | +| description | [string](#string) | | A short description of the target documentation. GFM syntax can be used for rich text representation. | +| url | [string](#string) | | The URL for the target documentation. Value MUST be in the format of a URL. | ### Header -`Header` is a representation of OpenAPI v2 specification's Header object. - -See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| description | [string](#string) | | `Description` is a short description of the header. | -| type | [string](#string) | | The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. | -| format | [string](#string) | | `Format` The extending format for the previously mentioned type. | -| default | [string](#string) | | `Default` Declares the value of the header that the server will use if none is provided. See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. Unlike JSON Schema this value MUST conform to the defined type for the header. | -| pattern | [string](#string) | | 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. | - - +`Header` is a representation of OpenAPI v2 specification's Header object. +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject +| Field | Type | Label | Description | +| ----------- | ----------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| description | [string](#string) | | `Description` is a short description of the header. | +| type | [string](#string) | | The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. | +| format | [string](#string) | | `Format` The extending format for the previously mentioned type. | +| default | [string](#string) | | `Default` Declares the value of the header that the server will use if none is provided. See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. Unlike JSON Schema this value MUST conform to the defined type for the header. | +| pattern | [string](#string) | | 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. | ### HeaderParameter -`HeaderParameter` a HTTP header parameter. -See: https://swagger.io/specification/v2/#parameter-object - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | `Name` is the header name. | -| description | [string](#string) | | `Description` is a short description of the header. | -| type | [HeaderParameter.Type](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter-Type) | | `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. See: https://swagger.io/specification/v2/#parameterType. | -| format | [string](#string) | | `Format` The extending format for the previously mentioned type. | -| required | [bool](#bool) | | `Required` indicates if the header is optional | - - - +`HeaderParameter` a HTTP header parameter. See: +https://swagger.io/specification/v2/#parameter-object +| Field | Type | Label | Description | +| ----------- | --------------------------------------------------------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| name | [string](#string) | | `Name` is the header name. | +| description | [string](#string) | | `Description` is a short description of the header. | +| type | [HeaderParameter.Type](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter-Type) | | `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. See: https://swagger.io/specification/v2/#parameterType. | +| format | [string](#string) | | `Format` The extending format for the previously mentioned type. | +| required | [bool](#bool) | | `Required` indicates if the header is optional | ### Info + `Info` is a representation of OpenAPI v2 specification's Info object. -See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject Example: - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - info: { - title: "Echo API"; - version: "1.0"; - description: ""; - contact: { - name: "gRPC-Gateway project"; - url: "https://github.com/grpc-ecosystem/grpc-gateway"; - email: "none@example.com"; - }; - license: { - name: "BSD 3-Clause License"; - url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; - }; - }; - ... - }; - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| title | [string](#string) | | The title of the application. | -| description | [string](#string) | | A short description of the application. GFM syntax can be used for rich text representation. | -| terms_of_service | [string](#string) | | The Terms of Service for the API. | -| contact | [Contact](#grpc-gateway-protoc_gen_openapiv2-options-Contact) | | The contact information for the exposed API. | -| license | [License](#grpc-gateway-protoc_gen_openapiv2-options-License) | | The license information for the exposed API. | -| version | [string](#string) | | Provides the version of the application API (not to be confused with the specification version). | -| extensions | [Info.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Info-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | - - - - - +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { +title: "Echo API"; version: "1.0"; description: ""; +contact: { name: "gRPC-Gateway project"; url: +"https://github.com/grpc-ecosystem/grpc-gateway"; email: +"none@example.com"; }; license: { name: "BSD 3-Clause License"; +url: +"https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; +}; }; ... }; + +| Field | Type | Label | Description | +| ---------------- | --------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| title | [string](#string) | | The title of the application. | +| description | [string](#string) | | A short description of the application. GFM syntax can be used for rich text representation. | +| terms_of_service | [string](#string) | | The Terms of Service for the API. | +| contact | [Contact](#grpc-gateway-protoc_gen_openapiv2-options-Contact) | | The contact information for the exposed API. | +| license | [License](#grpc-gateway-protoc_gen_openapiv2-options-License) | | The license information for the exposed API. | +| version | [string](#string) | | Provides the version of the application API (not to be confused with the specification version). | +| extensions | [Info.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Info-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | ### Info.ExtensionsEntry - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [google.protobuf.Value](#google-protobuf-Value) | | | - - - - - +| Field | Type | Label | Description | +| ----- | ----------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | ### JSONSchema -`JSONSchema` represents properties from JSON Schema taken, and as used, in -the OpenAPI v2 spec. + +`JSONSchema` represents properties from JSON Schema taken, and as used, in the +OpenAPI v2 spec. This includes changes made by OpenAPI v2. -See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject See also: https://cswr.github.io/JsonSchema/spec/basic_types/, https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json Example: - message SimpleMessage { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema: { - title: "SimpleMessage" - description: "A simple message." - required: ["id"] - } - }; - - // Id represents the message identifier. - string id = 1; [ - (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - description: "The unique identifier of the simple message." - }]; - } - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| ref | [string](#string) | | Ref is used to define an external reference to include in the message. This could be a fully qualified proto message reference, and that type must be imported into the protofile. If no message is identified, the Ref will be used verbatim in the output. For example: `ref: ".google.protobuf.Timestamp"`. | -| title | [string](#string) | | The title of the schema. | -| description | [string](#string) | | A short description of the schema. | -| default | [string](#string) | | | -| read_only | [bool](#bool) | | | -| example | [string](#string) | | A free-form property to include a JSON example of this field. This is copied verbatim to the output swagger.json. Quotes must be escaped. This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject | -| multiple_of | [double](#double) | | | -| maximum | [double](#double) | | Maximum represents an inclusive upper limit for a numeric instance. The value of MUST be a number, | -| exclusive_maximum | [bool](#bool) | | | -| minimum | [double](#double) | | minimum represents an inclusive lower limit for a numeric instance. The value of MUST be a number, | -| exclusive_minimum | [bool](#bool) | | | -| max_length | [uint64](#uint64) | | | -| min_length | [uint64](#uint64) | | | -| pattern | [string](#string) | | | -| max_items | [uint64](#uint64) | | | -| min_items | [uint64](#uint64) | | | -| unique_items | [bool](#bool) | | | -| max_properties | [uint64](#uint64) | | | -| min_properties | [uint64](#uint64) | | | -| required | [string](#string) | repeated | | -| array | [string](#string) | repeated | Items in 'array' must be unique. | -| type | [JSONSchema.JSONSchemaSimpleTypes](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-JSONSchemaSimpleTypes) | repeated | | -| format | [string](#string) | | `Format` | -| enum | [string](#string) | repeated | Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 | -| field_configuration | [JSONSchema.FieldConfiguration](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-FieldConfiguration) | | Additional field level properties used when generating the OpenAPI v2 file. | -| extensions | [JSONSchema.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | - - - - - +message SimpleMessage { option +(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { json_schema: { +title: "SimpleMessage" description: "A simple message." +required: ["id"] } }; + +// Id represents the message identifier. string id = 1; [ +(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: +"The unique identifier of the simple message." }]; } + +| Field | Type | Label | Description | +| ------------------- | --------------------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ref | [string](#string) | | Ref is used to define an external reference to include in the message. This could be a fully qualified proto message reference, and that type must be imported into the protofile. If no message is identified, the Ref will be used verbatim in the output. For example: `ref: ".google.protobuf.Timestamp"`. | +| title | [string](#string) | | The title of the schema. | +| description | [string](#string) | | A short description of the schema. | +| default | [string](#string) | | | +| read_only | [bool](#bool) | | | +| example | [string](#string) | | A free-form property to include a JSON example of this field. This is copied verbatim to the output swagger.json. Quotes must be escaped. This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject | +| multiple_of | [double](#double) | | | +| maximum | [double](#double) | | Maximum represents an inclusive upper limit for a numeric instance. The value of MUST be a number, | +| exclusive_maximum | [bool](#bool) | | | +| minimum | [double](#double) | | minimum represents an inclusive lower limit for a numeric instance. The value of MUST be a number, | +| exclusive_minimum | [bool](#bool) | | | +| max_length | [uint64](#uint64) | | | +| min_length | [uint64](#uint64) | | | +| pattern | [string](#string) | | | +| max_items | [uint64](#uint64) | | | +| min_items | [uint64](#uint64) | | | +| unique_items | [bool](#bool) | | | +| max_properties | [uint64](#uint64) | | | +| min_properties | [uint64](#uint64) | | | +| required | [string](#string) | repeated | | +| array | [string](#string) | repeated | Items in 'array' must be unique. | +| type | [JSONSchema.JSONSchemaSimpleTypes](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-JSONSchemaSimpleTypes) | repeated | | +| format | [string](#string) | | `Format` | +| enum | [string](#string) | repeated | Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 | +| field_configuration | [JSONSchema.FieldConfiguration](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-FieldConfiguration) | | Additional field level properties used when generating the OpenAPI v2 file. | +| extensions | [JSONSchema.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | ### JSONSchema.ExtensionsEntry - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [google.protobuf.Value](#google-protobuf-Value) | | | - - - - - +| Field | Type | Label | Description | +| ----- | ----------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | ### JSONSchema.FieldConfiguration -'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file. -These properties are not defined by OpenAPIv2, but they are used to control the generation. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| path_param_name | [string](#string) | | Alternative parameter name when used as path parameter. If set, this will be used as the complete parameter name when this field is used as a path parameter. Use this to avoid having auto generated path parameter names for overlapping paths. | - - - +'FieldConfiguration' provides additional field level properties used +when generating the OpenAPI v2 file. These properties are not defined by +OpenAPIv2, but they are used to control the generation. +| Field | Type | Label | Description | +| --------------- | ----------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| path_param_name | [string](#string) | | Alternative parameter name when used as path parameter. If set, this will be used as the complete parameter name when this field is used as a path parameter. Use this to avoid having auto generated path parameter names for overlapping paths. | ### License + `License` is a representation of OpenAPI v2 specification's License object. -See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject Example: - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - info: { - ... - license: { - name: "BSD 3-Clause License"; - url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; - }; - ... - }; - ... - }; - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The license name used for the API. | -| url | [string](#string) | | A URL to the license used for the API. MUST be in the format of a URL. | - - - - +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { +... license: { name: "BSD 3-Clause License"; url: +"https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; +}; ... }; ... }; +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ---------------------------------------------------------------------- | +| name | [string](#string) | | The license name used for the API. | +| url | [string](#string) | | A URL to the license used for the API. MUST be in the format of a URL. | ### Operation -`Operation` is a representation of OpenAPI v2 specification's Operation object. -See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject +`Operation` is a representation of OpenAPI v2 specification's Operation +object. + +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject Example: - service EchoService { - rpc Echo(SimpleMessage) returns (SimpleMessage) { - option (google.api.http) = { - get: "/v1/example/echo/{id}" - }; +service EchoService { rpc Echo(SimpleMessage) returns (SimpleMessage) { option +(google.api.http) = { get: "/v1/example/echo/{id}" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { summary: "Get a message."; @@ -886,720 +781,526 @@ Example: } } }; - } - } +} } + +| Field | Type | Label | Description | +| ------------- | ------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| tags | [string](#string) | repeated | A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier. | +| summary | [string](#string) | | A short summary of what the operation does. For maximum readability in the swagger-ui, this field SHOULD be less than 120 characters. | +| description | [string](#string) | | A verbose explanation of the operation behavior. GFM syntax can be used for rich text representation. | +| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation for this operation. | +| operation_id | [string](#string) | | Unique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is recommended to follow common programming naming conventions. | +| consumes | [string](#string) | repeated | A list of MIME types the operation can consume. This overrides the consumes definition at the OpenAPI Object. An empty value MAY be used to clear the global definition. Value MUST be as described under Mime Types. | +| produces | [string](#string) | repeated | A list of MIME types the operation can produce. This overrides the produces definition at the OpenAPI Object. An empty value MAY be used to clear the global definition. Value MUST be as described under Mime Types. | +| responses | [Operation.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ResponsesEntry) | repeated | The list of possible responses as they are returned from executing this operation. | +| schemes | [Scheme](#grpc-gateway-protoc_gen_openapiv2-options-Scheme) | repeated | The transfer protocol for the operation. Values MUST be from the list: "http", "https", "ws", "wss". The value overrides the OpenAPI Object schemes definition. | +| deprecated | [bool](#bool) | | Declares this operation to be deprecated. Usage of the declared operation should be refrained. Default value is false. | +| security | [SecurityRequirement](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement) | repeated | A declaration of which security schemes are applied for this operation. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). This definition overrides any declared top-level security. To remove a top-level security declaration, an empty array can be used. | +| extensions | [Operation.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | +| parameters | [Parameters](#grpc-gateway-protoc_gen_openapiv2-options-Parameters) | | Custom parameters such as HTTP request headers. See: https://swagger.io/docs/specification/2-0/describing-parameters/ and https://swagger.io/specification/v2/#parameter-object. | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| tags | [string](#string) | repeated | A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier. | -| summary | [string](#string) | | A short summary of what the operation does. For maximum readability in the swagger-ui, this field SHOULD be less than 120 characters. | -| description | [string](#string) | | A verbose explanation of the operation behavior. GFM syntax can be used for rich text representation. | -| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation for this operation. | -| operation_id | [string](#string) | | Unique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is recommended to follow common programming naming conventions. | -| consumes | [string](#string) | repeated | A list of MIME types the operation can consume. This overrides the consumes definition at the OpenAPI Object. An empty value MAY be used to clear the global definition. Value MUST be as described under Mime Types. | -| produces | [string](#string) | repeated | A list of MIME types the operation can produce. This overrides the produces definition at the OpenAPI Object. An empty value MAY be used to clear the global definition. Value MUST be as described under Mime Types. | -| responses | [Operation.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ResponsesEntry) | repeated | The list of possible responses as they are returned from executing this operation. | -| schemes | [Scheme](#grpc-gateway-protoc_gen_openapiv2-options-Scheme) | repeated | The transfer protocol for the operation. Values MUST be from the list: "http", "https", "ws", "wss". The value overrides the OpenAPI Object schemes definition. | -| deprecated | [bool](#bool) | | Declares this operation to be deprecated. Usage of the declared operation should be refrained. Default value is false. | -| security | [SecurityRequirement](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement) | repeated | A declaration of which security schemes are applied for this operation. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). This definition overrides any declared top-level security. To remove a top-level security declaration, an empty array can be used. | -| extensions | [Operation.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | -| parameters | [Parameters](#grpc-gateway-protoc_gen_openapiv2-options-Parameters) | | Custom parameters such as HTTP request headers. See: https://swagger.io/docs/specification/2-0/describing-parameters/ and https://swagger.io/specification/v2/#parameter-object. | + +### Operation.ExtensionsEntry +| Field | Type | Label | Description | +| ----- | ----------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + +### Operation.ResponsesEntry +| Field | Type | Label | Description | +| ----- | --------------------------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Response](#grpc-gateway-protoc_gen_openapiv2-options-Response) | | | - + -### Operation.ExtensionsEntry +### Parameters +`Parameters` is a representation of OpenAPI v2 specification's parameters +object. Note: This technically breaks compatibility with the OpenAPI 2 +definition structure as we only allow header parameters to be set here since we +do not want users specifying custom non-header parameters beyond those inferred +from the Protobuf schema. See: +https://swagger.io/specification/v2/#parameter-object +| Field | Type | Label | Description | +| ------- | ----------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| headers | [HeaderParameter](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter) | repeated | `Headers` is one or more HTTP header parameter. See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [google.protobuf.Value](#google-protobuf-Value) | | | + +### Response +`Response` is a representation of OpenAPI v2 specification's Response +object. +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject +| Field | Type | Label | Description | +| ----------- | ----------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| description | [string](#string) | | `Description` is a short description of the response. GFM syntax can be used for rich text representation. | +| schema | [Schema](#grpc-gateway-protoc_gen_openapiv2-options-Schema) | | `Schema` optionally defines the structure of the response. If `Schema` is not provided, it means there is no content to the response. | +| headers | [Response.HeadersEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-HeadersEntry) | repeated | `Headers` A list of headers that are sent with the response. `Header` name is expected to be a string in the canonical format of the MIME header key See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey | +| examples | [Response.ExamplesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExamplesEntry) | repeated | `Examples` gives per-mimetype response examples. See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object | +| extensions | [Response.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | + - +### Response.ExamplesEntry -### Operation.ResponsesEntry +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + +### Response.ExtensionsEntry -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [Response](#grpc-gateway-protoc_gen_openapiv2-options-Response) | | | +| Field | Type | Label | Description | +| ----- | ----------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + +### Response.HeadersEntry +| Field | Type | Label | Description | +| ----- | ----------------------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Header](#grpc-gateway-protoc_gen_openapiv2-options-Header) | | | + +### Schema - +`Schema` is a representation of OpenAPI v2 specification's Schema object. -### Parameters -`Parameters` is a representation of OpenAPI v2 specification's parameters object. -Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only -allow header parameters to be set here since we do not want users specifying custom non-header -parameters beyond those inferred from the Protobuf schema. -See: https://swagger.io/specification/v2/#parameter-object +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +| Field | Type | Label | Description | +| ------------- | ----------------------------------------------------------------------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| json_schema | [JSONSchema](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema) | | | +| discriminator | [string](#string) | | Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. | +| read_only | [bool](#bool) | | Relevant only for Schema "properties" definitions. Declares the property as "read only". This means that it MAY be sent as part of a response but MUST NOT be sent as part of the request. Properties marked as readOnly being true SHOULD NOT be in the required list of the defined schema. Default value is false. | +| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation for this schema. | +| example | [string](#string) | | A free-form property to include an example of an instance for this schema in JSON. This is copied verbatim to the output. | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| headers | [HeaderParameter](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter) | repeated | `Headers` is one or more HTTP header parameter. See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters | + +### Scopes +`Scopes` is a representation of OpenAPI v2 specification's Scopes object. +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject +Lists the available scopes for an OAuth2 security scheme. +| Field | Type | Label | Description | +| ----- | --------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------- | +| scope | [Scopes.ScopeEntry](#grpc-gateway-protoc_gen_openapiv2-options-Scopes-ScopeEntry) | repeated | Maps between a name of a scope to a short description of it (as the value of the property). | - + -### Response -`Response` is a representation of OpenAPI v2 specification's Response object. +### Scopes.ScopeEntry -See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| description | [string](#string) | | `Description` is a short description of the response. GFM syntax can be used for rich text representation. | -| schema | [Schema](#grpc-gateway-protoc_gen_openapiv2-options-Schema) | | `Schema` optionally defines the structure of the response. If `Schema` is not provided, it means there is no content to the response. | -| headers | [Response.HeadersEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-HeadersEntry) | repeated | `Headers` A list of headers that are sent with the response. `Header` name is expected to be a string in the canonical format of the MIME header key See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey | -| examples | [Response.ExamplesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExamplesEntry) | repeated | `Examples` gives per-mimetype response examples. See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object | -| extensions | [Response.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | +### SecurityDefinitions +`SecurityDefinitions` is a representation of OpenAPI v2 specification's +Security Definitions object. +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject +A declaration of the security schemes available to be used in the specification. +This does not enforce the security schemes on the operations and only serves to +provide the relevant details for each scheme. +| Field | Type | Label | Description | +| -------- | ----------------------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------- | +| security | [SecurityDefinitions.SecurityEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions-SecurityEntry) | repeated | A single security scheme definition, mapping a "name" to the scheme it defines. | + - +### SecurityDefinitions.SecurityEntry -### Response.ExamplesEntry +| Field | Type | Label | Description | +| ----- | --------------------------------------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [SecurityScheme](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme) | | | + +### SecurityRequirement -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | +`SecurityRequirement` is a representation of OpenAPI v2 specification's +Security Requirement object. +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject +Lists the required security schemes to execute this operation. The object can +have multiple security schemes declared in it which are all required (that is, +there is a logical AND between the schemes). +The name used for each property MUST correspond to a security scheme declared in +the Security Definitions. +| Field | Type | Label | Description | +| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| security_requirement | [SecurityRequirement.SecurityRequirementEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementEntry) | repeated | Each name must correspond to a security scheme which is declared in the Security Definitions. If the security scheme is of type "oauth2", then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty. | + - +### SecurityRequirement.SecurityRequirementEntry -### Response.ExtensionsEntry +| Field | Type | Label | Description | +| ----- | --------------------------------------------------------------------------------------------------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [SecurityRequirement.SecurityRequirementValue](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementValue) | | | + +### SecurityRequirement.SecurityRequirementValue -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [google.protobuf.Value](#google-protobuf-Value) | | | +If the security scheme is of type "oauth2", then the value is a list of +scope names required for the execution. For other security scheme types, the +array MUST be empty. +| Field | Type | Label | Description | +| ----- | ----------------- | -------- | ----------- | +| scope | [string](#string) | repeated | | + +### SecurityScheme +`SecurityScheme` is a representation of OpenAPI v2 specification's Security +Scheme object. + +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject + +Allows the definition of a security scheme that can be used by the operations. +Supported schemes are basic authentication, an API key (either as a header or as +a query parameter) and OAuth2's common flows (implicit, password, +application and access code). + +| Field | Type | Label | Description | +| ----------------- | ----------------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| type | [SecurityScheme.Type](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Type) | | The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2". | +| description | [string](#string) | | A short description for security scheme. | +| name | [string](#string) | | The name of the header or query parameter to be used. Valid for apiKey. | +| in | [SecurityScheme.In](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-In) | | The location of the API key. Valid values are "query" or "header". Valid for apiKey. | +| flow | [SecurityScheme.Flow](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Flow) | | The flow used by the OAuth2 security scheme. Valid values are "implicit", "password", "application" or "accessCode". Valid for oauth2. | +| authorization_url | [string](#string) | | The authorization URL to be used for this flow. This SHOULD be in the form of a URL. Valid for oauth2/implicit and oauth2/accessCode. | +| token_url | [string](#string) | | The token URL to be used for this flow. This SHOULD be in the form of a URL. Valid for oauth2/password, oauth2/application and oauth2/accessCode. | +| scopes | [Scopes](#grpc-gateway-protoc_gen_openapiv2-options-Scopes) | | The available scopes for the OAuth2 security scheme. Valid for oauth2. | +| extensions | [SecurityScheme.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | + - +### SecurityScheme.ExtensionsEntry -### Response.HeadersEntry +| Field | Type | Label | Description | +| ----- | ----------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + +### Swagger -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [Header](#grpc-gateway-protoc_gen_openapiv2-options-Header) | | | +`Swagger` is a representation of OpenAPI v2 specification's Swagger object. +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject +Example: +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { +title: "Echo API"; version: "1.0"; description: ""; +contact: { name: "gRPC-Gateway project"; url: +"https://github.com/grpc-ecosystem/grpc-gateway"; email: +"none@example.com"; }; license: { name: "BSD 3-Clause License"; +url: +"https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; +}; }; schemes: HTTPS; consumes: "application/json"; produces: +"application/json"; }; + +| Field | Type | Label | Description | +| -------------------- | --------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| swagger | [string](#string) | | Specifies the OpenAPI Specification version being used. It can be used by the OpenAPI UI and other clients to interpret the API listing. The value MUST be "2.0". | +| info | [Info](#grpc-gateway-protoc_gen_openapiv2-options-Info) | | Provides metadata about the API. The metadata can be used by the clients if needed. | +| host | [string](#string) | | The host (name or ip) serving the API. This MUST be the host only and does not include the scheme nor sub-paths. It MAY include a port. If the host is not included, the host serving the documentation is to be used (including the port). The host does not support path templating. | +| base_path | [string](#string) | | The base path on which the API is served, which is relative to the host. If it is not included, the API is served directly under the host. The value MUST start with a leading slash (/). The basePath does not support path templating. Note that using `base_path` does not change the endpoint paths that are generated in the resulting OpenAPI file. If you wish to use `base_path` with relatively generated OpenAPI paths, the `base_path` prefix must be manually removed from your `google.api.http` paths and your code changed to serve the API from the `base_path`. | +| schemes | [Scheme](#grpc-gateway-protoc_gen_openapiv2-options-Scheme) | repeated | The transfer protocol of the API. Values MUST be from the list: "http", "https", "ws", "wss". If the schemes is not included, the default scheme to be used is the one used to access the OpenAPI definition itself. | +| consumes | [string](#string) | repeated | A list of MIME types the APIs can consume. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under Mime Types. | +| produces | [string](#string) | repeated | A list of MIME types the APIs can produce. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under Mime Types. | +| responses | [Swagger.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ResponsesEntry) | repeated | An object to hold responses that can be used across operations. This property does not define global responses for all operations. | +| security_definitions | [SecurityDefinitions](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions) | | Security scheme definitions that can be used across the specification. | +| security | [SecurityRequirement](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement) | repeated | A declaration of which security schemes are applied for the API as a whole. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). Individual operations can override this definition. | +| tags | [Tag](#grpc-gateway-protoc_gen_openapiv2-options-Tag) | repeated | A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier. | +| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation. | +| extensions | [Swagger.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | + +### Swagger.ExtensionsEntry - +| Field | Type | Label | Description | +| ----- | ----------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | -### Schema -`Schema` is a representation of OpenAPI v2 specification's Schema object. + -See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +### Swagger.ResponsesEntry +| Field | Type | Label | Description | +| ----- | --------------------------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Response](#grpc-gateway-protoc_gen_openapiv2-options-Response) | | | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| json_schema | [JSONSchema](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema) | | | -| discriminator | [string](#string) | | Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. | -| read_only | [bool](#bool) | | Relevant only for Schema "properties" definitions. Declares the property as "read only". This means that it MAY be sent as part of a response but MUST NOT be sent as part of the request. Properties marked as readOnly being true SHOULD NOT be in the required list of the defined schema. Default value is false. | -| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation for this schema. | -| example | [string](#string) | | A free-form property to include an example of an instance for this schema in JSON. This is copied verbatim to the output. | + +### Tag +`Tag` is a representation of OpenAPI v2 specification's Tag object. +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject +| Field | Type | Label | Description | +| ------------- | ----------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| name | [string](#string) | | The name of the tag. Use it to allow override of the name of a global Tag object, then use that name to reference the tag throughout the OpenAPI file. | +| description | [string](#string) | | A short description for the tag. GFM syntax can be used for rich text representation. | +| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation for this tag. | +| extensions | [Tag.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Tag-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | + - +### Tag.ExtensionsEntry -### Scopes -`Scopes` is a representation of OpenAPI v2 specification's Scopes object. +| Field | Type | Label | Description | +| ----- | ----------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | -See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject + -Lists the available scopes for an OAuth2 security scheme. +### HeaderParameter.Type +`Type` is a a supported HTTP header type. See +https://swagger.io/specification/v2/#parameterType. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| scope | [Scopes.ScopeEntry](#grpc-gateway-protoc_gen_openapiv2-options-Scopes-ScopeEntry) | repeated | Maps between a name of a scope to a short description of it (as the value of the property). | +| Name | Number | Description | +| ------- | ------ | ----------- | +| UNKNOWN | 0 | | +| STRING | 1 | | +| NUMBER | 2 | | +| INTEGER | 3 | | +| BOOLEAN | 4 | | + +### JSONSchema.JSONSchemaSimpleTypes +| Name | Number | Description | +| ------- | ------ | ----------- | +| UNKNOWN | 0 | | +| ARRAY | 1 | | +| BOOLEAN | 2 | | +| INTEGER | 3 | | +| NULL | 4 | | +| NUMBER | 5 | | +| OBJECT | 6 | | +| STRING | 7 | | + +### Scheme - +Scheme describes the schemes supported by the OpenAPI Swagger and Operation +objects. -### Scopes.ScopeEntry +| Name | Number | Description | +| ------- | ------ | ----------- | +| UNKNOWN | 0 | | +| HTTP | 1 | | +| HTTPS | 2 | | +| WS | 3 | | +| WSS | 4 | | + +### SecurityScheme.Flow -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | +The flow used by the OAuth2 security scheme. Valid values are +"implicit", "password", "application" or +"accessCode". +| Name | Number | Description | +| ---------------- | ------ | ----------- | +| FLOW_INVALID | 0 | | +| FLOW_IMPLICIT | 1 | | +| FLOW_PASSWORD | 2 | | +| FLOW_APPLICATION | 3 | | +| FLOW_ACCESS_CODE | 4 | | + +### SecurityScheme.In +The location of the API key. Valid values are "query" or +"header". +| Name | Number | Description | +| ---------- | ------ | ----------- | +| IN_INVALID | 0 | | +| IN_QUERY | 1 | | +| IN_HEADER | 2 | | - + -### SecurityDefinitions -`SecurityDefinitions` is a representation of OpenAPI v2 specification's -Security Definitions object. +### SecurityScheme.Type -See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject +The type of the security scheme. Valid values are "basic", +"apiKey" or "oauth2". -A declaration of the security schemes available to be used in the -specification. This does not enforce the security schemes on the operations -and only serves to provide the relevant details for each scheme. +| Name | Number | Description | +| ------------ | ------ | ----------- | +| TYPE_INVALID | 0 | | +| TYPE_BASIC | 1 | | +| TYPE_API_KEY | 2 | | +| TYPE_OAUTH2 | 3 | | + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| security | [SecurityDefinitions.SecurityEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions-SecurityEntry) | repeated | A single security scheme definition, mapping a "name" to the scheme it defines. | - - - - - - - - -### SecurityDefinitions.SecurityEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [SecurityScheme](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme) | | | - - - - - - - - -### SecurityRequirement -`SecurityRequirement` is a representation of OpenAPI v2 specification's -Security Requirement object. - -See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject - -Lists the required security schemes to execute this operation. The object can -have multiple security schemes declared in it which are all required (that -is, there is a logical AND between the schemes). - -The name used for each property MUST correspond to a security scheme -declared in the Security Definitions. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| security_requirement | [SecurityRequirement.SecurityRequirementEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementEntry) | repeated | Each name must correspond to a security scheme which is declared in the Security Definitions. If the security scheme is of type "oauth2", then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty. | - - - - - - - - -### SecurityRequirement.SecurityRequirementEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [SecurityRequirement.SecurityRequirementValue](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementValue) | | | - - - - - - - - -### SecurityRequirement.SecurityRequirementValue -If the security scheme is of type "oauth2", then the value is a list of -scope names required for the execution. For other security scheme types, -the array MUST be empty. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| scope | [string](#string) | repeated | | - - - - - - - - -### SecurityScheme -`SecurityScheme` is a representation of OpenAPI v2 specification's -Security Scheme object. - -See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject - -Allows the definition of a security scheme that can be used by the -operations. Supported schemes are basic authentication, an API key (either as -a header or as a query parameter) and OAuth2's common flows (implicit, -password, application and access code). - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| type | [SecurityScheme.Type](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Type) | | The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2". | -| description | [string](#string) | | A short description for security scheme. | -| name | [string](#string) | | The name of the header or query parameter to be used. Valid for apiKey. | -| in | [SecurityScheme.In](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-In) | | The location of the API key. Valid values are "query" or "header". Valid for apiKey. | -| flow | [SecurityScheme.Flow](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Flow) | | The flow used by the OAuth2 security scheme. Valid values are "implicit", "password", "application" or "accessCode". Valid for oauth2. | -| authorization_url | [string](#string) | | The authorization URL to be used for this flow. This SHOULD be in the form of a URL. Valid for oauth2/implicit and oauth2/accessCode. | -| token_url | [string](#string) | | The token URL to be used for this flow. This SHOULD be in the form of a URL. Valid for oauth2/password, oauth2/application and oauth2/accessCode. | -| scopes | [Scopes](#grpc-gateway-protoc_gen_openapiv2-options-Scopes) | | The available scopes for the OAuth2 security scheme. Valid for oauth2. | -| extensions | [SecurityScheme.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | - - - - - - - - -### SecurityScheme.ExtensionsEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [google.protobuf.Value](#google-protobuf-Value) | | | - - - - - - - - -### Swagger -`Swagger` is a representation of OpenAPI v2 specification's Swagger object. - -See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject - -Example: - - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - info: { - title: "Echo API"; - version: "1.0"; - description: ""; - contact: { - name: "gRPC-Gateway project"; - url: "https://github.com/grpc-ecosystem/grpc-gateway"; - email: "none@example.com"; - }; - license: { - name: "BSD 3-Clause License"; - url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; - }; - }; - schemes: HTTPS; - consumes: "application/json"; - produces: "application/json"; - }; - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| swagger | [string](#string) | | Specifies the OpenAPI Specification version being used. It can be used by the OpenAPI UI and other clients to interpret the API listing. The value MUST be "2.0". | -| info | [Info](#grpc-gateway-protoc_gen_openapiv2-options-Info) | | Provides metadata about the API. The metadata can be used by the clients if needed. | -| host | [string](#string) | | The host (name or ip) serving the API. This MUST be the host only and does not include the scheme nor sub-paths. It MAY include a port. If the host is not included, the host serving the documentation is to be used (including the port). The host does not support path templating. | -| base_path | [string](#string) | | The base path on which the API is served, which is relative to the host. If it is not included, the API is served directly under the host. The value MUST start with a leading slash (/). The basePath does not support path templating. Note that using `base_path` does not change the endpoint paths that are generated in the resulting OpenAPI file. If you wish to use `base_path` with relatively generated OpenAPI paths, the `base_path` prefix must be manually removed from your `google.api.http` paths and your code changed to serve the API from the `base_path`. | -| schemes | [Scheme](#grpc-gateway-protoc_gen_openapiv2-options-Scheme) | repeated | The transfer protocol of the API. Values MUST be from the list: "http", "https", "ws", "wss". If the schemes is not included, the default scheme to be used is the one used to access the OpenAPI definition itself. | -| consumes | [string](#string) | repeated | A list of MIME types the APIs can consume. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under Mime Types. | -| produces | [string](#string) | repeated | A list of MIME types the APIs can produce. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under Mime Types. | -| responses | [Swagger.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ResponsesEntry) | repeated | An object to hold responses that can be used across operations. This property does not define global responses for all operations. | -| security_definitions | [SecurityDefinitions](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions) | | Security scheme definitions that can be used across the specification. | -| security | [SecurityRequirement](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement) | repeated | A declaration of which security schemes are applied for the API as a whole. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). Individual operations can override this definition. | -| tags | [Tag](#grpc-gateway-protoc_gen_openapiv2-options-Tag) | repeated | A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier. | -| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation. | -| extensions | [Swagger.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | - - - - - - - - -### Swagger.ExtensionsEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [google.protobuf.Value](#google-protobuf-Value) | | | - - - - - - - - -### Swagger.ResponsesEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [Response](#grpc-gateway-protoc_gen_openapiv2-options-Response) | | | - - - - - - - - -### Tag -`Tag` is a representation of OpenAPI v2 specification's Tag object. - -See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the tag. Use it to allow override of the name of a global Tag object, then use that name to reference the tag throughout the OpenAPI file. | -| description | [string](#string) | | A short description for the tag. GFM syntax can be used for rich text representation. | -| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation for this tag. | -| extensions | [Tag.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Tag-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | - - - - - - - - -### Tag.ExtensionsEntry - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [google.protobuf.Value](#google-protobuf-Value) | | | - - - - - - - - - - -### HeaderParameter.Type -`Type` is a a supported HTTP header type. -See https://swagger.io/specification/v2/#parameterType. - -| Name | Number | Description | -| ---- | ------ | ----------- | -| UNKNOWN | 0 | | -| STRING | 1 | | -| NUMBER | 2 | | -| INTEGER | 3 | | -| BOOLEAN | 4 | | - - - - - -### JSONSchema.JSONSchemaSimpleTypes - - -| Name | Number | Description | -| ---- | ------ | ----------- | -| UNKNOWN | 0 | | -| ARRAY | 1 | | -| BOOLEAN | 2 | | -| INTEGER | 3 | | -| NULL | 4 | | -| NUMBER | 5 | | -| OBJECT | 6 | | -| STRING | 7 | | - - - - - -### Scheme -Scheme describes the schemes supported by the OpenAPI Swagger -and Operation objects. - -| Name | Number | Description | -| ---- | ------ | ----------- | -| UNKNOWN | 0 | | -| HTTP | 1 | | -| HTTPS | 2 | | -| WS | 3 | | -| WSS | 4 | | - - - - - -### SecurityScheme.Flow -The flow used by the OAuth2 security scheme. Valid values are -"implicit", "password", "application" or "accessCode". - -| Name | Number | Description | -| ---- | ------ | ----------- | -| FLOW_INVALID | 0 | | -| FLOW_IMPLICIT | 1 | | -| FLOW_PASSWORD | 2 | | -| FLOW_APPLICATION | 3 | | -| FLOW_ACCESS_CODE | 4 | | - - - - - -### SecurityScheme.In -The location of the API key. Valid values are "query" or "header". - -| Name | Number | Description | -| ---- | ------ | ----------- | -| IN_INVALID | 0 | | -| IN_QUERY | 1 | | -| IN_HEADER | 2 | | - - - - - -### SecurityScheme.Type -The type of the security scheme. Valid values are "basic", -"apiKey" or "oauth2". - -| Name | Number | Description | -| ---- | ------ | ----------- | -| TYPE_INVALID | 0 | | -| TYPE_BASIC | 1 | | -| TYPE_API_KEY | 2 | | -| TYPE_OAUTH2 | 3 | | - - - - - - - - - - -

Top

## protoc-gen-openapiv2/options/annotations.proto - - - - - - ### File-level Extensions -| Extension | Type | Base | Number | Description | -| --------- | ---- | ---- | ------ | ----------- | -| openapiv2_field | JSONSchema | .google.protobuf.FieldOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. -All IDs are the same, as assigned. It is okay that they are the same, as they extend different descriptor messages. | -| openapiv2_swagger | Swagger | .google.protobuf.FileOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. +| Extension | Type | Base | Number | Description | +| --------------- | ---------- | ----------------------------- | ------ | -------------------------------------------------------------------------------------- | +| openapiv2_field | JSONSchema | .google.protobuf.FieldOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. | -All IDs are the same, as assigned. It is okay that they are the same, as they extend different descriptor messages. | -| openapiv2_schema | Schema | .google.protobuf.MessageOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. +All IDs are the same, as assigned. It is okay that they are the same, as they +extend different descriptor messages. | | openapiv2_swagger | Swagger | +.google.protobuf.FileOptions | 1042 | ID assigned by +protobuf-global-extension-registry@google.com for gRPC-Gateway project. -All IDs are the same, as assigned. It is okay that they are the same, as they extend different descriptor messages. | -| openapiv2_operation | Operation | .google.protobuf.MethodOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. +All IDs are the same, as assigned. It is okay that they are the same, as they +extend different descriptor messages. | | openapiv2_schema | Schema | +.google.protobuf.MessageOptions | 1042 | ID assigned by +protobuf-global-extension-registry@google.com for gRPC-Gateway project. -All IDs are the same, as assigned. It is okay that they are the same, as they extend different descriptor messages. | -| openapiv2_tag | Tag | .google.protobuf.ServiceOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. - -All IDs are the same, as assigned. It is okay that they are the same, as they extend different descriptor messages. | - - - - +All IDs are the same, as assigned. It is okay that they are the same, as they +extend different descriptor messages. | | openapiv2_operation | Operation | +.google.protobuf.MethodOptions | 1042 | ID assigned by +protobuf-global-extension-registry@google.com for gRPC-Gateway project. +All IDs are the same, as assigned. It is okay that they are the same, as they +extend different descriptor messages. | | openapiv2_tag | Tag | +.google.protobuf.ServiceOptions | 1042 | ID assigned by +protobuf-global-extension-registry@google.com for gRPC-Gateway project. +All IDs are the same, as assigned. It is okay that they are the same, as they +extend different descriptor messages. | +

Top

## ory/keto/opl/v1alpha1/syntax_service.proto - - ### CheckRequest - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| content | [bytes](#bytes) | | | - - - - - +| Field | Type | Label | Description | +| ------- | --------------- | ----- | ----------- | +| content | [bytes](#bytes) | | | ### CheckResponse - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | | - - - - - +| Field | Type | Label | Description | +| ------ | ----------------------------------------------- | -------- | ----------- | +| errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | | ### ParseError - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| message | [string](#string) | | | -| start | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | -| end | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | - - - - - +| Field | Type | Label | Description | +| ------- | ------------------------------------------------------- | ----- | ----------- | +| message | [string](#string) | | | +| start | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | +| end | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | ### SourcePosition - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| line | [uint32](#uint32) | | | -| column | [uint32](#uint32) | | | - - - - - - - - - - - +| Field | Type | Label | Description | +| ------ | ----------------- | ----- | ----------- | +| line | [uint32](#uint32) | | | +| column | [uint32](#uint32) | | | ### SyntaxService -The service that checks the syntax of an OPL file. - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Check | [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) | [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) | Performs a syntax check request. | - - +The service that checks the syntax of an OPL file. +| Method Name | Request Type | Response Type | Description | +| ----------- | --------------------------------------------------- | ----------------------------------------------------- | -------------------------------- | +| Check | [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) | [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) | Performs a syntax check request. | +

Top

## google/api/visibility.proto - - ### Visibility -`Visibility` restricts service consumer's access to service elements, -such as whether an application can call a visibility-restricted method. -The restriction is expressed by applying visibility labels on service -elements. The visibility labels are elsewhere linked to service consumers. -A service can define multiple visibility labels, but a service consumer -should be granted at most one visibility label. Multiple visibility -labels for a single service consumer are not supported. +`Visibility` restricts service consumer's access to service elements, such +as whether an application can call a visibility-restricted method. The +restriction is expressed by applying visibility labels on service elements. The +visibility labels are elsewhere linked to service consumers. + +A service can define multiple visibility labels, but a service consumer should +be granted at most one visibility label. Multiple visibility labels for a single +service consumer are not supported. -If an element and all its parents have no visibility label, its visibility -is unconditionally granted. +If an element and all its parents have no visibility label, its visibility is +unconditionally granted. Example: @@ -1613,1552 +1314,1210 @@ Example: Here, all methods are publicly visible except for the restricted methods EnhancedSearch and Delegate. +| Field | Type | Label | Description | +| ----- | -------------------------------------------- | -------- | ----------------------------------------------------------------- | +| rules | [VisibilityRule](#google-api-VisibilityRule) | repeated | A list of visibility rules that apply to individual API elements. | -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| rules | [VisibilityRule](#google-api-VisibilityRule) | repeated | A list of visibility rules that apply to individual API elements. - -**NOTE:** All service configuration rules follow "last one wins" order. | - - - - - +**NOTE:** All service configuration rules follow "last one wins" order. +| ### VisibilityRule + A visibility rule provides visibility configuration for an individual API element. - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| selector | [string](#string) | | Selects methods, messages, fields, enums, etc. to which this rule applies. +| Field | Type | Label | Description | +| -------- | ----------------- | ----- | -------------------------------------------------------------------------- | +| selector | [string](#string) | | Selects methods, messages, fields, enums, etc. to which this rule applies. | Refer to [selector][google.api.DocumentationRule.selector] for syntax details. | -| restriction | [string](#string) | | A comma-separated list of visibility labels that apply to the `selector`. Any of the listed labels can be used to grant the visibility. +| restriction | [string](#string) | | A comma-separated list of visibility +labels that apply to the `selector`. Any of the listed labels can be used to +grant the visibility. -If a rule has multiple labels, removing one of the labels but not all of them can break clients. +If a rule has multiple labels, removing one of the labels but not all of them +can break clients. Example: - visibility: rules: - selector: google.calendar.Calendar.EnhancedSearch restriction: INTERNAL, PREVIEW - -Removing INTERNAL from this restriction will break clients that rely on this method and only had access to it through INTERNAL. | - - - - - - - - +visibility: rules: - selector: google.calendar.Calendar.EnhancedSearch +restriction: INTERNAL, PREVIEW +Removing INTERNAL from this restriction will break clients that rely on this +method and only had access to it through INTERNAL. | ### File-level Extensions -| Extension | Type | Base | Number | Description | -| --------- | ---- | ---- | ------ | ----------- | -| enum_visibility | VisibilityRule | .google.protobuf.EnumOptions | 72295727 | See `VisibilityRule`. | -| value_visibility | VisibilityRule | .google.protobuf.EnumValueOptions | 72295727 | See `VisibilityRule`. | -| field_visibility | VisibilityRule | .google.protobuf.FieldOptions | 72295727 | See `VisibilityRule`. | -| message_visibility | VisibilityRule | .google.protobuf.MessageOptions | 72295727 | See `VisibilityRule`. | -| method_visibility | VisibilityRule | .google.protobuf.MethodOptions | 72295727 | See `VisibilityRule`. | -| api_visibility | VisibilityRule | .google.protobuf.ServiceOptions | 72295727 | See `VisibilityRule`. | - - - - - +| Extension | Type | Base | Number | Description | +| ------------------ | -------------- | --------------------------------- | -------- | --------------------- | +| enum_visibility | VisibilityRule | .google.protobuf.EnumOptions | 72295727 | See `VisibilityRule`. | +| value_visibility | VisibilityRule | .google.protobuf.EnumValueOptions | 72295727 | See `VisibilityRule`. | +| field_visibility | VisibilityRule | .google.protobuf.FieldOptions | 72295727 | See `VisibilityRule`. | +| message_visibility | VisibilityRule | .google.protobuf.MessageOptions | 72295727 | See `VisibilityRule`. | +| method_visibility | VisibilityRule | .google.protobuf.MethodOptions | 72295727 | See `VisibilityRule`. | +| api_visibility | VisibilityRule | .google.protobuf.ServiceOptions | 72295727 | See `VisibilityRule`. | +

Top

## google/api/field_behavior.proto - - - - ### FieldBehavior -An indicator of the behavior of a given field (for example, that a field -is required in requests, or given as output but ignored as input). -This **does not** change the behavior in protocol buffers itself; it only -denotes the behavior and may affect how API tooling handles the field. -Note: This enum **may** receive new values in the future. - -| Name | Number | Description | -| ---- | ------ | ----------- | -| FIELD_BEHAVIOR_UNSPECIFIED | 0 | Conventional default for enums. Do not use this. | -| OPTIONAL | 1 | Specifically denotes a field as optional. While all fields in protocol buffers are optional, this may be specified for emphasis if appropriate. | -| REQUIRED | 2 | Denotes a field as required. This indicates that the field **must** be provided as part of the request, and failure to do so will cause an error (usually `INVALID_ARGUMENT`). | -| OUTPUT_ONLY | 3 | Denotes a field as output only. This indicates that the field is provided in responses, but including the field in a request does nothing (the server *must* ignore it and *must not* throw an error as a result of the field's presence). | -| INPUT_ONLY | 4 | Denotes a field as input only. This indicates that the field is provided in requests, and the corresponding field is not included in output. | -| IMMUTABLE | 5 | Denotes a field as immutable. This indicates that the field may be set once in a request to create a resource, but may not be changed thereafter. | -| UNORDERED_LIST | 6 | Denotes that a (repeated) field is an unordered list. This indicates that the service may provide the elements of the list in any arbitrary order, rather than the order the user originally provided. Additionally, the list's order may or may not be stable. | -| NON_EMPTY_DEFAULT | 7 | Denotes that this field returns a non-empty default value if not set. This indicates that if the user provides the empty value in a request, a non-empty value will be returned. The user will not be aware of what non-empty value to expect. | +An indicator of the behavior of a given field (for example, that a field is +required in requests, or given as output but ignored as input). This **does +not** change the behavior in protocol buffers itself; it only denotes the +behavior and may affect how API tooling handles the field. +Note: This enum **may** receive new values in the future. - - +| Name | Number | Description | +| -------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| FIELD_BEHAVIOR_UNSPECIFIED | 0 | Conventional default for enums. Do not use this. | +| OPTIONAL | 1 | Specifically denotes a field as optional. While all fields in protocol buffers are optional, this may be specified for emphasis if appropriate. | +| REQUIRED | 2 | Denotes a field as required. This indicates that the field **must** be provided as part of the request, and failure to do so will cause an error (usually `INVALID_ARGUMENT`). | +| OUTPUT_ONLY | 3 | Denotes a field as output only. This indicates that the field is provided in responses, but including the field in a request does nothing (the server _must_ ignore it and _must not_ throw an error as a result of the field's presence). | +| INPUT_ONLY | 4 | Denotes a field as input only. This indicates that the field is provided in requests, and the corresponding field is not included in output. | +| IMMUTABLE | 5 | Denotes a field as immutable. This indicates that the field may be set once in a request to create a resource, but may not be changed thereafter. | +| UNORDERED_LIST | 6 | Denotes that a (repeated) field is an unordered list. This indicates that the service may provide the elements of the list in any arbitrary order, rather than the order the user originally provided. Additionally, the list's order may or may not be stable. | +| NON_EMPTY_DEFAULT | 7 | Denotes that this field returns a non-empty default value if not set. This indicates that if the user provides the empty value in a request, a non-empty value will be returned. The user will not be aware of what non-empty value to expect. | ### File-level Extensions -| Extension | Type | Base | Number | Description | -| --------- | ---- | ---- | ------ | ----------- | -| field_behavior | FieldBehavior | .google.protobuf.FieldOptions | 1052 | A designation of a specific field behavior (required, output only, etc.) in protobuf messages. - -Examples: - - string name = 1 [(google.api.field_behavior) = REQUIRED]; State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; google.protobuf.Duration ttl = 1 [(google.api.field_behavior) = INPUT_ONLY]; google.protobuf.Timestamp expire_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY, (google.api.field_behavior) = IMMUTABLE]; | - - - +| Extension | Type | Base | Number | Description | +| -------------- | ------------- | ----------------------------- | ------ | ---------------------------------------------------------------------------------------------- | +| field_behavior | FieldBehavior | .google.protobuf.FieldOptions | 1052 | A designation of a specific field behavior (required, output only, etc.) in protobuf messages. | +Examples: +string name = 1 [(google.api.field_behavior) = REQUIRED]; State state = 1 +[(google.api.field_behavior) = OUTPUT_ONLY]; google.protobuf.Duration ttl = 1 +[(google.api.field_behavior) = INPUT_ONLY]; google.protobuf.Timestamp +expire_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY, +(google.api.field_behavior) = IMMUTABLE]; | +

Top

## ory/keto/relation_tuples/v1alpha2/relation_tuples.proto - - ### RelationQuery -The query for listing relationships. -Clients can specify any optional field to + +The query for listing relationships. Clients can specify any optional field to partially filter for specific relationships. Example use cases (namespace is always required): - - object only: display a list of all permissions referring to a specific object - - relation only: get all groups that have members; get all directories that have content - - object & relation: display all subjects that have a specific permission relation - - subject & relation: display all groups a subject belongs to; display all objects a subject has access to - - object & relation & subject: check whether the relation tuple already exists - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespace | [string](#string) | optional | The namespace this relation tuple lives in. | -| object | [string](#string) | optional | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | optional | The relation between an Object and a Subject. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | optional | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | - - - - +- object only: display a list of all permissions referring to a specific object +- relation only: get all groups that have members; get all directories that have + content +- object & relation: display all subjects that have a specific permission + relation +- subject & relation: display all groups a subject belongs to; display all + objects a subject has access to +- object & relation & subject: check whether the relation tuple already + exists + +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| namespace | [string](#string) | optional | The namespace this relation tuple lives in. | +| object | [string](#string) | optional | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | optional | The relation between an Object and a Subject. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | optional | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | ### RelationTuple -RelationTuple defines a relation between an Object and a Subject. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespace | [string](#string) | | The namespace this relation tuple lives in. | -| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | | The relation between an Object and a Subject. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | -| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | -| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - - - +RelationTuple defines a relation between an Object and a Subject. +| Field | Type | Label | Description | +| ----------- | ----------------------------------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------- | +| namespace | [string](#string) | | The namespace this relation tuple lives in. | +| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | The relation between an Object and a Subject. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | +| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | +| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | ### Subject -Subject is either a concrete subject id or -a `SubjectSet` expanding to more Subjects. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | A concrete id of the subject. | -| set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - - - +Subject is either a concrete subject id or a `SubjectSet` expanding to more +Subjects. +| Field | Type | Label | Description | +| ----- | ----------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | +| id | [string](#string) | | A concrete id of the subject. | +| set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | ### SubjectQuery -SubjectQuery is either a concrete subject id or -a `SubjectSet` expanding to more Subjects. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| id | [string](#string) | | A concrete id of the subject. | -| set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - - - +SubjectQuery is either a concrete subject id or a `SubjectSet` expanding to more +Subjects. +| Field | Type | Label | Description | +| ----- | --------------------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | +| id | [string](#string) | | A concrete id of the subject. | +| set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | ### SubjectSet -SubjectSet refers to all subjects who have -the same `relation` on an `object`. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | -| object | [string](#string) | | The object related by this subject set. | -| relation | [string](#string) | | The relation between the object and the subjects. | - - - +SubjectSet refers to all subjects who have the same `relation` on an `object`. +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ------------------------------------------------------------------------ | +| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | +| object | [string](#string) | | The object related by this subject set. | +| relation | [string](#string) | | The relation between the object and the subjects. | ### SubjectSetQuery -SubjectSetQuery refers to all subjects who have -the same `relation` on an `object`. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | -| object | [string](#string) | | The object related by this subject set. | -| relation | [string](#string) | | The relation between the object and the subjects. | - - - - - - - - - - - - +SubjectSetQuery refers to all subjects who have the same `relation` on an +`object`. +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ------------------------------------------------------------------------ | +| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | +| object | [string](#string) | | The object related by this subject set. | +| relation | [string](#string) | | The relation between the object and the subjects. | +

Top

## ory/keto/relation_tuples/v1alpha2/check_service.proto - - ### CheckRequest -The request for a CheckService.Check RPC. -Checks whether a specific subject is related to an object. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespace | [string](#string) | | **Deprecated.** The namespace to evaluate the check. - -Note: If you use the expand-API and the check evaluates a RelationTuple specifying a SubjectSet as subject or due to a rewrite rule in a namespace config this check request may involve other namespaces automatically. | -| object | [string](#string) | | **Deprecated.** The related object in this check. | -| relation | [string](#string) | | **Deprecated.** The relation between the Object and the Subject. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The related subject in this check. | -| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | -| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | -| tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | | -| latest | [bool](#bool) | | This field is not implemented yet and has no effect. <!-- Set this field to `true` in case your application needs to authorize depending on up to date ACLs, also called a "content-change check". - -If set to `true` the `snaptoken` field is ignored, the check is evaluated at the latest snapshot (globally consistent) and the response includes a snaptoken for clients to store along with object contents that can be used for subsequent checks of the same content version. - -Example use case: - You need to authorize a user to modify/delete some resource and it is unacceptable that if the permission to do that had just been revoked some seconds ago so that the change had not yet been fully replicated to all availability zones. --> | -| snaptoken | [string](#string) | | This field is not implemented yet and has no effect. <!-- Optional. Like reads, a check is always evaluated at a consistent snapshot no earlier than the given snaptoken. - -Leave this field blank if you want to evaluate the check based on eventually consistent ACLs, benefiting from very low latency, but possibly slightly stale results. - -If the specified token is too old and no longer known, the server falls back as if no snaptoken had been specified. - -If not specified the server tries to evaluate the check on the best snapshot version where it is very likely that ACLs had already been replicated to all availability zones. --> | -| max_depth | [int32](#int32) | | The maximum depth to search for a relation. - -If the value is less than 1 or greater than the global max-depth then the global max-depth will be used instead. | - - - - +The request for a CheckService.Check RPC. Checks whether a specific subject is +related to an object. + +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ---------------------------------------------------- | +| namespace | [string](#string) | | **Deprecated.** The namespace to evaluate the check. | + +Note: If you use the expand-API and the check evaluates a RelationTuple +specifying a SubjectSet as subject or due to a rewrite rule in a namespace +config this check request may involve other namespaces automatically. | | object +| [string](#string) | | **Deprecated.** The related object in this check. | | +relation | [string](#string) | | **Deprecated.** The relation between the Object +and the Subject. | | subject | +[Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The +related subject in this check. | | subject_id | [string](#string) | | +**Deprecated.** A concrete id of the subject. | | subject_set | +[SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | +**Deprecated.** A subject set that expands to more Subjects. More information +are available under [concepts](../concepts/subjects.mdx). | | tuple | +[RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | | | latest +| [bool](#bool) | | This field is not implemented yet and has no effect. <!-- +Set this field to `true` in case your application needs to authorize depending +on up to date ACLs, also called a "content-change check". + +If set to `true` the `snaptoken` field is ignored, the check is evaluated at the +latest snapshot (globally consistent) and the response includes a snaptoken for +clients to store along with object contents that can be used for subsequent +checks of the same content version. + +Example use case: - You need to authorize a user to modify/delete some resource +and it is unacceptable that if the permission to do that had just been revoked +some seconds ago so that the change had not yet been fully replicated to all +availability zones. --> | | snaptoken | [string](#string) | | This field is +not implemented yet and has no effect. <!-- Optional. Like reads, a check is +always evaluated at a consistent snapshot no earlier than the given snaptoken. + +Leave this field blank if you want to evaluate the check based on eventually +consistent ACLs, benefiting from very low latency, but possibly slightly stale +results. + +If the specified token is too old and no longer known, the server falls back as +if no snaptoken had been specified. + +If not specified the server tries to evaluate the check on the best snapshot +version where it is very likely that ACLs had already been replicated to all +availability zones. --> | | max_depth | [int32](#int32) | | The maximum depth +to search for a relation. + +If the value is less than 1 or greater than the global max-depth then the global +max-depth will be used instead. | ### CheckResponse -The response for a CheckService.Check rpc. +The response for a CheckService.Check rpc. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| allowed | [bool](#bool) | | Whether the specified subject (id) is related to the requested object. +| Field | Type | Label | Description | +| ------- | ------------- | ----- | ---------------------------------------------------------------------- | +| allowed | [bool](#bool) | | Whether the specified subject (id) is related to the requested object. | -It is false by default if no ACL matches. | -| snaptoken | [string](#string) | | This field is not implemented yet and has no effect. <!-- The last known snapshot token ONLY specified if the request had not specified a snaptoken, since this performed a "content-change request" and consistently fetched the last known snapshot token. +It is false by default if no ACL matches. | | snaptoken | [string](#string) | | +This field is not implemented yet and has no effect. <!-- The last known +snapshot token ONLY specified if the request had not specified a snaptoken, +since this performed a "content-change request" and consistently fetched +the last known snapshot token. This field is not set if the request had specified a snaptoken! -If set, clients should cache and use this token for subsequent requests to have minimal latency, but allow slightly stale responses (only some milliseconds or seconds). --> | - - - - - - - - - - - +If set, clients should cache and use this token for subsequent requests to have +minimal latency, but allow slightly stale responses (only some milliseconds or +seconds). --> | ### CheckService -The service that performs authorization checks -based on the stored Access Control Lists. - -This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Check | [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) | [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) | Performs an authorization check. | - - +The service that performs authorization checks based on the stored Access +Control Lists. +This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). +| Method Name | Request Type | Response Type | Description | +| ----------- | --------------------------------------------------------------- | ----------------------------------------------------------------- | -------------------------------- | +| Check | [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) | [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) | Performs an authorization check. | +

Top

## ory/keto/relation_tuples/v1alpha2/expand_service.proto - - ### ExpandRequest -The request for an ExpandService.Expand RPC. -Expands the given subject set. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject to expand. | -| max_depth | [int32](#int32) | | The maximum depth of tree to build. - -If the value is less than 1 or greater than the global max-depth then the global max-depth will be used instead. -It is important to set this parameter to a meaningful value. Ponder how deep you really want to display this. | -| snaptoken | [string](#string) | | This field is not implemented yet and has no effect. <!-- Optional. Like reads, a expand is always evaluated at a consistent snapshot no earlier than the given snaptoken. +The request for an ExpandService.Expand RPC. Expands the given subject set. -Leave this field blank if you want to expand based on eventually consistent ACLs, benefiting from very low latency, but possibly slightly stale results. - -If the specified token is too old and no longer known, the server falls back as if no snaptoken had been specified. - -If not specified the server tries to build the tree on the best snapshot version where it is very likely that ACLs had already been replicated to all availability zones. --> | -| namespace | [string](#string) | | **Deprecated.** The namespace of the object and relation referenced in this subject set. | -| object | [string](#string) | | **Deprecated.** The object related by this subject set. | -| relation | [string](#string) | | **Deprecated.** The relation between the object and the subjects. | +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------- | ----- | ----------------------------------- | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject to expand. | +| max_depth | [int32](#int32) | | The maximum depth of tree to build. | +If the value is less than 1 or greater than the global max-depth then the global +max-depth will be used instead. +It is important to set this parameter to a meaningful value. Ponder how deep you +really want to display this. | | snaptoken | [string](#string) | | This field is +not implemented yet and has no effect. <!-- Optional. Like reads, a expand is +always evaluated at a consistent snapshot no earlier than the given snaptoken. +Leave this field blank if you want to expand based on eventually consistent +ACLs, benefiting from very low latency, but possibly slightly stale results. +If the specified token is too old and no longer known, the server falls back as +if no snaptoken had been specified. +If not specified the server tries to build the tree on the best snapshot version +where it is very likely that ACLs had already been replicated to all +availability zones. --> | | namespace | [string](#string) | | **Deprecated.** +The namespace of the object and relation referenced in this subject set. | | +object | [string](#string) | | **Deprecated.** The object related by this +subject set. | | relation | [string](#string) | | **Deprecated.** The relation +between the object and the subjects. | ### ExpandResponse -The response for a ExpandService.Expand RPC. +The response for a ExpandService.Expand RPC. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| tree | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | | The tree the requested subject set expands to. The requested subject set is the subject of the root. +| Field | Type | Label | Description | +| ----- | ------------------------------------------------------------- | ----- | ---------------------------------------------------------------------------------------------------- | +| tree | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | | The tree the requested subject set expands to. The requested subject set is the subject of the root. | This field can be nil in some circumstances. | - - - - - ### SubjectTree - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| node_type | [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) | | The type of the node. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The subject this node represents. Deprecated: More information is now available in the tuple field. | -| tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The relation tuple this node represents. | -| children | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | repeated | The children of this node. +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------- | +| node_type | [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) | | The type of the node. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The subject this node represents. Deprecated: More information is now available in the tuple field. | +| tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The relation tuple this node represents. | +| children | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | repeated | The children of this node. | This is never set if `node_type` == `NODE_TYPE_LEAF`. | - - - - - - - ### NodeType - -| Name | Number | Description | -| ---- | ------ | ----------- | -| unspecified | 0 | | -| NODE_TYPE_UNSPECIFIED | 0 | | -| union | 1 | This node expands to a union of all children. | -| NODE_TYPE_UNION | 1 | | -| exclusion | 2 | Not implemented yet. | -| NODE_TYPE_EXCLUSION | 2 | | -| intersection | 3 | Not implemented yet. | -| NODE_TYPE_INTERSECTION | 3 | | -| leaf | 4 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| NODE_TYPE_LEAF | 4 | | -| tuple_to_subject_set | 5 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| NODE_TYPE_TUPLE_TO_SUBJECT_SET | 5 | | -| computed_subject_set | 6 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| NODE_TYPE_COMPUTED_SUBJECT_SET | 6 | | -| not | 7 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| NODE_TYPE_NOT | 7 | | - - - - - - +| Name | Number | Description | +| ------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------- | +| unspecified | 0 | | +| NODE_TYPE_UNSPECIFIED | 0 | | +| union | 1 | This node expands to a union of all children. | +| NODE_TYPE_UNION | 1 | | +| exclusion | 2 | Not implemented yet. | +| NODE_TYPE_EXCLUSION | 2 | | +| intersection | 3 | Not implemented yet. | +| NODE_TYPE_INTERSECTION | 3 | | +| leaf | 4 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| NODE_TYPE_LEAF | 4 | | +| tuple_to_subject_set | 5 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| NODE_TYPE_TUPLE_TO_SUBJECT_SET | 5 | | +| computed_subject_set | 6 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| NODE_TYPE_COMPUTED_SUBJECT_SET | 6 | | +| not | 7 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| NODE_TYPE_NOT | 7 | | ### ExpandService -The service that performs subject set expansion -based on the stored Access Control Lists. - -This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| Expand | [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) | [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) | Expands the subject set into a tree of subjects. | - +The service that performs subject set expansion based on the stored Access +Control Lists. +This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). +| Method Name | Request Type | Response Type | Description | +| ----------- | ----------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------ | +| Expand | [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) | [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) | Expands the subject set into a tree of subjects. | +

Top

## ory/keto/relation_tuples/v1alpha2/namespaces_service.proto - - ### ListNamespacesRequest -Request for ReadService.ListNamespaces RPC. - - - - +Request for ReadService.ListNamespaces RPC. ### ListNamespacesResponse - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespaces | [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) | repeated | | - - - - - +| Field | Type | Label | Description | +| ---------- | --------------------------------------------------------- | -------- | ----------- | +| namespaces | [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) | repeated | | ### Namespace - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | | - - - - - - - - - - - +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------- | +| name | [string](#string) | | | ### NamespacesService + The service to query namespaces. This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| ListNamespaces | [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) | [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) | Lists Namespaces +| Method Name | Request Type | Response Type | Description | +| -------------- | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---------------- | +| ListNamespaces | [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) | [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) | Lists Namespaces | Get all namespaces. | - - - - +

Top

## ory/keto/relation_tuples/v1alpha2/openapi.proto - - ### ErrorResponse + JSON API Error Response The standard Ory JSON API error format. - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| error | [ErrorResponse.Error](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error) | | | - - - - - +| Field | Type | Label | Description | +| ----- | ----------------------------------------------------------------------------- | ----- | ----------- | +| error | [ErrorResponse.Error](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error) | | | ### ErrorResponse.Error +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------------- | +| code | [int64](#int64) | | The status code | +| debug | [string](#string) | | Debug information | +Debug information is often not exposed to protect against leaking sensitive +information. | | details | +[ErrorResponse.Error.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error-DetailsEntry) +| repeated | Further error details -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| code | [int64](#int64) | | The status code | -| debug | [string](#string) | | Debug information - -Debug information is often not exposed to protect against leaking sensitive information. | -| details | [ErrorResponse.Error.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error-DetailsEntry) | repeated | Further error details +Further details about the error. | | id | [string](#string) | | The error ID -Further details about the error. | -| id | [string](#string) | | The error ID +The error ID is useful when trying to identify various errors in application +logic. | | message | [string](#string) | | The error message -The error ID is useful when trying to identify various errors in application logic. | -| message | [string](#string) | | The error message +The error's message (required). | | reason | [string](#string) | | The error +reason -The error's message (required). | -| reason | [string](#string) | | The error reason +Reason holds a human-readable reason for the error. | | request | +[string](#string) | | The request ID -Reason holds a human-readable reason for the error. | -| request | [string](#string) | | The request ID - -The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. | -| status | [string](#string) | | The status description +The request ID is often exposed internally in order to trace errors across +service architectures. This is often a UUID. | | status | [string](#string) | | +The status description Status holds the human-readable HTTP status code. | - - - - - ### ErrorResponse.Error.DetailsEntry - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - - - - - - - - - - - - +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | +

Top

## ory/keto/relation_tuples/v1alpha2/read_service.proto - - ### ListRelationTuplesRequest -Request for ReadService.ListRelationTuples RPC. -See `ListRelationTuplesRequest_Query` for how to filter the query. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| query | [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) | | **Deprecated.** All query constraints are concatenated with a logical AND operator. - -The RelationTuple list from ListRelationTuplesResponse is ordered from the newest RelationTuple to the oldest. | -| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | -| expand_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | This field is not implemented yet and has no effect. <!-- Optional. The list of fields to be expanded in the RelationTuple list returned in `ListRelationTuplesResponse`. Leaving this field unspecified means all fields are expanded. - -Available fields: "object", "relation", "subject", "namespace", "subject.id", "subject.namespace", "subject.object", "subject.relation" --> | -| snaptoken | [string](#string) | | This field is not implemented yet and has no effect. <!-- Optional. The snapshot token for this read. --> | -| page_size | [int32](#int32) | | Optional. The maximum number of RelationTuples to return in the response. - -Default: 100 | -| page_token | [string](#string) | | Optional. An opaque pagination token returned from a previous call to `ListRelationTuples` that indicates where the page should start at. - -An empty token denotes the first page. All successive pages require the token from the previous page. | -| namespace | [string](#string) | | **Deprecated.** The namespace | -| object | [string](#string) | | **Deprecated.** The related object in this check. | -| relation | [string](#string) | | **Deprecated.** The relation between the Object and the Subject. | -| subject_id | [string](#string) | | A concrete id of the subject. | -| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - - - - +Request for ReadService.ListRelationTuples RPC. See +`ListRelationTuplesRequest_Query` for how to filter the query. + +| Field | Type | Label | Description | +| ----- | ----------------------------------------------------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------- | +| query | [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) | | **Deprecated.** All query constraints are concatenated with a logical AND operator. | + +The RelationTuple list from ListRelationTuplesResponse is ordered from the +newest RelationTuple to the oldest. | | relation_query | +[RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | | +expand_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | This +field is not implemented yet and has no effect. <!-- Optional. The list of +fields to be expanded in the RelationTuple list returned in +`ListRelationTuplesResponse`. Leaving this field unspecified means all fields +are expanded. + +Available fields: "object", "relation", "subject", +"namespace", "subject.id", "subject.namespace", +"subject.object", "subject.relation" --> | | snaptoken | +[string](#string) | | This field is not implemented yet and has no effect. +<!-- Optional. The snapshot token for this read. --> | | page_size | +[int32](#int32) | | Optional. The maximum number of RelationTuples to return in +the response. + +Default: 100 | | page_token | [string](#string) | | Optional. An opaque +pagination token returned from a previous call to `ListRelationTuples` that +indicates where the page should start at. + +An empty token denotes the first page. All successive pages require the token +from the previous page. | | namespace | [string](#string) | | **Deprecated.** +The namespace | | object | [string](#string) | | **Deprecated.** The related +object in this check. | | relation | [string](#string) | | **Deprecated.** The +relation between the Object and the Subject. | | subject_id | [string](#string) +| | A concrete id of the subject. | | subject_set | +[SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A +subject set that expands to more Subjects. More information are available under +[concepts](../concepts/subjects.mdx). | ### ListRelationTuplesRequest.Query -The query for listing relationships. -Clients can specify any optional field to + +The query for listing relationships. Clients can specify any optional field to partially filter for specific relationships. Example use cases (namespace is always required): - - object only: display a list of all permissions referring to a specific object - - relation only: get all groups that have members; get all directories that have content - - object & relation: display all subjects that have a specific permission relation - - subject & relation: display all groups a subject belongs to; display all objects a subject has access to - - object & relation & subject: check whether the relation tuple already exists - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespace | [string](#string) | | Required. The namespace to query. | -| object | [string](#string) | | Optional. The object to query for. | -| relation | [string](#string) | | Optional. The relation to query for. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | - - - - +- object only: display a list of all permissions referring to a specific object +- relation only: get all groups that have members; get all directories that have + content +- object & relation: display all subjects that have a specific permission + relation +- subject & relation: display all groups a subject belongs to; display all + objects a subject has access to +- object & relation & subject: check whether the relation tuple already + exists + +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------- | ----- | ------------------------------------ | +| namespace | [string](#string) | | Required. The namespace to query. | +| object | [string](#string) | | Optional. The object to query for. | +| relation | [string](#string) | | Optional. The relation to query for. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | ### ListRelationTuplesResponse -The response of a ReadService.ListRelationTuples RPC. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| relation_tuples | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | repeated | The relationships matching the list request. | -| next_page_token | [string](#string) | | The token required to get the next page. If this is the last page, the token will be the empty string. | - +The response of a ReadService.ListRelationTuples RPC. - - - - - - - - +| Field | Type | Label | Description | +| --------------- | ----------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------ | +| relation_tuples | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | repeated | The relationships matching the list request. | +| next_page_token | [string](#string) | | The token required to get the next page. If this is the last page, the token will be the empty string. | ### ReadService + The service to query relationships. This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis). -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| +| Method Name | Request Type | Response Type | Description | +| ------------------ | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------ | | ListRelationTuples | [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) | [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) | Lists ACL relationships. | - - - - -

Top

- -## ory/keto/relation_tuples/v1alpha2/version.proto - - - - - -### GetVersionRequest -Request for the VersionService.GetVersion RPC. - - - - - - - - -### GetVersionResponse -Response of the VersionService.GetVersion RPC. - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| version | [string](#string) | | The version string of the Ory Keto instance. | +

Top

+## ory/keto/relation_tuples/v1alpha2/version.proto + +### GetVersionRequest +Request for the VersionService.GetVersion RPC. - + - +### GetVersionResponse - +Response of the VersionService.GetVersion RPC. +| Field | Type | Label | Description | +| ------- | ----------------- | ----- | -------------------------------------------- | +| version | [string](#string) | | The version string of the Ory Keto instance. | ### VersionService -The service returning the specific Ory Keto instance version. - -This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis) and [write-APIs](../concepts/api-overview.mdx#write-apis). -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| GetVersion | [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) | [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) | Returns the version of the Ory Keto instance. - -This endpoint returns the service version typically notated using semantic versioning. +The service returning the specific Ory Keto instance version. -If the service supports TLS Edge Termination, this endpoint does not require the X-Forwarded-Proto header to be set. | +This service is part of the [read-APIs](../concepts/api-overview.mdx#read-apis) +and [write-APIs](../concepts/api-overview.mdx#write-apis). - +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------- | +| GetVersion | [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) | [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) | Returns the version of the Ory Keto instance. | +This endpoint returns the service version typically notated using semantic +versioning. +If the service supports TLS Edge Termination, this endpoint does not require the +X-Forwarded-Proto header to be set. | +

Top

## validate/validate.proto - - ### AnyRules -AnyRules describe constraints applied exclusively to the -`google.protobuf.Any` well-known type - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| required | [bool](#bool) | optional | Required specifies that this field must be set | -| in | [string](#string) | repeated | In specifies that this field's `type_url` must be equal to one of the specified values. | -| not_in | [string](#string) | repeated | NotIn specifies that this field's `type_url` must not be equal to any of the specified values. | - - - +AnyRules describe constraints applied exclusively to the `google.protobuf.Any` +well-known type +| Field | Type | Label | Description | +| -------- | ----------------- | -------- | -------------------------------------------------------------------------------------------------- | +| required | [bool](#bool) | optional | Required specifies that this field must be set | +| in | [string](#string) | repeated | In specifies that this field's `type_url` must be equal to one of the specified values. | +| not_in | [string](#string) | repeated | NotIn specifies that this field's `type_url` must not be equal to any of the specified values. | ### BoolRules -BoolRules describes the constraints applied to `bool` values +BoolRules describes the constraints applied to `bool` values -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | +| Field | Type | Label | Description | +| ----- | ------------- | -------- | ------------------------------------------------------------------- | | const | [bool](#bool) | optional | Const specifies that this field must be exactly the specified value | - - - - - ### BytesRules -BytesRules describe the constraints applied to `bytes` values - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| const | [bytes](#bytes) | optional | Const specifies that this field must be exactly the specified value | -| len | [uint64](#uint64) | optional | Len specifies that this field must be the specified number of bytes | -| min_len | [uint64](#uint64) | optional | MinLen specifies that this field must be the specified number of bytes at a minimum | -| max_len | [uint64](#uint64) | optional | MaxLen specifies that this field must be the specified number of bytes at a maximum | -| pattern | [string](#string) | optional | Pattern specifes that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters. | -| prefix | [bytes](#bytes) | optional | Prefix specifies that this field must have the specified bytes at the beginning of the string. | -| suffix | [bytes](#bytes) | optional | Suffix specifies that this field must have the specified bytes at the end of the string. | -| contains | [bytes](#bytes) | optional | Contains specifies that this field must have the specified bytes anywhere in the string. | -| in | [bytes](#bytes) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [bytes](#bytes) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ip | [bool](#bool) | optional | Ip specifies that the field must be a valid IP (v4 or v6) address in byte format | -| ipv4 | [bool](#bool) | optional | Ipv4 specifies that the field must be a valid IPv4 address in byte format | -| ipv6 | [bool](#bool) | optional | Ipv6 specifies that the field must be a valid IPv6 address in byte format | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - +BytesRules describe the constraints applied to `bytes` values +| Field | Type | Label | Description | +| ------------ | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [bytes](#bytes) | optional | Const specifies that this field must be exactly the specified value | +| len | [uint64](#uint64) | optional | Len specifies that this field must be the specified number of bytes | +| min_len | [uint64](#uint64) | optional | MinLen specifies that this field must be the specified number of bytes at a minimum | +| max_len | [uint64](#uint64) | optional | MaxLen specifies that this field must be the specified number of bytes at a maximum | +| pattern | [string](#string) | optional | Pattern specifes that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters. | +| prefix | [bytes](#bytes) | optional | Prefix specifies that this field must have the specified bytes at the beginning of the string. | +| suffix | [bytes](#bytes) | optional | Suffix specifies that this field must have the specified bytes at the end of the string. | +| contains | [bytes](#bytes) | optional | Contains specifies that this field must have the specified bytes anywhere in the string. | +| in | [bytes](#bytes) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [bytes](#bytes) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ip | [bool](#bool) | optional | Ip specifies that the field must be a valid IP (v4 or v6) address in byte format | +| ipv4 | [bool](#bool) | optional | Ipv4 specifies that the field must be a valid IPv4 address in byte format | +| ipv6 | [bool](#bool) | optional | Ipv6 specifies that the field must be a valid IPv6 address in byte format | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | ### DoubleRules -DoubleRules describes the constraints applied to `double` values - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| const | [double](#double) | optional | Const specifies that this field must be exactly the specified value | -| lt | [double](#double) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [double](#double) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [double](#double) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [double](#double) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [double](#double) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [double](#double) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - +DoubleRules describes the constraints applied to `double` values +| Field | Type | Label | Description | +| ------------ | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [double](#double) | optional | Const specifies that this field must be exactly the specified value | +| lt | [double](#double) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [double](#double) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [double](#double) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [double](#double) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [double](#double) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [double](#double) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | ### DurationRules + DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| required | [bool](#bool) | optional | Required specifies that this field must be set | -| const | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Const specifies that this field must be exactly the specified value | -| lt | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Lt specifies that this field must be less than the specified value, inclusive | -| gt | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Gt specifies that this field must be greater than the specified value, exclusive | -| gte | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Gte specifies that this field must be greater than the specified value, inclusive | -| in | [google.protobuf.Duration](#google-protobuf-Duration) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [google.protobuf.Duration](#google-protobuf-Duration) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | - - - - - +| Field | Type | Label | Description | +| -------- | ----------------------------------------------------- | -------- | --------------------------------------------------------------------------------- | +| required | [bool](#bool) | optional | Required specifies that this field must be set | +| const | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Const specifies that this field must be exactly the specified value | +| lt | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Lt specifies that this field must be less than the specified value, inclusive | +| gt | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Gt specifies that this field must be greater than the specified value, exclusive | +| gte | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Gte specifies that this field must be greater than the specified value, inclusive | +| in | [google.protobuf.Duration](#google-protobuf-Duration) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [google.protobuf.Duration](#google-protobuf-Duration) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | ### EnumRules -EnumRules describe the constraints applied to enum values - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| const | [int32](#int32) | optional | Const specifies that this field must be exactly the specified value | -| defined_only | [bool](#bool) | optional | DefinedOnly specifies that this field must be only one of the defined values for this enum, failing on any undefined value. | -| in | [int32](#int32) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [int32](#int32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | - - - +EnumRules describe the constraints applied to enum values +| Field | Type | Label | Description | +| ------------ | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------- | +| const | [int32](#int32) | optional | Const specifies that this field must be exactly the specified value | +| defined_only | [bool](#bool) | optional | DefinedOnly specifies that this field must be only one of the defined values for this enum, failing on any undefined value. | +| in | [int32](#int32) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [int32](#int32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | ### FieldRules + FieldRules encapsulates the rules for each type of field. Depending on the field, the correct set should be used to ensure proper validations. - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| message | [MessageRules](#validate-MessageRules) | optional | | -| float | [FloatRules](#validate-FloatRules) | optional | Scalar Field Types | -| double | [DoubleRules](#validate-DoubleRules) | optional | | -| int32 | [Int32Rules](#validate-Int32Rules) | optional | | -| int64 | [Int64Rules](#validate-Int64Rules) | optional | | -| uint32 | [UInt32Rules](#validate-UInt32Rules) | optional | | -| uint64 | [UInt64Rules](#validate-UInt64Rules) | optional | | -| sint32 | [SInt32Rules](#validate-SInt32Rules) | optional | | -| sint64 | [SInt64Rules](#validate-SInt64Rules) | optional | | -| fixed32 | [Fixed32Rules](#validate-Fixed32Rules) | optional | | -| fixed64 | [Fixed64Rules](#validate-Fixed64Rules) | optional | | -| sfixed32 | [SFixed32Rules](#validate-SFixed32Rules) | optional | | -| sfixed64 | [SFixed64Rules](#validate-SFixed64Rules) | optional | | -| bool | [BoolRules](#validate-BoolRules) | optional | | -| string | [StringRules](#validate-StringRules) | optional | | -| bytes | [BytesRules](#validate-BytesRules) | optional | | -| enum | [EnumRules](#validate-EnumRules) | optional | Complex Field Types | -| repeated | [RepeatedRules](#validate-RepeatedRules) | optional | | -| map | [MapRules](#validate-MapRules) | optional | | -| any | [AnyRules](#validate-AnyRules) | optional | Well-Known Field Types | -| duration | [DurationRules](#validate-DurationRules) | optional | | -| timestamp | [TimestampRules](#validate-TimestampRules) | optional | | - - - - - +| Field | Type | Label | Description | +| --------- | ------------------------------------------ | -------- | ---------------------- | +| message | [MessageRules](#validate-MessageRules) | optional | | +| float | [FloatRules](#validate-FloatRules) | optional | Scalar Field Types | +| double | [DoubleRules](#validate-DoubleRules) | optional | | +| int32 | [Int32Rules](#validate-Int32Rules) | optional | | +| int64 | [Int64Rules](#validate-Int64Rules) | optional | | +| uint32 | [UInt32Rules](#validate-UInt32Rules) | optional | | +| uint64 | [UInt64Rules](#validate-UInt64Rules) | optional | | +| sint32 | [SInt32Rules](#validate-SInt32Rules) | optional | | +| sint64 | [SInt64Rules](#validate-SInt64Rules) | optional | | +| fixed32 | [Fixed32Rules](#validate-Fixed32Rules) | optional | | +| fixed64 | [Fixed64Rules](#validate-Fixed64Rules) | optional | | +| sfixed32 | [SFixed32Rules](#validate-SFixed32Rules) | optional | | +| sfixed64 | [SFixed64Rules](#validate-SFixed64Rules) | optional | | +| bool | [BoolRules](#validate-BoolRules) | optional | | +| string | [StringRules](#validate-StringRules) | optional | | +| bytes | [BytesRules](#validate-BytesRules) | optional | | +| enum | [EnumRules](#validate-EnumRules) | optional | Complex Field Types | +| repeated | [RepeatedRules](#validate-RepeatedRules) | optional | | +| map | [MapRules](#validate-MapRules) | optional | | +| any | [AnyRules](#validate-AnyRules) | optional | Well-Known Field Types | +| duration | [DurationRules](#validate-DurationRules) | optional | | +| timestamp | [TimestampRules](#validate-TimestampRules) | optional | | ### Fixed32Rules -Fixed32Rules describes the constraints applied to `fixed32` values - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| const | [fixed32](#fixed32) | optional | Const specifies that this field must be exactly the specified value | -| lt | [fixed32](#fixed32) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [fixed32](#fixed32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [fixed32](#fixed32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [fixed32](#fixed32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [fixed32](#fixed32) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [fixed32](#fixed32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - +Fixed32Rules describes the constraints applied to `fixed32` values +| Field | Type | Label | Description | +| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [fixed32](#fixed32) | optional | Const specifies that this field must be exactly the specified value | +| lt | [fixed32](#fixed32) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [fixed32](#fixed32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [fixed32](#fixed32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [fixed32](#fixed32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [fixed32](#fixed32) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [fixed32](#fixed32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | ### Fixed64Rules -Fixed64Rules describes the constraints applied to `fixed64` values - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| const | [fixed64](#fixed64) | optional | Const specifies that this field must be exactly the specified value | -| lt | [fixed64](#fixed64) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [fixed64](#fixed64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [fixed64](#fixed64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [fixed64](#fixed64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [fixed64](#fixed64) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [fixed64](#fixed64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - +Fixed64Rules describes the constraints applied to `fixed64` values +| Field | Type | Label | Description | +| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [fixed64](#fixed64) | optional | Const specifies that this field must be exactly the specified value | +| lt | [fixed64](#fixed64) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [fixed64](#fixed64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [fixed64](#fixed64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [fixed64](#fixed64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [fixed64](#fixed64) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [fixed64](#fixed64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | ### FloatRules -FloatRules describes the constraints applied to `float` values - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| const | [float](#float) | optional | Const specifies that this field must be exactly the specified value | -| lt | [float](#float) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [float](#float) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [float](#float) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [float](#float) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [float](#float) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [float](#float) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - +FloatRules describes the constraints applied to `float` values +| Field | Type | Label | Description | +| ------------ | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [float](#float) | optional | Const specifies that this field must be exactly the specified value | +| lt | [float](#float) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [float](#float) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [float](#float) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [float](#float) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [float](#float) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [float](#float) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | ### Int32Rules -Int32Rules describes the constraints applied to `int32` values - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| const | [int32](#int32) | optional | Const specifies that this field must be exactly the specified value | -| lt | [int32](#int32) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [int32](#int32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [int32](#int32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [int32](#int32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [int32](#int32) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [int32](#int32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - +Int32Rules describes the constraints applied to `int32` values +| Field | Type | Label | Description | +| ------------ | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [int32](#int32) | optional | Const specifies that this field must be exactly the specified value | +| lt | [int32](#int32) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [int32](#int32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [int32](#int32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [int32](#int32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [int32](#int32) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [int32](#int32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | ### Int64Rules -Int64Rules describes the constraints applied to `int64` values - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| const | [int64](#int64) | optional | Const specifies that this field must be exactly the specified value | -| lt | [int64](#int64) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [int64](#int64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [int64](#int64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [int64](#int64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [int64](#int64) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [int64](#int64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - +Int64Rules describes the constraints applied to `int64` values +| Field | Type | Label | Description | +| ------------ | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [int64](#int64) | optional | Const specifies that this field must be exactly the specified value | +| lt | [int64](#int64) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [int64](#int64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [int64](#int64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [int64](#int64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [int64](#int64) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [int64](#int64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | ### MapRules -MapRules describe the constraints applied to `map` values - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| min_pairs | [uint64](#uint64) | optional | MinPairs specifies that this field must have the specified number of KVs at a minimum | -| max_pairs | [uint64](#uint64) | optional | MaxPairs specifies that this field must have the specified number of KVs at a maximum | -| no_sparse | [bool](#bool) | optional | NoSparse specifies values in this field cannot be unset. This only applies to map's with message value types. | -| keys | [FieldRules](#validate-FieldRules) | optional | Keys specifies the constraints to be applied to each key in the field. | -| values | [FieldRules](#validate-FieldRules) | optional | Values specifies the constraints to be applied to the value of each key in the field. Message values will still have their validations evaluated unless skip is specified here. | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - +MapRules describe the constraints applied to `map` values +| Field | Type | Label | Description | +| ------------ | ---------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| min_pairs | [uint64](#uint64) | optional | MinPairs specifies that this field must have the specified number of KVs at a minimum | +| max_pairs | [uint64](#uint64) | optional | MaxPairs specifies that this field must have the specified number of KVs at a maximum | +| no_sparse | [bool](#bool) | optional | NoSparse specifies values in this field cannot be unset. This only applies to map's with message value types. | +| keys | [FieldRules](#validate-FieldRules) | optional | Keys specifies the constraints to be applied to each key in the field. | +| values | [FieldRules](#validate-FieldRules) | optional | Values specifies the constraints to be applied to the value of each key in the field. Message values will still have their validations evaluated unless skip is specified here. | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | ### MessageRules -MessageRules describe the constraints applied to embedded message values. -For message-type fields, validation is performed recursively. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| skip | [bool](#bool) | optional | Skip specifies that the validation rules of this field should not be evaluated | -| required | [bool](#bool) | optional | Required specifies that this field must be set | - - - +MessageRules describe the constraints applied to embedded message values. For +message-type fields, validation is performed recursively. +| Field | Type | Label | Description | +| -------- | ------------- | -------- | ------------------------------------------------------------------------------ | +| skip | [bool](#bool) | optional | Skip specifies that the validation rules of this field should not be evaluated | +| required | [bool](#bool) | optional | Required specifies that this field must be set | ### RepeatedRules -RepeatedRules describe the constraints applied to `repeated` values - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| min_items | [uint64](#uint64) | optional | MinItems specifies that this field must have the specified number of items at a minimum | -| max_items | [uint64](#uint64) | optional | MaxItems specifies that this field must have the specified number of items at a maximum | -| unique | [bool](#bool) | optional | Unique specifies that all elements in this field must be unique. This contraint is only applicable to scalar and enum types (messages are not supported). | -| items | [FieldRules](#validate-FieldRules) | optional | Items specifies the contraints to be applied to each item in the field. Repeated message fields will still execute validation against each item unless skip is specified here. | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - +RepeatedRules describe the constraints applied to `repeated` values +| Field | Type | Label | Description | +| ------------ | ---------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| min_items | [uint64](#uint64) | optional | MinItems specifies that this field must have the specified number of items at a minimum | +| max_items | [uint64](#uint64) | optional | MaxItems specifies that this field must have the specified number of items at a maximum | +| unique | [bool](#bool) | optional | Unique specifies that all elements in this field must be unique. This contraint is only applicable to scalar and enum types (messages are not supported). | +| items | [FieldRules](#validate-FieldRules) | optional | Items specifies the contraints to be applied to each item in the field. Repeated message fields will still execute validation against each item unless skip is specified here. | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | ### SFixed32Rules -SFixed32Rules describes the constraints applied to `sfixed32` values - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| const | [sfixed32](#sfixed32) | optional | Const specifies that this field must be exactly the specified value | -| lt | [sfixed32](#sfixed32) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [sfixed32](#sfixed32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [sfixed32](#sfixed32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [sfixed32](#sfixed32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [sfixed32](#sfixed32) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [sfixed32](#sfixed32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - +SFixed32Rules describes the constraints applied to `sfixed32` values +| Field | Type | Label | Description | +| ------------ | --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [sfixed32](#sfixed32) | optional | Const specifies that this field must be exactly the specified value | +| lt | [sfixed32](#sfixed32) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [sfixed32](#sfixed32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [sfixed32](#sfixed32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [sfixed32](#sfixed32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [sfixed32](#sfixed32) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [sfixed32](#sfixed32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | ### SFixed64Rules -SFixed64Rules describes the constraints applied to `sfixed64` values - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| const | [sfixed64](#sfixed64) | optional | Const specifies that this field must be exactly the specified value | -| lt | [sfixed64](#sfixed64) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [sfixed64](#sfixed64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [sfixed64](#sfixed64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [sfixed64](#sfixed64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [sfixed64](#sfixed64) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [sfixed64](#sfixed64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - +SFixed64Rules describes the constraints applied to `sfixed64` values +| Field | Type | Label | Description | +| ------------ | --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [sfixed64](#sfixed64) | optional | Const specifies that this field must be exactly the specified value | +| lt | [sfixed64](#sfixed64) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [sfixed64](#sfixed64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [sfixed64](#sfixed64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [sfixed64](#sfixed64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [sfixed64](#sfixed64) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [sfixed64](#sfixed64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | ### SInt32Rules -SInt32Rules describes the constraints applied to `sint32` values - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| const | [sint32](#sint32) | optional | Const specifies that this field must be exactly the specified value | -| lt | [sint32](#sint32) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [sint32](#sint32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [sint32](#sint32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [sint32](#sint32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [sint32](#sint32) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [sint32](#sint32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - +SInt32Rules describes the constraints applied to `sint32` values +| Field | Type | Label | Description | +| ------------ | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [sint32](#sint32) | optional | Const specifies that this field must be exactly the specified value | +| lt | [sint32](#sint32) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [sint32](#sint32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [sint32](#sint32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [sint32](#sint32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [sint32](#sint32) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [sint32](#sint32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | ### SInt64Rules -SInt64Rules describes the constraints applied to `sint64` values - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| const | [sint64](#sint64) | optional | Const specifies that this field must be exactly the specified value | -| lt | [sint64](#sint64) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [sint64](#sint64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [sint64](#sint64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [sint64](#sint64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [sint64](#sint64) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [sint64](#sint64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - +SInt64Rules describes the constraints applied to `sint64` values +| Field | Type | Label | Description | +| ------------ | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [sint64](#sint64) | optional | Const specifies that this field must be exactly the specified value | +| lt | [sint64](#sint64) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [sint64](#sint64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [sint64](#sint64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [sint64](#sint64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [sint64](#sint64) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [sint64](#sint64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | ### StringRules -StringRules describe the constraints applied to `string` values - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| const | [string](#string) | optional | Const specifies that this field must be exactly the specified value | -| len | [uint64](#uint64) | optional | Len specifies that this field must be the specified number of characters (Unicode code points). Note that the number of characters may differ from the number of bytes in the string. | -| min_len | [uint64](#uint64) | optional | MinLen specifies that this field must be the specified number of characters (Unicode code points) at a minimum. Note that the number of characters may differ from the number of bytes in the string. | -| max_len | [uint64](#uint64) | optional | MaxLen specifies that this field must be the specified number of characters (Unicode code points) at a maximum. Note that the number of characters may differ from the number of bytes in the string. | -| len_bytes | [uint64](#uint64) | optional | LenBytes specifies that this field must be the specified number of bytes | -| min_bytes | [uint64](#uint64) | optional | MinBytes specifies that this field must be the specified number of bytes at a minimum | -| max_bytes | [uint64](#uint64) | optional | MaxBytes specifies that this field must be the specified number of bytes at a maximum | -| pattern | [string](#string) | optional | Pattern specifes that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters. | -| prefix | [string](#string) | optional | Prefix specifies that this field must have the specified substring at the beginning of the string. | -| suffix | [string](#string) | optional | Suffix specifies that this field must have the specified substring at the end of the string. | -| contains | [string](#string) | optional | Contains specifies that this field must have the specified substring anywhere in the string. | -| not_contains | [string](#string) | optional | NotContains specifies that this field cannot have the specified substring anywhere in the string. | -| in | [string](#string) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [string](#string) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| email | [bool](#bool) | optional | Email specifies that the field must be a valid email address as defined by RFC 5322 | -| hostname | [bool](#bool) | optional | Hostname specifies that the field must be a valid hostname as defined by RFC 1034. This constraint does not support internationalized domain names (IDNs). | -| ip | [bool](#bool) | optional | Ip specifies that the field must be a valid IP (v4 or v6) address. Valid IPv6 addresses should not include surrounding square brackets. | -| ipv4 | [bool](#bool) | optional | Ipv4 specifies that the field must be a valid IPv4 address. | -| ipv6 | [bool](#bool) | optional | Ipv6 specifies that the field must be a valid IPv6 address. Valid IPv6 addresses should not include surrounding square brackets. | -| uri | [bool](#bool) | optional | Uri specifies that the field must be a valid, absolute URI as defined by RFC 3986 | -| uri_ref | [bool](#bool) | optional | UriRef specifies that the field must be a valid URI as defined by RFC 3986 and may be relative or absolute. | -| address | [bool](#bool) | optional | Address specifies that the field must be either a valid hostname as defined by RFC 1034 (which does not support internationalized domain names or IDNs), or it can be a valid IP (v4 or v6). | -| uuid | [bool](#bool) | optional | Uuid specifies that the field must be a valid UUID as defined by RFC 4122 | -| well_known_regex | [KnownRegex](#validate-KnownRegex) | optional | WellKnownRegex specifies a common well known pattern defined as a regex. | -| strict | [bool](#bool) | optional | This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable strict header validation. By default, this is true, and HTTP header validations are RFC-compliant. Setting to false will enable a looser validations that only disallows \r\n\0 characters, which can be used to bypass header matching rules. Default: true | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - +StringRules describe the constraints applied to `string` values +| Field | Type | Label | Description | +| ---------------- | ---------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [string](#string) | optional | Const specifies that this field must be exactly the specified value | +| len | [uint64](#uint64) | optional | Len specifies that this field must be the specified number of characters (Unicode code points). Note that the number of characters may differ from the number of bytes in the string. | +| min_len | [uint64](#uint64) | optional | MinLen specifies that this field must be the specified number of characters (Unicode code points) at a minimum. Note that the number of characters may differ from the number of bytes in the string. | +| max_len | [uint64](#uint64) | optional | MaxLen specifies that this field must be the specified number of characters (Unicode code points) at a maximum. Note that the number of characters may differ from the number of bytes in the string. | +| len_bytes | [uint64](#uint64) | optional | LenBytes specifies that this field must be the specified number of bytes | +| min_bytes | [uint64](#uint64) | optional | MinBytes specifies that this field must be the specified number of bytes at a minimum | +| max_bytes | [uint64](#uint64) | optional | MaxBytes specifies that this field must be the specified number of bytes at a maximum | +| pattern | [string](#string) | optional | Pattern specifes that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters. | +| prefix | [string](#string) | optional | Prefix specifies that this field must have the specified substring at the beginning of the string. | +| suffix | [string](#string) | optional | Suffix specifies that this field must have the specified substring at the end of the string. | +| contains | [string](#string) | optional | Contains specifies that this field must have the specified substring anywhere in the string. | +| not_contains | [string](#string) | optional | NotContains specifies that this field cannot have the specified substring anywhere in the string. | +| in | [string](#string) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [string](#string) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| email | [bool](#bool) | optional | Email specifies that the field must be a valid email address as defined by RFC 5322 | +| hostname | [bool](#bool) | optional | Hostname specifies that the field must be a valid hostname as defined by RFC 1034. This constraint does not support internationalized domain names (IDNs). | +| ip | [bool](#bool) | optional | Ip specifies that the field must be a valid IP (v4 or v6) address. Valid IPv6 addresses should not include surrounding square brackets. | +| ipv4 | [bool](#bool) | optional | Ipv4 specifies that the field must be a valid IPv4 address. | +| ipv6 | [bool](#bool) | optional | Ipv6 specifies that the field must be a valid IPv6 address. Valid IPv6 addresses should not include surrounding square brackets. | +| uri | [bool](#bool) | optional | Uri specifies that the field must be a valid, absolute URI as defined by RFC 3986 | +| uri_ref | [bool](#bool) | optional | UriRef specifies that the field must be a valid URI as defined by RFC 3986 and may be relative or absolute. | +| address | [bool](#bool) | optional | Address specifies that the field must be either a valid hostname as defined by RFC 1034 (which does not support internationalized domain names or IDNs), or it can be a valid IP (v4 or v6). | +| uuid | [bool](#bool) | optional | Uuid specifies that the field must be a valid UUID as defined by RFC 4122 | +| well_known_regex | [KnownRegex](#validate-KnownRegex) | optional | WellKnownRegex specifies a common well known pattern defined as a regex. | +| strict | [bool](#bool) | optional | This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable strict header validation. By default, this is true, and HTTP header validations are RFC-compliant. Setting to false will enable a looser validations that only disallows \r\n\0 characters, which can be used to bypass header matching rules. Default: true | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | ### TimestampRules + TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| required | [bool](#bool) | optional | Required specifies that this field must be set | -| const | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Const specifies that this field must be exactly the specified value | -| lt | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Lte specifies that this field must be less than the specified value, inclusive | -| gt | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Gt specifies that this field must be greater than the specified value, exclusive | -| gte | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Gte specifies that this field must be greater than the specified value, inclusive | -| lt_now | [bool](#bool) | optional | LtNow specifies that this must be less than the current time. LtNow can only be used with the Within rule. | -| gt_now | [bool](#bool) | optional | GtNow specifies that this must be greater than the current time. GtNow can only be used with the Within rule. | -| within | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Within specifies that this field must be within this duration of the current time. This constraint can be used alone or with the LtNow and GtNow rules. | - - - - - +| Field | Type | Label | Description | +| -------- | ------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| required | [bool](#bool) | optional | Required specifies that this field must be set | +| const | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Const specifies that this field must be exactly the specified value | +| lt | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Lte specifies that this field must be less than the specified value, inclusive | +| gt | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Gt specifies that this field must be greater than the specified value, exclusive | +| gte | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Gte specifies that this field must be greater than the specified value, inclusive | +| lt_now | [bool](#bool) | optional | LtNow specifies that this must be less than the current time. LtNow can only be used with the Within rule. | +| gt_now | [bool](#bool) | optional | GtNow specifies that this must be greater than the current time. GtNow can only be used with the Within rule. | +| within | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Within specifies that this field must be within this duration of the current time. This constraint can be used alone or with the LtNow and GtNow rules. | ### UInt32Rules -UInt32Rules describes the constraints applied to `uint32` values - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| const | [uint32](#uint32) | optional | Const specifies that this field must be exactly the specified value | -| lt | [uint32](#uint32) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [uint32](#uint32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [uint32](#uint32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [uint32](#uint32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [uint32](#uint32) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [uint32](#uint32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - +UInt32Rules describes the constraints applied to `uint32` values +| Field | Type | Label | Description | +| ------------ | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [uint32](#uint32) | optional | Const specifies that this field must be exactly the specified value | +| lt | [uint32](#uint32) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [uint32](#uint32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [uint32](#uint32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [uint32](#uint32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [uint32](#uint32) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [uint32](#uint32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | ### UInt64Rules -UInt64Rules describes the constraints applied to `uint64` values - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| const | [uint64](#uint64) | optional | Const specifies that this field must be exactly the specified value | -| lt | [uint64](#uint64) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [uint64](#uint64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [uint64](#uint64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [uint64](#uint64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [uint64](#uint64) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [uint64](#uint64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | +UInt64Rules describes the constraints applied to `uint64` values - - - - - +| Field | Type | Label | Description | +| ------------ | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [uint64](#uint64) | optional | Const specifies that this field must be exactly the specified value | +| lt | [uint64](#uint64) | optional | Lt specifies that this field must be less than the specified value, exclusive | +| lte | [uint64](#uint64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | +| gt | [uint64](#uint64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | +| gte | [uint64](#uint64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | +| in | [uint64](#uint64) | repeated | In specifies that this field must be equal to one of the specified values | +| not_in | [uint64](#uint64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | +| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | ### KnownRegex -WellKnownRegex contain some well-known patterns. - -| Name | Number | Description | -| ---- | ------ | ----------- | -| UNKNOWN | 0 | | -| HTTP_HEADER_NAME | 1 | HTTP header name as defined by RFC 7230. | -| HTTP_HEADER_VALUE | 2 | HTTP header value as defined by RFC 7230. | - - +WellKnownRegex contain some well-known patterns. +| Name | Number | Description | +| ----------------- | ------ | ----------------------------------------- | +| UNKNOWN | 0 | | +| HTTP_HEADER_NAME | 1 | HTTP header name as defined by RFC 7230. | +| HTTP_HEADER_VALUE | 2 | HTTP header value as defined by RFC 7230. | ### File-level Extensions -| Extension | Type | Base | Number | Description | -| --------- | ---- | ---- | ------ | ----------- | -| rules | FieldRules | .google.protobuf.FieldOptions | 1071 | Rules specify the validations to be performed on this field. By default, no validation is performed against a field. | -| disabled | bool | .google.protobuf.MessageOptions | 1071 | Disabled nullifies any validation rules for this message, including any message fields associated with it that do support validation. | -| ignored | bool | .google.protobuf.MessageOptions | 1072 | Ignore skips generation of validation methods for this message. | -| required | bool | .google.protobuf.OneofOptions | 1071 | Required ensures that exactly one the field options in a oneof is set; validation fails if no fields in the oneof are set. | - - - - - +| Extension | Type | Base | Number | Description | +| --------- | ---------- | ------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------- | +| rules | FieldRules | .google.protobuf.FieldOptions | 1071 | Rules specify the validations to be performed on this field. By default, no validation is performed against a field. | +| disabled | bool | .google.protobuf.MessageOptions | 1071 | Disabled nullifies any validation rules for this message, including any message fields associated with it that do support validation. | +| ignored | bool | .google.protobuf.MessageOptions | 1072 | Ignore skips generation of validation methods for this message. | +| required | bool | .google.protobuf.OneofOptions | 1071 | Required ensures that exactly one the field options in a oneof is set; validation fails if no fields in the oneof are set. | +

Top

## ory/keto/relation_tuples/v1alpha2/write_service.proto - - ### CreateRelationTupleRequest -The request to create a new relationship. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| relation_tuple | [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) | | The relationship to create. | - - - +The request to create a new relationship. +| Field | Type | Label | Description | +| -------------- | --------------------------------------------------------------------------------------------------------------------- | ----- | --------------------------- | +| relation_tuple | [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) | | The relationship to create. | ### CreateRelationTupleRequest.Relationship - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespace | [string](#string) | | The namespace this relation tuple lives in. | -| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | | The relation between an Object and a Subject. | -| subject_id | [string](#string) | | A concrete id of the subject. | -| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - - - - - +| Field | Type | Label | Description | +| ----------- | ----------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | +| namespace | [string](#string) | | The namespace this relation tuple lives in. | +| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | The relation between an Object and a Subject. | +| subject_id | [string](#string) | | A concrete id of the subject. | +| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | ### CreateRelationTupleResponse -The response from creating a new relationship. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The created relationship. | - - - +The response from creating a new relationship. +| Field | Type | Label | Description | +| -------------- | ----------------------------------------------------------------- | ----- | ------------------------- | +| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The created relationship. | ### DeleteRelationTuplesRequest - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| query | [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) | | **Deprecated.** | -| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | -| namespace | [string](#string) | | **Deprecated.** The namespace this relation tuple lives in. | -| object | [string](#string) | | **Deprecated.** The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | | **Deprecated.** The relation between an Object and a Subject. | -| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | -| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - - - - - +| Field | Type | Label | Description | +| -------------- | --------------------------------------------------------------------------------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------- | +| query | [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) | | **Deprecated.** | +| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | +| namespace | [string](#string) | | **Deprecated.** The namespace this relation tuple lives in. | +| object | [string](#string) | | **Deprecated.** The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | **Deprecated.** The relation between an Object and a Subject. | +| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | +| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | ### DeleteRelationTuplesRequest.Query -The query for deleting relationships - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| namespace | [string](#string) | | Optional. The namespace to query. | -| object | [string](#string) | | Optional. The object to query for. | -| relation | [string](#string) | | Optional. The relation to query for. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | - - - +The query for deleting relationships +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------- | ----- | ------------------------------------ | +| namespace | [string](#string) | | Optional. The namespace to query. | +| object | [string](#string) | | Optional. The object to query for. | +| relation | [string](#string) | | Optional. The relation to query for. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | ### DeleteRelationTuplesResponse - - - - - - ### RelationTupleDelta -Write-delta for a TransactRelationTuplesRequest. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| action | [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) | | The action to do on the RelationTuple. | -| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The target RelationTuple. | - - - +Write-delta for a TransactRelationTuplesRequest. +| Field | Type | Label | Description | +| -------------- | ----------------------------------------------------------------------------------------- | ----- | -------------------------------------- | +| action | [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) | | The action to do on the RelationTuple. | +| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The target RelationTuple. | ### TransactRelationTuplesRequest -The request of a WriteService.TransactRelationTuples RPC. +The request of a WriteService.TransactRelationTuples RPC. -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | +| Field | Type | Label | Description | +| --------------------- | --------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- | | relation_tuple_deltas | [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) | repeated | The write delta for the relationships operated in one single transaction. Either all actions succeed or no change takes effect on error. | - - - - - ### TransactRelationTuplesResponse -The response of a WriteService.TransactRelationTuples rpc. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| snaptokens | [string](#string) | repeated | This field is not implemented yet and has no effect. <!-- The list of the new latest snapshot tokens of the affected RelationTuple, with the same index as specified in the `relation_tuple_deltas` field of the TransactRelationTuplesRequest request. - -If the RelationTupleDelta_Action was DELETE the snaptoken is empty at the same index. --> | - - - +The response of a WriteService.TransactRelationTuples rpc. - +| Field | Type | Label | Description | +| ---------- | ----------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| snaptokens | [string](#string) | repeated | This field is not implemented yet and has no effect. <!-- The list of the new latest snapshot tokens of the affected RelationTuple, with the same index as specified in the `relation_tuple_deltas` field of the TransactRelationTuplesRequest request. | +If the RelationTupleDelta_Action was DELETE the snaptoken is empty at the same +index. --> | ### RelationTupleDelta.Action - -| Name | Number | Description | -| ---- | ------ | ----------- | -| ACTION_UNSPECIFIED | 0 | Unspecified. The `TransactRelationTuples` RPC ignores this RelationTupleDelta if an action was unspecified. | -| ACTION_INSERT | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | -| insert | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | -| ACTION_DELETE | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | -| delete | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | - - - - - - +| Name | Number | Description | +| ------------------ | ------ | ----------------------------------------------------------------------------------------------------------- | +| ACTION_UNSPECIFIED | 0 | Unspecified. The `TransactRelationTuples` RPC ignores this RelationTupleDelta if an action was unspecified. | +| ACTION_INSERT | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | +| insert | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | +| ACTION_DELETE | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | +| delete | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | ### WriteService + The write service to create and delete Access Control Lists. -This service is part of the [write-APIs](../concepts/api-overview.mdx#write-apis). +This service is part of the +[write-APIs](../concepts/api-overview.mdx#write-apis). -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| +| Method Name | Request Type | Response Type | Description | +| ---------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | | TransactRelationTuples | [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) | [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) | Writes one or more relationships in a single transaction. | -| CreateRelationTuple | [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) | [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) | Creates a relationship | -| DeleteRelationTuples | [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) | [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) | Deletes relationships based on relation query | - - - - +| CreateRelationTuple | [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) | [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) | Creates a relationship | +| DeleteRelationTuples | [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) | [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) | Deletes relationships based on relation query | ## Scalar Value Types -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | - +| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | +| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------- | ----------- | ------- | ---------- | -------------- | ------------------------------ | +| double | | double | double | float | float64 | double | float | Float | +| float | | float | float | float | float32 | float | float | Float | +| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | +| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | +| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | +| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | +| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | +| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | +| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | diff --git a/spec/api.swagger.json b/spec/api.swagger.json index bf2e24f40..a3a49248a 100755 --- a/spec/api.swagger.json +++ b/spec/api.swagger.json @@ -15,16 +15,9 @@ } }, "basePath": "/", - "schemes": [ - "http", - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "schemes": ["http", "https"], + "consumes": ["application/json"], + "produces": ["application/json"], "paths": { "/admin/relation-tuples": { "delete": { @@ -93,12 +86,8 @@ "type": "string" } ], - "tags": [ - "relationship" - ], - "consumes": [ - "application/x-www-form-urlencoded" - ] + "tags": ["relationship"], + "consumes": ["application/x-www-form-urlencoded"] }, "put": { "summary": "Creates a relationship", @@ -128,9 +117,7 @@ } } ], - "tags": [ - "relationship" - ] + "tags": ["relationship"] }, "patch": { "summary": "Writes one or more relationships in a single transaction.", @@ -164,9 +151,7 @@ } } ], - "tags": [ - "relationship" - ] + "tags": ["relationship"] } }, "/namespaces": { @@ -197,12 +182,8 @@ } } }, - "tags": [ - "relationship" - ], - "consumes": [ - "application/x-www-form-urlencoded" - ] + "tags": ["relationship"], + "consumes": ["application/x-www-form-urlencoded"] } }, "/opl/syntax/check": { @@ -234,12 +215,8 @@ } } ], - "tags": [ - "relationship" - ], - "consumes": [ - "text/plain" - ] + "tags": ["relationship"], + "consumes": ["text/plain"] } }, "/relation-tuples": { @@ -326,12 +303,8 @@ "type": "string" } ], - "tags": [ - "relationship" - ], - "consumes": [ - "application/x-www-form-urlencoded" - ] + "tags": ["relationship"], + "consumes": ["application/x-www-form-urlencoded"] } }, "/relation-tuples/check": { @@ -417,13 +390,8 @@ "format": "int32" } ], - "tags": [ - "permission" - ], - "consumes": [ - "application/x-www-form-urlencoded", - "application/json" - ] + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded", "application/json"] }, "post": { "summary": "Performs an authorization check.", @@ -459,13 +427,8 @@ } } ], - "tags": [ - "permission" - ], - "consumes": [ - "application/x-www-form-urlencoded", - "application/json" - ] + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded", "application/json"] } }, "/relation-tuples/check/openapi": { @@ -551,13 +514,8 @@ "format": "int32" } ], - "tags": [ - "permission" - ], - "consumes": [ - "application/x-www-form-urlencoded", - "application/json" - ] + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded", "application/json"] }, "post": { "summary": "Performs an authorization check.", @@ -593,13 +551,8 @@ } } ], - "tags": [ - "permission" - ], - "consumes": [ - "application/x-www-form-urlencoded", - "application/json" - ] + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded", "application/json"] } }, "/relation-tuples/expand": { @@ -651,12 +604,8 @@ "type": "string" } ], - "tags": [ - "permission" - ], - "consumes": [ - "application/x-www-form-urlencoded" - ] + "tags": ["permission"], + "consumes": ["application/x-www-form-urlencoded"] } }, "/version": { @@ -678,9 +627,7 @@ } } }, - "tags": [ - "version" - ] + "tags": ["version"] } } }, @@ -811,9 +758,7 @@ }, "description": "The standard Ory JSON API error format.", "title": "JSON API Error Response", - "required": [ - "error" - ] + "required": ["error"] }, "ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error": { "type": "object", @@ -866,9 +811,7 @@ "title": "The status description" } }, - "required": [ - "message" - ] + "required": ["message"] }, "ory.keto.relation_tuples.v1alpha2.ExpandResponse": { "type": "object", @@ -966,11 +909,7 @@ } }, "description": "RelationTuple defines a relation between an Object and a Subject.", - "required": [ - "namespace", - "object", - "relation" - ] + "required": ["namespace", "object", "relation"] }, "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta": { "type": "object", @@ -985,18 +924,11 @@ } }, "description": "Write-delta for a TransactRelationTuplesRequest.", - "required": [ - "action", - "relation_tuple" - ] + "required": ["action", "relation_tuple"] }, "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action": { "type": "string", - "enum": [ - "ACTION_UNSPECIFIED", - "insert", - "delete" - ], + "enum": ["ACTION_UNSPECIFIED", "insert", "delete"], "default": "ACTION_UNSPECIFIED", "description": " - ACTION_UNSPECIFIED: Unspecified.\nThe `TransactRelationTuples` RPC ignores this\nRelationTupleDelta if an action was unspecified.\n - insert: Insertion of a new RelationTuple.\nIt is ignored if already existing.\n - delete: Deletion of the RelationTuple.\nIt is ignored if it does not exist." }, @@ -1031,11 +963,7 @@ } }, "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`.", - "required": [ - "namespace", - "object", - "relation" - ] + "required": ["namespace", "object", "relation"] }, "ory.keto.relation_tuples.v1alpha2.SubjectSetQuery": { "type": "object", @@ -1078,9 +1006,7 @@ "description": "The children of this node.\n\nThis is never set if `node_type` == `NODE_TYPE_LEAF`." } }, - "required": [ - "type" - ] + "required": ["type"] }, "ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse": { "type": "object", From 600be5f5a248258ba09a91e2c7c57b159e47a041 Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Wed, 22 Feb 2023 13:02:45 +0100 Subject: [PATCH 10/42] fix: remove well-known pb for Go --- proto/buf.md | 1709 ----------------- proto/go.mod | 5 +- proto/go.sum | 14 +- proto/google/api/annotations.pb.go | 118 -- proto/google/api/annotations.pb.validate.go | 36 - proto/google/api/field_behavior.pb.go | 249 --- .../google/api/field_behavior.pb.validate.go | 36 - proto/google/api/http.pb.go | 777 -------- proto/google/api/http.pb.validate.go | 521 ----- proto/google/api/visibility.pb.go | 447 ----- proto/google/api/visibility.pb.validate.go | 273 --- spec/api.swagger.json | 113 +- 12 files changed, 68 insertions(+), 4230 deletions(-) delete mode 100644 proto/google/api/annotations.pb.go delete mode 100644 proto/google/api/annotations.pb.validate.go delete mode 100644 proto/google/api/field_behavior.pb.go delete mode 100644 proto/google/api/field_behavior.pb.validate.go delete mode 100644 proto/google/api/http.pb.go delete mode 100644 proto/google/api/http.pb.validate.go delete mode 100644 proto/google/api/visibility.pb.go delete mode 100644 proto/google/api/visibility.pb.validate.go diff --git a/proto/buf.md b/proto/buf.md index 4d67c38f0..d43e1099f 100644 --- a/proto/buf.md +++ b/proto/buf.md @@ -4,61 +4,6 @@ ## Table of Contents -- [google/api/http.proto](#google_api_http-proto) - - [CustomHttpPattern](#google-api-CustomHttpPattern) - - [Http](#google-api-Http) - - [HttpRule](#google-api-HttpRule) -- [google/api/annotations.proto](#google_api_annotations-proto) - - [File-level Extensions](#google_api_annotations-proto-extensions) -- [protoc-gen-openapiv2/options/openapiv2.proto](#protoc-gen-openapiv2_options_openapiv2-proto) - - - [Contact](#grpc-gateway-protoc_gen_openapiv2-options-Contact) - - [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) - - [Header](#grpc-gateway-protoc_gen_openapiv2-options-Header) - - [HeaderParameter](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter) - - [Info](#grpc-gateway-protoc_gen_openapiv2-options-Info) - - [Info.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Info-ExtensionsEntry) - - [JSONSchema](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema) - - [JSONSchema.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-ExtensionsEntry) - - [JSONSchema.FieldConfiguration](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-FieldConfiguration) - - [License](#grpc-gateway-protoc_gen_openapiv2-options-License) - - [Operation](#grpc-gateway-protoc_gen_openapiv2-options-Operation) - - [Operation.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ExtensionsEntry) - - [Operation.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ResponsesEntry) - - [Parameters](#grpc-gateway-protoc_gen_openapiv2-options-Parameters) - - [Response](#grpc-gateway-protoc_gen_openapiv2-options-Response) - - [Response.ExamplesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExamplesEntry) - - [Response.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExtensionsEntry) - - [Response.HeadersEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-HeadersEntry) - - [Schema](#grpc-gateway-protoc_gen_openapiv2-options-Schema) - - [Scopes](#grpc-gateway-protoc_gen_openapiv2-options-Scopes) - - [Scopes.ScopeEntry](#grpc-gateway-protoc_gen_openapiv2-options-Scopes-ScopeEntry) - - [SecurityDefinitions](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions) - - [SecurityDefinitions.SecurityEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions-SecurityEntry) - - [SecurityRequirement](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement) - - [SecurityRequirement.SecurityRequirementEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementEntry) - - [SecurityRequirement.SecurityRequirementValue](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementValue) - - [SecurityScheme](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme) - - [SecurityScheme.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-ExtensionsEntry) - - [Swagger](#grpc-gateway-protoc_gen_openapiv2-options-Swagger) - - [Swagger.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ExtensionsEntry) - - [Swagger.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ResponsesEntry) - - [Tag](#grpc-gateway-protoc_gen_openapiv2-options-Tag) - - [Tag.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Tag-ExtensionsEntry) - - - [HeaderParameter.Type](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter-Type) - - [JSONSchema.JSONSchemaSimpleTypes](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-JSONSchemaSimpleTypes) - - [Scheme](#grpc-gateway-protoc_gen_openapiv2-options-Scheme) - - [SecurityScheme.Flow](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Flow) - - [SecurityScheme.In](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-In) - - [SecurityScheme.Type](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Type) - -- [protoc-gen-openapiv2/options/annotations.proto](#protoc-gen-openapiv2_options_annotations-proto) - - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) - - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) - - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) - - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) - - [File-level Extensions](#protoc-gen-openapiv2_options_annotations-proto-extensions) - [ory/keto/opl/v1alpha1/syntax_service.proto](#ory_keto_opl_v1alpha1_syntax_service-proto) - [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) @@ -68,24 +13,6 @@ - [SyntaxService](#ory-keto-opl-v1alpha1-SyntaxService) -- [google/api/visibility.proto](#google_api_visibility-proto) - - - [Visibility](#google-api-Visibility) - - [VisibilityRule](#google-api-VisibilityRule) - - - [File-level Extensions](#google_api_visibility-proto-extensions) - - [File-level Extensions](#google_api_visibility-proto-extensions) - - [File-level Extensions](#google_api_visibility-proto-extensions) - - [File-level Extensions](#google_api_visibility-proto-extensions) - - [File-level Extensions](#google_api_visibility-proto-extensions) - - [File-level Extensions](#google_api_visibility-proto-extensions) - -- [google/api/field_behavior.proto](#google_api_field_behavior-proto) - - - [FieldBehavior](#google-api-FieldBehavior) - - - [File-level Extensions](#google_api_field_behavior-proto-extensions) - - [ory/keto/relation_tuples/v1alpha2/relation_tuples.proto](#ory_keto_relation_tuples_v1alpha2_relation_tuples-proto) - [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) - [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) @@ -137,39 +64,6 @@ - [VersionService](#ory-keto-relation_tuples-v1alpha2-VersionService) -- [validate/validate.proto](#validate_validate-proto) - - - [AnyRules](#validate-AnyRules) - - [BoolRules](#validate-BoolRules) - - [BytesRules](#validate-BytesRules) - - [DoubleRules](#validate-DoubleRules) - - [DurationRules](#validate-DurationRules) - - [EnumRules](#validate-EnumRules) - - [FieldRules](#validate-FieldRules) - - [Fixed32Rules](#validate-Fixed32Rules) - - [Fixed64Rules](#validate-Fixed64Rules) - - [FloatRules](#validate-FloatRules) - - [Int32Rules](#validate-Int32Rules) - - [Int64Rules](#validate-Int64Rules) - - [MapRules](#validate-MapRules) - - [MessageRules](#validate-MessageRules) - - [RepeatedRules](#validate-RepeatedRules) - - [SFixed32Rules](#validate-SFixed32Rules) - - [SFixed64Rules](#validate-SFixed64Rules) - - [SInt32Rules](#validate-SInt32Rules) - - [SInt64Rules](#validate-SInt64Rules) - - [StringRules](#validate-StringRules) - - [TimestampRules](#validate-TimestampRules) - - [UInt32Rules](#validate-UInt32Rules) - - [UInt64Rules](#validate-UInt64Rules) - - - [KnownRegex](#validate-KnownRegex) - - - [File-level Extensions](#validate_validate-proto-extensions) - - [File-level Extensions](#validate_validate-proto-extensions) - - [File-level Extensions](#validate_validate-proto-extensions) - - [File-level Extensions](#validate_validate-proto-extensions) - - [ory/keto/relation_tuples/v1alpha2/write_service.proto](#ory_keto_relation_tuples_v1alpha2_write_service-proto) - [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) @@ -188,1047 +82,6 @@ - [Scalar Value Types](#scalar-value-types) - - -

Top

- -## google/api/http.proto - - - -### CustomHttpPattern - -A custom pattern is used for defining custom HTTP verb. - -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ------------------------------------- | -| kind | [string](#string) | | The name of this custom HTTP verb. | -| path | [string](#string) | | The path matched by this custom verb. | - - - -### Http - -Defines the HTTP configuration for an API service. It contains a list of -[HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method to -one or more HTTP REST API methods. - -| Field | Type | Label | Description | -| ----- | -------------------------------- | -------- | ------------------------------------------------------------------------ | -| rules | [HttpRule](#google-api-HttpRule) | repeated | A list of HTTP configuration rules that apply to individual API methods. | - -**NOTE:** All service configuration rules follow "last one wins" order. -| | fully_decode_reserved_expansion | [bool](#bool) | | When set to true, URL -path parameters will be fully URI-decoded except in cases of single segment -matches in reserved expansion, where "%2F" will be left encoded. - -The default behavior is to not decode RFC 6570 reserved characters in multi -segment matches. | - - - -### HttpRule - -# gRPC Transcoding - -gRPC Transcoding is a feature for mapping between a gRPC method and one or more -HTTP REST endpoints. It allows developers to build a single API service that -supports both gRPC APIs and REST APIs. Many systems, including -[Google APIs](https://github.com/googleapis/googleapis), -[Cloud Endpoints](https://cloud.google.com/endpoints), -[gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and -[Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use -it for large scale production services. - -`HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -how different portions of the gRPC request message are mapped to the URL path, -URL query parameters, and HTTP request body. It also controls how the gRPC -response message is mapped to the HTTP response body. `HttpRule` is typically -specified as an `google.api.http` annotation on the gRPC method. - -Each mapping specifies a URL path template and an HTTP method. The path template -may refer to one or more fields in the gRPC request message, as long as each -field is a non-repeated field with a primitive (non-message) type. The path -template controls how fields of the request message are mapped to the URL path. - -Example: - - service Messaging { - rpc GetMessage(GetMessageRequest) returns (Message) { - option (google.api.http) = { - get: "/v1/{name=messages/*}" - }; - } - } - message GetMessageRequest { - string name = 1; // Mapped to URL path. - } - message Message { - string text = 1; // The resource content. - } - -This enables an HTTP REST to gRPC mapping as below: - -| HTTP | gRPC | -| ------------------------- | --------------------------------------------- | -| `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` | - -Any fields in the request message which are not bound by the path template -automatically become HTTP query parameters if there is no HTTP request body. For -example: - - service Messaging { - rpc GetMessage(GetMessageRequest) returns (Message) { - option (google.api.http) = { - get:"/v1/messages/{message_id}" - }; - } - } - message GetMessageRequest { - message SubMessage { - string subfield = 1; - } - string message_id = 1; // Mapped to URL path. - int64 revision = 2; // Mapped to URL query parameter `revision`. - SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. - } - -This enables a HTTP JSON to RPC mapping as below: - -| HTTP | gRPC | -| --------------------------------------------------------- | ---- | -| `GET /v1/messages/123456?revision=2&sub.subfield=foo` | - -`GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` - -Note that fields which are mapped to URL query parameters must have a primitive -type or a repeated primitive type or a non-repeated message type. In the case of -a repeated type, the parameter can be repeated in the URL as -`...?param=A&param=B`. In the case of a message type, each field of the -message is mapped to a separate parameter, such as -`...?foo.a=A&foo.b=B&foo.c=C`. - -For HTTP methods that allow a request body, the `body` field specifies the -mapping. Consider a REST update method on the message resource collection: - - service Messaging { - rpc UpdateMessage(UpdateMessageRequest) returns (Message) { - option (google.api.http) = { - patch: "/v1/messages/{message_id}" - body: "message" - }; - } - } - message UpdateMessageRequest { - string message_id = 1; // mapped to the URL - Message message = 2; // mapped to the body - } - -The following HTTP JSON to RPC mapping is enabled, where the representation of -the JSON in the request body is determined by protos JSON encoding: - -| HTTP | gRPC | -| ------------------------------------------------------------- | -------------------------- | -| `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: | - -"123456" message { text: "Hi!" })` - -The special name `*` can be used in the body mapping to define that every field -not bound by the path template should be mapped to the request body. This -enables the following alternative definition of the update method: - - service Messaging { - rpc UpdateMessage(Message) returns (Message) { - option (google.api.http) = { - patch: "/v1/messages/{message_id}" - body: "*" - }; - } - } - message Message { - string message_id = 1; - string text = 2; - } - -The following HTTP JSON to RPC mapping is enabled: - -| HTTP | gRPC | -| ------------------------------------------------------------- | -------------------------- | -| `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: | - -"123456" text: "Hi!")` - -Note that when using `*` in the body mapping, it is not possible to have HTTP -parameters, as all fields not bound by the path end in the body. This makes this -option more rarely used in practice when defining REST APIs. The common usage of -`*` is in custom methods which don't use the URL at all for transferring -data. - -It is possible to define multiple HTTP methods for one RPC by using the -`additional_bindings` option. Example: - - service Messaging { - rpc GetMessage(GetMessageRequest) returns (Message) { - option (google.api.http) = { - get: "/v1/messages/{message_id}" - additional_bindings { - get: "/v1/users/{user_id}/messages/{message_id}" - } - }; - } - } - message GetMessageRequest { - string message_id = 1; - string user_id = 2; - } - -This enables the following two alternative HTTP JSON to RPC mappings: - -| HTTP | gRPC | -| ---------------------------------- | --------------------------------------------- | -| `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` | -| `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: | - -"123456")` - -## Rules for HTTP mapping - -1. Leaf request fields (recursive expansion nested messages in the request - message) are classified into three categories: - - Fields referred by the path template. They are passed via the URL path. - - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are - passed via the HTTP request body. - - All other fields are passed via the URL query parameters, and the parameter - name is the field path in the request message. A repeated field can be - represented as multiple query parameters under the same name. -2. If [HttpRule.body][google.api.HttpRule.body] is "\*", there is no URL - query parameter, all fields are passed via URL path and HTTP request body. -3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP - request body, all fields are passed via URL path and URL query parameters. - -### Path template syntax - - Template = "/" Segments [ Verb ] ; - Segments = Segment { "/" Segment } ; - Segment = "*" | "**" | LITERAL | Variable ; - Variable = "{" FieldPath [ "=" Segments ] "}" ; - FieldPath = IDENT { "." IDENT } ; - Verb = ":" LITERAL ; - -The syntax `*` matches a single URL path segment. The syntax `**` matches zero -or more URL path segments, which must be the last part of the URL path except -the `Verb`. - -The syntax `Variable` matches part of the URL path as specified by its template. -A variable template must not contain other variables. If a variable matches a -single path segment, its template may be omitted, e.g. `{var}` is equivalent to -`{var=*}`. - -The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -contains any reserved character, such characters should be percent-encoded -before the matching. - -If a variable contains exactly one path segment, such as `"{var}"` or -`"{var=*}"`, when such a variable is expanded into a URL path on the -client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -server side does the reverse decoding. Such variables show up in the -[Discovery Document](https://developers.google.com/discovery/v1/reference/apis) -as `{var}`. - -If a variable contains multiple path segments, such as `"{var=foo/*}"` -or `"{var=**}"`, when such a variable is expanded into a URL path on the -client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The -server side does the reverse decoding, except "%2F" and "%2f" -are left unchanged. Such variables show up in the -[Discovery Document](https://developers.google.com/discovery/v1/reference/apis) -as `{+var}`. - -## Using gRPC API Service Configuration - -gRPC API Service Configuration (service config) is a configuration language for -configuring a gRPC service to become a user-facing product. The service config -is simply the YAML representation of the `google.api.Service` proto message. - -As an alternative to annotating your proto file, you can configure gRPC -transcoding in your service config YAML files. You do this by specifying a -`HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -effect as the proto annotation. This can be particularly useful if you have a -proto that is reused in multiple services. Note that any transcoding specified -in the service config will override any matching transcoding configuration in -the proto. - -Example: - - http: - rules: - # Selects a gRPC method and applies HttpRule to it. - - selector: example.v1.Messaging.GetMessage - get: /v1/messages/{message_id}/{sub.subfield} - -## Special notes - -When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to -JSON conversion must follow the -[proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). - -While the single segment variable follows the semantics of -[RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 -Reserved Expansion. The reason is that the Reserved Expansion does not expand -special characters like `?` and `#`, which would lead to invalid URLs. As the -result, gRPC Transcoding uses a custom encoding for multi segment variables. - -The path variables **must not** refer to any repeated or mapped field, because -client libraries are not capable of handling such variable expansion. - -The path variables **must not** capture the leading "/" character. The -reason is that the most common use case "{var}" does not capture the -leading "/" character. For consistency, all path variables must share -the same behavior. - -Repeated message fields must not be mapped to URL query parameters, because no -client library can support such complicated mapping. - -If an API needs to use a JSON array for request or response body, it can map the -request or response body to a repeated field. However, some gRPC Transcoding -implementations may not support this feature. - -| Field | Type | Label | Description | -| -------- | ----------------- | ----- | -------------------------------------------- | -| selector | [string](#string) | | Selects a method to which this rule applies. | - -Refer to [selector][google.api.DocumentationRule.selector] for syntax details. | -| get | [string](#string) | | Maps to HTTP GET. Used for listing and getting -information about resources. | | put | [string](#string) | | Maps to HTTP PUT. -Used for replacing a resource. | | post | [string](#string) | | Maps to HTTP -POST. Used for creating a resource or performing an action. | | delete | -[string](#string) | | Maps to HTTP DELETE. Used for deleting a resource. | | -patch | [string](#string) | | Maps to HTTP PATCH. Used for updating a resource. -| | custom | [CustomHttpPattern](#google-api-CustomHttpPattern) | | The custom -pattern is used for specifying an HTTP method that is not included in the -`pattern` field, such as HEAD, or "_" to leave the HTTP method -unspecified for this rule. The wild-card rule is useful for services that -provide content to Web (HTML) clients. | | body | [string](#string) | | The name -of the request field whose value is mapped to the HTTP request body, or `_` for -mapping all request fields not captured by the path pattern to the HTTP body, or -omitted for not having any HTTP request body. - -NOTE: the referred field must be present at the top-level of the request message -type. | | response_body | [string](#string) | | Optional. The name of the -response field whose value is mapped to the HTTP response body. When omitted, -the entire response message will be used as the HTTP response body. - -NOTE: The referred field must be present at the top-level of the response -message type. | | additional_bindings | [HttpRule](#google-api-HttpRule) | -repeated | Additional HTTP bindings for the selector. Nested bindings must not -contain an `additional_bindings` field themselves (that is, the nesting may only -be one level deep). | - - - -

Top

- -## google/api/annotations.proto - - - -### File-level Extensions - -| Extension | Type | Base | Number | Description | -| --------- | -------- | ------------------------------ | -------- | --------------- | -| http | HttpRule | .google.protobuf.MethodOptions | 72295728 | See `HttpRule`. | - - - -

Top

- -## protoc-gen-openapiv2/options/openapiv2.proto - - - -### Contact - -`Contact` is a representation of OpenAPI v2 specification's Contact object. - -See: -https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject - -Example: - -option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { -... contact: { name: "gRPC-Gateway project"; url: -"https://github.com/grpc-ecosystem/grpc-gateway"; email: -"none@example.com"; }; ... }; ... }; - -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ------------------------------------------------------------------------------------------------ | -| name | [string](#string) | | The identifying name of the contact person/organization. | -| url | [string](#string) | | The URL pointing to the contact information. MUST be in the format of a URL. | -| email | [string](#string) | | The email address of the contact person/organization. MUST be in the format of an email address. | - - - -### ExternalDocumentation - -`ExternalDocumentation` is a representation of OpenAPI v2 specification's -ExternalDocumentation object. - -See: -https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject - -Example: - -option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { ... -external_docs: { description: "More about gRPC-Gateway"; url: -"https://github.com/grpc-ecosystem/grpc-gateway"; } ... }; - -| Field | Type | Label | Description | -| ----------- | ----------------- | ----- | ----------------------------------------------------------------------------------------------------- | -| description | [string](#string) | | A short description of the target documentation. GFM syntax can be used for rich text representation. | -| url | [string](#string) | | The URL for the target documentation. Value MUST be in the format of a URL. | - - - -### Header - -`Header` is a representation of OpenAPI v2 specification's Header object. - -See: -https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject - -| Field | Type | Label | Description | -| ----------- | ----------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| description | [string](#string) | | `Description` is a short description of the header. | -| type | [string](#string) | | The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. | -| format | [string](#string) | | `Format` The extending format for the previously mentioned type. | -| default | [string](#string) | | `Default` Declares the value of the header that the server will use if none is provided. See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. Unlike JSON Schema this value MUST conform to the defined type for the header. | -| pattern | [string](#string) | | 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. | - - - -### HeaderParameter - -`HeaderParameter` a HTTP header parameter. See: -https://swagger.io/specification/v2/#parameter-object - -| Field | Type | Label | Description | -| ----------- | --------------------------------------------------------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| name | [string](#string) | | `Name` is the header name. | -| description | [string](#string) | | `Description` is a short description of the header. | -| type | [HeaderParameter.Type](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter-Type) | | `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. See: https://swagger.io/specification/v2/#parameterType. | -| format | [string](#string) | | `Format` The extending format for the previously mentioned type. | -| required | [bool](#bool) | | `Required` indicates if the header is optional | - - - -### Info - -`Info` is a representation of OpenAPI v2 specification's Info object. - -See: -https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject - -Example: - -option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { -title: "Echo API"; version: "1.0"; description: ""; -contact: { name: "gRPC-Gateway project"; url: -"https://github.com/grpc-ecosystem/grpc-gateway"; email: -"none@example.com"; }; license: { name: "BSD 3-Clause License"; -url: -"https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; -}; }; ... }; - -| Field | Type | Label | Description | -| ---------------- | --------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| title | [string](#string) | | The title of the application. | -| description | [string](#string) | | A short description of the application. GFM syntax can be used for rich text representation. | -| terms_of_service | [string](#string) | | The Terms of Service for the API. | -| contact | [Contact](#grpc-gateway-protoc_gen_openapiv2-options-Contact) | | The contact information for the exposed API. | -| license | [License](#grpc-gateway-protoc_gen_openapiv2-options-License) | | The license information for the exposed API. | -| version | [string](#string) | | Provides the version of the application API (not to be confused with the specification version). | -| extensions | [Info.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Info-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | - - - -### Info.ExtensionsEntry - -| Field | Type | Label | Description | -| ----- | ----------------------------------------------- | ----- | ----------- | -| key | [string](#string) | | | -| value | [google.protobuf.Value](#google-protobuf-Value) | | | - - - -### JSONSchema - -`JSONSchema` represents properties from JSON Schema taken, and as used, in the -OpenAPI v2 spec. - -This includes changes made by OpenAPI v2. - -See: -https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject - -See also: https://cswr.github.io/JsonSchema/spec/basic_types/, -https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json - -Example: - -message SimpleMessage { option -(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { json_schema: { -title: "SimpleMessage" description: "A simple message." -required: ["id"] } }; - -// Id represents the message identifier. string id = 1; [ -(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: -"The unique identifier of the simple message." }]; } - -| Field | Type | Label | Description | -| ------------------- | --------------------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| ref | [string](#string) | | Ref is used to define an external reference to include in the message. This could be a fully qualified proto message reference, and that type must be imported into the protofile. If no message is identified, the Ref will be used verbatim in the output. For example: `ref: ".google.protobuf.Timestamp"`. | -| title | [string](#string) | | The title of the schema. | -| description | [string](#string) | | A short description of the schema. | -| default | [string](#string) | | | -| read_only | [bool](#bool) | | | -| example | [string](#string) | | A free-form property to include a JSON example of this field. This is copied verbatim to the output swagger.json. Quotes must be escaped. This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject | -| multiple_of | [double](#double) | | | -| maximum | [double](#double) | | Maximum represents an inclusive upper limit for a numeric instance. The value of MUST be a number, | -| exclusive_maximum | [bool](#bool) | | | -| minimum | [double](#double) | | minimum represents an inclusive lower limit for a numeric instance. The value of MUST be a number, | -| exclusive_minimum | [bool](#bool) | | | -| max_length | [uint64](#uint64) | | | -| min_length | [uint64](#uint64) | | | -| pattern | [string](#string) | | | -| max_items | [uint64](#uint64) | | | -| min_items | [uint64](#uint64) | | | -| unique_items | [bool](#bool) | | | -| max_properties | [uint64](#uint64) | | | -| min_properties | [uint64](#uint64) | | | -| required | [string](#string) | repeated | | -| array | [string](#string) | repeated | Items in 'array' must be unique. | -| type | [JSONSchema.JSONSchemaSimpleTypes](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-JSONSchemaSimpleTypes) | repeated | | -| format | [string](#string) | | `Format` | -| enum | [string](#string) | repeated | Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 | -| field_configuration | [JSONSchema.FieldConfiguration](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-FieldConfiguration) | | Additional field level properties used when generating the OpenAPI v2 file. | -| extensions | [JSONSchema.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | - - - -### JSONSchema.ExtensionsEntry - -| Field | Type | Label | Description | -| ----- | ----------------------------------------------- | ----- | ----------- | -| key | [string](#string) | | | -| value | [google.protobuf.Value](#google-protobuf-Value) | | | - - - -### JSONSchema.FieldConfiguration - -'FieldConfiguration' provides additional field level properties used -when generating the OpenAPI v2 file. These properties are not defined by -OpenAPIv2, but they are used to control the generation. - -| Field | Type | Label | Description | -| --------------- | ----------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| path_param_name | [string](#string) | | Alternative parameter name when used as path parameter. If set, this will be used as the complete parameter name when this field is used as a path parameter. Use this to avoid having auto generated path parameter names for overlapping paths. | - - - -### License - -`License` is a representation of OpenAPI v2 specification's License object. - -See: -https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject - -Example: - -option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { -... license: { name: "BSD 3-Clause License"; url: -"https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; -}; ... }; ... }; - -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ---------------------------------------------------------------------- | -| name | [string](#string) | | The license name used for the API. | -| url | [string](#string) | | A URL to the license used for the API. MUST be in the format of a URL. | - - - -### Operation - -`Operation` is a representation of OpenAPI v2 specification's Operation -object. - -See: -https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject - -Example: - -service EchoService { rpc Echo(SimpleMessage) returns (SimpleMessage) { option -(google.api.http) = { get: "/v1/example/echo/{id}" }; - - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Get a message."; - operation_id: "getMessage"; - tags: "echo"; - responses: { - key: "200" - value: { - description: "OK"; - } - } - }; - -} } - -| Field | Type | Label | Description | -| ------------- | ------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| tags | [string](#string) | repeated | A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier. | -| summary | [string](#string) | | A short summary of what the operation does. For maximum readability in the swagger-ui, this field SHOULD be less than 120 characters. | -| description | [string](#string) | | A verbose explanation of the operation behavior. GFM syntax can be used for rich text representation. | -| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation for this operation. | -| operation_id | [string](#string) | | Unique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is recommended to follow common programming naming conventions. | -| consumes | [string](#string) | repeated | A list of MIME types the operation can consume. This overrides the consumes definition at the OpenAPI Object. An empty value MAY be used to clear the global definition. Value MUST be as described under Mime Types. | -| produces | [string](#string) | repeated | A list of MIME types the operation can produce. This overrides the produces definition at the OpenAPI Object. An empty value MAY be used to clear the global definition. Value MUST be as described under Mime Types. | -| responses | [Operation.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ResponsesEntry) | repeated | The list of possible responses as they are returned from executing this operation. | -| schemes | [Scheme](#grpc-gateway-protoc_gen_openapiv2-options-Scheme) | repeated | The transfer protocol for the operation. Values MUST be from the list: "http", "https", "ws", "wss". The value overrides the OpenAPI Object schemes definition. | -| deprecated | [bool](#bool) | | Declares this operation to be deprecated. Usage of the declared operation should be refrained. Default value is false. | -| security | [SecurityRequirement](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement) | repeated | A declaration of which security schemes are applied for this operation. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). This definition overrides any declared top-level security. To remove a top-level security declaration, an empty array can be used. | -| extensions | [Operation.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | -| parameters | [Parameters](#grpc-gateway-protoc_gen_openapiv2-options-Parameters) | | Custom parameters such as HTTP request headers. See: https://swagger.io/docs/specification/2-0/describing-parameters/ and https://swagger.io/specification/v2/#parameter-object. | - - - -### Operation.ExtensionsEntry - -| Field | Type | Label | Description | -| ----- | ----------------------------------------------- | ----- | ----------- | -| key | [string](#string) | | | -| value | [google.protobuf.Value](#google-protobuf-Value) | | | - - - -### Operation.ResponsesEntry - -| Field | Type | Label | Description | -| ----- | --------------------------------------------------------------- | ----- | ----------- | -| key | [string](#string) | | | -| value | [Response](#grpc-gateway-protoc_gen_openapiv2-options-Response) | | | - - - -### Parameters - -`Parameters` is a representation of OpenAPI v2 specification's parameters -object. Note: This technically breaks compatibility with the OpenAPI 2 -definition structure as we only allow header parameters to be set here since we -do not want users specifying custom non-header parameters beyond those inferred -from the Protobuf schema. See: -https://swagger.io/specification/v2/#parameter-object - -| Field | Type | Label | Description | -| ------- | ----------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------- | -| headers | [HeaderParameter](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter) | repeated | `Headers` is one or more HTTP header parameter. See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters | - - - -### Response - -`Response` is a representation of OpenAPI v2 specification's Response -object. - -See: -https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject - -| Field | Type | Label | Description | -| ----------- | ----------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| description | [string](#string) | | `Description` is a short description of the response. GFM syntax can be used for rich text representation. | -| schema | [Schema](#grpc-gateway-protoc_gen_openapiv2-options-Schema) | | `Schema` optionally defines the structure of the response. If `Schema` is not provided, it means there is no content to the response. | -| headers | [Response.HeadersEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-HeadersEntry) | repeated | `Headers` A list of headers that are sent with the response. `Header` name is expected to be a string in the canonical format of the MIME header key See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey | -| examples | [Response.ExamplesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExamplesEntry) | repeated | `Examples` gives per-mimetype response examples. See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object | -| extensions | [Response.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | - - - -### Response.ExamplesEntry - -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - -### Response.ExtensionsEntry - -| Field | Type | Label | Description | -| ----- | ----------------------------------------------- | ----- | ----------- | -| key | [string](#string) | | | -| value | [google.protobuf.Value](#google-protobuf-Value) | | | - - - -### Response.HeadersEntry - -| Field | Type | Label | Description | -| ----- | ----------------------------------------------------------- | ----- | ----------- | -| key | [string](#string) | | | -| value | [Header](#grpc-gateway-protoc_gen_openapiv2-options-Header) | | | - - - -### Schema - -`Schema` is a representation of OpenAPI v2 specification's Schema object. - -See: -https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject - -| Field | Type | Label | Description | -| ------------- | ----------------------------------------------------------------------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| json_schema | [JSONSchema](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema) | | | -| discriminator | [string](#string) | | Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. | -| read_only | [bool](#bool) | | Relevant only for Schema "properties" definitions. Declares the property as "read only". This means that it MAY be sent as part of a response but MUST NOT be sent as part of the request. Properties marked as readOnly being true SHOULD NOT be in the required list of the defined schema. Default value is false. | -| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation for this schema. | -| example | [string](#string) | | A free-form property to include an example of an instance for this schema in JSON. This is copied verbatim to the output. | - - - -### Scopes - -`Scopes` is a representation of OpenAPI v2 specification's Scopes object. - -See: -https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject - -Lists the available scopes for an OAuth2 security scheme. - -| Field | Type | Label | Description | -| ----- | --------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------- | -| scope | [Scopes.ScopeEntry](#grpc-gateway-protoc_gen_openapiv2-options-Scopes-ScopeEntry) | repeated | Maps between a name of a scope to a short description of it (as the value of the property). | - - - -### Scopes.ScopeEntry - -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - -### SecurityDefinitions - -`SecurityDefinitions` is a representation of OpenAPI v2 specification's -Security Definitions object. - -See: -https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject - -A declaration of the security schemes available to be used in the specification. -This does not enforce the security schemes on the operations and only serves to -provide the relevant details for each scheme. - -| Field | Type | Label | Description | -| -------- | ----------------------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------- | -| security | [SecurityDefinitions.SecurityEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions-SecurityEntry) | repeated | A single security scheme definition, mapping a "name" to the scheme it defines. | - - - -### SecurityDefinitions.SecurityEntry - -| Field | Type | Label | Description | -| ----- | --------------------------------------------------------------------------- | ----- | ----------- | -| key | [string](#string) | | | -| value | [SecurityScheme](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme) | | | - - - -### SecurityRequirement - -`SecurityRequirement` is a representation of OpenAPI v2 specification's -Security Requirement object. - -See: -https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject - -Lists the required security schemes to execute this operation. The object can -have multiple security schemes declared in it which are all required (that is, -there is a logical AND between the schemes). - -The name used for each property MUST correspond to a security scheme declared in -the Security Definitions. - -| Field | Type | Label | Description | -| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| security_requirement | [SecurityRequirement.SecurityRequirementEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementEntry) | repeated | Each name must correspond to a security scheme which is declared in the Security Definitions. If the security scheme is of type "oauth2", then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty. | - - - -### SecurityRequirement.SecurityRequirementEntry - -| Field | Type | Label | Description | -| ----- | --------------------------------------------------------------------------------------------------------------------------------------- | ----- | ----------- | -| key | [string](#string) | | | -| value | [SecurityRequirement.SecurityRequirementValue](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementValue) | | | - - - -### SecurityRequirement.SecurityRequirementValue - -If the security scheme is of type "oauth2", then the value is a list of -scope names required for the execution. For other security scheme types, the -array MUST be empty. - -| Field | Type | Label | Description | -| ----- | ----------------- | -------- | ----------- | -| scope | [string](#string) | repeated | | - - - -### SecurityScheme - -`SecurityScheme` is a representation of OpenAPI v2 specification's Security -Scheme object. - -See: -https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject - -Allows the definition of a security scheme that can be used by the operations. -Supported schemes are basic authentication, an API key (either as a header or as -a query parameter) and OAuth2's common flows (implicit, password, -application and access code). - -| Field | Type | Label | Description | -| ----------------- | ----------------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| type | [SecurityScheme.Type](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Type) | | The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2". | -| description | [string](#string) | | A short description for security scheme. | -| name | [string](#string) | | The name of the header or query parameter to be used. Valid for apiKey. | -| in | [SecurityScheme.In](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-In) | | The location of the API key. Valid values are "query" or "header". Valid for apiKey. | -| flow | [SecurityScheme.Flow](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Flow) | | The flow used by the OAuth2 security scheme. Valid values are "implicit", "password", "application" or "accessCode". Valid for oauth2. | -| authorization_url | [string](#string) | | The authorization URL to be used for this flow. This SHOULD be in the form of a URL. Valid for oauth2/implicit and oauth2/accessCode. | -| token_url | [string](#string) | | The token URL to be used for this flow. This SHOULD be in the form of a URL. Valid for oauth2/password, oauth2/application and oauth2/accessCode. | -| scopes | [Scopes](#grpc-gateway-protoc_gen_openapiv2-options-Scopes) | | The available scopes for the OAuth2 security scheme. Valid for oauth2. | -| extensions | [SecurityScheme.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | - - - -### SecurityScheme.ExtensionsEntry - -| Field | Type | Label | Description | -| ----- | ----------------------------------------------- | ----- | ----------- | -| key | [string](#string) | | | -| value | [google.protobuf.Value](#google-protobuf-Value) | | | - - - -### Swagger - -`Swagger` is a representation of OpenAPI v2 specification's Swagger object. - -See: -https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject - -Example: - -option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { -title: "Echo API"; version: "1.0"; description: ""; -contact: { name: "gRPC-Gateway project"; url: -"https://github.com/grpc-ecosystem/grpc-gateway"; email: -"none@example.com"; }; license: { name: "BSD 3-Clause License"; -url: -"https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE.txt"; -}; }; schemes: HTTPS; consumes: "application/json"; produces: -"application/json"; }; - -| Field | Type | Label | Description | -| -------------------- | --------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| swagger | [string](#string) | | Specifies the OpenAPI Specification version being used. It can be used by the OpenAPI UI and other clients to interpret the API listing. The value MUST be "2.0". | -| info | [Info](#grpc-gateway-protoc_gen_openapiv2-options-Info) | | Provides metadata about the API. The metadata can be used by the clients if needed. | -| host | [string](#string) | | The host (name or ip) serving the API. This MUST be the host only and does not include the scheme nor sub-paths. It MAY include a port. If the host is not included, the host serving the documentation is to be used (including the port). The host does not support path templating. | -| base_path | [string](#string) | | The base path on which the API is served, which is relative to the host. If it is not included, the API is served directly under the host. The value MUST start with a leading slash (/). The basePath does not support path templating. Note that using `base_path` does not change the endpoint paths that are generated in the resulting OpenAPI file. If you wish to use `base_path` with relatively generated OpenAPI paths, the `base_path` prefix must be manually removed from your `google.api.http` paths and your code changed to serve the API from the `base_path`. | -| schemes | [Scheme](#grpc-gateway-protoc_gen_openapiv2-options-Scheme) | repeated | The transfer protocol of the API. Values MUST be from the list: "http", "https", "ws", "wss". If the schemes is not included, the default scheme to be used is the one used to access the OpenAPI definition itself. | -| consumes | [string](#string) | repeated | A list of MIME types the APIs can consume. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under Mime Types. | -| produces | [string](#string) | repeated | A list of MIME types the APIs can produce. This is global to all APIs but can be overridden on specific API calls. Value MUST be as described under Mime Types. | -| responses | [Swagger.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ResponsesEntry) | repeated | An object to hold responses that can be used across operations. This property does not define global responses for all operations. | -| security_definitions | [SecurityDefinitions](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions) | | Security scheme definitions that can be used across the specification. | -| security | [SecurityRequirement](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement) | repeated | A declaration of which security schemes are applied for the API as a whole. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). Individual operations can override this definition. | -| tags | [Tag](#grpc-gateway-protoc_gen_openapiv2-options-Tag) | repeated | A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier. | -| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation. | -| extensions | [Swagger.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | - - - -### Swagger.ExtensionsEntry - -| Field | Type | Label | Description | -| ----- | ----------------------------------------------- | ----- | ----------- | -| key | [string](#string) | | | -| value | [google.protobuf.Value](#google-protobuf-Value) | | | - - - -### Swagger.ResponsesEntry - -| Field | Type | Label | Description | -| ----- | --------------------------------------------------------------- | ----- | ----------- | -| key | [string](#string) | | | -| value | [Response](#grpc-gateway-protoc_gen_openapiv2-options-Response) | | | - - - -### Tag - -`Tag` is a representation of OpenAPI v2 specification's Tag object. - -See: -https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject - -| Field | Type | Label | Description | -| ------------- | ----------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| name | [string](#string) | | The name of the tag. Use it to allow override of the name of a global Tag object, then use that name to reference the tag throughout the OpenAPI file. | -| description | [string](#string) | | A short description for the tag. GFM syntax can be used for rich text representation. | -| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation for this tag. | -| extensions | [Tag.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Tag-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | - - - -### Tag.ExtensionsEntry - -| Field | Type | Label | Description | -| ----- | ----------------------------------------------- | ----- | ----------- | -| key | [string](#string) | | | -| value | [google.protobuf.Value](#google-protobuf-Value) | | | - - - -### HeaderParameter.Type - -`Type` is a a supported HTTP header type. See -https://swagger.io/specification/v2/#parameterType. - -| Name | Number | Description | -| ------- | ------ | ----------- | -| UNKNOWN | 0 | | -| STRING | 1 | | -| NUMBER | 2 | | -| INTEGER | 3 | | -| BOOLEAN | 4 | | - - - -### JSONSchema.JSONSchemaSimpleTypes - -| Name | Number | Description | -| ------- | ------ | ----------- | -| UNKNOWN | 0 | | -| ARRAY | 1 | | -| BOOLEAN | 2 | | -| INTEGER | 3 | | -| NULL | 4 | | -| NUMBER | 5 | | -| OBJECT | 6 | | -| STRING | 7 | | - - - -### Scheme - -Scheme describes the schemes supported by the OpenAPI Swagger and Operation -objects. - -| Name | Number | Description | -| ------- | ------ | ----------- | -| UNKNOWN | 0 | | -| HTTP | 1 | | -| HTTPS | 2 | | -| WS | 3 | | -| WSS | 4 | | - - - -### SecurityScheme.Flow - -The flow used by the OAuth2 security scheme. Valid values are -"implicit", "password", "application" or -"accessCode". - -| Name | Number | Description | -| ---------------- | ------ | ----------- | -| FLOW_INVALID | 0 | | -| FLOW_IMPLICIT | 1 | | -| FLOW_PASSWORD | 2 | | -| FLOW_APPLICATION | 3 | | -| FLOW_ACCESS_CODE | 4 | | - - - -### SecurityScheme.In - -The location of the API key. Valid values are "query" or -"header". - -| Name | Number | Description | -| ---------- | ------ | ----------- | -| IN_INVALID | 0 | | -| IN_QUERY | 1 | | -| IN_HEADER | 2 | | - - - -### SecurityScheme.Type - -The type of the security scheme. Valid values are "basic", -"apiKey" or "oauth2". - -| Name | Number | Description | -| ------------ | ------ | ----------- | -| TYPE_INVALID | 0 | | -| TYPE_BASIC | 1 | | -| TYPE_API_KEY | 2 | | -| TYPE_OAUTH2 | 3 | | - - - -

Top

- -## protoc-gen-openapiv2/options/annotations.proto - - - -### File-level Extensions - -| Extension | Type | Base | Number | Description | -| --------------- | ---------- | ----------------------------- | ------ | -------------------------------------------------------------------------------------- | -| openapiv2_field | JSONSchema | .google.protobuf.FieldOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. | - -All IDs are the same, as assigned. It is okay that they are the same, as they -extend different descriptor messages. | | openapiv2_swagger | Swagger | -.google.protobuf.FileOptions | 1042 | ID assigned by -protobuf-global-extension-registry@google.com for gRPC-Gateway project. - -All IDs are the same, as assigned. It is okay that they are the same, as they -extend different descriptor messages. | | openapiv2_schema | Schema | -.google.protobuf.MessageOptions | 1042 | ID assigned by -protobuf-global-extension-registry@google.com for gRPC-Gateway project. - -All IDs are the same, as assigned. It is okay that they are the same, as they -extend different descriptor messages. | | openapiv2_operation | Operation | -.google.protobuf.MethodOptions | 1042 | ID assigned by -protobuf-global-extension-registry@google.com for gRPC-Gateway project. - -All IDs are the same, as assigned. It is okay that they are the same, as they -extend different descriptor messages. | | openapiv2_tag | Tag | -.google.protobuf.ServiceOptions | 1042 | ID assigned by -protobuf-global-extension-registry@google.com for gRPC-Gateway project. - -All IDs are the same, as assigned. It is okay that they are the same, as they -extend different descriptor messages. | -

Top

@@ -1280,131 +133,6 @@ The service that checks the syntax of an OPL file. | ----------- | --------------------------------------------------- | ----------------------------------------------------- | -------------------------------- | | Check | [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) | [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) | Performs a syntax check request. | - - -

Top

- -## google/api/visibility.proto - - - -### Visibility - -`Visibility` restricts service consumer's access to service elements, such -as whether an application can call a visibility-restricted method. The -restriction is expressed by applying visibility labels on service elements. The -visibility labels are elsewhere linked to service consumers. - -A service can define multiple visibility labels, but a service consumer should -be granted at most one visibility label. Multiple visibility labels for a single -service consumer are not supported. - -If an element and all its parents have no visibility label, its visibility is -unconditionally granted. - -Example: - - visibility: - rules: - - selector: google.calendar.Calendar.EnhancedSearch - restriction: PREVIEW - - selector: google.calendar.Calendar.Delegate - restriction: INTERNAL - -Here, all methods are publicly visible except for the restricted methods -EnhancedSearch and Delegate. - -| Field | Type | Label | Description | -| ----- | -------------------------------------------- | -------- | ----------------------------------------------------------------- | -| rules | [VisibilityRule](#google-api-VisibilityRule) | repeated | A list of visibility rules that apply to individual API elements. | - -**NOTE:** All service configuration rules follow "last one wins" order. -| - - - -### VisibilityRule - -A visibility rule provides visibility configuration for an individual API -element. - -| Field | Type | Label | Description | -| -------- | ----------------- | ----- | -------------------------------------------------------------------------- | -| selector | [string](#string) | | Selects methods, messages, fields, enums, etc. to which this rule applies. | - -Refer to [selector][google.api.DocumentationRule.selector] for syntax details. | -| restriction | [string](#string) | | A comma-separated list of visibility -labels that apply to the `selector`. Any of the listed labels can be used to -grant the visibility. - -If a rule has multiple labels, removing one of the labels but not all of them -can break clients. - -Example: - -visibility: rules: - selector: google.calendar.Calendar.EnhancedSearch -restriction: INTERNAL, PREVIEW - -Removing INTERNAL from this restriction will break clients that rely on this -method and only had access to it through INTERNAL. | - - - -### File-level Extensions - -| Extension | Type | Base | Number | Description | -| ------------------ | -------------- | --------------------------------- | -------- | --------------------- | -| enum_visibility | VisibilityRule | .google.protobuf.EnumOptions | 72295727 | See `VisibilityRule`. | -| value_visibility | VisibilityRule | .google.protobuf.EnumValueOptions | 72295727 | See `VisibilityRule`. | -| field_visibility | VisibilityRule | .google.protobuf.FieldOptions | 72295727 | See `VisibilityRule`. | -| message_visibility | VisibilityRule | .google.protobuf.MessageOptions | 72295727 | See `VisibilityRule`. | -| method_visibility | VisibilityRule | .google.protobuf.MethodOptions | 72295727 | See `VisibilityRule`. | -| api_visibility | VisibilityRule | .google.protobuf.ServiceOptions | 72295727 | See `VisibilityRule`. | - - - -

Top

- -## google/api/field_behavior.proto - - - -### FieldBehavior - -An indicator of the behavior of a given field (for example, that a field is -required in requests, or given as output but ignored as input). This **does -not** change the behavior in protocol buffers itself; it only denotes the -behavior and may affect how API tooling handles the field. - -Note: This enum **may** receive new values in the future. - -| Name | Number | Description | -| -------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| FIELD_BEHAVIOR_UNSPECIFIED | 0 | Conventional default for enums. Do not use this. | -| OPTIONAL | 1 | Specifically denotes a field as optional. While all fields in protocol buffers are optional, this may be specified for emphasis if appropriate. | -| REQUIRED | 2 | Denotes a field as required. This indicates that the field **must** be provided as part of the request, and failure to do so will cause an error (usually `INVALID_ARGUMENT`). | -| OUTPUT_ONLY | 3 | Denotes a field as output only. This indicates that the field is provided in responses, but including the field in a request does nothing (the server _must_ ignore it and _must not_ throw an error as a result of the field's presence). | -| INPUT_ONLY | 4 | Denotes a field as input only. This indicates that the field is provided in requests, and the corresponding field is not included in output. | -| IMMUTABLE | 5 | Denotes a field as immutable. This indicates that the field may be set once in a request to create a resource, but may not be changed thereafter. | -| UNORDERED_LIST | 6 | Denotes that a (repeated) field is an unordered list. This indicates that the service may provide the elements of the list in any arbitrary order, rather than the order the user originally provided. Additionally, the list's order may or may not be stable. | -| NON_EMPTY_DEFAULT | 7 | Denotes that this field returns a non-empty default value if not set. This indicates that if the user provides the empty value in a request, a non-empty value will be returned. The user will not be aware of what non-empty value to expect. | - - - -### File-level Extensions - -| Extension | Type | Base | Number | Description | -| -------------- | ------------- | ----------------------------- | ------ | ---------------------------------------------------------------------------------------------- | -| field_behavior | FieldBehavior | .google.protobuf.FieldOptions | 1052 | A designation of a specific field behavior (required, output only, etc.) in protobuf messages. | - -Examples: - -string name = 1 [(google.api.field_behavior) = REQUIRED]; State state = 1 -[(google.api.field_behavior) = OUTPUT_ONLY]; google.protobuf.Duration ttl = 1 -[(google.api.field_behavior) = INPUT_ONLY]; google.protobuf.Timestamp -expire_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY, -(google.api.field_behavior) = IMMUTABLE]; | -

Top

@@ -1935,443 +663,6 @@ versioning. If the service supports TLS Edge Termination, this endpoint does not require the X-Forwarded-Proto header to be set. | - - -

Top

- -## validate/validate.proto - - - -### AnyRules - -AnyRules describe constraints applied exclusively to the `google.protobuf.Any` -well-known type - -| Field | Type | Label | Description | -| -------- | ----------------- | -------- | -------------------------------------------------------------------------------------------------- | -| required | [bool](#bool) | optional | Required specifies that this field must be set | -| in | [string](#string) | repeated | In specifies that this field's `type_url` must be equal to one of the specified values. | -| not_in | [string](#string) | repeated | NotIn specifies that this field's `type_url` must not be equal to any of the specified values. | - - - -### BoolRules - -BoolRules describes the constraints applied to `bool` values - -| Field | Type | Label | Description | -| ----- | ------------- | -------- | ------------------------------------------------------------------- | -| const | [bool](#bool) | optional | Const specifies that this field must be exactly the specified value | - - - -### BytesRules - -BytesRules describe the constraints applied to `bytes` values - -| Field | Type | Label | Description | -| ------------ | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -| const | [bytes](#bytes) | optional | Const specifies that this field must be exactly the specified value | -| len | [uint64](#uint64) | optional | Len specifies that this field must be the specified number of bytes | -| min_len | [uint64](#uint64) | optional | MinLen specifies that this field must be the specified number of bytes at a minimum | -| max_len | [uint64](#uint64) | optional | MaxLen specifies that this field must be the specified number of bytes at a maximum | -| pattern | [string](#string) | optional | Pattern specifes that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters. | -| prefix | [bytes](#bytes) | optional | Prefix specifies that this field must have the specified bytes at the beginning of the string. | -| suffix | [bytes](#bytes) | optional | Suffix specifies that this field must have the specified bytes at the end of the string. | -| contains | [bytes](#bytes) | optional | Contains specifies that this field must have the specified bytes anywhere in the string. | -| in | [bytes](#bytes) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [bytes](#bytes) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ip | [bool](#bool) | optional | Ip specifies that the field must be a valid IP (v4 or v6) address in byte format | -| ipv4 | [bool](#bool) | optional | Ipv4 specifies that the field must be a valid IPv4 address in byte format | -| ipv6 | [bool](#bool) | optional | Ipv6 specifies that the field must be a valid IPv6 address in byte format | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - -### DoubleRules - -DoubleRules describes the constraints applied to `double` values - -| Field | Type | Label | Description | -| ------------ | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| const | [double](#double) | optional | Const specifies that this field must be exactly the specified value | -| lt | [double](#double) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [double](#double) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [double](#double) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [double](#double) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [double](#double) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [double](#double) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - -### DurationRules - -DurationRules describe the constraints applied exclusively to the -`google.protobuf.Duration` well-known type - -| Field | Type | Label | Description | -| -------- | ----------------------------------------------------- | -------- | --------------------------------------------------------------------------------- | -| required | [bool](#bool) | optional | Required specifies that this field must be set | -| const | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Const specifies that this field must be exactly the specified value | -| lt | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Lt specifies that this field must be less than the specified value, inclusive | -| gt | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Gt specifies that this field must be greater than the specified value, exclusive | -| gte | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Gte specifies that this field must be greater than the specified value, inclusive | -| in | [google.protobuf.Duration](#google-protobuf-Duration) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [google.protobuf.Duration](#google-protobuf-Duration) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | - - - -### EnumRules - -EnumRules describe the constraints applied to enum values - -| Field | Type | Label | Description | -| ------------ | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------- | -| const | [int32](#int32) | optional | Const specifies that this field must be exactly the specified value | -| defined_only | [bool](#bool) | optional | DefinedOnly specifies that this field must be only one of the defined values for this enum, failing on any undefined value. | -| in | [int32](#int32) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [int32](#int32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | - - - -### FieldRules - -FieldRules encapsulates the rules for each type of field. Depending on the -field, the correct set should be used to ensure proper validations. - -| Field | Type | Label | Description | -| --------- | ------------------------------------------ | -------- | ---------------------- | -| message | [MessageRules](#validate-MessageRules) | optional | | -| float | [FloatRules](#validate-FloatRules) | optional | Scalar Field Types | -| double | [DoubleRules](#validate-DoubleRules) | optional | | -| int32 | [Int32Rules](#validate-Int32Rules) | optional | | -| int64 | [Int64Rules](#validate-Int64Rules) | optional | | -| uint32 | [UInt32Rules](#validate-UInt32Rules) | optional | | -| uint64 | [UInt64Rules](#validate-UInt64Rules) | optional | | -| sint32 | [SInt32Rules](#validate-SInt32Rules) | optional | | -| sint64 | [SInt64Rules](#validate-SInt64Rules) | optional | | -| fixed32 | [Fixed32Rules](#validate-Fixed32Rules) | optional | | -| fixed64 | [Fixed64Rules](#validate-Fixed64Rules) | optional | | -| sfixed32 | [SFixed32Rules](#validate-SFixed32Rules) | optional | | -| sfixed64 | [SFixed64Rules](#validate-SFixed64Rules) | optional | | -| bool | [BoolRules](#validate-BoolRules) | optional | | -| string | [StringRules](#validate-StringRules) | optional | | -| bytes | [BytesRules](#validate-BytesRules) | optional | | -| enum | [EnumRules](#validate-EnumRules) | optional | Complex Field Types | -| repeated | [RepeatedRules](#validate-RepeatedRules) | optional | | -| map | [MapRules](#validate-MapRules) | optional | | -| any | [AnyRules](#validate-AnyRules) | optional | Well-Known Field Types | -| duration | [DurationRules](#validate-DurationRules) | optional | | -| timestamp | [TimestampRules](#validate-TimestampRules) | optional | | - - - -### Fixed32Rules - -Fixed32Rules describes the constraints applied to `fixed32` values - -| Field | Type | Label | Description | -| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| const | [fixed32](#fixed32) | optional | Const specifies that this field must be exactly the specified value | -| lt | [fixed32](#fixed32) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [fixed32](#fixed32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [fixed32](#fixed32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [fixed32](#fixed32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [fixed32](#fixed32) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [fixed32](#fixed32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - -### Fixed64Rules - -Fixed64Rules describes the constraints applied to `fixed64` values - -| Field | Type | Label | Description | -| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| const | [fixed64](#fixed64) | optional | Const specifies that this field must be exactly the specified value | -| lt | [fixed64](#fixed64) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [fixed64](#fixed64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [fixed64](#fixed64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [fixed64](#fixed64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [fixed64](#fixed64) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [fixed64](#fixed64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - -### FloatRules - -FloatRules describes the constraints applied to `float` values - -| Field | Type | Label | Description | -| ------------ | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| const | [float](#float) | optional | Const specifies that this field must be exactly the specified value | -| lt | [float](#float) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [float](#float) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [float](#float) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [float](#float) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [float](#float) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [float](#float) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - -### Int32Rules - -Int32Rules describes the constraints applied to `int32` values - -| Field | Type | Label | Description | -| ------------ | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| const | [int32](#int32) | optional | Const specifies that this field must be exactly the specified value | -| lt | [int32](#int32) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [int32](#int32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [int32](#int32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [int32](#int32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [int32](#int32) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [int32](#int32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - -### Int64Rules - -Int64Rules describes the constraints applied to `int64` values - -| Field | Type | Label | Description | -| ------------ | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| const | [int64](#int64) | optional | Const specifies that this field must be exactly the specified value | -| lt | [int64](#int64) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [int64](#int64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [int64](#int64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [int64](#int64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [int64](#int64) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [int64](#int64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - -### MapRules - -MapRules describe the constraints applied to `map` values - -| Field | Type | Label | Description | -| ------------ | ---------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| min_pairs | [uint64](#uint64) | optional | MinPairs specifies that this field must have the specified number of KVs at a minimum | -| max_pairs | [uint64](#uint64) | optional | MaxPairs specifies that this field must have the specified number of KVs at a maximum | -| no_sparse | [bool](#bool) | optional | NoSparse specifies values in this field cannot be unset. This only applies to map's with message value types. | -| keys | [FieldRules](#validate-FieldRules) | optional | Keys specifies the constraints to be applied to each key in the field. | -| values | [FieldRules](#validate-FieldRules) | optional | Values specifies the constraints to be applied to the value of each key in the field. Message values will still have their validations evaluated unless skip is specified here. | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - -### MessageRules - -MessageRules describe the constraints applied to embedded message values. For -message-type fields, validation is performed recursively. - -| Field | Type | Label | Description | -| -------- | ------------- | -------- | ------------------------------------------------------------------------------ | -| skip | [bool](#bool) | optional | Skip specifies that the validation rules of this field should not be evaluated | -| required | [bool](#bool) | optional | Required specifies that this field must be set | - - - -### RepeatedRules - -RepeatedRules describe the constraints applied to `repeated` values - -| Field | Type | Label | Description | -| ------------ | ---------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| min_items | [uint64](#uint64) | optional | MinItems specifies that this field must have the specified number of items at a minimum | -| max_items | [uint64](#uint64) | optional | MaxItems specifies that this field must have the specified number of items at a maximum | -| unique | [bool](#bool) | optional | Unique specifies that all elements in this field must be unique. This contraint is only applicable to scalar and enum types (messages are not supported). | -| items | [FieldRules](#validate-FieldRules) | optional | Items specifies the contraints to be applied to each item in the field. Repeated message fields will still execute validation against each item unless skip is specified here. | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - -### SFixed32Rules - -SFixed32Rules describes the constraints applied to `sfixed32` values - -| Field | Type | Label | Description | -| ------------ | --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| const | [sfixed32](#sfixed32) | optional | Const specifies that this field must be exactly the specified value | -| lt | [sfixed32](#sfixed32) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [sfixed32](#sfixed32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [sfixed32](#sfixed32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [sfixed32](#sfixed32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [sfixed32](#sfixed32) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [sfixed32](#sfixed32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - -### SFixed64Rules - -SFixed64Rules describes the constraints applied to `sfixed64` values - -| Field | Type | Label | Description | -| ------------ | --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| const | [sfixed64](#sfixed64) | optional | Const specifies that this field must be exactly the specified value | -| lt | [sfixed64](#sfixed64) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [sfixed64](#sfixed64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [sfixed64](#sfixed64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [sfixed64](#sfixed64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [sfixed64](#sfixed64) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [sfixed64](#sfixed64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - -### SInt32Rules - -SInt32Rules describes the constraints applied to `sint32` values - -| Field | Type | Label | Description | -| ------------ | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| const | [sint32](#sint32) | optional | Const specifies that this field must be exactly the specified value | -| lt | [sint32](#sint32) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [sint32](#sint32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [sint32](#sint32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [sint32](#sint32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [sint32](#sint32) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [sint32](#sint32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - -### SInt64Rules - -SInt64Rules describes the constraints applied to `sint64` values - -| Field | Type | Label | Description | -| ------------ | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| const | [sint64](#sint64) | optional | Const specifies that this field must be exactly the specified value | -| lt | [sint64](#sint64) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [sint64](#sint64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [sint64](#sint64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [sint64](#sint64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [sint64](#sint64) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [sint64](#sint64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - -### StringRules - -StringRules describe the constraints applied to `string` values - -| Field | Type | Label | Description | -| ---------------- | ---------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| const | [string](#string) | optional | Const specifies that this field must be exactly the specified value | -| len | [uint64](#uint64) | optional | Len specifies that this field must be the specified number of characters (Unicode code points). Note that the number of characters may differ from the number of bytes in the string. | -| min_len | [uint64](#uint64) | optional | MinLen specifies that this field must be the specified number of characters (Unicode code points) at a minimum. Note that the number of characters may differ from the number of bytes in the string. | -| max_len | [uint64](#uint64) | optional | MaxLen specifies that this field must be the specified number of characters (Unicode code points) at a maximum. Note that the number of characters may differ from the number of bytes in the string. | -| len_bytes | [uint64](#uint64) | optional | LenBytes specifies that this field must be the specified number of bytes | -| min_bytes | [uint64](#uint64) | optional | MinBytes specifies that this field must be the specified number of bytes at a minimum | -| max_bytes | [uint64](#uint64) | optional | MaxBytes specifies that this field must be the specified number of bytes at a maximum | -| pattern | [string](#string) | optional | Pattern specifes that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters. | -| prefix | [string](#string) | optional | Prefix specifies that this field must have the specified substring at the beginning of the string. | -| suffix | [string](#string) | optional | Suffix specifies that this field must have the specified substring at the end of the string. | -| contains | [string](#string) | optional | Contains specifies that this field must have the specified substring anywhere in the string. | -| not_contains | [string](#string) | optional | NotContains specifies that this field cannot have the specified substring anywhere in the string. | -| in | [string](#string) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [string](#string) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| email | [bool](#bool) | optional | Email specifies that the field must be a valid email address as defined by RFC 5322 | -| hostname | [bool](#bool) | optional | Hostname specifies that the field must be a valid hostname as defined by RFC 1034. This constraint does not support internationalized domain names (IDNs). | -| ip | [bool](#bool) | optional | Ip specifies that the field must be a valid IP (v4 or v6) address. Valid IPv6 addresses should not include surrounding square brackets. | -| ipv4 | [bool](#bool) | optional | Ipv4 specifies that the field must be a valid IPv4 address. | -| ipv6 | [bool](#bool) | optional | Ipv6 specifies that the field must be a valid IPv6 address. Valid IPv6 addresses should not include surrounding square brackets. | -| uri | [bool](#bool) | optional | Uri specifies that the field must be a valid, absolute URI as defined by RFC 3986 | -| uri_ref | [bool](#bool) | optional | UriRef specifies that the field must be a valid URI as defined by RFC 3986 and may be relative or absolute. | -| address | [bool](#bool) | optional | Address specifies that the field must be either a valid hostname as defined by RFC 1034 (which does not support internationalized domain names or IDNs), or it can be a valid IP (v4 or v6). | -| uuid | [bool](#bool) | optional | Uuid specifies that the field must be a valid UUID as defined by RFC 4122 | -| well_known_regex | [KnownRegex](#validate-KnownRegex) | optional | WellKnownRegex specifies a common well known pattern defined as a regex. | -| strict | [bool](#bool) | optional | This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable strict header validation. By default, this is true, and HTTP header validations are RFC-compliant. Setting to false will enable a looser validations that only disallows \r\n\0 characters, which can be used to bypass header matching rules. Default: true | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - -### TimestampRules - -TimestampRules describe the constraints applied exclusively to the -`google.protobuf.Timestamp` well-known type - -| Field | Type | Label | Description | -| -------- | ------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -| required | [bool](#bool) | optional | Required specifies that this field must be set | -| const | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Const specifies that this field must be exactly the specified value | -| lt | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Lte specifies that this field must be less than the specified value, inclusive | -| gt | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Gt specifies that this field must be greater than the specified value, exclusive | -| gte | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | Gte specifies that this field must be greater than the specified value, inclusive | -| lt_now | [bool](#bool) | optional | LtNow specifies that this must be less than the current time. LtNow can only be used with the Within rule. | -| gt_now | [bool](#bool) | optional | GtNow specifies that this must be greater than the current time. GtNow can only be used with the Within rule. | -| within | [google.protobuf.Duration](#google-protobuf-Duration) | optional | Within specifies that this field must be within this duration of the current time. This constraint can be used alone or with the LtNow and GtNow rules. | - - - -### UInt32Rules - -UInt32Rules describes the constraints applied to `uint32` values - -| Field | Type | Label | Description | -| ------------ | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| const | [uint32](#uint32) | optional | Const specifies that this field must be exactly the specified value | -| lt | [uint32](#uint32) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [uint32](#uint32) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [uint32](#uint32) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [uint32](#uint32) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [uint32](#uint32) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [uint32](#uint32) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - -### UInt64Rules - -UInt64Rules describes the constraints applied to `uint64` values - -| Field | Type | Label | Description | -| ------------ | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| const | [uint64](#uint64) | optional | Const specifies that this field must be exactly the specified value | -| lt | [uint64](#uint64) | optional | Lt specifies that this field must be less than the specified value, exclusive | -| lte | [uint64](#uint64) | optional | Lte specifies that this field must be less than or equal to the specified value, inclusive | -| gt | [uint64](#uint64) | optional | Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed. | -| gte | [uint64](#uint64) | optional | Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed. | -| in | [uint64](#uint64) | repeated | In specifies that this field must be equal to one of the specified values | -| not_in | [uint64](#uint64) | repeated | NotIn specifies that this field cannot be equal to one of the specified values | -| ignore_empty | [bool](#bool) | optional | IgnoreEmpty specifies that the validation rules of this field should be evaluated only if the field is not empty | - - - -### KnownRegex - -WellKnownRegex contain some well-known patterns. - -| Name | Number | Description | -| ----------------- | ------ | ----------------------------------------- | -| UNKNOWN | 0 | | -| HTTP_HEADER_NAME | 1 | HTTP header name as defined by RFC 7230. | -| HTTP_HEADER_VALUE | 2 | HTTP header value as defined by RFC 7230. | - - - -### File-level Extensions - -| Extension | Type | Base | Number | Description | -| --------- | ---------- | ------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------- | -| rules | FieldRules | .google.protobuf.FieldOptions | 1071 | Rules specify the validations to be performed on this field. By default, no validation is performed against a field. | -| disabled | bool | .google.protobuf.MessageOptions | 1071 | Disabled nullifies any validation rules for this message, including any message fields associated with it that do support validation. | -| ignored | bool | .google.protobuf.MessageOptions | 1072 | Ignore skips generation of validation methods for this message. | -| required | bool | .google.protobuf.OneofOptions | 1071 | Required ensures that exactly one the field options in a oneof is set; validation fails if no fields in the oneof are set. | -

Top

diff --git a/proto/go.mod b/proto/go.mod index a64a293ad..518312758 100644 --- a/proto/go.mod +++ b/proto/go.mod @@ -3,6 +3,7 @@ module github.com/ory/keto/proto go 1.19 require ( + github.com/envoyproxy/protoc-gen-validate v0.1.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 github.com/stretchr/testify v1.8.1 google.golang.org/genproto v0.0.0-20230131230820-1c016267d619 @@ -16,8 +17,8 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect golang.org/x/net v0.7.0 // indirect - golang.org/x/sys v0.4.0 // indirect - golang.org/x/text v0.6.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/proto/go.sum b/proto/go.sum index 7cfb2ad15..a0503708a 100644 --- a/proto/go.sum +++ b/proto/go.sum @@ -2,6 +2,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= @@ -22,12 +24,12 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20230131230820-1c016267d619 h1:p0kMzw6AG0JEzd7Z+kXqOiLhC6gjUQTbtS2zR0Q3DbI= google.golang.org/genproto v0.0.0-20230131230820-1c016267d619/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= diff --git a/proto/google/api/annotations.pb.go b/proto/google/api/annotations.pb.go deleted file mode 100644 index 926bc237e..000000000 --- a/proto/google/api/annotations.pb.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc (unknown) -// source: google/api/annotations.proto - -package annotations - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var file_google_api_annotations_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*HttpRule)(nil), - Field: 72295728, - Name: "google.api.http", - Tag: "bytes,72295728,opt,name=http", - Filename: "google/api/annotations.proto", - }, -} - -// Extension fields to descriptorpb.MethodOptions. -var ( - // See `HttpRule`. - // - // optional google.api.HttpRule http = 72295728; - E_Http = &file_google_api_annotations_proto_extTypes[0] -) - -var File_google_api_annotations_proto protoreflect.FileDescriptor - -var file_google_api_annotations_proto_rawDesc = []byte{ - 0x0a, 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, 0x12, 0x0a, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x3a, 0x4b, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb0, 0xca, 0xbc, 0x22, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, - 0x42, 0x6e, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x42, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, - 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_google_api_annotations_proto_goTypes = []interface{}{ - (*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions - (*HttpRule)(nil), // 1: google.api.HttpRule -} -var file_google_api_annotations_proto_depIdxs = []int32{ - 0, // 0: google.api.http:extendee -> google.protobuf.MethodOptions - 1, // 1: google.api.http:type_name -> google.api.HttpRule - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 1, // [1:2] is the sub-list for extension type_name - 0, // [0:1] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_google_api_annotations_proto_init() } -func file_google_api_annotations_proto_init() { - if File_google_api_annotations_proto != nil { - return - } - file_google_api_http_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_annotations_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_google_api_annotations_proto_goTypes, - DependencyIndexes: file_google_api_annotations_proto_depIdxs, - ExtensionInfos: file_google_api_annotations_proto_extTypes, - }.Build() - File_google_api_annotations_proto = out.File - file_google_api_annotations_proto_rawDesc = nil - file_google_api_annotations_proto_goTypes = nil - file_google_api_annotations_proto_depIdxs = nil -} diff --git a/proto/google/api/annotations.pb.validate.go b/proto/google/api/annotations.pb.validate.go deleted file mode 100644 index 20d090e16..000000000 --- a/proto/google/api/annotations.pb.validate.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: google/api/annotations.proto - -package annotations - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) diff --git a/proto/google/api/field_behavior.pb.go b/proto/google/api/field_behavior.pb.go deleted file mode 100644 index 4ad8ac937..000000000 --- a/proto/google/api/field_behavior.pb.go +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc (unknown) -// source: google/api/field_behavior.proto - -package annotations - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// An indicator of the behavior of a given field (for example, that a field -// is required in requests, or given as output but ignored as input). -// This **does not** change the behavior in protocol buffers itself; it only -// denotes the behavior and may affect how API tooling handles the field. -// -// Note: This enum **may** receive new values in the future. -type FieldBehavior int32 - -const ( - // Conventional default for enums. Do not use this. - FieldBehavior_FIELD_BEHAVIOR_UNSPECIFIED FieldBehavior = 0 - // Specifically denotes a field as optional. - // While all fields in protocol buffers are optional, this may be specified - // for emphasis if appropriate. - FieldBehavior_OPTIONAL FieldBehavior = 1 - // Denotes a field as required. - // This indicates that the field **must** be provided as part of the request, - // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - FieldBehavior_REQUIRED FieldBehavior = 2 - // Denotes a field as output only. - // This indicates that the field is provided in responses, but including the - // field in a request does nothing (the server *must* ignore it and - // *must not* throw an error as a result of the field's presence). - FieldBehavior_OUTPUT_ONLY FieldBehavior = 3 - // Denotes a field as input only. - // This indicates that the field is provided in requests, and the - // corresponding field is not included in output. - FieldBehavior_INPUT_ONLY FieldBehavior = 4 - // Denotes a field as immutable. - // This indicates that the field may be set once in a request to create a - // resource, but may not be changed thereafter. - FieldBehavior_IMMUTABLE FieldBehavior = 5 - // Denotes that a (repeated) field is an unordered list. - // This indicates that the service may provide the elements of the list - // in any arbitrary order, rather than the order the user originally - // provided. Additionally, the list's order may or may not be stable. - FieldBehavior_UNORDERED_LIST FieldBehavior = 6 - // Denotes that this field returns a non-empty default value if not set. - // This indicates that if the user provides the empty value in a request, - // a non-empty value will be returned. The user will not be aware of what - // non-empty value to expect. - FieldBehavior_NON_EMPTY_DEFAULT FieldBehavior = 7 -) - -// Enum value maps for FieldBehavior. -var ( - FieldBehavior_name = map[int32]string{ - 0: "FIELD_BEHAVIOR_UNSPECIFIED", - 1: "OPTIONAL", - 2: "REQUIRED", - 3: "OUTPUT_ONLY", - 4: "INPUT_ONLY", - 5: "IMMUTABLE", - 6: "UNORDERED_LIST", - 7: "NON_EMPTY_DEFAULT", - } - FieldBehavior_value = map[string]int32{ - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - } -) - -func (x FieldBehavior) Enum() *FieldBehavior { - p := new(FieldBehavior) - *p = x - return p -} - -func (x FieldBehavior) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (FieldBehavior) Descriptor() protoreflect.EnumDescriptor { - return file_google_api_field_behavior_proto_enumTypes[0].Descriptor() -} - -func (FieldBehavior) Type() protoreflect.EnumType { - return &file_google_api_field_behavior_proto_enumTypes[0] -} - -func (x FieldBehavior) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use FieldBehavior.Descriptor instead. -func (FieldBehavior) EnumDescriptor() ([]byte, []int) { - return file_google_api_field_behavior_proto_rawDescGZIP(), []int{0} -} - -var file_google_api_field_behavior_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: ([]FieldBehavior)(nil), - Field: 1052, - Name: "google.api.field_behavior", - Tag: "varint,1052,rep,name=field_behavior,enum=google.api.FieldBehavior", - Filename: "google/api/field_behavior.proto", - }, -} - -// Extension fields to descriptorpb.FieldOptions. -var ( - // A designation of a specific field behavior (required, output only, etc.) - // in protobuf messages. - // - // Examples: - // - // string name = 1 [(google.api.field_behavior) = REQUIRED]; - // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // google.protobuf.Duration ttl = 1 - // [(google.api.field_behavior) = INPUT_ONLY]; - // google.protobuf.Timestamp expire_time = 1 - // [(google.api.field_behavior) = OUTPUT_ONLY, - // (google.api.field_behavior) = IMMUTABLE]; - // - // repeated google.api.FieldBehavior field_behavior = 1052; - E_FieldBehavior = &file_google_api_field_behavior_proto_extTypes[0] -) - -var File_google_api_field_behavior_proto protoreflect.FileDescriptor - -var file_google_api_field_behavior_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, - 0xa6, 0x01, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, - 0x72, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x42, 0x45, 0x48, 0x41, 0x56, - 0x49, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, - 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0f, 0x0a, - 0x0b, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x03, 0x12, 0x0e, - 0x0a, 0x0a, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x04, 0x12, 0x0d, - 0x0a, 0x09, 0x49, 0x4d, 0x4d, 0x55, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x05, 0x12, 0x12, 0x0a, - 0x0e, 0x55, 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, - 0x06, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x4f, 0x4e, 0x5f, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x5f, 0x44, - 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x07, 0x3a, 0x60, 0x0a, 0x0e, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9c, 0x08, 0x20, 0x03, 0x28, 0x0e, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x52, 0x0d, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x70, 0x0a, 0x0e, 0x63, 0x6f, - 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x12, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, - 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_field_behavior_proto_rawDescOnce sync.Once - file_google_api_field_behavior_proto_rawDescData = file_google_api_field_behavior_proto_rawDesc -) - -func file_google_api_field_behavior_proto_rawDescGZIP() []byte { - file_google_api_field_behavior_proto_rawDescOnce.Do(func() { - file_google_api_field_behavior_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_field_behavior_proto_rawDescData) - }) - return file_google_api_field_behavior_proto_rawDescData -} - -var file_google_api_field_behavior_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_google_api_field_behavior_proto_goTypes = []interface{}{ - (FieldBehavior)(0), // 0: google.api.FieldBehavior - (*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions -} -var file_google_api_field_behavior_proto_depIdxs = []int32{ - 1, // 0: google.api.field_behavior:extendee -> google.protobuf.FieldOptions - 0, // 1: google.api.field_behavior:type_name -> google.api.FieldBehavior - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 1, // [1:2] is the sub-list for extension type_name - 0, // [0:1] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_google_api_field_behavior_proto_init() } -func file_google_api_field_behavior_proto_init() { - if File_google_api_field_behavior_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_field_behavior_proto_rawDesc, - NumEnums: 1, - NumMessages: 0, - NumExtensions: 1, - NumServices: 0, - }, - GoTypes: file_google_api_field_behavior_proto_goTypes, - DependencyIndexes: file_google_api_field_behavior_proto_depIdxs, - EnumInfos: file_google_api_field_behavior_proto_enumTypes, - ExtensionInfos: file_google_api_field_behavior_proto_extTypes, - }.Build() - File_google_api_field_behavior_proto = out.File - file_google_api_field_behavior_proto_rawDesc = nil - file_google_api_field_behavior_proto_goTypes = nil - file_google_api_field_behavior_proto_depIdxs = nil -} diff --git a/proto/google/api/field_behavior.pb.validate.go b/proto/google/api/field_behavior.pb.validate.go deleted file mode 100644 index e4e9bc921..000000000 --- a/proto/google/api/field_behavior.pb.validate.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: google/api/field_behavior.proto - -package annotations - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) diff --git a/proto/google/api/http.pb.go b/proto/google/api/http.pb.go deleted file mode 100644 index d2c195609..000000000 --- a/proto/google/api/http.pb.go +++ /dev/null @@ -1,777 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc (unknown) -// source: google/api/http.proto - -package annotations - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -type Http struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - Rules []*HttpRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - FullyDecodeReservedExpansion bool `protobuf:"varint,2,opt,name=fully_decode_reserved_expansion,json=fullyDecodeReservedExpansion,proto3" json:"fully_decode_reserved_expansion,omitempty"` -} - -func (x *Http) Reset() { - *x = Http{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_http_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Http) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Http) ProtoMessage() {} - -func (x *Http) ProtoReflect() protoreflect.Message { - mi := &file_google_api_http_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 Http.ProtoReflect.Descriptor instead. -func (*Http) Descriptor() ([]byte, []int) { - return file_google_api_http_proto_rawDescGZIP(), []int{0} -} - -func (x *Http) GetRules() []*HttpRule { - if x != nil { - return x.Rules - } - return nil -} - -func (x *Http) GetFullyDecodeReservedExpansion() bool { - if x != nil { - return x.FullyDecodeReservedExpansion - } - return false -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -type HttpRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - // - // Types that are assignable to Pattern: - // - // *HttpRule_Get - // *HttpRule_Put - // *HttpRule_Post - // *HttpRule_Delete - // *HttpRule_Patch - // *HttpRule_Custom - Pattern isHttpRule_Pattern `protobuf_oneof:"pattern"` - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"` - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - ResponseBody string `protobuf:"bytes,12,opt,name=response_body,json=responseBody,proto3" json:"response_body,omitempty"` - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - AdditionalBindings []*HttpRule `protobuf:"bytes,11,rep,name=additional_bindings,json=additionalBindings,proto3" json:"additional_bindings,omitempty"` -} - -func (x *HttpRule) Reset() { - *x = HttpRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_http_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HttpRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HttpRule) ProtoMessage() {} - -func (x *HttpRule) ProtoReflect() protoreflect.Message { - mi := &file_google_api_http_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HttpRule.ProtoReflect.Descriptor instead. -func (*HttpRule) Descriptor() ([]byte, []int) { - return file_google_api_http_proto_rawDescGZIP(), []int{1} -} - -func (x *HttpRule) GetSelector() string { - if x != nil { - return x.Selector - } - return "" -} - -func (m *HttpRule) GetPattern() isHttpRule_Pattern { - if m != nil { - return m.Pattern - } - return nil -} - -func (x *HttpRule) GetGet() string { - if x, ok := x.GetPattern().(*HttpRule_Get); ok { - return x.Get - } - return "" -} - -func (x *HttpRule) GetPut() string { - if x, ok := x.GetPattern().(*HttpRule_Put); ok { - return x.Put - } - return "" -} - -func (x *HttpRule) GetPost() string { - if x, ok := x.GetPattern().(*HttpRule_Post); ok { - return x.Post - } - return "" -} - -func (x *HttpRule) GetDelete() string { - if x, ok := x.GetPattern().(*HttpRule_Delete); ok { - return x.Delete - } - return "" -} - -func (x *HttpRule) GetPatch() string { - if x, ok := x.GetPattern().(*HttpRule_Patch); ok { - return x.Patch - } - return "" -} - -func (x *HttpRule) GetCustom() *CustomHttpPattern { - if x, ok := x.GetPattern().(*HttpRule_Custom); ok { - return x.Custom - } - return nil -} - -func (x *HttpRule) GetBody() string { - if x != nil { - return x.Body - } - return "" -} - -func (x *HttpRule) GetResponseBody() string { - if x != nil { - return x.ResponseBody - } - return "" -} - -func (x *HttpRule) GetAdditionalBindings() []*HttpRule { - if x != nil { - return x.AdditionalBindings - } - return nil -} - -type isHttpRule_Pattern interface { - isHttpRule_Pattern() -} - -type HttpRule_Get struct { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - Get string `protobuf:"bytes,2,opt,name=get,proto3,oneof"` -} - -type HttpRule_Put struct { - // Maps to HTTP PUT. Used for replacing a resource. - Put string `protobuf:"bytes,3,opt,name=put,proto3,oneof"` -} - -type HttpRule_Post struct { - // Maps to HTTP POST. Used for creating a resource or performing an action. - Post string `protobuf:"bytes,4,opt,name=post,proto3,oneof"` -} - -type HttpRule_Delete struct { - // Maps to HTTP DELETE. Used for deleting a resource. - Delete string `protobuf:"bytes,5,opt,name=delete,proto3,oneof"` -} - -type HttpRule_Patch struct { - // Maps to HTTP PATCH. Used for updating a resource. - Patch string `protobuf:"bytes,6,opt,name=patch,proto3,oneof"` -} - -type HttpRule_Custom struct { - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - Custom *CustomHttpPattern `protobuf:"bytes,8,opt,name=custom,proto3,oneof"` -} - -func (*HttpRule_Get) isHttpRule_Pattern() {} - -func (*HttpRule_Put) isHttpRule_Pattern() {} - -func (*HttpRule_Post) isHttpRule_Pattern() {} - -func (*HttpRule_Delete) isHttpRule_Pattern() {} - -func (*HttpRule_Patch) isHttpRule_Pattern() {} - -func (*HttpRule_Custom) isHttpRule_Pattern() {} - -// A custom pattern is used for defining custom HTTP verb. -type CustomHttpPattern struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of this custom HTTP verb. - Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` - // The path matched by this custom verb. - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` -} - -func (x *CustomHttpPattern) Reset() { - *x = CustomHttpPattern{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_http_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CustomHttpPattern) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CustomHttpPattern) ProtoMessage() {} - -func (x *CustomHttpPattern) ProtoReflect() protoreflect.Message { - mi := &file_google_api_http_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CustomHttpPattern.ProtoReflect.Descriptor instead. -func (*CustomHttpPattern) Descriptor() ([]byte, []int) { - return file_google_api_http_proto_rawDescGZIP(), []int{2} -} - -func (x *CustomHttpPattern) GetKind() string { - if x != nil { - return x.Kind - } - return "" -} - -func (x *CustomHttpPattern) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -var File_google_api_http_proto protoreflect.FileDescriptor - -var file_google_api_http_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x22, 0x79, 0x0a, 0x04, 0x48, 0x74, 0x74, 0x70, 0x12, 0x2a, 0x0a, 0x05, 0x72, - 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, - 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x1f, 0x66, 0x75, 0x6c, 0x6c, 0x79, - 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, - 0x5f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x1c, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xda, - 0x02, 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x03, 0x67, 0x65, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x03, 0x70, - 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x70, 0x75, 0x74, 0x12, - 0x14, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, - 0x16, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x37, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, - 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x48, 0x00, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x62, 0x6f, 0x64, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x61, 0x64, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, - 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x12, 0x61, 0x64, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, - 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x22, 0x3b, 0x0a, 0x11, 0x43, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x6a, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x09, 0x48, 0x74, 0x74, 0x70, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x04, - 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_api_http_proto_rawDescOnce sync.Once - file_google_api_http_proto_rawDescData = file_google_api_http_proto_rawDesc -) - -func file_google_api_http_proto_rawDescGZIP() []byte { - file_google_api_http_proto_rawDescOnce.Do(func() { - file_google_api_http_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_http_proto_rawDescData) - }) - return file_google_api_http_proto_rawDescData -} - -var file_google_api_http_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_google_api_http_proto_goTypes = []interface{}{ - (*Http)(nil), // 0: google.api.Http - (*HttpRule)(nil), // 1: google.api.HttpRule - (*CustomHttpPattern)(nil), // 2: google.api.CustomHttpPattern -} -var file_google_api_http_proto_depIdxs = []int32{ - 1, // 0: google.api.Http.rules:type_name -> google.api.HttpRule - 2, // 1: google.api.HttpRule.custom:type_name -> google.api.CustomHttpPattern - 1, // 2: google.api.HttpRule.additional_bindings:type_name -> google.api.HttpRule - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_google_api_http_proto_init() } -func file_google_api_http_proto_init() { - if File_google_api_http_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_http_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Http); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_http_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HttpRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_http_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomHttpPattern); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_google_api_http_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*HttpRule_Get)(nil), - (*HttpRule_Put)(nil), - (*HttpRule_Post)(nil), - (*HttpRule_Delete)(nil), - (*HttpRule_Patch)(nil), - (*HttpRule_Custom)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_http_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_api_http_proto_goTypes, - DependencyIndexes: file_google_api_http_proto_depIdxs, - MessageInfos: file_google_api_http_proto_msgTypes, - }.Build() - File_google_api_http_proto = out.File - file_google_api_http_proto_rawDesc = nil - file_google_api_http_proto_goTypes = nil - file_google_api_http_proto_depIdxs = nil -} diff --git a/proto/google/api/http.pb.validate.go b/proto/google/api/http.pb.validate.go deleted file mode 100644 index d622caba4..000000000 --- a/proto/google/api/http.pb.validate.go +++ /dev/null @@ -1,521 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: google/api/http.proto - -package annotations - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Http with the rules defined in the proto -// definition for this message. If any rules are violated, the first error -// encountered is returned, or nil if there are no violations. -func (m *Http) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Http with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in HttpMultiError, or nil if none found. -func (m *Http) ValidateAll() error { - return m.validate(true) -} - -func (m *Http) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetRules() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HttpValidationError{ - field: fmt.Sprintf("Rules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HttpValidationError{ - field: fmt.Sprintf("Rules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpValidationError{ - field: fmt.Sprintf("Rules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - // no validation rules for FullyDecodeReservedExpansion - - if len(errors) > 0 { - return HttpMultiError(errors) - } - - return nil -} - -// HttpMultiError is an error wrapping multiple validation errors returned by -// Http.ValidateAll() if the designated constraints aren't met. -type HttpMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HttpMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HttpMultiError) AllErrors() []error { return m } - -// HttpValidationError is the validation error returned by Http.Validate if the -// designated constraints aren't met. -type HttpValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpValidationError) ErrorName() string { return "HttpValidationError" } - -// Error satisfies the builtin error interface -func (e HttpValidationError) 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 %sHttp.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpValidationError{} - -// Validate checks the field values on HttpRule with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *HttpRule) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on HttpRule with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in HttpRuleMultiError, or nil -// if none found. -func (m *HttpRule) ValidateAll() error { - return m.validate(true) -} - -func (m *HttpRule) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Selector - - // no validation rules for Body - - // no validation rules for ResponseBody - - for idx, item := range m.GetAdditionalBindings() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HttpRuleValidationError{ - field: fmt.Sprintf("AdditionalBindings[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HttpRuleValidationError{ - field: fmt.Sprintf("AdditionalBindings[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpRuleValidationError{ - field: fmt.Sprintf("AdditionalBindings[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - switch v := m.Pattern.(type) { - case *HttpRule_Get: - if v == nil { - err := HttpRuleValidationError{ - field: "Pattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for Get - case *HttpRule_Put: - if v == nil { - err := HttpRuleValidationError{ - field: "Pattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for Put - case *HttpRule_Post: - if v == nil { - err := HttpRuleValidationError{ - field: "Pattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for Post - case *HttpRule_Delete: - if v == nil { - err := HttpRuleValidationError{ - field: "Pattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for Delete - case *HttpRule_Patch: - if v == nil { - err := HttpRuleValidationError{ - field: "Pattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - // no validation rules for Patch - case *HttpRule_Custom: - if v == nil { - err := HttpRuleValidationError{ - field: "Pattern", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetCustom()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, HttpRuleValidationError{ - field: "Custom", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, HttpRuleValidationError{ - field: "Custom", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCustom()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return HttpRuleValidationError{ - field: "Custom", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return HttpRuleMultiError(errors) - } - - return nil -} - -// HttpRuleMultiError is an error wrapping multiple validation errors returned -// by HttpRule.ValidateAll() if the designated constraints aren't met. -type HttpRuleMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m HttpRuleMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m HttpRuleMultiError) AllErrors() []error { return m } - -// HttpRuleValidationError is the validation error returned by -// HttpRule.Validate if the designated constraints aren't met. -type HttpRuleValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e HttpRuleValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e HttpRuleValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e HttpRuleValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e HttpRuleValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e HttpRuleValidationError) ErrorName() string { return "HttpRuleValidationError" } - -// Error satisfies the builtin error interface -func (e HttpRuleValidationError) 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 %sHttpRule.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = HttpRuleValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = HttpRuleValidationError{} - -// Validate checks the field values on CustomHttpPattern with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *CustomHttpPattern) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CustomHttpPattern with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CustomHttpPatternMultiError, or nil if none found. -func (m *CustomHttpPattern) ValidateAll() error { - return m.validate(true) -} - -func (m *CustomHttpPattern) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Kind - - // no validation rules for Path - - if len(errors) > 0 { - return CustomHttpPatternMultiError(errors) - } - - return nil -} - -// CustomHttpPatternMultiError is an error wrapping multiple validation errors -// returned by CustomHttpPattern.ValidateAll() if the designated constraints -// aren't met. -type CustomHttpPatternMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CustomHttpPatternMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CustomHttpPatternMultiError) AllErrors() []error { return m } - -// CustomHttpPatternValidationError is the validation error returned by -// CustomHttpPattern.Validate if the designated constraints aren't met. -type CustomHttpPatternValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CustomHttpPatternValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CustomHttpPatternValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CustomHttpPatternValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CustomHttpPatternValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CustomHttpPatternValidationError) ErrorName() string { - return "CustomHttpPatternValidationError" -} - -// Error satisfies the builtin error interface -func (e CustomHttpPatternValidationError) 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 %sCustomHttpPattern.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CustomHttpPatternValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CustomHttpPatternValidationError{} diff --git a/proto/google/api/visibility.pb.go b/proto/google/api/visibility.pb.go deleted file mode 100644 index bb80df833..000000000 --- a/proto/google/api/visibility.pb.go +++ /dev/null @@ -1,447 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc (unknown) -// source: google/api/visibility.proto - -package visibility - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// `Visibility` restricts service consumer's access to service elements, -// such as whether an application can call a visibility-restricted method. -// The restriction is expressed by applying visibility labels on service -// elements. The visibility labels are elsewhere linked to service consumers. -// -// A service can define multiple visibility labels, but a service consumer -// should be granted at most one visibility label. Multiple visibility -// labels for a single service consumer are not supported. -// -// If an element and all its parents have no visibility label, its visibility -// is unconditionally granted. -// -// Example: -// -// visibility: -// rules: -// - selector: google.calendar.Calendar.EnhancedSearch -// restriction: PREVIEW -// - selector: google.calendar.Calendar.Delegate -// restriction: INTERNAL -// -// Here, all methods are publicly visible except for the restricted methods -// EnhancedSearch and Delegate. -type Visibility struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A list of visibility rules that apply to individual API elements. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - Rules []*VisibilityRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` -} - -func (x *Visibility) Reset() { - *x = Visibility{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_visibility_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Visibility) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Visibility) ProtoMessage() {} - -func (x *Visibility) ProtoReflect() protoreflect.Message { - mi := &file_google_api_visibility_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 Visibility.ProtoReflect.Descriptor instead. -func (*Visibility) Descriptor() ([]byte, []int) { - return file_google_api_visibility_proto_rawDescGZIP(), []int{0} -} - -func (x *Visibility) GetRules() []*VisibilityRule { - if x != nil { - return x.Rules - } - return nil -} - -// A visibility rule provides visibility configuration for an individual API -// element. -type VisibilityRule struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Selects methods, messages, fields, enums, etc. to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` - // A comma-separated list of visibility labels that apply to the `selector`. - // Any of the listed labels can be used to grant the visibility. - // - // If a rule has multiple labels, removing one of the labels but not all of - // them can break clients. - // - // Example: - // - // visibility: - // rules: - // - selector: google.calendar.Calendar.EnhancedSearch - // restriction: INTERNAL, PREVIEW - // - // Removing INTERNAL from this restriction will break clients that rely on - // this method and only had access to it through INTERNAL. - Restriction string `protobuf:"bytes,2,opt,name=restriction,proto3" json:"restriction,omitempty"` -} - -func (x *VisibilityRule) Reset() { - *x = VisibilityRule{} - if protoimpl.UnsafeEnabled { - mi := &file_google_api_visibility_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VisibilityRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VisibilityRule) ProtoMessage() {} - -func (x *VisibilityRule) ProtoReflect() protoreflect.Message { - mi := &file_google_api_visibility_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VisibilityRule.ProtoReflect.Descriptor instead. -func (*VisibilityRule) Descriptor() ([]byte, []int) { - return file_google_api_visibility_proto_rawDescGZIP(), []int{1} -} - -func (x *VisibilityRule) GetSelector() string { - if x != nil { - return x.Selector - } - return "" -} - -func (x *VisibilityRule) GetRestriction() string { - if x != nil { - return x.Restriction - } - return "" -} - -var file_google_api_visibility_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.EnumOptions)(nil), - ExtensionType: (*VisibilityRule)(nil), - Field: 72295727, - Name: "google.api.enum_visibility", - Tag: "bytes,72295727,opt,name=enum_visibility", - Filename: "google/api/visibility.proto", - }, - { - ExtendedType: (*descriptorpb.EnumValueOptions)(nil), - ExtensionType: (*VisibilityRule)(nil), - Field: 72295727, - Name: "google.api.value_visibility", - Tag: "bytes,72295727,opt,name=value_visibility", - Filename: "google/api/visibility.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*VisibilityRule)(nil), - Field: 72295727, - Name: "google.api.field_visibility", - Tag: "bytes,72295727,opt,name=field_visibility", - Filename: "google/api/visibility.proto", - }, - { - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: (*VisibilityRule)(nil), - Field: 72295727, - Name: "google.api.message_visibility", - Tag: "bytes,72295727,opt,name=message_visibility", - Filename: "google/api/visibility.proto", - }, - { - ExtendedType: (*descriptorpb.MethodOptions)(nil), - ExtensionType: (*VisibilityRule)(nil), - Field: 72295727, - Name: "google.api.method_visibility", - Tag: "bytes,72295727,opt,name=method_visibility", - Filename: "google/api/visibility.proto", - }, - { - ExtendedType: (*descriptorpb.ServiceOptions)(nil), - ExtensionType: (*VisibilityRule)(nil), - Field: 72295727, - Name: "google.api.api_visibility", - Tag: "bytes,72295727,opt,name=api_visibility", - Filename: "google/api/visibility.proto", - }, -} - -// Extension fields to descriptorpb.EnumOptions. -var ( - // See `VisibilityRule`. - // - // optional google.api.VisibilityRule enum_visibility = 72295727; - E_EnumVisibility = &file_google_api_visibility_proto_extTypes[0] -) - -// Extension fields to descriptorpb.EnumValueOptions. -var ( - // See `VisibilityRule`. - // - // optional google.api.VisibilityRule value_visibility = 72295727; - E_ValueVisibility = &file_google_api_visibility_proto_extTypes[1] -) - -// Extension fields to descriptorpb.FieldOptions. -var ( - // See `VisibilityRule`. - // - // optional google.api.VisibilityRule field_visibility = 72295727; - E_FieldVisibility = &file_google_api_visibility_proto_extTypes[2] -) - -// Extension fields to descriptorpb.MessageOptions. -var ( - // See `VisibilityRule`. - // - // optional google.api.VisibilityRule message_visibility = 72295727; - E_MessageVisibility = &file_google_api_visibility_proto_extTypes[3] -) - -// Extension fields to descriptorpb.MethodOptions. -var ( - // See `VisibilityRule`. - // - // optional google.api.VisibilityRule method_visibility = 72295727; - E_MethodVisibility = &file_google_api_visibility_proto_extTypes[4] -) - -// Extension fields to descriptorpb.ServiceOptions. -var ( - // See `VisibilityRule`. - // - // optional google.api.VisibilityRule api_visibility = 72295727; - E_ApiVisibility = &file_google_api_visibility_proto_extTypes[5] -) - -var File_google_api_visibility_proto protoreflect.FileDescriptor - -var file_google_api_visibility_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, - 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x0a, 0x56, - 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x72, 0x75, 0x6c, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x4e, 0x0a, 0x0e, 0x56, - 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x73, - 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x64, 0x0a, 0x0f, 0x65, - 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1c, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0xca, 0xbc, - 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, - 0x65, 0x52, 0x0e, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x3a, 0x6b, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0xca, 0xbc, 0x22, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, - 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x67, - 0x0a, 0x10, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0xaf, 0xca, 0xbc, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x73, - 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x6d, 0x0a, 0x12, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, - 0xca, 0xbc, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, - 0x75, 0x6c, 0x65, 0x52, 0x11, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x56, 0x69, 0x73, 0x69, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x6a, 0x0a, 0x11, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0xca, 0xbc, 0x22, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, - 0x52, 0x10, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x3a, 0x65, 0x0a, 0x0e, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0xca, 0xbc, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0d, 0x61, 0x70, 0x69, 0x56, - 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x42, 0x6e, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0f, 0x56, 0x69, 0x73, - 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, - 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x3b, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0xf8, - 0x01, 0x01, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_google_api_visibility_proto_rawDescOnce sync.Once - file_google_api_visibility_proto_rawDescData = file_google_api_visibility_proto_rawDesc -) - -func file_google_api_visibility_proto_rawDescGZIP() []byte { - file_google_api_visibility_proto_rawDescOnce.Do(func() { - file_google_api_visibility_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_visibility_proto_rawDescData) - }) - return file_google_api_visibility_proto_rawDescData -} - -var file_google_api_visibility_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_google_api_visibility_proto_goTypes = []interface{}{ - (*Visibility)(nil), // 0: google.api.Visibility - (*VisibilityRule)(nil), // 1: google.api.VisibilityRule - (*descriptorpb.EnumOptions)(nil), // 2: google.protobuf.EnumOptions - (*descriptorpb.EnumValueOptions)(nil), // 3: google.protobuf.EnumValueOptions - (*descriptorpb.FieldOptions)(nil), // 4: google.protobuf.FieldOptions - (*descriptorpb.MessageOptions)(nil), // 5: google.protobuf.MessageOptions - (*descriptorpb.MethodOptions)(nil), // 6: google.protobuf.MethodOptions - (*descriptorpb.ServiceOptions)(nil), // 7: google.protobuf.ServiceOptions -} -var file_google_api_visibility_proto_depIdxs = []int32{ - 1, // 0: google.api.Visibility.rules:type_name -> google.api.VisibilityRule - 2, // 1: google.api.enum_visibility:extendee -> google.protobuf.EnumOptions - 3, // 2: google.api.value_visibility:extendee -> google.protobuf.EnumValueOptions - 4, // 3: google.api.field_visibility:extendee -> google.protobuf.FieldOptions - 5, // 4: google.api.message_visibility:extendee -> google.protobuf.MessageOptions - 6, // 5: google.api.method_visibility:extendee -> google.protobuf.MethodOptions - 7, // 6: google.api.api_visibility:extendee -> google.protobuf.ServiceOptions - 1, // 7: google.api.enum_visibility:type_name -> google.api.VisibilityRule - 1, // 8: google.api.value_visibility:type_name -> google.api.VisibilityRule - 1, // 9: google.api.field_visibility:type_name -> google.api.VisibilityRule - 1, // 10: google.api.message_visibility:type_name -> google.api.VisibilityRule - 1, // 11: google.api.method_visibility:type_name -> google.api.VisibilityRule - 1, // 12: google.api.api_visibility:type_name -> google.api.VisibilityRule - 13, // [13:13] is the sub-list for method output_type - 13, // [13:13] is the sub-list for method input_type - 7, // [7:13] is the sub-list for extension type_name - 1, // [1:7] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_google_api_visibility_proto_init() } -func file_google_api_visibility_proto_init() { - if File_google_api_visibility_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_api_visibility_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Visibility); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_api_visibility_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VisibilityRule); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_api_visibility_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 6, - NumServices: 0, - }, - GoTypes: file_google_api_visibility_proto_goTypes, - DependencyIndexes: file_google_api_visibility_proto_depIdxs, - MessageInfos: file_google_api_visibility_proto_msgTypes, - ExtensionInfos: file_google_api_visibility_proto_extTypes, - }.Build() - File_google_api_visibility_proto = out.File - file_google_api_visibility_proto_rawDesc = nil - file_google_api_visibility_proto_goTypes = nil - file_google_api_visibility_proto_depIdxs = nil -} diff --git a/proto/google/api/visibility.pb.validate.go b/proto/google/api/visibility.pb.validate.go deleted file mode 100644 index 0147dc1e2..000000000 --- a/proto/google/api/visibility.pb.validate.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: google/api/visibility.proto - -package visibility - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Visibility with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Visibility) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Visibility with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in VisibilityMultiError, or -// nil if none found. -func (m *Visibility) ValidateAll() error { - return m.validate(true) -} - -func (m *Visibility) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetRules() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, VisibilityValidationError{ - field: fmt.Sprintf("Rules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, VisibilityValidationError{ - field: fmt.Sprintf("Rules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return VisibilityValidationError{ - field: fmt.Sprintf("Rules[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return VisibilityMultiError(errors) - } - - return nil -} - -// VisibilityMultiError is an error wrapping multiple validation errors -// returned by Visibility.ValidateAll() if the designated constraints aren't met. -type VisibilityMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m VisibilityMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m VisibilityMultiError) AllErrors() []error { return m } - -// VisibilityValidationError is the validation error returned by -// Visibility.Validate if the designated constraints aren't met. -type VisibilityValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e VisibilityValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e VisibilityValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e VisibilityValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e VisibilityValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e VisibilityValidationError) ErrorName() string { return "VisibilityValidationError" } - -// Error satisfies the builtin error interface -func (e VisibilityValidationError) 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 %sVisibility.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = VisibilityValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = VisibilityValidationError{} - -// Validate checks the field values on VisibilityRule with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *VisibilityRule) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on VisibilityRule with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in VisibilityRuleMultiError, -// or nil if none found. -func (m *VisibilityRule) ValidateAll() error { - return m.validate(true) -} - -func (m *VisibilityRule) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Selector - - // no validation rules for Restriction - - if len(errors) > 0 { - return VisibilityRuleMultiError(errors) - } - - return nil -} - -// VisibilityRuleMultiError is an error wrapping multiple validation errors -// returned by VisibilityRule.ValidateAll() if the designated constraints -// aren't met. -type VisibilityRuleMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m VisibilityRuleMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m VisibilityRuleMultiError) AllErrors() []error { return m } - -// VisibilityRuleValidationError is the validation error returned by -// VisibilityRule.Validate if the designated constraints aren't met. -type VisibilityRuleValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e VisibilityRuleValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e VisibilityRuleValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e VisibilityRuleValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e VisibilityRuleValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e VisibilityRuleValidationError) ErrorName() string { return "VisibilityRuleValidationError" } - -// Error satisfies the builtin error interface -func (e VisibilityRuleValidationError) 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 %sVisibilityRule.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = VisibilityRuleValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = VisibilityRuleValidationError{} diff --git a/spec/api.swagger.json b/spec/api.swagger.json index a3a49248a..5bbb4e20c 100755 --- a/spec/api.swagger.json +++ b/spec/api.swagger.json @@ -31,7 +31,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -96,13 +96,13 @@ "201": { "description": "The created relationship.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" + "$ref": "#/definitions/relationship" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -113,7 +113,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship" + "$ref": "#/definitions/createRelationshipBody" } } ], @@ -133,7 +133,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -146,7 +146,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta" + "$ref": "#/definitions/relationshipDelta" } } } @@ -163,7 +163,7 @@ "200": { "description": "The list of namespaces.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse" + "$ref": "#/definitions/relationshipNamespaces" }, "examples": { "application/json": { @@ -178,7 +178,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -194,13 +194,13 @@ "200": { "description": "The result of the syntax checker", "schema": { - "$ref": "#/definitions/ory.keto.opl.v1alpha1.CheckResponse" + "$ref": "#/definitions/checkOplSyntaxResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -227,13 +227,13 @@ "200": { "description": "The list of relationships.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse" + "$ref": "#/definitions/relationships" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -315,19 +315,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } } }, @@ -400,19 +400,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } } }, @@ -423,7 +423,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" + "$ref": "#/definitions/postCheckPermissionBody" } } ], @@ -439,19 +439,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } } }, @@ -524,19 +524,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } } }, @@ -547,7 +547,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" + "$ref": "#/definitions/postCheckPermissionBody" } } ], @@ -563,13 +563,13 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" + "$ref": "#/definitions/expandedPermissionTree" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -623,7 +623,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -632,7 +632,7 @@ } }, "definitions": { - "ory.keto.opl.v1alpha1.CheckResponse": { + "checkOplSyntaxResult": { "type": "object", "properties": { "errors": { @@ -670,7 +670,7 @@ } } }, - "ory.keto.relation_tuples.v1alpha2.CheckRequest": { + "postCheckPermissionBody": { "type": "object", "properties": { "namespace": { @@ -690,7 +690,7 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSetQuery", + "$ref": "#/definitions/subjectSetQuery", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." }, "max-depth": { @@ -701,7 +701,7 @@ }, "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object." }, - "ory.keto.relation_tuples.v1alpha2.CheckResponse": { + "checkPermissionResult": { "type": "object", "properties": { "allowed": { @@ -711,7 +711,7 @@ }, "description": "The response for a CheckService.Check rpc." }, - "ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship": { + "createRelationshipBody": { "type": "object", "properties": { "namespace": { @@ -731,7 +731,7 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", + "$ref": "#/definitions/subjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } } @@ -740,7 +740,7 @@ "type": "object", "properties": { "relationTuple": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", + "$ref": "#/definitions/relationship", "description": "The created relationship." } }, @@ -749,18 +749,18 @@ "ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse": { "type": "object" }, - "ory.keto.relation_tuples.v1alpha2.ErrorResponse": { + "errorGeneric": { "type": "object", "properties": { "error": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error" + "$ref": "#/definitions/errorGeneric.Error" } }, "description": "The standard Ory JSON API error format.", "title": "JSON API Error Response", "required": ["error"] }, - "ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error": { + "errorGeneric.Error": { "type": "object", "properties": { "code": { @@ -817,7 +817,7 @@ "type": "object", "properties": { "tree": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree", + "$ref": "#/definitions/expandedPermissionTree", "description": "The tree the requested subject set expands to.\nThe requested subject set is the subject of the root.\n\nThis field can be nil in some circumstances." } }, @@ -833,7 +833,7 @@ }, "description": "Response of the VersionService.GetVersion RPC." }, - "ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse": { + "relationshipNamespaces": { "type": "object", "properties": { "namespaces": { @@ -844,13 +844,13 @@ } } }, - "ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse": { + "relationships": { "type": "object", "properties": { "relation_tuples": { "type": "array", "items": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" + "$ref": "#/definitions/relationship" }, "description": "The relationships matching the list request." }, @@ -884,7 +884,7 @@ "default": "unspecified", "description": " - union: This node expands to a union of all children.\n - exclusion: Not implemented yet.\n - intersection: Not implemented yet.\n - leaf: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - tuple_to_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - computed_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - not: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached." }, - "ory.keto.relation_tuples.v1alpha2.RelationTuple": { + "relationship": { "type": "object", "properties": { "namespace": { @@ -904,29 +904,29 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", + "$ref": "#/definitions/subjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } }, "description": "RelationTuple defines a relation between an Object and a Subject.", "required": ["namespace", "object", "relation"] }, - "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta": { + "relationshipDelta": { "type": "object", "properties": { "action": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action", + "$ref": "#/definitions/relationshipDelta.Action", "description": "The action to do on the RelationTuple." }, "relation_tuple": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", + "$ref": "#/definitions/relationship", "description": "The target RelationTuple." } }, "description": "Write-delta for a TransactRelationTuplesRequest.", "required": ["action", "relation_tuple"] }, - "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action": { + "relationshipDelta.Action": { "type": "string", "enum": ["ACTION_UNSPECIFIED", "insert", "delete"], "default": "ACTION_UNSPECIFIED", @@ -940,13 +940,13 @@ "description": "A concrete id of the subject." }, "set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", + "$ref": "#/definitions/subjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } }, "description": "Subject is either a concrete subject id or\na `SubjectSet` expanding to more Subjects." }, - "ory.keto.relation_tuples.v1alpha2.SubjectSet": { + "subjectSet": { "type": "object", "properties": { "namespace": { @@ -965,7 +965,7 @@ "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`.", "required": ["namespace", "object", "relation"] }, - "ory.keto.relation_tuples.v1alpha2.SubjectSetQuery": { + "subjectSetQuery": { "type": "object", "properties": { "namespace": { @@ -983,7 +983,7 @@ }, "description": "SubjectSetQuery refers to all subjects who have\nthe same `relation` on an `object`." }, - "ory.keto.relation_tuples.v1alpha2.SubjectTree": { + "expandedPermissionTree": { "type": "object", "properties": { "type": { @@ -995,13 +995,13 @@ "description": "The subject this node represents.\nDeprecated: More information is now available in the tuple field." }, "tuple": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", + "$ref": "#/definitions/relationship", "description": "The relation tuple this node represents." }, "children": { "type": "array", "items": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" + "$ref": "#/definitions/expandedPermissionTree" }, "description": "The children of this node.\n\nThis is never set if `node_type` == `NODE_TYPE_LEAF`." } @@ -1011,6 +1011,7 @@ "ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse": { "type": "object", "description": "The response of a WriteService.TransactRelationTuples rpc." - } + }, + "UUID": { "type": "string", "format": "uuid4" } } } From 4883c7c3744ff2f6cb7c16a279357f6f542c7afc Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Wed, 22 Feb 2023 14:01:34 +0100 Subject: [PATCH 11/42] fix: block on dial --- internal/driver/daemon_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/driver/daemon_test.go b/internal/driver/daemon_test.go index 0c46ebdd7..72064077b 100644 --- a/internal/driver/daemon_test.go +++ b/internal/driver/daemon_test.go @@ -4,14 +4,17 @@ package driver import ( + "context" "fmt" "io" "net/http" "net/http/httptest" "testing" + prometheus "github.com/ory/x/prometheusx" "github.com/phayes/freeport" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -20,12 +23,6 @@ import ( "google.golang.org/grpc/status" "github.com/ory/keto/internal/driver/config" - - "context" - - prometheus "github.com/ory/x/prometheusx" - "github.com/stretchr/testify/require" - "github.com/ory/keto/internal/x/dbx" ) @@ -70,7 +67,10 @@ func TestPanicRecovery(t *testing.T) { doneShutdown := make(chan struct{}) eg.Go(r.serveWrite(ctx, doneShutdown)) - conn, err := grpc.DialContext(ctx, fmt.Sprintf("127.0.0.1:%d", port), grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := grpc.DialContext(ctx, fmt.Sprintf("127.0.0.1:%d", port), + grpc.WithTransportCredentials(insecure.NewCredentials()), + grpc.WithBlock(), + ) require.NoError(t, err) defer conn.Close() From 36d77f8d388970dbc0af07b5709e389801e0657f Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Wed, 22 Feb 2023 15:28:39 +0100 Subject: [PATCH 12/42] chore: remove http handlers --- cmd/check/root.go | 6 +- internal/check/handler.go | 248 ------------------ internal/driver/registry_default.go | 3 - internal/e2e/cli_client_test.go | 5 +- internal/e2e/rest_client_test.go | 5 +- internal/expand/handler.go | 72 +---- internal/expand/handler_test.go | 26 +- .../namespace/namespacehandler/handler.go | 29 -- internal/relationtuple/handler.go | 10 - internal/relationtuple/read_server.go | 79 ------ internal/relationtuple/swagger_definitions.go | 114 -------- internal/relationtuple/transact_server.go | 213 --------------- internal/schema/handler.go | 55 ---- 13 files changed, 19 insertions(+), 846 deletions(-) delete mode 100644 internal/relationtuple/swagger_definitions.go diff --git a/cmd/check/root.go b/cmd/check/root.go index c77f900c7..83db2c4ad 100644 --- a/cmd/check/root.go +++ b/cmd/check/root.go @@ -10,15 +10,15 @@ import ( "github.com/ory/keto/ketoapi" rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" - "github.com/ory/keto/internal/check" - "github.com/ory/x/cmdx" "github.com/spf13/cobra" "github.com/ory/keto/cmd/client" ) -type checkOutput check.CheckPermissionResult +type checkOutput struct { + Allowed bool `json:"allowed"` +} func (o *checkOutput) String() string { if o.Allowed { diff --git a/internal/check/handler.go b/internal/check/handler.go index 957f427ec..527dc9921 100644 --- a/internal/check/handler.go +++ b/internal/check/handler.go @@ -5,10 +5,6 @@ package check import ( "context" - "encoding/json" - "io" - "net/http" - "net/url" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/pkg/errors" @@ -18,7 +14,6 @@ import ( "github.com/ory/keto/ketoapi" - "github.com/julienschmidt/httprouter" "google.golang.org/grpc" "github.com/ory/keto/internal/relationtuple" @@ -41,7 +36,6 @@ type ( var ( _ rts.CheckServiceServer = (*Handler)(nil) - _ *checkPermission = nil ) func NewHandler(d handlerDependencies) *Handler { @@ -53,13 +47,6 @@ const ( OpenAPIRouteBase = RouteBase + "/openapi" ) -func (h *Handler) RegisterReadRoutes(r *x.ReadRouter) { - r.GET(RouteBase, h.getCheckMirrorStatus) - r.GET(OpenAPIRouteBase, h.getCheckNoStatus) - r.POST(RouteBase, h.postCheckMirrorStatus) - r.POST(OpenAPIRouteBase, h.postCheckNoStatus) -} - func (h *Handler) RegisterReadGRPC(s *grpc.Server) { rts.RegisterCheckServiceServer(s, h) } @@ -71,241 +58,6 @@ func (h *Handler) RegisterReadGRPCGatewayConn(ctx context.Context, mux *runtime. return rts.RegisterCheckServiceHandler(ctx, mux, conn) } -// Check Permission Result -// -// The content of the allowed field is mirrored in the HTTP status code. -// -// swagger:model checkPermissionResult -type CheckPermissionResult struct { - // whether the relation tuple is allowed - // - // required: true - Allowed bool `json:"allowed"` -} - -// Check Permission Request Parameters -// -// swagger:parameters checkPermission -type checkPermission struct { - // in: query - MaxDepth int `json:"max-depth"` -} - -// swagger:route GET /relation-tuples/check/openapi permission checkPermission -// -// # Check a permission -// -// To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). -// -// Consumes: -// - application/x-www-form-urlencoded -// -// Produces: -// - application/json -// -// Schemes: http, https -// -// Responses: -// 200: checkPermissionResult -// 400: errorGeneric -// default: errorGeneric -func (h *Handler) getCheckNoStatus(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { - allowed, err := h.getCheck(r.Context(), r.URL.Query()) - if err != nil { - h.d.Writer().WriteError(w, r, err) - return - } - h.d.Writer().Write(w, r, &CheckPermissionResult{Allowed: allowed}) -} - -// Check Permission Or Error Request Parameters -// -// swagger:parameters checkPermissionOrError -// nolint:deadcode,unused -type checkPermissionOrError struct { - // in: query - MaxDepth int `json:"max-depth"` -} - -// swagger:route GET /relation-tuples/check permission checkPermissionOrError -// -// # Check a permission -// -// To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). -// -// Consumes: -// - application/x-www-form-urlencoded -// -// Produces: -// - application/json -// -// Schemes: http, https -// -// Responses: -// 200: checkPermissionResult -// 400: errorGeneric -// 403: checkPermissionResult -// default: errorGeneric -func (h *Handler) getCheckMirrorStatus(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { - allowed, err := h.getCheck(r.Context(), r.URL.Query()) - if err != nil { - h.d.Writer().WriteError(w, r, err) - return - } - - if allowed { - h.d.Writer().Write(w, r, &CheckPermissionResult{Allowed: allowed}) - return - } - - h.d.Writer().WriteCode(w, r, http.StatusForbidden, &CheckPermissionResult{Allowed: allowed}) -} - -func (h *Handler) getCheck(ctx context.Context, q url.Values) (bool, error) { - maxDepth, err := x.GetMaxDepthFromQuery(q) - if err != nil { - return false, err - } - - tuple, err := (&ketoapi.RelationTuple{}).FromURLQuery(q) - if err != nil { - return false, err - } - - it, err := h.d.ReadOnlyMapper().FromTuple(ctx, tuple) - // herodot.ErrNotFound occurs when the namespace is unknown - if errors.Is(err, herodot.ErrNotFound) { - return false, nil - } else if err != nil { - return false, err - } - - return h.d.PermissionEngine().CheckIsMember(ctx, it[0], maxDepth) -} - -// Check Permission using Post Request Parameters -// -// swagger:parameters postCheckPermission -// nolint:deadcode,unused -type postCheckPermission struct { - // in: query - MaxDepth int `json:"max-depth"` - - // in: body - Payload postCheckPermissionBody -} - -// Check Permission using Post Request Body -// -// swagger:model postCheckPermissionBody -// nolint:deadcode,unused -type postCheckPermissionBody struct { - ketoapi.RelationQuery -} - -// swagger:route POST /relation-tuples/check/openapi permission postCheckPermission -// -// # Check a permission -// -// To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). -// -// Consumes: -// - application/json -// -// Produces: -// - application/json -// -// Schemes: http, https -// -// Responses: -// 200: checkPermissionResult -// 400: errorGeneric -// default: errorGeneric -func (h *Handler) postCheckNoStatus(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { - allowed, err := h.postCheck(r.Context(), r.Body, r.URL.Query()) - if err != nil { - h.d.Writer().WriteError(w, r, err) - return - } - h.d.Writer().Write(w, r, &CheckPermissionResult{Allowed: allowed}) -} - -// Post Check Permission Or Error Request Parameters -// -// swagger:parameters postCheckPermissionOrError -// nolint:deadcode,unused -type postCheckPermissionOrError struct { - // nolint:deadcode,unused - // in: query - MaxDepth int `json:"max-depth"` - - // in: body - Body postCheckPermissionOrErrorBody -} - -// Post Check Permission Or Error Body -// -// swagger:model postCheckPermissionOrErrorBody -// nolint:deadcode,unused -type postCheckPermissionOrErrorBody struct { - ketoapi.RelationQuery -} - -// swagger:route POST /relation-tuples/check permission postCheckPermissionOrError -// -// # Check a permission -// -// To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). -// -// Consumes: -// - application/json -// -// Produces: -// - application/json -// -// Schemes: http, https -// -// Responses: -// 200: checkPermissionResult -// 400: errorGeneric -// 403: checkPermissionResult -// default: errorGeneric -func (h *Handler) postCheckMirrorStatus(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { - allowed, err := h.postCheck(r.Context(), r.Body, r.URL.Query()) - if err != nil { - h.d.Writer().WriteError(w, r, err) - return - } - - if allowed { - h.d.Writer().Write(w, r, &CheckPermissionResult{Allowed: allowed}) - return - } - - h.d.Writer().WriteCode(w, r, http.StatusForbidden, &CheckPermissionResult{Allowed: allowed}) -} - -func (h *Handler) postCheck(ctx context.Context, body io.Reader, query url.Values) (bool, error) { - maxDepth, err := x.GetMaxDepthFromQuery(query) - if err != nil { - return false, err - } - - var tuple ketoapi.RelationTuple - if err := json.NewDecoder(body).Decode(&tuple); err != nil { - return false, errors.WithStack(herodot.ErrBadRequest.WithErrorf("could not unmarshal json: %s", err.Error())) - } - t, err := h.d.ReadOnlyMapper().FromTuple(ctx, &tuple) - // herodot.ErrNotFound occurs when the namespace is unknown - if errors.Is(err, herodot.ErrNotFound) { - return false, nil - } else if err != nil { - return false, err - } - - return h.d.PermissionEngine().CheckIsMember(ctx, t[0], maxDepth) -} - func (h *Handler) Check(ctx context.Context, req *rts.CheckRequest) (res *rts.CheckResponse, err error) { tuple := (&ketoapi.RelationTuple{}).FromCheckRequest(req) diff --git a/internal/driver/registry_default.go b/internal/driver/registry_default.go index dde2f1144..b17d4fc3c 100644 --- a/internal/driver/registry_default.go +++ b/internal/driver/registry_default.go @@ -82,19 +82,16 @@ type ( healthReadyCheckers healthx.ReadyCheckers } ReadHandler interface { - RegisterReadRoutes(r *x.ReadRouter) RegisterReadGRPC(s *grpc.Server) RegisterReadGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error RegisterReadGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error } WriteHandler interface { - RegisterWriteRoutes(r *x.WriteRouter) RegisterWriteGRPC(s *grpc.Server) RegisterWriteGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error RegisterWriteGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error } OPLSyntaxHandler interface { - RegisterSyntaxRoutes(r *x.OPLSyntaxRouter) RegisterSyntaxGRPC(s *grpc.Server) RegisterSyntaxGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error RegisterSyntaxGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error diff --git a/internal/e2e/cli_client_test.go b/internal/e2e/cli_client_test.go index 5ea581fd8..feda1bddc 100644 --- a/internal/e2e/cli_client_test.go +++ b/internal/e2e/cli_client_test.go @@ -13,11 +13,10 @@ import ( "time" "github.com/ory/keto/ketoapi" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" "github.com/ory/herodot" - "github.com/ory/keto/internal/check" - grpcHealthV1 "google.golang.org/grpc/health/grpc_health_v1" "github.com/ory/keto/cmd/status" @@ -112,7 +111,7 @@ func (g *cliClient) check(t require.TestingT, r *ketoapi.RelationTuple) bool { sub = r.SubjectSet.String() } out := g.c.ExecNoErr(t, "check", sub, r.Relation, r.Namespace, r.Object) - var res check.CheckPermissionResult + var res rts.CheckResponse require.NoError(t, json.Unmarshal([]byte(out), &res)) return res.Allowed } diff --git a/internal/e2e/rest_client_test.go b/internal/e2e/rest_client_test.go index 149285ea7..b0192f72b 100644 --- a/internal/e2e/rest_client_test.go +++ b/internal/e2e/rest_client_test.go @@ -16,6 +16,7 @@ import ( "github.com/ory/keto/internal/schema" "github.com/ory/keto/ketoapi" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" "github.com/ory/herodot" "github.com/tidwall/gjson" @@ -134,14 +135,14 @@ func (rc *restClient) check(t require.TestingT, r *ketoapi.RelationTuple) bool { q := r.ToURLQuery() bodyGet, codeGet := rc.makeRequest(t, http.MethodGet, fmt.Sprintf("%s?%s", check.RouteBase, q.Encode()), "", rc.readURL) - var respGet check.CheckPermissionResult + var respGet rts.CheckResponse require.NoError(t, json.Unmarshal([]byte(bodyGet), &respGet)) j, err := json.Marshal(r) require.NoError(t, err) bodyPost, codePost := rc.makeRequest(t, http.MethodPost, check.RouteBase, string(j), rc.readURL) - var respPost check.CheckPermissionResult + var respPost rts.CheckResponse require.NoError(t, json.Unmarshal([]byte(bodyPost), &respPost)) if codeGet == http.StatusOK && codePost == http.StatusOK { diff --git a/internal/expand/handler.go b/internal/expand/handler.go index 6c09d8a2b..785452431 100644 --- a/internal/expand/handler.go +++ b/internal/expand/handler.go @@ -5,14 +5,11 @@ package expand import ( "context" - "net/http" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/ory/keto/ketoapi" - "github.com/julienschmidt/httprouter" - "github.com/ory/herodot" "google.golang.org/grpc" "github.com/ory/keto/internal/relationtuple" @@ -35,7 +32,6 @@ type ( var ( _ rts.ExpandServiceServer = (*handler)(nil) - _ *expandPermissions = nil ) const RouteBase = "/relation-tuples/expand" @@ -44,10 +40,6 @@ func NewHandler(d handlerDependencies) *handler { return &handler{d: d} } -func (h *handler) RegisterReadRoutes(r *x.ReadRouter) { - r.GET(RouteBase, h.getExpand) -} - func (h *handler) RegisterReadGRPC(s *grpc.Server) { rts.RegisterExpandServiceServer(s, h) } @@ -56,69 +48,7 @@ func (h *handler) RegisterReadGRPCGateway(ctx context.Context, mux *runtime.Serv return rts.RegisterExpandServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) } func (h *handler) RegisterReadGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return rts.RegisterReadServiceHandler(ctx, mux, conn) -} - -// Expand Permissions Request Parameters -// -// swagger:parameters expandPermissions -type expandPermissions struct { - // in:query - MaxDepth int `json:"max-depth"` - // in:query - ketoapi.SubjectSet -} - -// swagger:route GET /relation-tuples/expand permission expandPermissions -// -// # Expand a Relationship into permissions. -// -// Use this endpoint to expand a relationship tuple into permissions. -// -// Consumes: -// - application/x-www-form-urlencoded -// -// Produces: -// - application/json -// -// Schemes: http, https -// -// Responses: -// 200: expandedPermissionTree -// 400: errorGeneric -// 404: errorGeneric -// default: errorGeneric -func (h *handler) getExpand(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { - maxDepth, err := x.GetMaxDepthFromQuery(r.URL.Query()) - if err != nil { - h.d.Writer().WriteError(w, r, herodot.ErrBadRequest.WithError(err.Error())) - return - } - - subSet := (&ketoapi.SubjectSet{}).FromURLQuery(r.URL.Query()) - internal, err := h.d.ReadOnlyMapper().FromSubjectSet(r.Context(), subSet) - if err != nil { - h.d.Writer().WriteError(w, r, err) - return - } - - res, err := h.d.ExpandEngine().BuildTree(r.Context(), internal, maxDepth) - if err != nil { - h.d.Writer().WriteError(w, r, err) - return - } - if res == nil { - h.d.Writer().Write(w, r, herodot.ErrNotFound.WithError("no relation tuple found")) - return - } - - tree, err := h.d.ReadOnlyMapper().ToTree(r.Context(), res) - if err != nil { - h.d.Writer().WriteError(w, r, err) - return - } - - h.d.Writer().Write(w, r, tree) + return rts.RegisterExpandServiceHandler(ctx, mux, conn) } func (h *handler) Expand(ctx context.Context, req *rts.ExpandRequest) (*rts.ExpandResponse, error) { diff --git a/internal/expand/handler_test.go b/internal/expand/handler_test.go index 2b64e907c..9a791ba9f 100644 --- a/internal/expand/handler_test.go +++ b/internal/expand/handler_test.go @@ -9,39 +9,33 @@ import ( "encoding/json" "io" "net/http" - "net/http/httptest" "net/url" "testing" "github.com/ory/x/pointerx" - - "github.com/ory/keto/ketoapi" - - "github.com/ory/keto/internal/driver/config" - - "github.com/julienschmidt/httprouter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/ory/keto/internal/driver" + "github.com/ory/keto/internal/driver/config" "github.com/ory/keto/internal/expand" "github.com/ory/keto/internal/namespace" "github.com/ory/keto/internal/relationtuple" "github.com/ory/keto/internal/x" + "github.com/ory/keto/ketoapi" ) func TestRESTHandler(t *testing.T) { - nspace := &namespace.Namespace{ - Name: "expand handler", - } + nspaces := []*namespace.Namespace{{Name: "expand handler"}} + nspace := nspaces[0] + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() reg := driver.NewSqliteTestRegistry(t, false) - require.NoError(t, reg.Config(context.Background()).Set(config.KeyNamespaces, []*namespace.Namespace{nspace})) - h := expand.NewHandler(reg) - r := httprouter.New() - h.RegisterReadRoutes(&x.ReadRouter{Router: r}) - ts := httptest.NewServer(r) - defer ts.Close() + require.NoError(t, reg.Config(ctx).Set(config.KeyNamespaces, nspaces)) + + endpoints := x.NewTestEndpoints(t, expand.NewHandler(reg)) + ts := endpoints.HTTP t.Run("case=returns bad request on malformed int", func(t *testing.T) { resp, err := ts.Client().Get(ts.URL + expand.RouteBase + "?max-depth=foo") diff --git a/internal/namespace/namespacehandler/handler.go b/internal/namespace/namespacehandler/handler.go index 990405701..d59e5fa86 100644 --- a/internal/namespace/namespacehandler/handler.go +++ b/internal/namespace/namespacehandler/handler.go @@ -5,10 +5,8 @@ package namespacehandler import ( "context" - "net/http" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/julienschmidt/httprouter" "github.com/ory/herodot" "google.golang.org/grpc" @@ -36,10 +34,6 @@ func New(d handlerDeps) *handler { return &handler{d} } -func (h *handler) RegisterReadRoutes(r *x.ReadRouter) { - r.GET(RouteBase, h.getNamespaces) -} - func (h *handler) RegisterReadGRPC(s *grpc.Server) { rts.RegisterNamespacesServiceServer(s, h) } @@ -68,26 +62,3 @@ func (h *handler) ListNamespaces(ctx context.Context, _ *rts.ListNamespacesReque } return &rts.ListNamespacesResponse{Namespaces: apiNamespaces}, nil } - -// swagger:route GET /namespaces relationship listRelationshipNamespaces -// -// # Query namespaces -// -// Get all namespaces -// -// Produces: -// - application/json -// -// Schemes: http, https -// -// Responses: -// 200: relationshipNamespaces -// default: errorGeneric -func (h *handler) getNamespaces(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { - res, err := h.ListNamespaces(r.Context(), nil) - if err != nil { - h.Writer().WriteError(w, r, err) - return - } - h.Writer().Write(w, r, res) -} diff --git a/internal/relationtuple/handler.go b/internal/relationtuple/handler.go index a6c40b60b..2f32171ee 100644 --- a/internal/relationtuple/handler.go +++ b/internal/relationtuple/handler.go @@ -38,16 +38,6 @@ func NewHandler(d handlerDeps) *handler { } } -func (h *handler) RegisterReadRoutes(r *x.ReadRouter) { - r.GET(ReadRouteBase, h.getRelations) -} - -func (h *handler) RegisterWriteRoutes(r *x.WriteRouter) { - r.PUT(WriteRouteBase, h.createRelation) - r.DELETE(WriteRouteBase, h.deleteRelations) - r.PATCH(WriteRouteBase, h.patchRelationTuples) -} - func (h *handler) RegisterReadGRPC(s *grpc.Server) { rts.RegisterReadServiceServer(s, h) } diff --git a/internal/relationtuple/read_server.go b/internal/relationtuple/read_server.go index 9bded22b3..eb0f8f5c9 100644 --- a/internal/relationtuple/read_server.go +++ b/internal/relationtuple/read_server.go @@ -5,8 +5,6 @@ package relationtuple import ( "context" - "net/http" - "strconv" "github.com/ory/x/pointerx" @@ -14,10 +12,6 @@ import ( rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" - "github.com/ory/herodot" - - "github.com/julienschmidt/httprouter" - "github.com/ory/keto/internal/x" ) @@ -111,76 +105,3 @@ func (h *handler) ListRelationTuples(ctx context.Context, req *rts.ListRelationT return resp, nil } - -// swagger:route GET /relation-tuples relationship getRelationships -// -// # Query relationships -// -// Get all relationships that match the query. Only the namespace field is required. -// -// Consumes: -// - application/x-www-form-urlencoded -// -// Produces: -// - application/json -// -// Schemes: http, https -// -// Responses: -// 200: relationships -// 404: errorGeneric -// default: errorGeneric -func (h *handler) getRelations(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { - ctx := r.Context() - - q := r.URL.Query() - query, err := (&ketoapi.RelationQuery{}).FromURLQuery(q) - if err != nil { - h.d.Writer().WriteError(w, r, herodot.ErrBadRequest.WithError(err.Error())) - return - } - - l := h.d.Logger() - for k := range q { - l = l.WithField(k, q.Get(k)) - } - l.Debug("querying relationships") - - var paginationOpts []x.PaginationOptionSetter - if pageToken := q.Get("page_token"); pageToken != "" { - paginationOpts = append(paginationOpts, x.WithToken(pageToken)) - } - - if pageSize := q.Get("page_size"); pageSize != "" { - s, err := strconv.ParseInt(pageSize, 0, 0) - if err != nil { - h.d.Writer().WriteError(w, r, herodot.ErrBadRequest.WithError(err.Error())) - return - } - paginationOpts = append(paginationOpts, x.WithSize(int(s))) - } - - iq, err := h.d.ReadOnlyMapper().FromQuery(ctx, query) - if err != nil { - h.d.Writer().WriteError(w, r, err) - return - } - ir, nextPage, err := h.d.RelationTupleManager().GetRelationTuples(ctx, iq, paginationOpts...) - if err != nil { - h.d.Writer().WriteError(w, r, err) - return - } - - relations, err := h.d.ReadOnlyMapper().ToTuple(ctx, ir...) - if err != nil { - h.d.Writer().WriteError(w, r, err) - return - } - - resp := &ketoapi.GetResponse{ - RelationTuples: relations, - NextPageToken: nextPage, - } - - h.d.Writer().Write(w, r, resp) -} diff --git a/internal/relationtuple/swagger_definitions.go b/internal/relationtuple/swagger_definitions.go deleted file mode 100644 index 24bf0eda6..000000000 --- a/internal/relationtuple/swagger_definitions.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright © 2023 Ory Corp -// SPDX-License-Identifier: Apache-2.0 - -package relationtuple - -import ( - "github.com/ory/keto/internal/x" - "github.com/ory/keto/ketoapi" -) - -var ( - _ = (*patchRelationships)(nil) - _ = (*getRelationships)(nil) - _ = (*relationshipInQuery)(nil) -) - -// Patch Relationships Request Parameters -// -// swagger:parameters patchRelationships -type patchRelationships struct { - // in:body - Body []*ketoapi.PatchDelta -} - -// Get Relationships Request Parameters -// -// swagger:parameters getRelationships -type getRelationships struct { - // Namespace of the Relationship - // - // in: query - Namespace string `json:"namespace"` - - // Object of the Relationship - // - // in: query - Object string `json:"object"` - - // Relation of the Relationship - // - // in: query - Relation string `json:"relation"` - - // SubjectID of the Relationship - // - // in: query - // Either subject_set.* or subject_id are required. - SubjectID string `json:"subject_id"` - - // Namespace of the Subject Set - // - // in: query - // Either subject_set.* or subject_id are required. - SNamespace string `json:"subject_set.namespace"` - - // Object of the Subject Set - // - // in: query - // Either subject_set.* or subject_id are required. - SObject string `json:"subject_set.object"` - - // Relation of the Subject Set - // - // in: query - // Either subject_set.* or subject_id are required. - SRelation string `json:"subject_set.relation"` - - // swagger:allOf - x.PaginationOptions -} - -// The relationship parameters in the URL query. -// -// swagger:parameters checkPermission checkPermissionOrError deleteRelationships -type relationshipInQuery struct { - // Namespace of the Relationship - // - // in: query - Namespace string `json:"namespace"` - - // Object of the Relationship - // - // in: query - Object string `json:"object"` - - // Relation of the Relationship - // - // in: query - Relation string `json:"relation"` - - // SubjectID of the Relationship - // - // in: query - // Either subject_set.* or subject_id are required. - SubjectID string `json:"subject_id"` - - // Namespace of the Subject Set - // - // in: query - // Either subject_set.* or subject_id are required. - SNamespace string `json:"subject_set.namespace"` - - // Object of the Subject Set - // - // in: query - // Either subject_set.* or subject_id are required. - SObject string `json:"subject_set.object"` - - // Relation of the Subject Set - // - // in: query - // Either subject_set.* or subject_id are required. - SRelation string `json:"subject_set.relation"` -} diff --git a/internal/relationtuple/transact_server.go b/internal/relationtuple/transact_server.go index 7c6f97206..46d75a7b1 100644 --- a/internal/relationtuple/transact_server.go +++ b/internal/relationtuple/transact_server.go @@ -5,17 +5,13 @@ package relationtuple import ( "context" - "encoding/json" - "net/http" - "github.com/julienschmidt/httprouter" "github.com/ory/herodot" "github.com/pkg/errors" "google.golang.org/grpc" "google.golang.org/grpc/metadata" "github.com/ory/keto/internal/x/events" - "github.com/ory/keto/internal/x/validate" "github.com/ory/keto/ketoapi" rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" ) @@ -137,212 +133,3 @@ func (h *handler) DeleteRelationTuples(ctx context.Context, req *rts.DeleteRelat _ = grpc.SetHeader(ctx, metadata.Pairs("x-http-code", "204")) return &rts.DeleteRelationTuplesResponse{}, nil } - -// Create Relationship Request Parameters -// -// swagger:parameters createRelationship -// nolint:deadcode,unused -type createRelationship struct { - // in: body - Body createRelationshipBody -} - -// Create Relationship Request Body -// -// swagger:model createRelationshipBody -// nolint:deadcode,unused -type createRelationshipBody struct { - ketoapi.RelationQuery -} - -// swagger:route PUT /admin/relation-tuples relationship createRelationship -// -// # Create a Relationship -// -// Use this endpoint to create a relationship. -// -// Consumes: -// - application/json -// -// Produces: -// - application/json -// -// Schemes: http, https -// -// Responses: -// 201: relationship -// 400: errorGeneric -// default: errorGeneric -func (h *handler) createRelation(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { - ctx := r.Context() - - events.Add(ctx, h.d, events.RelationtuplesCreated) - - var rt ketoapi.RelationTuple - if err := json.NewDecoder(r.Body).Decode(&rt); err != nil { - h.d.Writer().WriteError(w, r, errors.WithStack(herodot.ErrBadRequest.WithError(err.Error()))) - return - } - - if err := rt.Validate(); err != nil { - h.d.Writer().WriteError(w, r, err) - return - } - - h.d.Logger().WithFields(rt.ToLoggerFields()).Debug("creating relation tuple") - - it, err := h.d.Mapper().FromTuple(ctx, &rt) - if err != nil { - h.d.Logger().WithError(err).WithFields(rt.ToLoggerFields()).Errorf("could not map relation tuple to UUIDs") - h.d.Writer().WriteError(w, r, err) - return - } - if err := h.d.RelationTupleManager().WriteRelationTuples(ctx, it...); err != nil { - h.d.Logger().WithError(err).WithFields(rt.ToLoggerFields()).Errorf("got an error while creating the relation tuple") - h.d.Writer().WriteError(w, r, err) - return - } - - h.d.Writer().WriteCreated(w, r, - ReadRouteBase+"?"+rt.ToURLQuery().Encode(), - &rt, - ) -} - -// swagger:route DELETE /admin/relation-tuples relationship deleteRelationships -// -// # Delete Relationships -// -// Use this endpoint to delete relationships -// -// Consumes: -// - application/x-www-form-urlencoded -// -// Produces: -// - application/json -// -// Schemes: http, https -// -// Responses: -// 204: emptyResponse -// 400: errorGeneric -// default: errorGeneric -func (h *handler) deleteRelations(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { - ctx := r.Context() - - events.Add(ctx, h.d, events.RelationtuplesDeleted) - - if err := validate.All(r, - validate.NoExtraQueryParams(ketoapi.RelationQueryKeys...), - validate.QueryParamsContainsOneOf(ketoapi.NamespaceKey), - validate.HasEmptyBody(), - ); err != nil { - h.d.Writer().WriteError(w, r, err) - return - } - - q := r.URL.Query() - query, err := (&ketoapi.RelationQuery{}).FromURLQuery(q) - if err != nil { - h.d.Writer().WriteError(w, r, herodot.ErrBadRequest.WithError(err.Error())) - return - } - - l := h.d.Logger() - for k := range q { - l = l.WithField(k, q.Get(k)) - } - l.Debug("deleting relationships") - - iq, err := h.d.ReadOnlyMapper().FromQuery(ctx, query) - if err != nil { - h.d.Logger().WithError(err).Errorf("could not map fields to UUIDs") - h.d.Writer().WriteError(w, r, err) - return - } - if err := h.d.RelationTupleManager().DeleteAllRelationTuples(ctx, iq); err != nil { - l.WithError(err).Errorf("got an error while deleting relationships") - h.d.Writer().WriteError(w, r, herodot.ErrInternalServerError.WithError(err.Error())) - return - } - - w.WriteHeader(http.StatusNoContent) -} - -func internalTuplesWithAction(deltas []*ketoapi.PatchDelta, action ketoapi.PatchAction) (filtered []*ketoapi.RelationTuple) { - for _, d := range deltas { - if d.Action == action { - filtered = append(filtered, d.RelationTuple) - } - } - return -} - -// swagger:route PATCH /admin/relation-tuples relationship patchRelationships -// -// # Patch Multiple Relationships -// -// Use this endpoint to patch one or more relationships. -// -// Consumes: -// - application/json -// -// Produces: -// - application/json -// -// Schemes: http, https -// -// Responses: -// 204: emptyResponse -// 400: errorGeneric -// 404: errorGeneric -// default: errorGeneric -func (h *handler) patchRelationTuples(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { - ctx := r.Context() - - events.Add(ctx, h.d, events.RelationtuplesChanged) - - var deltas []*ketoapi.PatchDelta - if err := json.NewDecoder(r.Body).Decode(&deltas); err != nil { - h.d.Writer().WriteError(w, r, herodot.ErrBadRequest.WithError(err.Error())) - return - } - for _, d := range deltas { - if d.RelationTuple == nil { - h.d.Writer().WriteError(w, r, herodot.ErrBadRequest.WithError("relation_tuple is missing")) - return - } - if err := d.RelationTuple.Validate(); err != nil { - h.d.Writer().WriteError(w, r, err) - return - } - - switch d.Action { - case ketoapi.ActionInsert, ketoapi.ActionDelete: - default: - h.d.Writer().WriteError(w, r, herodot.ErrBadRequest.WithError("unknown action "+string(d.Action))) - return - } - } - - insertTuples := internalTuplesWithAction(deltas, ketoapi.ActionInsert) - deleteTuples := internalTuplesWithAction(deltas, ketoapi.ActionDelete) - - its, err := h.d.Mapper().FromTuple(ctx, append(insertTuples, deleteTuples...)...) - if err != nil { - h.d.Logger().WithError(err).Errorf("got an error while mapping fields to UUID") - h.d.Writer().WriteError(w, r, err) - return - } - if err := h.d.RelationTupleManager(). - TransactRelationTuples( - ctx, - its[:len(insertTuples)], - its[len(insertTuples):]); err != nil { - - h.d.Writer().WriteError(w, r, err) - return - } - - w.WriteHeader(http.StatusNoContent) -} diff --git a/internal/schema/handler.go b/internal/schema/handler.go index a19ea0a13..bdc729d4d 100644 --- a/internal/schema/handler.go +++ b/internal/schema/handler.go @@ -5,17 +5,11 @@ package schema import ( "context" - "io" - "net/http" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/julienschmidt/httprouter" - "github.com/ory/herodot" - "github.com/pkg/errors" "google.golang.org/grpc" "github.com/ory/keto/internal/x" - "github.com/ory/keto/ketoapi" opl "github.com/ory/keto/proto/ory/keto/opl/v1alpha1" ) @@ -35,10 +29,6 @@ func NewHandler(d handlerDependencies) *Handler { return &Handler{d: d} } -func (h *Handler) RegisterSyntaxRoutes(r *x.OPLSyntaxRouter) { - r.POST(RouteBase, h.postCheckOplSyntax) -} - func (h *Handler) RegisterSyntaxGRPC(s *grpc.Server) { opl.RegisterSyntaxServiceServer(s, h) } @@ -58,48 +48,3 @@ func (h *Handler) Check(_ context.Context, request *opl.CheckRequest) (*opl.Chec } return &opl.CheckResponse{Errors: apiErrors}, nil } - -// Check OPL Syntax Request Parameters -// -// swagger:parameters checkOplSyntax -type checkOplSyntax struct { - // in: body - Body checkOplSyntaxBody -} - -// Ory Permission Language Document -// -// swagger:model checkOplSyntaxBody -type checkOplSyntaxBody string - -// swagger:route POST /opl/syntax/check relationship checkOplSyntax -// -// # Check the syntax of an OPL file -// -// The OPL file is expected in the body of the request. -// -// Consumes: -// - text/plain -// -// Produces: -// - application/json -// -// Schemes: http, https -// -// Responses: -// 200: checkOplSyntaxResult -// 400: errorGeneric -// default: errorGeneric -func (h *Handler) postCheckOplSyntax(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { - data, err := io.ReadAll(r.Body) - if err != nil { - h.d.Writer().WriteError(w, r, errors.WithStack(herodot.ErrBadRequest.WithError(err.Error()))) - return - } - _, parseErrors := Parse(string(data)) - apiErrors := make([]*ketoapi.ParseError, len(parseErrors)) - for i, e := range parseErrors { - apiErrors[i] = e.ToAPI() - } - h.d.Writer().Write(w, r, &ketoapi.CheckOPLSyntaxResponse{Errors: apiErrors}) -} From 7a8c33f7f3f3f405d46628793900825d46544666 Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Thu, 23 Feb 2023 15:09:54 +0100 Subject: [PATCH 13/42] refactor: add validation middleware --- .schema/openapi/patches/health.yaml | 1 - Makefile | 2 + internal/driver/daemon.go | 57 ++-- internal/relationtuple/transact_server.go | 15 +- internal/x/helpers.go | 48 +++- internal/x/test_endpoints.go | 33 +-- .../v1alpha2/write_service.pb.go | 267 +++++++++--------- .../v1alpha2/write_service.pb.validate.go | 11 + .../v1alpha2/write_service.proto | 7 +- spec/api.swagger.json | 3 +- 10 files changed, 229 insertions(+), 215 deletions(-) diff --git a/.schema/openapi/patches/health.yaml b/.schema/openapi/patches/health.yaml index e662f65c6..0ae4c0ded 100644 --- a/.schema/openapi/patches/health.yaml +++ b/.schema/openapi/patches/health.yaml @@ -22,7 +22,6 @@ type: object properties: status: - description: Always "ok". type: string description: {{.ProjectHumanName}} is ready to accept connections. '500': diff --git a/Makefile b/Makefile index 42e100976..6ec24765d 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,7 @@ format: .bin/ory .bin/goimports node_modules .bin/ory dev headers copyright --type=open-source --exclude=.bin --exclude=internal/httpclient --exclude=proto .bin/goimports -w -local github.com/ory/keto *.go internal cmd contrib ketoctx ketoapi embedx npm exec -- prettier --write . + buf format -w .PHONY: install install: @@ -102,6 +103,7 @@ build: # .PHONY: buf-gen buf-gen: .bin/buf node_modules + buf format -w buf generate proto make format @echo "All code was generated successfully!" diff --git a/internal/driver/daemon.go b/internal/driver/daemon.go index 0375f5cb2..379501f23 100644 --- a/internal/driver/daemon.go +++ b/internal/driver/daemon.go @@ -13,49 +13,42 @@ import ( "strings" "syscall" + grpcLogrus "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" grpcRecovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/credentials/insecure" - "google.golang.org/grpc/status" - - "github.com/ory/keto/internal/namespace/namespacehandler" - "github.com/ory/keto/internal/schema" - rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" - - prometheus "github.com/ory/x/prometheusx" - grpcOtel "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" - "go.opentelemetry.io/otel" - - "github.com/ory/x/logrusx" - - grpcLogrus "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" "github.com/julienschmidt/httprouter" + "github.com/ory/analytics-go/v4" + "github.com/ory/graceful" "github.com/ory/herodot" + "github.com/ory/x/healthx" + "github.com/ory/x/logrusx" + "github.com/ory/x/metricsx" + "github.com/ory/x/otelx" + prometheus "github.com/ory/x/prometheusx" "github.com/ory/x/reqlog" + "github.com/pkg/errors" "github.com/rs/cors" + "github.com/soheilhy/cmux" + "github.com/spf13/cobra" "github.com/urfave/negroni" + grpcOtel "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" + "go.opentelemetry.io/otel" + "golang.org/x/sync/errgroup" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/credentials/insecure" grpcHealthV1 "google.golang.org/grpc/health/grpc_health_v1" "google.golang.org/grpc/reflection" + "google.golang.org/grpc/status" "github.com/ory/keto/internal/check" + "github.com/ory/keto/internal/driver/config" "github.com/ory/keto/internal/expand" + "github.com/ory/keto/internal/namespace/namespacehandler" "github.com/ory/keto/internal/relationtuple" + "github.com/ory/keto/internal/schema" "github.com/ory/keto/internal/x" - - "github.com/ory/analytics-go/v4" - "github.com/ory/x/healthx" - "github.com/ory/x/metricsx" - "github.com/ory/x/otelx" - "github.com/spf13/cobra" - - "github.com/ory/keto/internal/driver/config" - - "github.com/ory/graceful" - "github.com/pkg/errors" - "github.com/soheilhy/cmux" - "golang.org/x/sync/errgroup" - "google.golang.org/grpc" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" ) func (r *RegistryDefault) enableSqa(cmd *cobra.Command) { @@ -493,10 +486,8 @@ func (r *RegistryDefault) unaryInterceptors(ctx context.Context) []grpc.UnarySer is = append(is, grpcOtel.UnaryServerInterceptor(grpcOtel.WithTracerProvider(otel.GetTracerProvider()))) } is = append(is, r.defaultUnaryInterceptors...) - is = append(is, - herodot.UnaryErrorUnwrapInterceptor, - grpcLogrus.UnaryServerInterceptor(r.l.Entry), - ) + is = append(is, grpcLogrus.UnaryServerInterceptor(r.l.Entry)) + is = append(is, x.GlobalGRPCUnaryServerInterceptors...) if r.sqaService != nil { is = append(is, r.sqaService.UnaryInterceptor) } diff --git a/internal/relationtuple/transact_server.go b/internal/relationtuple/transact_server.go index 46d75a7b1..4f566656a 100644 --- a/internal/relationtuple/transact_server.go +++ b/internal/relationtuple/transact_server.go @@ -21,7 +21,7 @@ var _ rts.WriteServiceServer = (*handler)(nil) func protoTuplesWithAction(deltas []*rts.RelationTupleDelta, action rts.RelationTupleDelta_Action) (filtered []*ketoapi.RelationTuple, err error) { for _, d := range deltas { if d.Action == action { - it, err := (&ketoapi.RelationTuple{}).FromDataProvider(&ketoapi.OpenAPITupleData{d.RelationTuple}) + it, err := (&ketoapi.RelationTuple{}).FromDataProvider(&ketoapi.OpenAPITupleData{Wrapped: d.RelationTuple}) if err != nil { return nil, err } @@ -34,10 +34,6 @@ func protoTuplesWithAction(deltas []*rts.RelationTupleDelta, action rts.Relation func (h *handler) TransactRelationTuples(ctx context.Context, req *rts.TransactRelationTuplesRequest) (*rts.TransactRelationTuplesResponse, error) { events.Add(ctx, h.d, events.RelationtuplesChanged) - if err := req.ValidateAll(); err != nil { - return nil, herodot.ErrBadRequest.WithWrap(err).WithReason(err.Error()) - } - insertTuples, err := protoTuplesWithAction(req.RelationTupleDeltas, rts.RelationTupleDelta_ACTION_INSERT) if err != nil { return nil, err @@ -69,18 +65,11 @@ func (h *handler) TransactRelationTuples(ctx context.Context, req *rts.TransactR } func (h *handler) CreateRelationTuple(ctx context.Context, request *rts.CreateRelationTupleRequest) (*rts.CreateRelationTupleResponse, error) { - if request.RelationTuple == nil { - return nil, errors.WithStack(herodot.ErrBadRequest.WithReason("invalid request: missing relation_tuple")) - } - tuple, err := (&ketoapi.RelationTuple{}).FromDataProvider(&ketoapi.OpenAPITupleData{request.RelationTuple}) + tuple, err := (&ketoapi.RelationTuple{}).FromDataProvider(&ketoapi.OpenAPITupleData{Wrapped: request.RelationTuple}) if err != nil { return nil, err } - if err := tuple.Validate(); err != nil { - return nil, err - } - mapped, err := h.d.Mapper().FromTuple(ctx, tuple) if err != nil { return nil, err diff --git a/internal/x/helpers.go b/internal/x/helpers.go index e1b7d80d1..5025ddc5f 100644 --- a/internal/x/helpers.go +++ b/internal/x/helpers.go @@ -12,9 +12,12 @@ import ( "github.com/gofrs/uuid" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/ory/herodot" "google.golang.org/genproto/googleapis/rpc/errdetails" + "google.golang.org/grpc" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" ) @@ -29,7 +32,7 @@ func UUIDs(n int) []uuid.UUID { var GRPCGatewayMuxOptions = []runtime.ServeMuxOption{ runtime.WithForwardResponseOption(HttpResponseModifier), - runtime.WithMetadata(func(ctx context.Context, req *http.Request) metadata.MD { + runtime.WithMetadata(func(_ context.Context, req *http.Request) metadata.MD { md := make(metadata.MD) contentLength, _ := strconv.Atoi(req.Header.Get("Content-Length")) @@ -78,3 +81,46 @@ var GRPCGatewayMuxOptions = []runtime.ServeMuxOption{ _, _ = w.Write(buf) }), } + +var GlobalGRPCUnaryServerInterceptors = []grpc.UnaryServerInterceptor{ + herodot.UnaryErrorUnwrapInterceptor, + validationInterceptor, +} + +func HttpResponseModifier(ctx context.Context, w http.ResponseWriter, _ proto.Message) error { + md, ok := runtime.ServerMetadataFromContext(ctx) + if !ok { + return nil + } + + delete(w.Header(), "Grpc-Metadata-Content-Type") + + if vals := md.HeaderMD.Get("x-http-location"); len(vals) > 0 { + w.Header().Add("location", vals[0]) + } + + // set http status code + if vals := md.HeaderMD.Get("x-http-code"); len(vals) > 0 { + code, err := strconv.Atoi(vals[0]) + if err != nil { + return err + } + // delete the headers to not expose any grpc-metadata in http response + delete(md.HeaderMD, "x-http-code") + delete(w.Header(), "Grpc-Metadata-X-Http-Code") + w.WriteHeader(code) + } + + return nil +} + +type validator interface{ ValidateAll() error } + +var validationInterceptor grpc.UnaryServerInterceptor = func(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { + if r, ok := req.(validator); ok { + if err := r.ValidateAll(); err != nil { + return nil, herodot.ErrBadRequest.WithWrap(err).WithReason(err.Error()) + } + } + return handler(ctx, req) +} diff --git a/internal/x/test_endpoints.go b/internal/x/test_endpoints.go index c5f0c7c73..e848a4640 100644 --- a/internal/x/test_endpoints.go +++ b/internal/x/test_endpoints.go @@ -6,18 +6,14 @@ package x import ( "context" "net" - "net/http" "net/http/httptest" - "strconv" "testing" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/ory/herodot" "github.com/stretchr/testify/require" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/test/bufconn" - "google.golang.org/protobuf/proto" ) type ( @@ -39,33 +35,6 @@ type ( } ) -func HttpResponseModifier(ctx context.Context, w http.ResponseWriter, p proto.Message) error { - md, ok := runtime.ServerMetadataFromContext(ctx) - if !ok { - return nil - } - - delete(w.Header(), "Grpc-Metadata-Content-Type") - - if vals := md.HeaderMD.Get("x-http-location"); len(vals) > 0 { - w.Header().Add("location", vals[0]) - } - - // set http status code - if vals := md.HeaderMD.Get("x-http-code"); len(vals) > 0 { - code, err := strconv.Atoi(vals[0]) - if err != nil { - return err - } - // delete the headers to not expose any grpc-metadata in http response - delete(md.HeaderMD, "x-http-code") - delete(w.Header(), "Grpc-Metadata-X-Http-Code") - w.WriteHeader(code) - } - - return nil -} - func NewTestEndpoints( t *testing.T, handler any, @@ -76,7 +45,7 @@ func NewTestEndpoints( l := bufconn.Listen(1024 * 1024) t.Cleanup(func() { _ = l.Close() }) s := grpc.NewServer( - grpc.ChainUnaryInterceptor(herodot.UnaryErrorUnwrapInterceptor), + grpc.ChainUnaryInterceptor(GlobalGRPCUnaryServerInterceptors...), ) if h, ok := handler.(readHandler); ok { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go index 4527f7880..71115001d 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go @@ -785,154 +785,155 @@ var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDesc = []byte{ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, - 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0xf2, 0x02, 0x0a, 0x1a, + 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0xff, 0x02, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x71, 0x0a, 0x0e, 0x72, 0x65, + 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x7e, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0d, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x1a, 0xe0, 0x01, - 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x1c, + 0x74, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x42, 0x0b, + 0xe0, 0x41, 0x02, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x1a, 0xe0, 0x01, 0x0a, 0x0c, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, + 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, + 0x51, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, + 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x76, 0x0a, + 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x22, 0x92, 0x05, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x70, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x14, 0x18, 0x01, 0xfa, 0xd2, + 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, + 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, + 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x5a, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, + 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x73, 0x65, 0x74, 0x1a, 0x9f, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x20, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x69, 0x64, 0x12, 0x51, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x5f, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x22, 0x76, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x57, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x22, 0x92, 0x05, 0x0a, 0x1b, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x70, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x14, 0x18, - 0x01, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, - 0x47, 0x45, 0x52, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x0e, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, - 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x06, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, - 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x5a, 0x0a, 0x0b, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x32, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x1a, 0x9f, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x73, - 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x1e, 0x0a, - 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb8, 0x07, - 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xaf, - 0x02, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x40, 0x2e, 0x6f, 0x72, 0x79, 0x2e, - 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x6f, 0x72, - 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, + 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, + 0x70, 0x69, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x1e, 0x0a, 0x1c, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb8, 0x07, 0x0a, 0x0c, 0x57, + 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xaf, 0x02, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8f, - 0x01, 0x92, 0x41, 0x57, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, - 0x69, 0x70, 0x2a, 0x12, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x4a, 0x33, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x2c, 0x0a, - 0x12, 0x41, 0x6e, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x22, 0x16, 0x0a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x12, 0x02, 0x7b, 0x7d, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2f, 0x3a, 0x15, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x32, 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x12, 0xd4, 0x02, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x3d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x40, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, + 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbd, 0x01, 0x92, 0x41, 0x7c, 0x0a, 0x0c, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x12, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x4a, - 0x58, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x51, 0x0a, 0x19, 0x54, 0x68, 0x65, 0x20, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, - 0x69, 0x70, 0x2e, 0x12, 0x34, 0x0a, 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x3a, - 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x62, - 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x1a, - 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x9e, 0x02, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x12, 0x3e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x3f, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x84, 0x01, 0x92, 0x41, 0x63, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x32, 0x21, 0x61, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, - 0x72, 0x6d, 0x2d, 0x75, 0x72, 0x6c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x4a, 0x1b, 0x0a, - 0x03, 0x32, 0x30, 0x34, 0x12, 0x14, 0x0a, 0x12, 0x41, 0x6e, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, - 0x2a, 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x42, 0xc2, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8f, 0x01, 0x92, 0x41, + 0x57, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, + 0x12, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, + 0x69, 0x70, 0x73, 0x4a, 0x33, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x2c, 0x0a, 0x12, 0x41, 0x6e, + 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x22, 0x16, 0x0a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x6a, 0x73, 0x6f, 0x6e, 0x12, 0x02, 0x7b, 0x7d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x15, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x64, + 0x65, 0x6c, 0x74, 0x61, 0x73, 0x32, 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0xd4, 0x02, + 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x3d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbd, 0x01, 0x92, 0x41, 0x7c, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x4a, 0x58, 0x0a, 0x03, + 0x32, 0x30, 0x31, 0x12, 0x51, 0x0a, 0x19, 0x54, 0x68, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, + 0x12, 0x34, 0x0a, 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x3a, 0x0e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x62, 0x0e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x1a, 0x16, 0x2f, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x12, 0x9e, 0x02, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x3e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x32, 0x42, 0x11, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, - 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, - 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, + 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x84, + 0x01, 0x92, 0x41, 0x63, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, + 0x69, 0x70, 0x2a, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x32, 0x21, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, 0x72, 0x6d, 0x2d, + 0x75, 0x72, 0x6c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x4a, 0x1b, 0x0a, 0x03, 0x32, 0x30, + 0x34, 0x12, 0x14, 0x0a, 0x12, 0x41, 0x6e, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x42, 0xc2, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x11, + 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, + 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, + 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.validate.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.validate.go index 3dcbd85f3..9107a5b74 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.validate.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.validate.go @@ -455,6 +455,17 @@ func (m *CreateRelationTupleRequest) validate(all bool) error { var errors []error + if m.GetRelationTuple() == nil { + err := CreateRelationTupleRequestValidationError{ + field: "RelationTuple", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + if all { switch v := interface{}(m.GetRelationTuple()).(type) { case interface{ ValidateAll() error }: diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto index 20eb81274..e74e6014a 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.proto @@ -159,6 +159,8 @@ message CreateRelationTupleRequest { string relation = 3; oneof subject { + // option (validate.required) = true; + // A concrete id of the subject. string subject_id = 5 [json_name = "subject_id"]; // A subject set that expands to more Subjects. @@ -167,7 +169,10 @@ message CreateRelationTupleRequest { } } // The relationship to create. - Relationship relation_tuple = 1; + Relationship relation_tuple = 1 [ + (google.api.field_behavior) = REQUIRED, + (validate.rules).message.required = true + ]; } // The response from creating a new relationship. diff --git a/spec/api.swagger.json b/spec/api.swagger.json index 5bbb4e20c..be1efa2ba 100755 --- a/spec/api.swagger.json +++ b/spec/api.swagger.json @@ -113,7 +113,8 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/createRelationshipBody" + "$ref": "#/definitions/createRelationshipBody", + "required": ["relationTuple"] } } ], From f9e5646088772368c29f10d723dae9950133a686 Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Thu, 23 Feb 2023 15:16:27 +0100 Subject: [PATCH 14/42] chore: clean up swagger comments --- doc.go | 22 ---------------------- doc_swagger.go | 24 ------------------------ internal/swagger_types.go | 10 ---------- ketoapi/public_api_definitions.go | 26 +------------------------- 4 files changed, 1 insertion(+), 81 deletions(-) delete mode 100644 doc.go delete mode 100644 doc_swagger.go delete mode 100644 internal/swagger_types.go diff --git a/doc.go b/doc.go deleted file mode 100644 index 63207783f..000000000 --- a/doc.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright © 2023 Ory Corp -// SPDX-License-Identifier: Apache-2.0 - -// Package main ORY Keto -// -// Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs. -// -// Schemes: http, https -// Host: -// BasePath: / -// Version: Latest -// License: Apache 2.0 https://github.com/ory/keto/blob/master/LICENSE -// Contact: ORY https://www.ory.sh -// -// Consumes: -// - application/json -// -// Produces: -// - application/json -// -// swagger:meta -package main diff --git a/doc_swagger.go b/doc_swagger.go deleted file mode 100644 index c5ab14edb..000000000 --- a/doc_swagger.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright © 2023 Ory Corp -// SPDX-License-Identifier: Apache-2.0 - -package main - -import "github.com/ory/herodot" - -// JSON API Error Response -// -// The standard Ory JSON API error format. -// -// swagger:model errorGeneric -type errorGeneric struct { - // Contains error details - // - // required: true - Error herodot.DefaultError `json:"error"` -} - -// An empty response -// -// swagger:response emptyResponse -// nolint:deadcode,unused -type emptyResponse struct{} diff --git a/internal/swagger_types.go b/internal/swagger_types.go deleted file mode 100644 index 9aea9a242..000000000 --- a/internal/swagger_types.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright © 2023 Ory Corp -// SPDX-License-Identifier: Apache-2.0 - -package internal - -// Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 204. -// -// swagger:response emptyResponse -// nolint:deadcode,unused -type emptyResponse struct{} diff --git a/ketoapi/public_api_definitions.go b/ketoapi/public_api_definitions.go index 1e96eac56..8e08e3c9b 100644 --- a/ketoapi/public_api_definitions.go +++ b/ketoapi/public_api_definitions.go @@ -23,15 +23,11 @@ var ( ErrUnknownNodeType = errors.New("unknown node type") ) -// swagger:model namespace type Namespace struct { // Name of the namespace. Name string `json:"name"` } -// Relationship -// -// swagger:model relationship type RelationTuple struct { // Namespace of the Relation Tuple // @@ -56,12 +52,9 @@ type RelationTuple struct { // SubjectSet of the Relation Tuple // // Either SubjectSet or SubjectID can be provided. - // - // swagger:allOf SubjectSet *SubjectSet `json:"subject_set,omitempty"` } -// swagger:model subjectSet type SubjectSet struct { // Namespace of the Subject Set // @@ -79,9 +72,6 @@ type SubjectSet struct { Relation string `json:"relation"` } -// Relation Query -// -// swagger:model relationQuery type RelationQuery struct { // Namespace to query Namespace *string `json:"namespace"` @@ -99,20 +89,15 @@ type RelationQuery struct { // SubjectSet to query // // Either SubjectSet or SubjectID can be provided. - // - // swagger:allOf SubjectSet *SubjectSet `json:"subject_set,omitempty"` } -// Payload for patching a relationship -// -// swagger:model relationshipPatch +// Payload for patching a relationship. type PatchDelta struct { Action PatchAction `json:"action"` RelationTuple *RelationTuple `json:"relation_tuple"` } -// swagger:enum PatchAction type PatchAction string const ( @@ -142,8 +127,6 @@ var RelationQueryKeys = []string{ } // Paginated Relationship List -// -// swagger:model relationships type GetResponse struct { RelationTuples []*RelationTuple `json:"relation_tuples"` // The opaque token to provide in a subsequent request @@ -153,8 +136,6 @@ type GetResponse struct { } // Relationship Namespace List -// -// swagger:model relationshipNamespaces type GetNamespacesResponse struct { Namespaces []Namespace `json:"namespaces"` } @@ -175,10 +156,8 @@ func (r *RelationTuple) Validate() error { return nil } -// swagger:enum ExpandNodeType type ExpandNodeType TreeNodeType -// swagger:enum TreeNodeType type TreeNodeType string const ( @@ -232,7 +211,6 @@ type Tree[T tuple[T]] struct { // OpenAPI spec, since go-swagger does not understand generics :(. // This can be fixed by using grpc-gateway. -// swagger:model expandedPermissionTree type swaggerOnlyExpandTree struct { // nolint // The type of the node. // @@ -257,8 +235,6 @@ type SourcePosition struct { } // CheckOPLSyntaxResponse represents the response for an OPL syntax check request. -// -// swagger:model checkOplSyntaxResult type CheckOPLSyntaxResponse struct { // The list of syntax errors // From a76905937ffa368bebd05749ebaa6cab0217cf07 Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Thu, 23 Feb 2023 15:21:45 +0100 Subject: [PATCH 15/42] fix: re-add ParseErrors field --- internal/e2e/grpc_client_test.go | 2 +- internal/schema/handler.go | 2 +- proto/buf.md | 7 +- .../keto/opl/v1alpha1/syntax_service.pb.go | 127 ++++++++++-------- .../v1alpha1/syntax_service.pb.validate.go | 34 +++++ .../keto/opl/v1alpha1/syntax_service.proto | 3 +- .../keto/opl/v1alpha1/syntax_service_pb.d.ts | 5 + .../keto/opl/v1alpha1/syntax_service_pb.js | 65 ++++++++- spec/api.swagger.json | 119 ++++++++-------- 9 files changed, 238 insertions(+), 126 deletions(-) diff --git a/internal/e2e/grpc_client_test.go b/internal/e2e/grpc_client_test.go index 0e1fee51e..1244dfad0 100644 --- a/internal/e2e/grpc_client_test.go +++ b/internal/e2e/grpc_client_test.go @@ -240,7 +240,7 @@ func (g *grpcClient) oplCheckSyntax(t require.TestingT, content []byte) (parseEr res, err := c.Check(g.ctx, &opl.CheckRequest{Content: content}) require.NoError(t, err) - raw, err := json.Marshal(res.Errors) + raw, err := json.Marshal(res.ParseErrors) require.NoError(t, err) err = json.Unmarshal(raw, &parseErrors) require.NoError(t, err) diff --git a/internal/schema/handler.go b/internal/schema/handler.go index bdc729d4d..c5cd4987a 100644 --- a/internal/schema/handler.go +++ b/internal/schema/handler.go @@ -46,5 +46,5 @@ func (h *Handler) Check(_ context.Context, request *opl.CheckRequest) (*opl.Chec for i, e := range parseErrors { apiErrors[i] = e.ToProto() } - return &opl.CheckResponse{Errors: apiErrors}, nil + return &opl.CheckResponse{Errors: apiErrors, ParseErrors: apiErrors}, nil } diff --git a/proto/buf.md b/proto/buf.md index d43e1099f..a3cd25ab3 100644 --- a/proto/buf.md +++ b/proto/buf.md @@ -100,9 +100,10 @@ ### CheckResponse -| Field | Type | Label | Description | -| ------ | ----------------------------------------------- | -------- | ----------- | -| errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | | +| Field | Type | Label | Description | +| ------------ | ----------------------------------------------- | -------- | ----------- | +| parse_errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | | +| errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | | diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go index e5900d8ac..7fb1521d5 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go @@ -74,7 +74,8 @@ type CheckResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Errors []*ParseError `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"` + ParseErrors []*ParseError `protobuf:"bytes,1,rep,name=parse_errors,json=parseErrors,proto3" json:"parse_errors,omitempty"` + Errors []*ParseError `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` } func (x *CheckResponse) Reset() { @@ -109,6 +110,13 @@ func (*CheckResponse) Descriptor() ([]byte, []int) { return file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDescGZIP(), []int{1} } +func (x *CheckResponse) GetParseErrors() []*ParseError { + if x != nil { + return x.ParseErrors + } + return nil +} + func (x *CheckResponse) GetErrors() []*ParseError { if x != nil { return x.Errors @@ -248,53 +256,57 @@ var file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDesc = []byte{ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x4a, 0x0a, 0x0d, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, + 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x0d, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, + 0x0c, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, + 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, + 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x73, 0x12, 0x39, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, + 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, + 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x9c, + 0x01, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, + 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x12, 0x37, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x3c, 0x0a, + 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x4c, + 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x32, 0x8b, 0x02, 0x0a, 0x0d, + 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xf9, 0x01, + 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x23, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, - 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x73, - 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, - 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x37, 0x0a, - 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x3c, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x32, 0x8b, 0x02, 0x0a, 0x0d, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xf9, 0x01, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x12, 0x23, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, - 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa4, 0x01, 0x92, 0x41, - 0x7f, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, - 0x0e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x70, 0x6c, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x32, - 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x4a, 0x53, 0x0a, 0x03, 0x32, - 0x30, 0x30, 0x12, 0x4c, 0x0a, 0x20, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x26, 0x1a, 0x24, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, - 0x11, 0x2f, 0x6f, 0x70, 0x6c, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x42, 0x95, 0x01, 0x0a, 0x18, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, - 0x12, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x6f, 0x70, 0x6c, 0x2f, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6f, 0x70, 0x6c, 0xaa, 0x02, 0x15, 0x4f, 0x72, 0x79, - 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x4f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0xca, 0x02, 0x15, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x4f, 0x70, - 0x6c, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xa4, 0x01, 0x92, 0x41, 0x7f, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x0e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x70, 0x6c, + 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x32, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x6c, 0x61, + 0x69, 0x6e, 0x4a, 0x53, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x4c, 0x0a, 0x20, 0x54, 0x68, 0x65, + 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, + 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x28, 0x0a, + 0x26, 0x1a, 0x24, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x07, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x11, 0x2f, 0x6f, 0x70, 0x6c, 0x2f, 0x73, 0x79, 0x6e, + 0x74, 0x61, 0x78, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x95, 0x01, 0x0a, 0x18, 0x73, 0x68, + 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x12, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, + 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, + 0x2f, 0x6f, 0x70, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6f, 0x70, + 0x6c, 0xaa, 0x02, 0x15, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x4f, 0x70, 0x6c, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, 0x4f, 0x72, 0x79, 0x5c, + 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x4f, 0x70, 0x6c, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -317,16 +329,17 @@ var file_ory_keto_opl_v1alpha1_syntax_service_proto_goTypes = []interface{}{ (*SourcePosition)(nil), // 3: ory.keto.opl.v1alpha1.SourcePosition } var file_ory_keto_opl_v1alpha1_syntax_service_proto_depIdxs = []int32{ - 2, // 0: ory.keto.opl.v1alpha1.CheckResponse.errors:type_name -> ory.keto.opl.v1alpha1.ParseError - 3, // 1: ory.keto.opl.v1alpha1.ParseError.start:type_name -> ory.keto.opl.v1alpha1.SourcePosition - 3, // 2: ory.keto.opl.v1alpha1.ParseError.end:type_name -> ory.keto.opl.v1alpha1.SourcePosition - 0, // 3: ory.keto.opl.v1alpha1.SyntaxService.Check:input_type -> ory.keto.opl.v1alpha1.CheckRequest - 1, // 4: ory.keto.opl.v1alpha1.SyntaxService.Check:output_type -> ory.keto.opl.v1alpha1.CheckResponse - 4, // [4:5] is the sub-list for method output_type - 3, // [3:4] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 2, // 0: ory.keto.opl.v1alpha1.CheckResponse.parse_errors:type_name -> ory.keto.opl.v1alpha1.ParseError + 2, // 1: ory.keto.opl.v1alpha1.CheckResponse.errors:type_name -> ory.keto.opl.v1alpha1.ParseError + 3, // 2: ory.keto.opl.v1alpha1.ParseError.start:type_name -> ory.keto.opl.v1alpha1.SourcePosition + 3, // 3: ory.keto.opl.v1alpha1.ParseError.end:type_name -> ory.keto.opl.v1alpha1.SourcePosition + 0, // 4: ory.keto.opl.v1alpha1.SyntaxService.Check:input_type -> ory.keto.opl.v1alpha1.CheckRequest + 1, // 5: ory.keto.opl.v1alpha1.SyntaxService.Check:output_type -> ory.keto.opl.v1alpha1.CheckResponse + 5, // [5:6] is the sub-list for method output_type + 4, // [4:5] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_ory_keto_opl_v1alpha1_syntax_service_proto_init() } diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.validate.go b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.validate.go index d39925890..b54c6be1d 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.validate.go +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.validate.go @@ -158,6 +158,40 @@ func (m *CheckResponse) validate(all bool) error { var errors []error + for idx, item := range m.GetParseErrors() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: fmt.Sprintf("ParseErrors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, CheckResponseValidationError{ + field: fmt.Sprintf("ParseErrors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return CheckResponseValidationError{ + field: fmt.Sprintf("ParseErrors[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + for idx, item := range m.GetErrors() { _, _ = idx, item diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.proto b/proto/ory/keto/opl/v1alpha1/syntax_service.proto index 55ff245c4..6dc97c687 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.proto +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.proto @@ -41,7 +41,8 @@ message CheckRequest { } message CheckResponse { - repeated ParseError errors = 1; + repeated ParseError parse_errors = 1; + repeated ParseError errors = 2; } message ParseError { diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts index 823e9f538..0d2d57c27 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts +++ b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.d.ts @@ -30,6 +30,10 @@ export namespace CheckRequest { } export class CheckResponse extends jspb.Message { + clearParseErrorsList(): void; + getParseErrorsList(): Array; + setParseErrorsList(value: Array): CheckResponse; + addParseErrors(value?: ParseError, index?: number): ParseError; clearErrorsList(): void; getErrorsList(): Array; setErrorsList(value: Array): CheckResponse; @@ -47,6 +51,7 @@ export class CheckResponse extends jspb.Message { export namespace CheckResponse { export type AsObject = { + parseErrorsList: Array, errorsList: Array, } } diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js index ff66fed8f..a024fd933 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js +++ b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js @@ -273,7 +273,7 @@ proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.setContent = function(value) * @private {!Array} * @const */ -proto.ory.keto.opl.v1alpha1.CheckResponse.repeatedFields_ = [1]; +proto.ory.keto.opl.v1alpha1.CheckResponse.repeatedFields_ = [1,2]; @@ -306,6 +306,8 @@ proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.toObject = function(opt_incl */ proto.ory.keto.opl.v1alpha1.CheckResponse.toObject = function(includeInstance, msg) { var f, obj = { + parseErrorsList: jspb.Message.toObjectList(msg.getParseErrorsList(), + proto.ory.keto.opl.v1alpha1.ParseError.toObject, includeInstance), errorsList: jspb.Message.toObjectList(msg.getErrorsList(), proto.ory.keto.opl.v1alpha1.ParseError.toObject, includeInstance) }; @@ -345,6 +347,11 @@ proto.ory.keto.opl.v1alpha1.CheckResponse.deserializeBinaryFromReader = function var field = reader.getFieldNumber(); switch (field) { case 1: + var value = new proto.ory.keto.opl.v1alpha1.ParseError; + reader.readMessage(value,proto.ory.keto.opl.v1alpha1.ParseError.deserializeBinaryFromReader); + msg.addParseErrors(value); + break; + case 2: var value = new proto.ory.keto.opl.v1alpha1.ParseError; reader.readMessage(value,proto.ory.keto.opl.v1alpha1.ParseError.deserializeBinaryFromReader); msg.addErrors(value); @@ -378,7 +385,7 @@ proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.serializeBinary = function() */ proto.ory.keto.opl.v1alpha1.CheckResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getErrorsList(); + f = message.getParseErrorsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, @@ -386,14 +393,22 @@ proto.ory.keto.opl.v1alpha1.CheckResponse.serializeBinaryToWriter = function(mes proto.ory.keto.opl.v1alpha1.ParseError.serializeBinaryToWriter ); } + f = message.getErrorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.ory.keto.opl.v1alpha1.ParseError.serializeBinaryToWriter + ); + } }; /** - * repeated ParseError errors = 1; + * repeated ParseError parse_errors = 1; * @return {!Array} */ -proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.getErrorsList = function() { +proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.getParseErrorsList = function() { return /** @type{!Array} */ ( jspb.Message.getRepeatedWrapperField(this, proto.ory.keto.opl.v1alpha1.ParseError, 1)); }; @@ -403,7 +418,7 @@ proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.getErrorsList = function() { * @param {!Array} value * @return {!proto.ory.keto.opl.v1alpha1.CheckResponse} returns this */ -proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.setErrorsList = function(value) { +proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.setParseErrorsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -413,11 +428,49 @@ proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.setErrorsList = function(val * @param {number=} opt_index * @return {!proto.ory.keto.opl.v1alpha1.ParseError} */ -proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.addErrors = function(opt_value, opt_index) { +proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.addParseErrors = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ory.keto.opl.v1alpha1.ParseError, opt_index); }; +/** + * Clears the list making it empty but non-null. + * @return {!proto.ory.keto.opl.v1alpha1.CheckResponse} returns this + */ +proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.clearParseErrorsList = function() { + return this.setParseErrorsList([]); +}; + + +/** + * repeated ParseError errors = 2; + * @return {!Array} + */ +proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.getErrorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ory.keto.opl.v1alpha1.ParseError, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ory.keto.opl.v1alpha1.CheckResponse} returns this +*/ +proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.setErrorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ory.keto.opl.v1alpha1.ParseError=} opt_value + * @param {number=} opt_index + * @return {!proto.ory.keto.opl.v1alpha1.ParseError} + */ +proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.addErrors = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ory.keto.opl.v1alpha1.ParseError, opt_index); +}; + + /** * Clears the list making it empty but non-null. * @return {!proto.ory.keto.opl.v1alpha1.CheckResponse} returns this diff --git a/spec/api.swagger.json b/spec/api.swagger.json index be1efa2ba..4800b76f5 100755 --- a/spec/api.swagger.json +++ b/spec/api.swagger.json @@ -31,7 +31,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -96,13 +96,13 @@ "201": { "description": "The created relationship.", "schema": { - "$ref": "#/definitions/relationship" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -113,7 +113,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/createRelationshipBody", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship", "required": ["relationTuple"] } } @@ -134,7 +134,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -147,7 +147,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/relationshipDelta" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta" } } } @@ -164,7 +164,7 @@ "200": { "description": "The list of namespaces.", "schema": { - "$ref": "#/definitions/relationshipNamespaces" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse" }, "examples": { "application/json": { @@ -179,7 +179,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -195,13 +195,13 @@ "200": { "description": "The result of the syntax checker", "schema": { - "$ref": "#/definitions/checkOplSyntaxResult" + "$ref": "#/definitions/ory.keto.opl.v1alpha1.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -228,13 +228,13 @@ "200": { "description": "The list of relationships.", "schema": { - "$ref": "#/definitions/relationships" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -316,19 +316,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } } }, @@ -401,19 +401,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } } }, @@ -424,7 +424,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/postCheckPermissionBody" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" } } ], @@ -440,19 +440,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } } }, @@ -525,19 +525,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } } }, @@ -548,7 +548,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/postCheckPermissionBody" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" } } ], @@ -564,13 +564,13 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/expandedPermissionTree" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -624,7 +624,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -633,9 +633,15 @@ } }, "definitions": { - "checkOplSyntaxResult": { + "ory.keto.opl.v1alpha1.CheckResponse": { "type": "object", "properties": { + "parseErrors": { + "type": "array", + "items": { + "$ref": "#/definitions/ory.keto.opl.v1alpha1.ParseError" + } + }, "errors": { "type": "array", "items": { @@ -671,7 +677,7 @@ } } }, - "postCheckPermissionBody": { + "ory.keto.relation_tuples.v1alpha2.CheckRequest": { "type": "object", "properties": { "namespace": { @@ -691,7 +697,7 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/subjectSetQuery", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSetQuery", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." }, "max-depth": { @@ -702,7 +708,7 @@ }, "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object." }, - "checkPermissionResult": { + "ory.keto.relation_tuples.v1alpha2.CheckResponse": { "type": "object", "properties": { "allowed": { @@ -712,7 +718,7 @@ }, "description": "The response for a CheckService.Check rpc." }, - "createRelationshipBody": { + "ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship": { "type": "object", "properties": { "namespace": { @@ -732,7 +738,7 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/subjectSet", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } } @@ -741,7 +747,7 @@ "type": "object", "properties": { "relationTuple": { - "$ref": "#/definitions/relationship", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", "description": "The created relationship." } }, @@ -750,18 +756,18 @@ "ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse": { "type": "object" }, - "errorGeneric": { + "ory.keto.relation_tuples.v1alpha2.ErrorResponse": { "type": "object", "properties": { "error": { - "$ref": "#/definitions/errorGeneric.Error" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error" } }, "description": "The standard Ory JSON API error format.", "title": "JSON API Error Response", "required": ["error"] }, - "errorGeneric.Error": { + "ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error": { "type": "object", "properties": { "code": { @@ -818,7 +824,7 @@ "type": "object", "properties": { "tree": { - "$ref": "#/definitions/expandedPermissionTree", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree", "description": "The tree the requested subject set expands to.\nThe requested subject set is the subject of the root.\n\nThis field can be nil in some circumstances." } }, @@ -834,7 +840,7 @@ }, "description": "Response of the VersionService.GetVersion RPC." }, - "relationshipNamespaces": { + "ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse": { "type": "object", "properties": { "namespaces": { @@ -845,13 +851,13 @@ } } }, - "relationships": { + "ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse": { "type": "object", "properties": { "relation_tuples": { "type": "array", "items": { - "$ref": "#/definitions/relationship" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" }, "description": "The relationships matching the list request." }, @@ -885,7 +891,7 @@ "default": "unspecified", "description": " - union: This node expands to a union of all children.\n - exclusion: Not implemented yet.\n - intersection: Not implemented yet.\n - leaf: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - tuple_to_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - computed_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - not: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached." }, - "relationship": { + "ory.keto.relation_tuples.v1alpha2.RelationTuple": { "type": "object", "properties": { "namespace": { @@ -905,29 +911,29 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/subjectSet", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } }, "description": "RelationTuple defines a relation between an Object and a Subject.", "required": ["namespace", "object", "relation"] }, - "relationshipDelta": { + "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta": { "type": "object", "properties": { "action": { - "$ref": "#/definitions/relationshipDelta.Action", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action", "description": "The action to do on the RelationTuple." }, "relation_tuple": { - "$ref": "#/definitions/relationship", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", "description": "The target RelationTuple." } }, "description": "Write-delta for a TransactRelationTuplesRequest.", "required": ["action", "relation_tuple"] }, - "relationshipDelta.Action": { + "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action": { "type": "string", "enum": ["ACTION_UNSPECIFIED", "insert", "delete"], "default": "ACTION_UNSPECIFIED", @@ -941,13 +947,13 @@ "description": "A concrete id of the subject." }, "set": { - "$ref": "#/definitions/subjectSet", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } }, "description": "Subject is either a concrete subject id or\na `SubjectSet` expanding to more Subjects." }, - "subjectSet": { + "ory.keto.relation_tuples.v1alpha2.SubjectSet": { "type": "object", "properties": { "namespace": { @@ -966,7 +972,7 @@ "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`.", "required": ["namespace", "object", "relation"] }, - "subjectSetQuery": { + "ory.keto.relation_tuples.v1alpha2.SubjectSetQuery": { "type": "object", "properties": { "namespace": { @@ -984,7 +990,7 @@ }, "description": "SubjectSetQuery refers to all subjects who have\nthe same `relation` on an `object`." }, - "expandedPermissionTree": { + "ory.keto.relation_tuples.v1alpha2.SubjectTree": { "type": "object", "properties": { "type": { @@ -996,13 +1002,13 @@ "description": "The subject this node represents.\nDeprecated: More information is now available in the tuple field." }, "tuple": { - "$ref": "#/definitions/relationship", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", "description": "The relation tuple this node represents." }, "children": { "type": "array", "items": { - "$ref": "#/definitions/expandedPermissionTree" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" }, "description": "The children of this node.\n\nThis is never set if `node_type` == `NODE_TYPE_LEAF`." } @@ -1012,7 +1018,6 @@ "ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse": { "type": "object", "description": "The response of a WriteService.TransactRelationTuples rpc." - }, - "UUID": { "type": "string", "format": "uuid4" } + } } } From 4136a0b289b73c684113b4a86b45e8a971c36be3 Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Thu, 23 Feb 2023 15:25:53 +0100 Subject: [PATCH 16/42] chore: make sdk --- internal/httpclient/.openapi-generator/FILES | 2 + internal/httpclient/README.md | 1 + internal/httpclient/api/openapi.yaml | 34 +++++- internal/httpclient/api_metadata.go | 24 ++-- .../httpclient/docs/CheckOplSyntaxResult.md | 26 ++++ internal/httpclient/docs/InlineResponse200.md | 2 +- .../httpclient/docs/InlineResponse2001.md | 22 ++-- .../httpclient/docs/InlineResponse2002.md | 51 ++++++++ internal/httpclient/docs/MetadataApi.md | 12 +- .../model_check_opl_syntax_result.go | 38 +++++- .../httpclient/model_inline_response_200.go | 1 - .../httpclient/model_inline_response_200_1.go | 28 ++--- .../httpclient/model_inline_response_200_2.go | 108 ++++++++++++++++ spec/api.json | 7 +- spec/api.swagger.json | 115 +++++++++--------- 15 files changed, 364 insertions(+), 107 deletions(-) create mode 100644 internal/httpclient/docs/InlineResponse2002.md create mode 100644 internal/httpclient/model_inline_response_200_2.go diff --git a/internal/httpclient/.openapi-generator/FILES b/internal/httpclient/.openapi-generator/FILES index edee192f8..ba3bc9747 100644 --- a/internal/httpclient/.openapi-generator/FILES +++ b/internal/httpclient/.openapi-generator/FILES @@ -16,6 +16,7 @@ docs/ErrorGenericError.md docs/ExpandedPermissionTree.md docs/InlineResponse200.md docs/InlineResponse2001.md +docs/InlineResponse2002.md docs/InlineResponse503.md docs/MetadataApi.md docs/OryKetoOplV1alpha1ParseError.md @@ -47,6 +48,7 @@ model_error_generic_error.go model_expanded_permission_tree.go model_inline_response_200.go model_inline_response_200_1.go +model_inline_response_200_2.go model_inline_response_503.go model_ory_keto_opl_v1alpha1_parse_error.go model_ory_keto_opl_v1alpha1_source_position.go diff --git a/internal/httpclient/README.md b/internal/httpclient/README.md index 0e72c1a5d..e5d11c3b2 100644 --- a/internal/httpclient/README.md +++ b/internal/httpclient/README.md @@ -105,6 +105,7 @@ Class | Method | HTTP request | Description - [ExpandedPermissionTree](docs/ExpandedPermissionTree.md) - [InlineResponse200](docs/InlineResponse200.md) - [InlineResponse2001](docs/InlineResponse2001.md) + - [InlineResponse2002](docs/InlineResponse2002.md) - [InlineResponse503](docs/InlineResponse503.md) - [OryKetoOplV1alpha1ParseError](docs/OryKetoOplV1alpha1ParseError.md) - [OryKetoOplV1alpha1SourcePosition](docs/OryKetoOplV1alpha1SourcePosition.md) diff --git a/internal/httpclient/api/openapi.yaml b/internal/httpclient/api/openapi.yaml index cdd5f207f..5c575c001 100644 --- a/internal/httpclient/api/openapi.yaml +++ b/internal/httpclient/api/openapi.yaml @@ -183,7 +183,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200' + $ref: '#/components/schemas/inline_response_200_1' description: Ory Keto is ready to accept requests. "503": content: @@ -713,7 +713,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_1' + $ref: '#/components/schemas/inline_response_200_2' description: Returns the Ory Keto version. summary: Return Running Software Version. tags: @@ -725,6 +725,21 @@ components: type: string checkOplSyntaxResult: example: + parseErrors: + - start: + Line: 0 + column: 6 + end: + Line: 0 + column: 6 + message: message + - start: + Line: 0 + column: 6 + end: + Line: 0 + column: 6 + message: message errors: - start: Line: 0 @@ -745,6 +760,10 @@ components: items: $ref: '#/components/schemas/ory.keto.opl.v1alpha1.ParseError' type: array + parseErrors: + items: + $ref: '#/components/schemas/ory.keto.opl.v1alpha1.ParseError' + type: array type: object checkPermissionResult: description: The response for a CheckService.Check rpc. @@ -1153,6 +1172,15 @@ components: type: string type: object inline_response_200: + example: + status: status + properties: + status: + type: string + required: + - status + type: object + inline_response_200_1: example: status: status properties: @@ -1173,7 +1201,7 @@ components: required: - errors type: object - inline_response_200_1: + inline_response_200_2: example: version: version properties: diff --git a/internal/httpclient/api_metadata.go b/internal/httpclient/api_metadata.go index 87d656e67..c9113c635 100644 --- a/internal/httpclient/api_metadata.go +++ b/internal/httpclient/api_metadata.go @@ -42,9 +42,9 @@ type MetadataApi interface { /* * GetVersionExecute executes the request - * @return InlineResponse2001 + * @return InlineResponse2002 */ - GetVersionExecute(r MetadataApiApiGetVersionRequest) (*InlineResponse2001, *http.Response, error) + GetVersionExecute(r MetadataApiApiGetVersionRequest) (*InlineResponse2002, *http.Response, error) /* * IsAlive Check HTTP Server Status @@ -84,9 +84,9 @@ type MetadataApi interface { /* * IsReadyExecute executes the request - * @return InlineResponse200 + * @return InlineResponse2001 */ - IsReadyExecute(r MetadataApiApiIsReadyRequest) (*InlineResponse200, *http.Response, error) + IsReadyExecute(r MetadataApiApiIsReadyRequest) (*InlineResponse2001, *http.Response, error) } // MetadataApiService MetadataApi service @@ -97,7 +97,7 @@ type MetadataApiApiGetVersionRequest struct { ApiService MetadataApi } -func (r MetadataApiApiGetVersionRequest) Execute() (*InlineResponse2001, *http.Response, error) { +func (r MetadataApiApiGetVersionRequest) Execute() (*InlineResponse2002, *http.Response, error) { return r.ApiService.GetVersionExecute(r) } @@ -122,16 +122,16 @@ func (a *MetadataApiService) GetVersion(ctx context.Context) MetadataApiApiGetVe /* * Execute executes the request - * @return InlineResponse2001 + * @return InlineResponse2002 */ -func (a *MetadataApiService) GetVersionExecute(r MetadataApiApiGetVersionRequest) (*InlineResponse2001, *http.Response, error) { +func (a *MetadataApiService) GetVersionExecute(r MetadataApiApiGetVersionRequest) (*InlineResponse2002, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue *InlineResponse2001 + localVarReturnValue *InlineResponse2002 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetadataApiService.GetVersion") @@ -322,7 +322,7 @@ type MetadataApiApiIsReadyRequest struct { ApiService MetadataApi } -func (r MetadataApiApiIsReadyRequest) Execute() (*InlineResponse200, *http.Response, error) { +func (r MetadataApiApiIsReadyRequest) Execute() (*InlineResponse2001, *http.Response, error) { return r.ApiService.IsReadyExecute(r) } @@ -349,16 +349,16 @@ func (a *MetadataApiService) IsReady(ctx context.Context) MetadataApiApiIsReadyR /* * Execute executes the request - * @return InlineResponse200 + * @return InlineResponse2001 */ -func (a *MetadataApiService) IsReadyExecute(r MetadataApiApiIsReadyRequest) (*InlineResponse200, *http.Response, error) { +func (a *MetadataApiService) IsReadyExecute(r MetadataApiApiIsReadyRequest) (*InlineResponse2001, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue *InlineResponse200 + localVarReturnValue *InlineResponse2001 ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetadataApiService.IsReady") diff --git a/internal/httpclient/docs/CheckOplSyntaxResult.md b/internal/httpclient/docs/CheckOplSyntaxResult.md index f02421a21..f31f9f30b 100644 --- a/internal/httpclient/docs/CheckOplSyntaxResult.md +++ b/internal/httpclient/docs/CheckOplSyntaxResult.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Errors** | Pointer to [**[]OryKetoOplV1alpha1ParseError**](OryKetoOplV1alpha1ParseError.md) | | [optional] +**ParseErrors** | Pointer to [**[]OryKetoOplV1alpha1ParseError**](OryKetoOplV1alpha1ParseError.md) | | [optional] ## Methods @@ -50,6 +51,31 @@ SetErrors sets Errors field to given value. HasErrors returns a boolean if a field has been set. +### GetParseErrors + +`func (o *CheckOplSyntaxResult) GetParseErrors() []OryKetoOplV1alpha1ParseError` + +GetParseErrors returns the ParseErrors field if non-nil, zero value otherwise. + +### GetParseErrorsOk + +`func (o *CheckOplSyntaxResult) GetParseErrorsOk() (*[]OryKetoOplV1alpha1ParseError, bool)` + +GetParseErrorsOk returns a tuple with the ParseErrors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParseErrors + +`func (o *CheckOplSyntaxResult) SetParseErrors(v []OryKetoOplV1alpha1ParseError)` + +SetParseErrors sets ParseErrors field to given value. + +### HasParseErrors + +`func (o *CheckOplSyntaxResult) HasParseErrors() bool` + +HasParseErrors returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/internal/httpclient/docs/InlineResponse200.md b/internal/httpclient/docs/InlineResponse200.md index 430ba9b99..f5121bb43 100644 --- a/internal/httpclient/docs/InlineResponse200.md +++ b/internal/httpclient/docs/InlineResponse200.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Status** | **string** | Always \"ok\". | +**Status** | **string** | | ## Methods diff --git a/internal/httpclient/docs/InlineResponse2001.md b/internal/httpclient/docs/InlineResponse2001.md index 4102597f2..fd9955a6a 100644 --- a/internal/httpclient/docs/InlineResponse2001.md +++ b/internal/httpclient/docs/InlineResponse2001.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Version** | **string** | The version of Ory Keto. | +**Status** | **string** | Always \"ok\". | ## Methods ### NewInlineResponse2001 -`func NewInlineResponse2001(version string, ) *InlineResponse2001` +`func NewInlineResponse2001(status string, ) *InlineResponse2001` NewInlineResponse2001 instantiates a new InlineResponse2001 object This constructor will assign default values to properties that have it defined, @@ -25,24 +25,24 @@ NewInlineResponse2001WithDefaults instantiates a new InlineResponse2001 object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetVersion +### GetStatus -`func (o *InlineResponse2001) GetVersion() string` +`func (o *InlineResponse2001) GetStatus() string` -GetVersion returns the Version field if non-nil, zero value otherwise. +GetStatus returns the Status field if non-nil, zero value otherwise. -### GetVersionOk +### GetStatusOk -`func (o *InlineResponse2001) GetVersionOk() (*string, bool)` +`func (o *InlineResponse2001) GetStatusOk() (*string, bool)` -GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetVersion +### SetStatus -`func (o *InlineResponse2001) SetVersion(v string)` +`func (o *InlineResponse2001) SetStatus(v string)` -SetVersion sets Version field to given value. +SetStatus sets Status field to given value. diff --git a/internal/httpclient/docs/InlineResponse2002.md b/internal/httpclient/docs/InlineResponse2002.md new file mode 100644 index 000000000..452b7a00a --- /dev/null +++ b/internal/httpclient/docs/InlineResponse2002.md @@ -0,0 +1,51 @@ +# InlineResponse2002 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Version** | **string** | The version of Ory Keto. | + +## Methods + +### NewInlineResponse2002 + +`func NewInlineResponse2002(version string, ) *InlineResponse2002` + +NewInlineResponse2002 instantiates a new InlineResponse2002 object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInlineResponse2002WithDefaults + +`func NewInlineResponse2002WithDefaults() *InlineResponse2002` + +NewInlineResponse2002WithDefaults instantiates a new InlineResponse2002 object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVersion + +`func (o *InlineResponse2002) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *InlineResponse2002) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *InlineResponse2002) SetVersion(v string)` + +SetVersion sets Version field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/internal/httpclient/docs/MetadataApi.md b/internal/httpclient/docs/MetadataApi.md index ff2c9bb07..733eb2207 100644 --- a/internal/httpclient/docs/MetadataApi.md +++ b/internal/httpclient/docs/MetadataApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description ## GetVersion -> InlineResponse2001 GetVersion(ctx).Execute() +> InlineResponse2002 GetVersion(ctx).Execute() Return Running Software Version. @@ -39,7 +39,7 @@ func main() { fmt.Fprintf(os.Stderr, "Error when calling `MetadataApi.GetVersion``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `GetVersion`: InlineResponse2001 + // response from `GetVersion`: InlineResponse2002 fmt.Fprintf(os.Stdout, "Response from `MetadataApi.GetVersion`: %v\n", resp) } ``` @@ -55,7 +55,7 @@ Other parameters are passed through a pointer to a apiGetVersionRequest struct v ### Return type -[**InlineResponse2001**](InlineResponse2001.md) +[**InlineResponse2002**](InlineResponse2002.md) ### Authorization @@ -134,7 +134,7 @@ No authorization required ## IsReady -> InlineResponse200 IsReady(ctx).Execute() +> InlineResponse2001 IsReady(ctx).Execute() Check HTTP Server and Database Status @@ -161,7 +161,7 @@ func main() { fmt.Fprintf(os.Stderr, "Error when calling `MetadataApi.IsReady``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `IsReady`: InlineResponse200 + // response from `IsReady`: InlineResponse2001 fmt.Fprintf(os.Stdout, "Response from `MetadataApi.IsReady`: %v\n", resp) } ``` @@ -177,7 +177,7 @@ Other parameters are passed through a pointer to a apiIsReadyRequest struct via ### Return type -[**InlineResponse200**](InlineResponse200.md) +[**InlineResponse2001**](InlineResponse2001.md) ### Authorization diff --git a/internal/httpclient/model_check_opl_syntax_result.go b/internal/httpclient/model_check_opl_syntax_result.go index 29b902ae1..e50b61c16 100644 --- a/internal/httpclient/model_check_opl_syntax_result.go +++ b/internal/httpclient/model_check_opl_syntax_result.go @@ -17,7 +17,8 @@ import ( // CheckOplSyntaxResult struct for CheckOplSyntaxResult type CheckOplSyntaxResult struct { - Errors []OryKetoOplV1alpha1ParseError `json:"errors,omitempty"` + Errors []OryKetoOplV1alpha1ParseError `json:"errors,omitempty"` + ParseErrors []OryKetoOplV1alpha1ParseError `json:"parseErrors,omitempty"` } // NewCheckOplSyntaxResult instantiates a new CheckOplSyntaxResult object @@ -69,11 +70,46 @@ func (o *CheckOplSyntaxResult) SetErrors(v []OryKetoOplV1alpha1ParseError) { o.Errors = v } +// GetParseErrors returns the ParseErrors field value if set, zero value otherwise. +func (o *CheckOplSyntaxResult) GetParseErrors() []OryKetoOplV1alpha1ParseError { + if o == nil || o.ParseErrors == nil { + var ret []OryKetoOplV1alpha1ParseError + return ret + } + return o.ParseErrors +} + +// GetParseErrorsOk returns a tuple with the ParseErrors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CheckOplSyntaxResult) GetParseErrorsOk() ([]OryKetoOplV1alpha1ParseError, bool) { + if o == nil || o.ParseErrors == nil { + return nil, false + } + return o.ParseErrors, true +} + +// HasParseErrors returns a boolean if a field has been set. +func (o *CheckOplSyntaxResult) HasParseErrors() bool { + if o != nil && o.ParseErrors != nil { + return true + } + + return false +} + +// SetParseErrors gets a reference to the given []OryKetoOplV1alpha1ParseError and assigns it to the ParseErrors field. +func (o *CheckOplSyntaxResult) SetParseErrors(v []OryKetoOplV1alpha1ParseError) { + o.ParseErrors = v +} + func (o CheckOplSyntaxResult) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Errors != nil { toSerialize["errors"] = o.Errors } + if o.ParseErrors != nil { + toSerialize["parseErrors"] = o.ParseErrors + } return json.Marshal(toSerialize) } diff --git a/internal/httpclient/model_inline_response_200.go b/internal/httpclient/model_inline_response_200.go index 9b003e2dd..f28140614 100644 --- a/internal/httpclient/model_inline_response_200.go +++ b/internal/httpclient/model_inline_response_200.go @@ -17,7 +17,6 @@ import ( // InlineResponse200 struct for InlineResponse200 type InlineResponse200 struct { - // Always \"ok\". Status string `json:"status"` } diff --git a/internal/httpclient/model_inline_response_200_1.go b/internal/httpclient/model_inline_response_200_1.go index b49e8e744..265014a9d 100644 --- a/internal/httpclient/model_inline_response_200_1.go +++ b/internal/httpclient/model_inline_response_200_1.go @@ -17,17 +17,17 @@ import ( // InlineResponse2001 struct for InlineResponse2001 type InlineResponse2001 struct { - // The version of Ory Keto. - Version string `json:"version"` + // Always \"ok\". + Status string `json:"status"` } // NewInlineResponse2001 instantiates a new InlineResponse2001 object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewInlineResponse2001(version string) *InlineResponse2001 { +func NewInlineResponse2001(status string) *InlineResponse2001 { this := InlineResponse2001{} - this.Version = version + this.Status = status return &this } @@ -39,34 +39,34 @@ func NewInlineResponse2001WithDefaults() *InlineResponse2001 { return &this } -// GetVersion returns the Version field value -func (o *InlineResponse2001) GetVersion() string { +// GetStatus returns the Status field value +func (o *InlineResponse2001) GetStatus() string { if o == nil { var ret string return ret } - return o.Version + return o.Status } -// GetVersionOk returns a tuple with the Version field value +// GetStatusOk returns a tuple with the Status field value // and a boolean to check if the value has been set. -func (o *InlineResponse2001) GetVersionOk() (*string, bool) { +func (o *InlineResponse2001) GetStatusOk() (*string, bool) { if o == nil { return nil, false } - return &o.Version, true + return &o.Status, true } -// SetVersion sets field value -func (o *InlineResponse2001) SetVersion(v string) { - o.Version = v +// SetStatus sets field value +func (o *InlineResponse2001) SetStatus(v string) { + o.Status = v } func (o InlineResponse2001) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { - toSerialize["version"] = o.Version + toSerialize["status"] = o.Status } return json.Marshal(toSerialize) } diff --git a/internal/httpclient/model_inline_response_200_2.go b/internal/httpclient/model_inline_response_200_2.go new file mode 100644 index 000000000..5d35f3f5a --- /dev/null +++ b/internal/httpclient/model_inline_response_200_2.go @@ -0,0 +1,108 @@ +/* + * Ory Keto API + * + * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. + * + * API version: 1.0.0 + * Contact: hi@ory.sh + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" +) + +// InlineResponse2002 struct for InlineResponse2002 +type InlineResponse2002 struct { + // The version of Ory Keto. + Version string `json:"version"` +} + +// NewInlineResponse2002 instantiates a new InlineResponse2002 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInlineResponse2002(version string) *InlineResponse2002 { + this := InlineResponse2002{} + this.Version = version + return &this +} + +// NewInlineResponse2002WithDefaults instantiates a new InlineResponse2002 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInlineResponse2002WithDefaults() *InlineResponse2002 { + this := InlineResponse2002{} + return &this +} + +// GetVersion returns the Version field value +func (o *InlineResponse2002) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *InlineResponse2002) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *InlineResponse2002) SetVersion(v string) { + o.Version = v +} + +func (o InlineResponse2002) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["version"] = o.Version + } + return json.Marshal(toSerialize) +} + +type NullableInlineResponse2002 struct { + value *InlineResponse2002 + isSet bool +} + +func (v NullableInlineResponse2002) Get() *InlineResponse2002 { + return v.value +} + +func (v *NullableInlineResponse2002) Set(val *InlineResponse2002) { + v.value = val + v.isSet = true +} + +func (v NullableInlineResponse2002) IsSet() bool { + return v.isSet +} + +func (v *NullableInlineResponse2002) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInlineResponse2002(val *InlineResponse2002) *NullableInlineResponse2002 { + return &NullableInlineResponse2002{value: val, isSet: true} +} + +func (v NullableInlineResponse2002) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInlineResponse2002) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/spec/api.json b/spec/api.json index 75f8a4e9f..48a9b0e14 100755 --- a/spec/api.json +++ b/spec/api.json @@ -12,6 +12,12 @@ "$ref": "#/components/schemas/ory.keto.opl.v1alpha1.ParseError" }, "type": "array" + }, + "parseErrors": { + "items": { + "$ref": "#/components/schemas/ory.keto.opl.v1alpha1.ParseError" + }, + "type": "array" } }, "type": "object" @@ -554,7 +560,6 @@ "schema": { "properties": { "status": { - "description": "Always \"ok\".", "type": "string" } }, diff --git a/spec/api.swagger.json b/spec/api.swagger.json index 4800b76f5..e0cb0ef38 100755 --- a/spec/api.swagger.json +++ b/spec/api.swagger.json @@ -31,7 +31,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -96,13 +96,13 @@ "201": { "description": "The created relationship.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" + "$ref": "#/definitions/relationship" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -113,7 +113,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship", + "$ref": "#/definitions/createRelationshipBody", "required": ["relationTuple"] } } @@ -134,7 +134,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -147,7 +147,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta" + "$ref": "#/definitions/relationshipDelta" } } } @@ -164,7 +164,7 @@ "200": { "description": "The list of namespaces.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse" + "$ref": "#/definitions/relationshipNamespaces" }, "examples": { "application/json": { @@ -179,7 +179,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -195,13 +195,13 @@ "200": { "description": "The result of the syntax checker", "schema": { - "$ref": "#/definitions/ory.keto.opl.v1alpha1.CheckResponse" + "$ref": "#/definitions/checkOplSyntaxResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -228,13 +228,13 @@ "200": { "description": "The list of relationships.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse" + "$ref": "#/definitions/relationships" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -316,19 +316,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } } }, @@ -401,19 +401,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } } }, @@ -424,7 +424,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" + "$ref": "#/definitions/postCheckPermissionBody" } } ], @@ -440,19 +440,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } } }, @@ -525,19 +525,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } } }, @@ -548,7 +548,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" + "$ref": "#/definitions/postCheckPermissionBody" } } ], @@ -564,13 +564,13 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" + "$ref": "#/definitions/expandedPermissionTree" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -624,7 +624,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -633,7 +633,7 @@ } }, "definitions": { - "ory.keto.opl.v1alpha1.CheckResponse": { + "checkOplSyntaxResult": { "type": "object", "properties": { "parseErrors": { @@ -677,7 +677,7 @@ } } }, - "ory.keto.relation_tuples.v1alpha2.CheckRequest": { + "postCheckPermissionBody": { "type": "object", "properties": { "namespace": { @@ -697,7 +697,7 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSetQuery", + "$ref": "#/definitions/subjectSetQuery", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." }, "max-depth": { @@ -708,7 +708,7 @@ }, "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object." }, - "ory.keto.relation_tuples.v1alpha2.CheckResponse": { + "checkPermissionResult": { "type": "object", "properties": { "allowed": { @@ -718,7 +718,7 @@ }, "description": "The response for a CheckService.Check rpc." }, - "ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship": { + "createRelationshipBody": { "type": "object", "properties": { "namespace": { @@ -738,7 +738,7 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", + "$ref": "#/definitions/subjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } } @@ -747,7 +747,7 @@ "type": "object", "properties": { "relationTuple": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", + "$ref": "#/definitions/relationship", "description": "The created relationship." } }, @@ -756,18 +756,18 @@ "ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse": { "type": "object" }, - "ory.keto.relation_tuples.v1alpha2.ErrorResponse": { + "errorGeneric": { "type": "object", "properties": { "error": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error" + "$ref": "#/definitions/errorGeneric.Error" } }, "description": "The standard Ory JSON API error format.", "title": "JSON API Error Response", "required": ["error"] }, - "ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error": { + "errorGeneric.Error": { "type": "object", "properties": { "code": { @@ -824,7 +824,7 @@ "type": "object", "properties": { "tree": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree", + "$ref": "#/definitions/expandedPermissionTree", "description": "The tree the requested subject set expands to.\nThe requested subject set is the subject of the root.\n\nThis field can be nil in some circumstances." } }, @@ -840,7 +840,7 @@ }, "description": "Response of the VersionService.GetVersion RPC." }, - "ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse": { + "relationshipNamespaces": { "type": "object", "properties": { "namespaces": { @@ -851,13 +851,13 @@ } } }, - "ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse": { + "relationships": { "type": "object", "properties": { "relation_tuples": { "type": "array", "items": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" + "$ref": "#/definitions/relationship" }, "description": "The relationships matching the list request." }, @@ -891,7 +891,7 @@ "default": "unspecified", "description": " - union: This node expands to a union of all children.\n - exclusion: Not implemented yet.\n - intersection: Not implemented yet.\n - leaf: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - tuple_to_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - computed_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - not: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached." }, - "ory.keto.relation_tuples.v1alpha2.RelationTuple": { + "relationship": { "type": "object", "properties": { "namespace": { @@ -911,29 +911,29 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", + "$ref": "#/definitions/subjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } }, "description": "RelationTuple defines a relation between an Object and a Subject.", "required": ["namespace", "object", "relation"] }, - "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta": { + "relationshipDelta": { "type": "object", "properties": { "action": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action", + "$ref": "#/definitions/relationshipDelta.Action", "description": "The action to do on the RelationTuple." }, "relation_tuple": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", + "$ref": "#/definitions/relationship", "description": "The target RelationTuple." } }, "description": "Write-delta for a TransactRelationTuplesRequest.", "required": ["action", "relation_tuple"] }, - "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action": { + "relationshipDelta.Action": { "type": "string", "enum": ["ACTION_UNSPECIFIED", "insert", "delete"], "default": "ACTION_UNSPECIFIED", @@ -947,13 +947,13 @@ "description": "A concrete id of the subject." }, "set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", - "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." + "$ref": "#/definitions/subjectSet", + "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/15_subjects.mdx)." } }, "description": "Subject is either a concrete subject id or\na `SubjectSet` expanding to more Subjects." }, - "ory.keto.relation_tuples.v1alpha2.SubjectSet": { + "subjectSet": { "type": "object", "properties": { "namespace": { @@ -972,7 +972,7 @@ "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`.", "required": ["namespace", "object", "relation"] }, - "ory.keto.relation_tuples.v1alpha2.SubjectSetQuery": { + "subjectSetQuery": { "type": "object", "properties": { "namespace": { @@ -990,7 +990,7 @@ }, "description": "SubjectSetQuery refers to all subjects who have\nthe same `relation` on an `object`." }, - "ory.keto.relation_tuples.v1alpha2.SubjectTree": { + "expandedPermissionTree": { "type": "object", "properties": { "type": { @@ -1002,13 +1002,13 @@ "description": "The subject this node represents.\nDeprecated: More information is now available in the tuple field." }, "tuple": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", + "$ref": "#/definitions/relationship", "description": "The relation tuple this node represents." }, "children": { "type": "array", "items": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" + "$ref": "#/definitions/expandedPermissionTree" }, "description": "The children of this node.\n\nThis is never set if `node_type` == `NODE_TYPE_LEAF`." } @@ -1018,6 +1018,7 @@ "ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse": { "type": "object", "description": "The response of a WriteService.TransactRelationTuples rpc." - } + }, + "UUID": { "type": "string", "format": "uuid4" } } } From e58802335f967e04064011666a6b3c7fc8c598fe Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Thu, 23 Feb 2023 15:51:35 +0100 Subject: [PATCH 17/42] chore: fix makefile --- Makefile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 6ec24765d..506e5694f 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ authors: # updates the AUTHORS file curl https://raw.githubusercontent.com/ory/ci/master/authors/authors.sh | env PRODUCT="Ory Keto" bash .PHONY: format -format: .bin/ory .bin/goimports node_modules +format: .bin/buf .bin/ory .bin/goimports node_modules .bin/ory dev headers copyright --type=open-source --exclude=.bin --exclude=internal/httpclient --exclude=proto .bin/goimports -w -local github.com/ory/keto *.go internal cmd contrib ketoctx ketoapi embedx npm exec -- prettier --write . @@ -62,12 +62,6 @@ docker: .PHONY: sdk sdk: buf .bin/swagger .bin/ory node_modules rm -rf internal/httpclient - # cp proto/openapiv2/gateway.swagger.json spec/swagger.json - # swagger generate spec -m -o spec/swagger.json \ - # -c github.com/ory/keto \ - # -c github.com/ory/x/healthx \ - # -x internal/httpclient \ - # -x internal/e2e .bin/ory dev swagger sanitize ./spec/api.swagger.json sed -i -f ./.schema/openapi/patches/replacements.sed ./spec/api.swagger.json swagger validate ./spec/api.swagger.json From 619a306a6e82d14480c5d15ab6efa947cb77415b Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Tue, 28 Feb 2023 13:53:29 +0100 Subject: [PATCH 18/42] fix: null tree --- cmd/expand/root.go | 3 +++ cmd/expand/root_test.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/expand/root.go b/cmd/expand/root.go index 12215d89d..b0eaa1c2a 100644 --- a/cmd/expand/root.go +++ b/cmd/expand/root.go @@ -83,6 +83,9 @@ type pbJSONValue struct{ *rts.ExpandResponse } func (v *pbJSONValue) MarshalJSON() ([]byte, error) { marshaler := &protojson.MarshalOptions{EmitUnpopulated: true} + if v.Tree == nil || v.Tree.NodeType.Number() == 0 { + return []byte("null"), nil + } return marshaler.Marshal(v.Tree) } func (v *pbJSONValue) String() string { diff --git a/cmd/expand/root_test.go b/cmd/expand/root_test.go index 71d6b3c72..8f502fe01 100644 --- a/cmd/expand/root_test.go +++ b/cmd/expand/root_test.go @@ -25,7 +25,7 @@ func TestExpandCommand(t *testing.T) { "--"+cmdx.FlagFormat, string(cmdx.FormatJSON), "--insecure-skip-hostname-verification=true", ) - assert.Equal(t, "{\"type\":\"unspecified\",\"subject\":null,\"tuple\":null,\"children\":[]}\n", stdOut) + assert.Equal(t, "null\n", stdOut) }) t.Run("format=default", func(t *testing.T) { From a99a212c389f45c18cdde4b0923919fd757647b6 Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Fri, 10 Mar 2023 17:44:38 +0100 Subject: [PATCH 19/42] fix: add internal gRPC server --- buf.gen.yaml | 8 +- internal/driver/daemon.go | 130 ++- internal/driver/registry.go | 2 + internal/driver/registry_default.go | 7 + .../namespace/namespacehandler/handler.go | 3 +- proto/buf.md | 826 +----------------- proto/docs.md | 820 +++++++++++++++++ .../keto/opl/v1alpha1/syntax_service.pb.go | 2 +- .../keto/opl/v1alpha1/syntax_service.pb.gw.go | 2 +- .../opl/v1alpha1/syntax_service_grpc.pb.go | 10 +- .../v1alpha2/check_service.pb.go | 30 +- .../v1alpha2/check_service.pb.gw.go | 2 +- .../v1alpha2/check_service_grpc.pb.go | 10 +- .../v1alpha2/expand_service.pb.go | 24 +- .../v1alpha2/expand_service.pb.gw.go | 2 +- .../v1alpha2/expand_service_grpc.pb.go | 10 +- .../v1alpha2/namespaces_service.pb.go | 2 +- .../v1alpha2/namespaces_service.pb.gw.go | 2 +- .../v1alpha2/namespaces_service_grpc.pb.go | 10 +- .../relation_tuples/v1alpha2/openapi.pb.go | 76 +- .../v1alpha2/read_service.pb.go | 22 +- .../v1alpha2/read_service.pb.gw.go | 2 +- .../v1alpha2/read_service_grpc.pb.go | 10 +- .../v1alpha2/relation_tuples.pb.go | 10 +- .../relation_tuples/v1alpha2/version.pb.go | 2 +- .../relation_tuples/v1alpha2/version.pb.gw.go | 2 +- .../v1alpha2/version_grpc.pb.go | 10 +- .../v1alpha2/write_service.pb.go | 30 +- .../v1alpha2/write_service.pb.gw.go | 2 +- .../v1alpha2/write_service_grpc.pb.go | 20 +- spec/api.swagger.json | 119 +-- 31 files changed, 1169 insertions(+), 1038 deletions(-) create mode 100644 proto/docs.md diff --git a/buf.gen.yaml b/buf.gen.yaml index 9ba025710..e30c7f5d3 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -26,11 +26,11 @@ plugins: opt: ts_out=proto path: node_modules/.bin/protoc-gen-ts - - remote: buf.build/grpc-ecosystem/plugins/grpc-gateway:v2.14.0-1 + - plugin: buf.build/grpc-ecosystem/gateway out: proto opt: paths=source_relative - - remote: buf.build/grpc-ecosystem/plugins/openapiv2:v2.14.0-1 + - plugin: buf.build/grpc-ecosystem/openapiv2 opt: - allow_merge=true - merge_file_name=api @@ -41,6 +41,6 @@ plugins: - disable_default_responses=true out: spec - - remote: buf.build/sawadashota/plugins/protoc-gen-doc:v1.5.1 + - plugin: buf.build/community/pseudomuto-doc + opt: markdown,docs.md out: proto - opt: markdown,proto/buf.md diff --git a/internal/driver/daemon.go b/internal/driver/daemon.go index 379501f23..e915a6f08 100644 --- a/internal/driver/daemon.go +++ b/internal/driver/daemon.go @@ -12,6 +12,7 @@ import ( "runtime/debug" "strings" "syscall" + "time" grpcLogrus "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus" grpcRecovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery" @@ -40,6 +41,7 @@ import ( grpcHealthV1 "google.golang.org/grpc/health/grpc_health_v1" "google.golang.org/grpc/reflection" "google.golang.org/grpc/status" + "google.golang.org/grpc/test/bufconn" "github.com/ory/keto/internal/check" "github.com/ory/keto/internal/driver/config" @@ -125,6 +127,7 @@ func (r *RegistryDefault) ServeAll(ctx context.Context) error { // We need to separate the setup (invoking the functions that return the serve functions) from running the serve // functions to mitigate race contitions in the HTTP router. for _, serve := range []func() error{ + r.serveInternalGRPC(innerCtx), r.serveRead(innerCtx, doneShutdown), r.serveWrite(innerCtx, doneShutdown), r.serveOPLSyntax(innerCtx, doneShutdown), @@ -136,6 +139,57 @@ func (r *RegistryDefault) ServeAll(ctx context.Context) error { return eg.Wait() } +func (r *RegistryDefault) initInternalGRPC() { + r.internalGRPC.listener = bufconn.Listen(1024 * 1024 * 10) + r.internalGRPC.dialer = func() (*grpc.ClientConn, error) { + return grpc.Dial("bufnet", + grpc.WithTransportCredentials(insecure.NewCredentials()), + grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { return r.internalGRPC.listener.Dial() }), + ) + } + +} + +func (r *RegistryDefault) serveInternalGRPC(ctx context.Context) func() error { + return func() error { + serverDone := make(chan struct{}) + internalGRPCServer := r.newInternalGRPCServer(ctx) + eg := &errgroup.Group{} + + eg.Go(func() error { + err := internalGRPCServer.Serve(r.internalGRPCListener()) + close(serverDone) + return err + }) + + eg.Go(func() (err error) { + <-ctx.Done() + + internalGRPCServer.GracefulStop() + select { + case <-serverDone: + return nil + case <-time.After(graceful.DefaultShutdownTimeout): + internalGRPCServer.Stop() + return errors.New("graceful stop of internal gRPC server canceled, had to force it") + } + }) + + err := eg.Wait() + return err + } +} + +func (r *RegistryDefault) internalGRPCListener() net.Listener { + r.internalGRPC.initOnce.Do(r.initInternalGRPC) + return r.internalGRPC.listener +} + +func (r *RegistryDefault) internalGRPCDialer() GRPCDialer { + r.internalGRPC.initOnce.Do(r.initInternalGRPC) + return r.internalGRPC.dialer +} + func (r *RegistryDefault) serveRead(ctx context.Context, done chan<- struct{}) func() error { rt, s := r.ReadRouter(ctx), r.ReadGRPCServer(ctx) @@ -333,7 +387,7 @@ func (r *RegistryDefault) ReadRouter(ctx context.Context) http.Handler { } n.Use(reqlog.NewMiddlewareFromLogger(r.l, "read#Ory Keto").ExcludePaths(healthx.AliveCheckPath, healthx.ReadyCheckPath)) - conn, err := grpc.DialContext(ctx, r.Config(ctx).ReadAPIListenOn(), grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := r.internalGRPCDialer()() if err != nil { panic(err) } @@ -345,7 +399,7 @@ func (r *RegistryDefault) ReadRouter(ctx context.Context) http.Handler { )...) for _, h := range r.allHandlers() { if h, ok := h.(ReadHandler); ok { - if err := h.RegisterReadGRPCGateway(ctx, mux, r.Config(ctx).ReadAPIListenOn(), grpc.WithTransportCredentials(insecure.NewCredentials())); err != nil { + if err := h.RegisterReadGRPCGatewayConn(ctx, mux, conn); err != nil { panic(err) } } @@ -380,7 +434,7 @@ func (r *RegistryDefault) WriteRouter(ctx context.Context) http.Handler { } n.Use(reqlog.NewMiddlewareFromLogger(r.l, "write#Ory Keto").ExcludePaths(healthx.AliveCheckPath, healthx.ReadyCheckPath)) - conn, err := grpc.DialContext(ctx, r.Config(ctx).WriteAPIListenOn(), grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := r.internalGRPCDialer()() if err != nil { panic(err) } @@ -392,7 +446,7 @@ func (r *RegistryDefault) WriteRouter(ctx context.Context) http.Handler { )...) for _, h := range r.allHandlers() { if h, ok := h.(WriteHandler); ok { - if err := h.RegisterWriteGRPCGateway(ctx, mux, r.Config(ctx).WriteAPIListenOn(), grpc.WithTransportCredentials(insecure.NewCredentials())); err != nil { + if err := h.RegisterWriteGRPCGatewayConn(ctx, mux, conn); err != nil { panic(err) } } @@ -435,7 +489,7 @@ func (r *RegistryDefault) OPLSyntaxRouter(ctx context.Context) http.Handler { r.HealthHandler().SetHealthRoutes(pr.Router, false) r.HealthHandler().SetVersionRoutes(pr.Router) - conn, err := grpc.DialContext(ctx, r.Config(ctx).OPLSyntaxAPIListenOn(), grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := r.internalGRPCDialer()() if err != nil { panic(err) } @@ -447,7 +501,7 @@ func (r *RegistryDefault) OPLSyntaxRouter(ctx context.Context) http.Handler { )...) for _, h := range r.allHandlers() { if h, ok := h.(OPLSyntaxHandler); ok { - if err := h.RegisterSyntaxGRPCGateway(ctx, mux, r.Config(ctx).OPLSyntaxAPIListenOn(), grpc.WithTransportCredentials(insecure.NewCredentials())); err != nil { + if err := h.RegisterSyntaxGRPCGatewayConn(ctx, mux, conn); err != nil { panic(err) } } @@ -512,6 +566,22 @@ func (r *RegistryDefault) streamInterceptors(ctx context.Context) []grpc.StreamS return is } +// newInternalGRPCServer creates a new gRPC server with the default +// interceptors, but without transport credentials, to be used internally. +func (r *RegistryDefault) newInternalGRPCServer(ctx context.Context) *grpc.Server { + s := grpc.NewServer( + grpc.ChainStreamInterceptor(r.streamInterceptors(ctx)...), + grpc.ChainUnaryInterceptor(r.unaryInterceptors(ctx)...), + ) + + r.registerCommonGRPCServices(s) + r.registerReadGRPCServices(s) + r.registerWriteGRPCServices(s) + r.registerOPLGRPCServices(s) + + return s +} + func (r *RegistryDefault) newGrpcServer(ctx context.Context) *grpc.Server { opts := []grpc.ServerOption{ grpc.ChainStreamInterceptor(r.streamInterceptors(ctx)...), @@ -523,50 +593,56 @@ func (r *RegistryDefault) newGrpcServer(ctx context.Context) *grpc.Server { return grpc.NewServer(opts...) } -func (r *RegistryDefault) ReadGRPCServer(ctx context.Context) *grpc.Server { - s := r.newGrpcServer(ctx) - +func (r *RegistryDefault) registerCommonGRPCServices(s *grpc.Server) { grpcHealthV1.RegisterHealthServer(s, r.HealthServer()) rts.RegisterVersionServiceServer(s, r) reflection.Register(s) +} +func (r *RegistryDefault) registerReadGRPCServices(s *grpc.Server) { for _, h := range r.allHandlers() { if h, ok := h.(ReadHandler); ok { h.RegisterReadGRPC(s) } } - - return s } -func (r *RegistryDefault) WriteGRPCServer(ctx context.Context) *grpc.Server { - s := r.newGrpcServer(ctx) - - grpcHealthV1.RegisterHealthServer(s, r.HealthServer()) - rts.RegisterVersionServiceServer(s, r) - reflection.Register(s) - +func (r *RegistryDefault) registerWriteGRPCServices(s *grpc.Server) { for _, h := range r.allHandlers() { if h, ok := h.(WriteHandler); ok { h.RegisterWriteGRPC(s) } } - - return s } -func (r *RegistryDefault) OplGRPCServer(ctx context.Context) *grpc.Server { - s := r.newGrpcServer(ctx) - - grpcHealthV1.RegisterHealthServer(s, r.HealthServer()) - rts.RegisterVersionServiceServer(s, r) - reflection.Register(s) - +func (r *RegistryDefault) registerOPLGRPCServices(s *grpc.Server) { for _, h := range r.allHandlers() { if h, ok := h.(OPLSyntaxHandler); ok { h.RegisterSyntaxGRPC(s) } } +} + +func (r *RegistryDefault) ReadGRPCServer(ctx context.Context) *grpc.Server { + s := r.newGrpcServer(ctx) + r.registerCommonGRPCServices(s) + r.registerReadGRPCServices(s) + + return s +} + +func (r *RegistryDefault) WriteGRPCServer(ctx context.Context) *grpc.Server { + s := r.newGrpcServer(ctx) + r.registerCommonGRPCServices(s) + r.registerWriteGRPCServices(s) + + return s +} + +func (r *RegistryDefault) OplGRPCServer(ctx context.Context) *grpc.Server { + s := r.newGrpcServer(ctx) + r.registerCommonGRPCServices(s) + r.registerOPLGRPCServices(s) return s } diff --git a/internal/driver/registry.go b/internal/driver/registry.go index ae9ac1c94..f5c028ff5 100644 --- a/internal/driver/registry.go +++ b/internal/driver/registry.go @@ -55,6 +55,8 @@ type ( ServeAllSQA(cmd *cobra.Command) error } + GRPCDialer func() (*grpc.ClientConn, error) + contextKeys string ) diff --git a/internal/driver/registry_default.go b/internal/driver/registry_default.go index b17d4fc3c..b0044421d 100644 --- a/internal/driver/registry_default.go +++ b/internal/driver/registry_default.go @@ -25,6 +25,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/health" + "google.golang.org/grpc/test/bufconn" "github.com/ory/keto/internal/check" "github.com/ory/keto/internal/driver/config" @@ -80,6 +81,12 @@ type ( grpcTransportCredentials credentials.TransportCredentials defaultMigrationOptions []popx.MigrationBoxOption healthReadyCheckers healthx.ReadyCheckers + + internalGRPC struct { + initOnce sync.Once + listener *bufconn.Listener + dialer GRPCDialer + } } ReadHandler interface { RegisterReadGRPC(s *grpc.Server) diff --git a/internal/namespace/namespacehandler/handler.go b/internal/namespace/namespacehandler/handler.go index d59e5fa86..4188e79b4 100644 --- a/internal/namespace/namespacehandler/handler.go +++ b/internal/namespace/namespacehandler/handler.go @@ -41,8 +41,9 @@ func (h *handler) RegisterReadGRPC(s *grpc.Server) { func (h *handler) RegisterReadGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error { return rts.RegisterNamespacesServiceHandlerFromEndpoint(ctx, mux, endpoint, opts) } + func (h *handler) RegisterReadGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return rts.RegisterReadServiceHandler(ctx, mux, conn) + return rts.RegisterNamespacesServiceHandler(ctx, mux, conn) } func (h *handler) ListNamespaces(ctx context.Context, _ *rts.ListNamespacesRequest) (*rts.ListNamespacesResponse, error) { diff --git a/proto/buf.md b/proto/buf.md index 6efd4dba7..88f25c77d 100644 --- a/proto/buf.md +++ b/proto/buf.md @@ -1,820 +1,10 @@ -# Protocol Documentation +# Ory Keto gRPC Client - +This package provides the generated gRPC client for +[Ory Keto](https://ory.sh/keto). Go to +[the documentation](https://ory.sh/keto/docs) to learn more -## Table of Contents - -- [ory/keto/opl/v1alpha1/syntax_service.proto](#ory_keto_opl_v1alpha1_syntax_service-proto) - - - [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) - - [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) - - [ParseError](#ory-keto-opl-v1alpha1-ParseError) - - [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) - - - [SyntaxService](#ory-keto-opl-v1alpha1-SyntaxService) - -- [ory/keto/relation_tuples/v1alpha2/relation_tuples.proto](#ory_keto_relation_tuples_v1alpha2_relation_tuples-proto) - - [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) - - [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) - - [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) - - [SubjectQuery](#ory-keto-relation_tuples-v1alpha2-SubjectQuery) - - [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) - - [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) -- [ory/keto/relation_tuples/v1alpha2/check_service.proto](#ory_keto_relation_tuples_v1alpha2_check_service-proto) - - - [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) - - [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) - - - [CheckService](#ory-keto-relation_tuples-v1alpha2-CheckService) - -- [ory/keto/relation_tuples/v1alpha2/expand_service.proto](#ory_keto_relation_tuples_v1alpha2_expand_service-proto) - - - [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) - - [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) - - [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) - - - [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) - - - [ExpandService](#ory-keto-relation_tuples-v1alpha2-ExpandService) - -- [ory/keto/relation_tuples/v1alpha2/namespaces_service.proto](#ory_keto_relation_tuples_v1alpha2_namespaces_service-proto) - - - [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) - - [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) - - [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) - - - [NamespacesService](#ory-keto-relation_tuples-v1alpha2-NamespacesService) - -- [ory/keto/relation_tuples/v1alpha2/openapi.proto](#ory_keto_relation_tuples_v1alpha2_openapi-proto) - - [ErrorResponse](#ory-keto-relation_tuples-v1alpha2-ErrorResponse) - - [ErrorResponse.Error](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error) - - [ErrorResponse.Error.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error-DetailsEntry) -- [ory/keto/relation_tuples/v1alpha2/read_service.proto](#ory_keto_relation_tuples_v1alpha2_read_service-proto) - - - [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) - - [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) - - [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) - - - [ReadService](#ory-keto-relation_tuples-v1alpha2-ReadService) - -- [ory/keto/relation_tuples/v1alpha2/version.proto](#ory_keto_relation_tuples_v1alpha2_version-proto) - - - [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) - - [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) - - - [VersionService](#ory-keto-relation_tuples-v1alpha2-VersionService) - -- [ory/keto/relation_tuples/v1alpha2/write_service.proto](#ory_keto_relation_tuples_v1alpha2_write_service-proto) - - - [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) - - [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) - - [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) - - [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) - - [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) - - [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) - - [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) - - [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) - - [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) - - - [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) - - - [WriteService](#ory-keto-relation_tuples-v1alpha2-WriteService) - -- [Scalar Value Types](#scalar-value-types) - - - -

Top

- -## ory/keto/opl/v1alpha1/syntax_service.proto - - - -### CheckRequest - -| Field | Type | Label | Description | -| ------- | --------------- | ----- | ----------- | -| content | [bytes](#bytes) | | | - - - -### CheckResponse - -| Field | Type | Label | Description | -| ------------ | ----------------------------------------------- | -------- | ----------- | -| parse_errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | | -| errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | | - - - -### ParseError - -| Field | Type | Label | Description | -| ------- | ------------------------------------------------------- | ----- | ----------- | -| message | [string](#string) | | | -| start | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | -| end | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | - - - -### SourcePosition - -| Field | Type | Label | Description | -| ------ | ----------------- | ----- | ----------- | -| line | [uint32](#uint32) | | | -| column | [uint32](#uint32) | | | - - - -### SyntaxService - -The service that checks the syntax of an OPL file. - -| Method Name | Request Type | Response Type | Description | -| ----------- | --------------------------------------------------- | ----------------------------------------------------- | -------------------------------- | -| Check | [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) | [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) | Performs a syntax check request. | - - - -

Top

- -## ory/keto/relation_tuples/v1alpha2/relation_tuples.proto - - - -### RelationQuery - -The query for listing relationships. Clients can specify any optional field to -partially filter for specific relationships. - -Example use cases (namespace is always required): - -- object only: display a list of all permissions referring to a specific object -- relation only: get all groups that have members; get all directories that have - content -- object & relation: display all subjects that have a specific permission - relation -- subject & relation: display all groups a subject belongs to; display all - objects a subject has access to -- object & relation & subject: check whether the relation tuple already - exists - -| Field | Type | Label | Description | -| --------- | ----------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| namespace | [string](#string) | optional | The namespace this relation tuple lives in. | -| object | [string](#string) | optional | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | optional | The relation between an Object and a Subject. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | optional | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | - - - -### RelationTuple - -RelationTuple defines a relation between an Object and a Subject. - -| Field | Type | Label | Description | -| ----------- | ----------------------------------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------- | -| namespace | [string](#string) | | The namespace this relation tuple lives in. | -| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | | The relation between an Object and a Subject. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | -| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | -| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - - - -### Subject - -Subject is either a concrete subject id or a `SubjectSet` expanding to more -Subjects. - -| Field | Type | Label | Description | -| ----- | ----------------------------------------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------- | -| id | [string](#string) | | A concrete id of the subject. | -| set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/15_subjects.mdx). | - - - -### SubjectQuery - -SubjectQuery is either a concrete subject id or a `SubjectSet` expanding to more -Subjects. - -| Field | Type | Label | Description | -| ----- | --------------------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | -| id | [string](#string) | | A concrete id of the subject. | -| set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - - - -### SubjectSet - -SubjectSet refers to all subjects who have the same `relation` on an `object`. - -| Field | Type | Label | Description | -| --------- | ----------------- | ----- | ------------------------------------------------------------------------ | -| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | -| object | [string](#string) | | The object related by this subject set. | -| relation | [string](#string) | | The relation between the object and the subjects. | - - - -### SubjectSetQuery - -SubjectSetQuery refers to all subjects who have the same `relation` on an -`object`. - -| Field | Type | Label | Description | -| --------- | ----------------- | ----- | ------------------------------------------------------------------------ | -| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | -| object | [string](#string) | | The object related by this subject set. | -| relation | [string](#string) | | The relation between the object and the subjects. | - - - -

Top

- -## ory/keto/relation_tuples/v1alpha2/check_service.proto - - - -### CheckRequest - -The request for a CheckService.Check RPC. Checks whether a specific subject is -related to an object. - -| Field | Type | Label | Description | -| --------- | ----------------- | ----- | ---------------------------------------------------- | -| namespace | [string](#string) | | **Deprecated.** The namespace to evaluate the check. | - -Note: If you use the expand-API and the check evaluates a RelationTuple -specifying a SubjectSet as subject or due to a rewrite rule in a namespace -config this check request may involve other namespaces automatically. | | object -| [string](#string) | | **Deprecated.** The related object in this check. | | -relation | [string](#string) | | **Deprecated.** The relation between the Object -and the Subject. | | subject | -[Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The -related subject in this check. | | subject_id | [string](#string) | | -**Deprecated.** A concrete id of the subject. | | subject_set | -[SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | -**Deprecated.** A subject set that expands to more Subjects. More information -are available under [concepts](../concepts/subjects.mdx). | | tuple | -[RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | | | latest -| [bool](#bool) | | This field is not implemented yet and has no effect. <!-- -Set this field to `true` in case your application needs to authorize depending -on up to date ACLs, also called a "content-change check". - -If set to `true` the `snaptoken` field is ignored, the check is evaluated at the -latest snapshot (globally consistent) and the response includes a snaptoken for -clients to store along with object contents that can be used for subsequent -checks of the same content version. - -Example use case: - You need to authorize a user to modify/delete some resource -and it is unacceptable that if the permission to do that had just been revoked -some seconds ago so that the change had not yet been fully replicated to all -availability zones. --> | | snaptoken | [string](#string) | | This field is -not implemented yet and has no effect. <!-- Optional. Like reads, a check is -always evaluated at a consistent snapshot no earlier than the given snaptoken. - -Leave this field blank if you want to evaluate the check based on eventually -consistent ACLs, benefiting from very low latency, but possibly slightly stale -results. - -If the specified token is too old and no longer known, the server falls back as -if no snaptoken had been specified. - -If not specified the server tries to evaluate the check on the best snapshot -version where it is very likely that ACLs had already been replicated to all -availability zones. --> | | max_depth | [int32](#int32) | | The maximum depth -to search for a relation. - -If the value is less than 1 or greater than the global max-depth then the global -max-depth will be used instead. | - - - -### CheckResponse - -The response for a CheckService.Check rpc. - -| Field | Type | Label | Description | -| ------- | ------------- | ----- | ---------------------------------------------------------------------- | -| allowed | [bool](#bool) | | Whether the specified subject (id) is related to the requested object. | - -It is false by default if no ACL matches. | | snaptoken | [string](#string) | | -This field is not implemented yet and has no effect. <!-- The last known -snapshot token ONLY specified if the request had not specified a snaptoken, -since this performed a "content-change request" and consistently fetched -the last known snapshot token. - -This field is not set if the request had specified a snaptoken! - -If set, clients should cache and use this token for subsequent requests to have -minimal latency, but allow slightly stale responses (only some milliseconds or -seconds). --> | - - - -### CheckService - -The service that performs authorization checks based on the stored Access -Control Lists. - -This service is part of the -[read-APIs](../concepts/25_api-overview.mdx#read-apis). - -| Method Name | Request Type | Response Type | Description | -| ----------- | --------------------------------------------------------------- | ----------------------------------------------------------------- | -------------------------------- | -| Check | [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) | [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) | Performs an authorization check. | - - - -

Top

- -## ory/keto/relation_tuples/v1alpha2/expand_service.proto - - - -### ExpandRequest - -The request for an ExpandService.Expand RPC. Expands the given subject set. - -| Field | Type | Label | Description | -| --------- | ----------------------------------------------------- | ----- | ----------------------------------- | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject to expand. | -| max_depth | [int32](#int32) | | The maximum depth of tree to build. | - -If the value is less than 1 or greater than the global max-depth then the global -max-depth will be used instead. - -It is important to set this parameter to a meaningful value. Ponder how deep you -really want to display this. | | snaptoken | [string](#string) | | This field is -not implemented yet and has no effect. <!-- Optional. Like reads, a expand is -always evaluated at a consistent snapshot no earlier than the given snaptoken. - -Leave this field blank if you want to expand based on eventually consistent -ACLs, benefiting from very low latency, but possibly slightly stale results. - -If the specified token is too old and no longer known, the server falls back as -if no snaptoken had been specified. - -If not specified the server tries to build the tree on the best snapshot version -where it is very likely that ACLs had already been replicated to all -availability zones. --> | | namespace | [string](#string) | | **Deprecated.** -The namespace of the object and relation referenced in this subject set. | | -object | [string](#string) | | **Deprecated.** The object related by this -subject set. | | relation | [string](#string) | | **Deprecated.** The relation -between the object and the subjects. | - - - -### ExpandResponse - -The response for a ExpandService.Expand RPC. - -| Field | Type | Label | Description | -| ----- | ------------------------------------------------------------- | ----- | ---------------------------------------------------------------------------------------------------- | -| tree | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | | The tree the requested subject set expands to. The requested subject set is the subject of the root. | - -This field can be nil in some circumstances. | - - - -### SubjectTree - -| Field | Type | Label | Description | -| --------- | ----------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------- | -| node_type | [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) | | The type of the node. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The subject this node represents. Deprecated: More information is now available in the tuple field. | -| tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The relation tuple this node represents. | -| children | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | repeated | The children of this node. | - -This is never set if `node_type` == `NODE_TYPE_LEAF`. | - - - -### NodeType - -| Name | Number | Description | -| ------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------- | -| unspecified | 0 | | -| NODE_TYPE_UNSPECIFIED | 0 | | -| union | 1 | This node expands to a union of all children. | -| NODE_TYPE_UNION | 1 | | -| exclusion | 2 | Not implemented yet. | -| NODE_TYPE_EXCLUSION | 2 | | -| intersection | 3 | Not implemented yet. | -| NODE_TYPE_INTERSECTION | 3 | | -| leaf | 4 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| NODE_TYPE_LEAF | 4 | | -| tuple_to_subject_set | 5 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| NODE_TYPE_TUPLE_TO_SUBJECT_SET | 5 | | -| computed_subject_set | 6 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| NODE_TYPE_COMPUTED_SUBJECT_SET | 6 | | -| not | 7 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | -| NODE_TYPE_NOT | 7 | | - - - -### ExpandService - -The service that performs subject set expansion based on the stored Access -Control Lists. - -This service is part of the -[read-APIs](../concepts/25_api-overview.mdx#read-apis). - -| Method Name | Request Type | Response Type | Description | -| ----------- | ----------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------ | -| Expand | [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) | [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) | Expands the subject set into a tree of subjects. | - - - -

Top

- -## ory/keto/relation_tuples/v1alpha2/namespaces_service.proto - - - -### ListNamespacesRequest - -Request for ReadService.ListNamespaces RPC. - - - -### ListNamespacesResponse - -| Field | Type | Label | Description | -| ---------- | --------------------------------------------------------- | -------- | ----------- | -| namespaces | [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) | repeated | | - - - -### Namespace - -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ----------- | -| name | [string](#string) | | | - - - -### NamespacesService - -The service to query namespaces. - -This service is part of the -[read-APIs](../concepts/25_api-overview.mdx#read-apis). - -| Method Name | Request Type | Response Type | Description | -| -------------- | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---------------- | -| ListNamespaces | [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) | [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) | Lists Namespaces | - -Get all namespaces. | - - - -

Top

- -## ory/keto/relation_tuples/v1alpha2/openapi.proto - - - -### ErrorResponse - -JSON API Error Response - -The standard Ory JSON API error format. - -| Field | Type | Label | Description | -| ----- | ----------------------------------------------------------------------------- | ----- | ----------- | -| error | [ErrorResponse.Error](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error) | | | - - - -### ErrorResponse.Error - -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ----------------- | -| code | [int64](#int64) | | The status code | -| debug | [string](#string) | | Debug information | - -Debug information is often not exposed to protect against leaking sensitive -information. | | details | -[ErrorResponse.Error.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error-DetailsEntry) -| repeated | Further error details - -Further details about the error. | | id | [string](#string) | | The error ID - -The error ID is useful when trying to identify various errors in application -logic. | | message | [string](#string) | | The error message - -The error's message (required). | | reason | [string](#string) | | The error -reason - -Reason holds a human-readable reason for the error. | | request | -[string](#string) | | The request ID - -The request ID is often exposed internally in order to trace errors across -service architectures. This is often a UUID. | | status | [string](#string) | | -The status description - -Status holds the human-readable HTTP status code. | - - - -### ErrorResponse.Error.DetailsEntry - -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ----------- | -| key | [string](#string) | | | -| value | [string](#string) | | | - - - -

Top

- -## ory/keto/relation_tuples/v1alpha2/read_service.proto - - - -### ListRelationTuplesRequest - -Request for ReadService.ListRelationTuples RPC. See -`ListRelationTuplesRequest_Query` for how to filter the query. - -| Field | Type | Label | Description | -| ----- | ----------------------------------------------------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------- | -| query | [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) | | **Deprecated.** All query constraints are concatenated with a logical AND operator. | - -The RelationTuple list from ListRelationTuplesResponse is ordered from the -newest RelationTuple to the oldest. | | relation_query | -[RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | | -expand_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | This -field is not implemented yet and has no effect. <!-- Optional. The list of -fields to be expanded in the RelationTuple list returned in -`ListRelationTuplesResponse`. Leaving this field unspecified means all fields -are expanded. - -Available fields: "object", "relation", "subject", -"namespace", "subject.id", "subject.namespace", -"subject.object", "subject.relation" --> | | snaptoken | -[string](#string) | | This field is not implemented yet and has no effect. -<!-- Optional. The snapshot token for this read. --> | | page_size | -[int32](#int32) | | Optional. The maximum number of RelationTuples to return in -the response. - -Default: 100 | | page_token | [string](#string) | | Optional. An opaque -pagination token returned from a previous call to `ListRelationTuples` that -indicates where the page should start at. - -An empty token denotes the first page. All successive pages require the token -from the previous page. | | namespace | [string](#string) | | **Deprecated.** -The namespace | | object | [string](#string) | | **Deprecated.** The related -object in this check. | | relation | [string](#string) | | **Deprecated.** The -relation between the Object and the Subject. | | subject_id | [string](#string) -| | A concrete id of the subject. | | subject_set | -[SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A -subject set that expands to more Subjects. More information are available under -[concepts](../concepts/subjects.mdx). | - - - -### ListRelationTuplesRequest.Query - -The query for listing relationships. Clients can specify any optional field to -partially filter for specific relationships. - -Example use cases (namespace is always required): - -- object only: display a list of all permissions referring to a specific object -- relation only: get all groups that have members; get all directories that have - content -- object & relation: display all subjects that have a specific permission - relation -- subject & relation: display all groups a subject belongs to; display all - objects a subject has access to -- object & relation & subject: check whether the relation tuple already - exists - -| Field | Type | Label | Description | -| --------- | ----------------------------------------------------- | ----- | ------------------------------------ | -| namespace | [string](#string) | | Required. The namespace to query. | -| object | [string](#string) | | Optional. The object to query for. | -| relation | [string](#string) | | Optional. The relation to query for. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | - - - -### ListRelationTuplesResponse - -The response of a ReadService.ListRelationTuples RPC. - -| Field | Type | Label | Description | -| --------------- | ----------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------ | -| relation_tuples | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | repeated | The relationships matching the list request. | -| next_page_token | [string](#string) | | The token required to get the next page. If this is the last page, the token will be the empty string. | - - - -### ReadService - -The service to query relationships. - -This service is part of the -[read-APIs](../concepts/25_api-overview.mdx#read-apis). - -| Method Name | Request Type | Response Type | Description | -| ------------------ | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------ | -| ListRelationTuples | [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) | [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) | Lists ACL relationships. | - - - -

Top

- -## ory/keto/relation_tuples/v1alpha2/version.proto - - - -### GetVersionRequest - -Request for the VersionService.GetVersion RPC. - - - -### GetVersionResponse - -Response of the VersionService.GetVersion RPC. - -| Field | Type | Label | Description | -| ------- | ----------------- | ----- | -------------------------------------------- | -| version | [string](#string) | | The version string of the Ory Keto instance. | - - - -### VersionService - -The service returning the specific Ory Keto instance version. - -This service is part of the -[read-APIs](../concepts/25_api-overview.mdx#read-apis) and -[write-APIs](../concepts/25_api-overview.mdx#write-apis). - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------- | -| GetVersion | [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) | [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) | Returns the version of the Ory Keto instance. | - -This endpoint returns the service version typically notated using semantic -versioning. - -If the service supports TLS Edge Termination, this endpoint does not require the -X-Forwarded-Proto header to be set. | - - - -

Top

- -## ory/keto/relation_tuples/v1alpha2/write_service.proto - - - -### CreateRelationTupleRequest - -The request to create a new relationship. - -| Field | Type | Label | Description | -| -------------- | --------------------------------------------------------------------------------------------------------------------- | ----- | --------------------------- | -| relation_tuple | [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) | | The relationship to create. | - - - -### CreateRelationTupleRequest.Relationship - -| Field | Type | Label | Description | -| ----------- | ----------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | -| namespace | [string](#string) | | The namespace this relation tuple lives in. | -| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | | The relation between an Object and a Subject. | -| subject_id | [string](#string) | | A concrete id of the subject. | -| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - - - -### CreateRelationTupleResponse - -The response from creating a new relationship. - -| Field | Type | Label | Description | -| -------------- | ----------------------------------------------------------------- | ----- | ------------------------- | -| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The created relationship. | - - - -### DeleteRelationTuplesRequest - -| Field | Type | Label | Description | -| -------------- | --------------------------------------------------------------------------------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------- | -| query | [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) | | **Deprecated.** | -| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | -| namespace | [string](#string) | | **Deprecated.** The namespace this relation tuple lives in. | -| object | [string](#string) | | **Deprecated.** The object related by this tuple. It is an object in the namespace of the tuple. | -| relation | [string](#string) | | **Deprecated.** The relation between an Object and a Subject. | -| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | -| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | - - - -### DeleteRelationTuplesRequest.Query - -The query for deleting relationships - -| Field | Type | Label | Description | -| --------- | ----------------------------------------------------- | ----- | ------------------------------------ | -| namespace | [string](#string) | | Optional. The namespace to query. | -| object | [string](#string) | | Optional. The object to query for. | -| relation | [string](#string) | | Optional. The relation to query for. | -| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | - - - -### DeleteRelationTuplesResponse - - - -### RelationTupleDelta - -Write-delta for a TransactRelationTuplesRequest. - -| Field | Type | Label | Description | -| -------------- | ----------------------------------------------------------------------------------------- | ----- | -------------------------------------- | -| action | [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) | | The action to do on the RelationTuple. | -| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The target RelationTuple. | - - - -### TransactRelationTuplesRequest - -The request of a WriteService.TransactRelationTuples RPC. - -| Field | Type | Label | Description | -| --------------------- | --------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -| relation_tuple_deltas | [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) | repeated | The write delta for the relationships operated in one single transaction. Either all actions succeed or no change takes effect on error. | - - - -### TransactRelationTuplesResponse - -The response of a WriteService.TransactRelationTuples rpc. - -| Field | Type | Label | Description | -| ---------- | ----------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| snaptokens | [string](#string) | repeated | This field is not implemented yet and has no effect. <!-- The list of the new latest snapshot tokens of the affected RelationTuple, with the same index as specified in the `relation_tuple_deltas` field of the TransactRelationTuplesRequest request. | - -If the RelationTupleDelta_Action was DELETE the snaptoken is empty at the same -index. --> | - - - -### RelationTupleDelta.Action - -| Name | Number | Description | -| ------------------ | ------ | ----------------------------------------------------------------------------------------------------------- | -| ACTION_UNSPECIFIED | 0 | Unspecified. The `TransactRelationTuples` RPC ignores this RelationTupleDelta if an action was unspecified. | -| ACTION_INSERT | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | -| insert | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | -| ACTION_DELETE | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | -| delete | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | - - - -### WriteService - -The write service to create and delete Access Control Lists. - -This service is part of the -[write-APIs](../concepts/25_api-overview.mdx#write-apis). - -| Method Name | Request Type | Response Type | Description | -| ---------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | -| TransactRelationTuples | [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) | [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) | Writes one or more relationships in a single transaction. | -| CreateRelationTuple | [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) | [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) | Creates a relationship | -| DeleteRelationTuples | [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) | [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) | Deletes relationships based on relation query | - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------- | ----------- | ------- | ---------- | -------------- | ------------------------------ | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | +The protocol buffer compiler, `protoc`, is used to compile `.proto` files, which +contain service and message definitions. Go to +[the gRPC documentation](https://grpc.io/docs/protoc-installation/#install-pre-compiled-binaries-any-os) +for installation instructions. diff --git a/proto/docs.md b/proto/docs.md new file mode 100644 index 000000000..6efd4dba7 --- /dev/null +++ b/proto/docs.md @@ -0,0 +1,820 @@ +# Protocol Documentation + + + +## Table of Contents + +- [ory/keto/opl/v1alpha1/syntax_service.proto](#ory_keto_opl_v1alpha1_syntax_service-proto) + + - [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) + - [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) + - [ParseError](#ory-keto-opl-v1alpha1-ParseError) + - [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) + + - [SyntaxService](#ory-keto-opl-v1alpha1-SyntaxService) + +- [ory/keto/relation_tuples/v1alpha2/relation_tuples.proto](#ory_keto_relation_tuples_v1alpha2_relation_tuples-proto) + - [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) + - [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) + - [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) + - [SubjectQuery](#ory-keto-relation_tuples-v1alpha2-SubjectQuery) + - [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) + - [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) +- [ory/keto/relation_tuples/v1alpha2/check_service.proto](#ory_keto_relation_tuples_v1alpha2_check_service-proto) + + - [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) + - [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) + + - [CheckService](#ory-keto-relation_tuples-v1alpha2-CheckService) + +- [ory/keto/relation_tuples/v1alpha2/expand_service.proto](#ory_keto_relation_tuples_v1alpha2_expand_service-proto) + + - [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) + - [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) + - [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) + + - [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) + + - [ExpandService](#ory-keto-relation_tuples-v1alpha2-ExpandService) + +- [ory/keto/relation_tuples/v1alpha2/namespaces_service.proto](#ory_keto_relation_tuples_v1alpha2_namespaces_service-proto) + + - [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) + - [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) + - [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) + + - [NamespacesService](#ory-keto-relation_tuples-v1alpha2-NamespacesService) + +- [ory/keto/relation_tuples/v1alpha2/openapi.proto](#ory_keto_relation_tuples_v1alpha2_openapi-proto) + - [ErrorResponse](#ory-keto-relation_tuples-v1alpha2-ErrorResponse) + - [ErrorResponse.Error](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error) + - [ErrorResponse.Error.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error-DetailsEntry) +- [ory/keto/relation_tuples/v1alpha2/read_service.proto](#ory_keto_relation_tuples_v1alpha2_read_service-proto) + + - [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) + - [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) + - [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) + + - [ReadService](#ory-keto-relation_tuples-v1alpha2-ReadService) + +- [ory/keto/relation_tuples/v1alpha2/version.proto](#ory_keto_relation_tuples_v1alpha2_version-proto) + + - [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) + - [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) + + - [VersionService](#ory-keto-relation_tuples-v1alpha2-VersionService) + +- [ory/keto/relation_tuples/v1alpha2/write_service.proto](#ory_keto_relation_tuples_v1alpha2_write_service-proto) + + - [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) + - [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) + - [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) + - [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) + - [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) + - [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) + - [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) + - [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) + - [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) + + - [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) + + - [WriteService](#ory-keto-relation_tuples-v1alpha2-WriteService) + +- [Scalar Value Types](#scalar-value-types) + + + +

Top

+ +## ory/keto/opl/v1alpha1/syntax_service.proto + + + +### CheckRequest + +| Field | Type | Label | Description | +| ------- | --------------- | ----- | ----------- | +| content | [bytes](#bytes) | | | + + + +### CheckResponse + +| Field | Type | Label | Description | +| ------------ | ----------------------------------------------- | -------- | ----------- | +| parse_errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | | +| errors | [ParseError](#ory-keto-opl-v1alpha1-ParseError) | repeated | | + + + +### ParseError + +| Field | Type | Label | Description | +| ------- | ------------------------------------------------------- | ----- | ----------- | +| message | [string](#string) | | | +| start | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | +| end | [SourcePosition](#ory-keto-opl-v1alpha1-SourcePosition) | | | + + + +### SourcePosition + +| Field | Type | Label | Description | +| ------ | ----------------- | ----- | ----------- | +| line | [uint32](#uint32) | | | +| column | [uint32](#uint32) | | | + + + +### SyntaxService + +The service that checks the syntax of an OPL file. + +| Method Name | Request Type | Response Type | Description | +| ----------- | --------------------------------------------------- | ----------------------------------------------------- | -------------------------------- | +| Check | [CheckRequest](#ory-keto-opl-v1alpha1-CheckRequest) | [CheckResponse](#ory-keto-opl-v1alpha1-CheckResponse) | Performs a syntax check request. | + + + +

Top

+ +## ory/keto/relation_tuples/v1alpha2/relation_tuples.proto + + + +### RelationQuery + +The query for listing relationships. Clients can specify any optional field to +partially filter for specific relationships. + +Example use cases (namespace is always required): + +- object only: display a list of all permissions referring to a specific object +- relation only: get all groups that have members; get all directories that have + content +- object & relation: display all subjects that have a specific permission + relation +- subject & relation: display all groups a subject belongs to; display all + objects a subject has access to +- object & relation & subject: check whether the relation tuple already + exists + +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| namespace | [string](#string) | optional | The namespace this relation tuple lives in. | +| object | [string](#string) | optional | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | optional | The relation between an Object and a Subject. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | optional | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | + + + +### RelationTuple + +RelationTuple defines a relation between an Object and a Subject. + +| Field | Type | Label | Description | +| ----------- | ----------------------------------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------- | +| namespace | [string](#string) | | The namespace this relation tuple lives in. | +| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | The relation between an Object and a Subject. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject related by this tuple. A Subject either represents a concrete subject id or a `SubjectSet` that expands to more Subjects. | +| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | +| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + +### Subject + +Subject is either a concrete subject id or a `SubjectSet` expanding to more +Subjects. + +| Field | Type | Label | Description | +| ----- | ----------------------------------------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------- | +| id | [string](#string) | | A concrete id of the subject. | +| set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/15_subjects.mdx). | + + + +### SubjectQuery + +SubjectQuery is either a concrete subject id or a `SubjectSet` expanding to more +Subjects. + +| Field | Type | Label | Description | +| ----- | --------------------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | +| id | [string](#string) | | A concrete id of the subject. | +| set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + +### SubjectSet + +SubjectSet refers to all subjects who have the same `relation` on an `object`. + +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ------------------------------------------------------------------------ | +| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | +| object | [string](#string) | | The object related by this subject set. | +| relation | [string](#string) | | The relation between the object and the subjects. | + + + +### SubjectSetQuery + +SubjectSetQuery refers to all subjects who have the same `relation` on an +`object`. + +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ------------------------------------------------------------------------ | +| namespace | [string](#string) | | The namespace of the object and relation referenced in this subject set. | +| object | [string](#string) | | The object related by this subject set. | +| relation | [string](#string) | | The relation between the object and the subjects. | + + + +

Top

+ +## ory/keto/relation_tuples/v1alpha2/check_service.proto + + + +### CheckRequest + +The request for a CheckService.Check RPC. Checks whether a specific subject is +related to an object. + +| Field | Type | Label | Description | +| --------- | ----------------- | ----- | ---------------------------------------------------- | +| namespace | [string](#string) | | **Deprecated.** The namespace to evaluate the check. | + +Note: If you use the expand-API and the check evaluates a RelationTuple +specifying a SubjectSet as subject or due to a rewrite rule in a namespace +config this check request may involve other namespaces automatically. | | object +| [string](#string) | | **Deprecated.** The related object in this check. | | +relation | [string](#string) | | **Deprecated.** The relation between the Object +and the Subject. | | subject | +[Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The +related subject in this check. | | subject_id | [string](#string) | | +**Deprecated.** A concrete id of the subject. | | subject_set | +[SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | +**Deprecated.** A subject set that expands to more Subjects. More information +are available under [concepts](../concepts/subjects.mdx). | | tuple | +[RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | | | latest +| [bool](#bool) | | This field is not implemented yet and has no effect. <!-- +Set this field to `true` in case your application needs to authorize depending +on up to date ACLs, also called a "content-change check". + +If set to `true` the `snaptoken` field is ignored, the check is evaluated at the +latest snapshot (globally consistent) and the response includes a snaptoken for +clients to store along with object contents that can be used for subsequent +checks of the same content version. + +Example use case: - You need to authorize a user to modify/delete some resource +and it is unacceptable that if the permission to do that had just been revoked +some seconds ago so that the change had not yet been fully replicated to all +availability zones. --> | | snaptoken | [string](#string) | | This field is +not implemented yet and has no effect. <!-- Optional. Like reads, a check is +always evaluated at a consistent snapshot no earlier than the given snaptoken. + +Leave this field blank if you want to evaluate the check based on eventually +consistent ACLs, benefiting from very low latency, but possibly slightly stale +results. + +If the specified token is too old and no longer known, the server falls back as +if no snaptoken had been specified. + +If not specified the server tries to evaluate the check on the best snapshot +version where it is very likely that ACLs had already been replicated to all +availability zones. --> | | max_depth | [int32](#int32) | | The maximum depth +to search for a relation. + +If the value is less than 1 or greater than the global max-depth then the global +max-depth will be used instead. | + + + +### CheckResponse + +The response for a CheckService.Check rpc. + +| Field | Type | Label | Description | +| ------- | ------------- | ----- | ---------------------------------------------------------------------- | +| allowed | [bool](#bool) | | Whether the specified subject (id) is related to the requested object. | + +It is false by default if no ACL matches. | | snaptoken | [string](#string) | | +This field is not implemented yet and has no effect. <!-- The last known +snapshot token ONLY specified if the request had not specified a snaptoken, +since this performed a "content-change request" and consistently fetched +the last known snapshot token. + +This field is not set if the request had specified a snaptoken! + +If set, clients should cache and use this token for subsequent requests to have +minimal latency, but allow slightly stale responses (only some milliseconds or +seconds). --> | + + + +### CheckService + +The service that performs authorization checks based on the stored Access +Control Lists. + +This service is part of the +[read-APIs](../concepts/25_api-overview.mdx#read-apis). + +| Method Name | Request Type | Response Type | Description | +| ----------- | --------------------------------------------------------------- | ----------------------------------------------------------------- | -------------------------------- | +| Check | [CheckRequest](#ory-keto-relation_tuples-v1alpha2-CheckRequest) | [CheckResponse](#ory-keto-relation_tuples-v1alpha2-CheckResponse) | Performs an authorization check. | + + + +

Top

+ +## ory/keto/relation_tuples/v1alpha2/expand_service.proto + + + +### ExpandRequest + +The request for an ExpandService.Expand RPC. Expands the given subject set. + +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------- | ----- | ----------------------------------- | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | The subject to expand. | +| max_depth | [int32](#int32) | | The maximum depth of tree to build. | + +If the value is less than 1 or greater than the global max-depth then the global +max-depth will be used instead. + +It is important to set this parameter to a meaningful value. Ponder how deep you +really want to display this. | | snaptoken | [string](#string) | | This field is +not implemented yet and has no effect. <!-- Optional. Like reads, a expand is +always evaluated at a consistent snapshot no earlier than the given snaptoken. + +Leave this field blank if you want to expand based on eventually consistent +ACLs, benefiting from very low latency, but possibly slightly stale results. + +If the specified token is too old and no longer known, the server falls back as +if no snaptoken had been specified. + +If not specified the server tries to build the tree on the best snapshot version +where it is very likely that ACLs had already been replicated to all +availability zones. --> | | namespace | [string](#string) | | **Deprecated.** +The namespace of the object and relation referenced in this subject set. | | +object | [string](#string) | | **Deprecated.** The object related by this +subject set. | | relation | [string](#string) | | **Deprecated.** The relation +between the object and the subjects. | + + + +### ExpandResponse + +The response for a ExpandService.Expand RPC. + +| Field | Type | Label | Description | +| ----- | ------------------------------------------------------------- | ----- | ---------------------------------------------------------------------------------------------------- | +| tree | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | | The tree the requested subject set expands to. The requested subject set is the subject of the root. | + +This field can be nil in some circumstances. | + + + +### SubjectTree + +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------- | +| node_type | [NodeType](#ory-keto-relation_tuples-v1alpha2-NodeType) | | The type of the node. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | **Deprecated.** The subject this node represents. Deprecated: More information is now available in the tuple field. | +| tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The relation tuple this node represents. | +| children | [SubjectTree](#ory-keto-relation_tuples-v1alpha2-SubjectTree) | repeated | The children of this node. | + +This is never set if `node_type` == `NODE_TYPE_LEAF`. | + + + +### NodeType + +| Name | Number | Description | +| ------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------- | +| unspecified | 0 | | +| NODE_TYPE_UNSPECIFIED | 0 | | +| union | 1 | This node expands to a union of all children. | +| NODE_TYPE_UNION | 1 | | +| exclusion | 2 | Not implemented yet. | +| NODE_TYPE_EXCLUSION | 2 | | +| intersection | 3 | Not implemented yet. | +| NODE_TYPE_INTERSECTION | 3 | | +| leaf | 4 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| NODE_TYPE_LEAF | 4 | | +| tuple_to_subject_set | 5 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| NODE_TYPE_TUPLE_TO_SUBJECT_SET | 5 | | +| computed_subject_set | 6 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| NODE_TYPE_COMPUTED_SUBJECT_SET | 6 | | +| not | 7 | This node is a leaf and contains no children. Its subject is a `SubjectID` unless `max_depth` was reached. | +| NODE_TYPE_NOT | 7 | | + + + +### ExpandService + +The service that performs subject set expansion based on the stored Access +Control Lists. + +This service is part of the +[read-APIs](../concepts/25_api-overview.mdx#read-apis). + +| Method Name | Request Type | Response Type | Description | +| ----------- | ----------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------ | +| Expand | [ExpandRequest](#ory-keto-relation_tuples-v1alpha2-ExpandRequest) | [ExpandResponse](#ory-keto-relation_tuples-v1alpha2-ExpandResponse) | Expands the subject set into a tree of subjects. | + + + +

Top

+ +## ory/keto/relation_tuples/v1alpha2/namespaces_service.proto + + + +### ListNamespacesRequest + +Request for ReadService.ListNamespaces RPC. + + + +### ListNamespacesResponse + +| Field | Type | Label | Description | +| ---------- | --------------------------------------------------------- | -------- | ----------- | +| namespaces | [Namespace](#ory-keto-relation_tuples-v1alpha2-Namespace) | repeated | | + + + +### Namespace + +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------- | +| name | [string](#string) | | | + + + +### NamespacesService + +The service to query namespaces. + +This service is part of the +[read-APIs](../concepts/25_api-overview.mdx#read-apis). + +| Method Name | Request Type | Response Type | Description | +| -------------- | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---------------- | +| ListNamespaces | [ListNamespacesRequest](#ory-keto-relation_tuples-v1alpha2-ListNamespacesRequest) | [ListNamespacesResponse](#ory-keto-relation_tuples-v1alpha2-ListNamespacesResponse) | Lists Namespaces | + +Get all namespaces. | + + + +

Top

+ +## ory/keto/relation_tuples/v1alpha2/openapi.proto + + + +### ErrorResponse + +JSON API Error Response + +The standard Ory JSON API error format. + +| Field | Type | Label | Description | +| ----- | ----------------------------------------------------------------------------- | ----- | ----------- | +| error | [ErrorResponse.Error](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error) | | | + + + +### ErrorResponse.Error + +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------------- | +| code | [int64](#int64) | | The status code | +| debug | [string](#string) | | Debug information | + +Debug information is often not exposed to protect against leaking sensitive +information. | | details | +[ErrorResponse.Error.DetailsEntry](#ory-keto-relation_tuples-v1alpha2-ErrorResponse-Error-DetailsEntry) +| repeated | Further error details + +Further details about the error. | | id | [string](#string) | | The error ID + +The error ID is useful when trying to identify various errors in application +logic. | | message | [string](#string) | | The error message + +The error's message (required). | | reason | [string](#string) | | The error +reason + +Reason holds a human-readable reason for the error. | | request | +[string](#string) | | The request ID + +The request ID is often exposed internally in order to trace errors across +service architectures. This is often a UUID. | | status | [string](#string) | | +The status description + +Status holds the human-readable HTTP status code. | + + + +### ErrorResponse.Error.DetailsEntry + +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + +

Top

+ +## ory/keto/relation_tuples/v1alpha2/read_service.proto + + + +### ListRelationTuplesRequest + +Request for ReadService.ListRelationTuples RPC. See +`ListRelationTuplesRequest_Query` for how to filter the query. + +| Field | Type | Label | Description | +| ----- | ----------------------------------------------------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------- | +| query | [ListRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest-Query) | | **Deprecated.** All query constraints are concatenated with a logical AND operator. | + +The RelationTuple list from ListRelationTuplesResponse is ordered from the +newest RelationTuple to the oldest. | | relation_query | +[RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | | +expand_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | This +field is not implemented yet and has no effect. <!-- Optional. The list of +fields to be expanded in the RelationTuple list returned in +`ListRelationTuplesResponse`. Leaving this field unspecified means all fields +are expanded. + +Available fields: "object", "relation", "subject", +"namespace", "subject.id", "subject.namespace", +"subject.object", "subject.relation" --> | | snaptoken | +[string](#string) | | This field is not implemented yet and has no effect. +<!-- Optional. The snapshot token for this read. --> | | page_size | +[int32](#int32) | | Optional. The maximum number of RelationTuples to return in +the response. + +Default: 100 | | page_token | [string](#string) | | Optional. An opaque +pagination token returned from a previous call to `ListRelationTuples` that +indicates where the page should start at. + +An empty token denotes the first page. All successive pages require the token +from the previous page. | | namespace | [string](#string) | | **Deprecated.** +The namespace | | object | [string](#string) | | **Deprecated.** The related +object in this check. | | relation | [string](#string) | | **Deprecated.** The +relation between the Object and the Subject. | | subject_id | [string](#string) +| | A concrete id of the subject. | | subject_set | +[SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | A +subject set that expands to more Subjects. More information are available under +[concepts](../concepts/subjects.mdx). | + + + +### ListRelationTuplesRequest.Query + +The query for listing relationships. Clients can specify any optional field to +partially filter for specific relationships. + +Example use cases (namespace is always required): + +- object only: display a list of all permissions referring to a specific object +- relation only: get all groups that have members; get all directories that have + content +- object & relation: display all subjects that have a specific permission + relation +- subject & relation: display all groups a subject belongs to; display all + objects a subject has access to +- object & relation & subject: check whether the relation tuple already + exists + +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------- | ----- | ------------------------------------ | +| namespace | [string](#string) | | Required. The namespace to query. | +| object | [string](#string) | | Optional. The object to query for. | +| relation | [string](#string) | | Optional. The relation to query for. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | + + + +### ListRelationTuplesResponse + +The response of a ReadService.ListRelationTuples RPC. + +| Field | Type | Label | Description | +| --------------- | ----------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------ | +| relation_tuples | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | repeated | The relationships matching the list request. | +| next_page_token | [string](#string) | | The token required to get the next page. If this is the last page, the token will be the empty string. | + + + +### ReadService + +The service to query relationships. + +This service is part of the +[read-APIs](../concepts/25_api-overview.mdx#read-apis). + +| Method Name | Request Type | Response Type | Description | +| ------------------ | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------ | +| ListRelationTuples | [ListRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesRequest) | [ListRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-ListRelationTuplesResponse) | Lists ACL relationships. | + + + +

Top

+ +## ory/keto/relation_tuples/v1alpha2/version.proto + + + +### GetVersionRequest + +Request for the VersionService.GetVersion RPC. + + + +### GetVersionResponse + +Response of the VersionService.GetVersion RPC. + +| Field | Type | Label | Description | +| ------- | ----------------- | ----- | -------------------------------------------- | +| version | [string](#string) | | The version string of the Ory Keto instance. | + + + +### VersionService + +The service returning the specific Ory Keto instance version. + +This service is part of the +[read-APIs](../concepts/25_api-overview.mdx#read-apis) and +[write-APIs](../concepts/25_api-overview.mdx#write-apis). + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------- | +| GetVersion | [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) | [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) | Returns the version of the Ory Keto instance. | + +This endpoint returns the service version typically notated using semantic +versioning. + +If the service supports TLS Edge Termination, this endpoint does not require the +X-Forwarded-Proto header to be set. | + + + +

Top

+ +## ory/keto/relation_tuples/v1alpha2/write_service.proto + + + +### CreateRelationTupleRequest + +The request to create a new relationship. + +| Field | Type | Label | Description | +| -------------- | --------------------------------------------------------------------------------------------------------------------- | ----- | --------------------------- | +| relation_tuple | [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) | | The relationship to create. | + + + +### CreateRelationTupleRequest.Relationship + +| Field | Type | Label | Description | +| ----------- | ----------------------------------------------------------- | ----- | ----------------------------------------------------------------------------------------------------------------------- | +| namespace | [string](#string) | | The namespace this relation tuple lives in. | +| object | [string](#string) | | The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | The relation between an Object and a Subject. | +| subject_id | [string](#string) | | A concrete id of the subject. | +| subject_set | [SubjectSet](#ory-keto-relation_tuples-v1alpha2-SubjectSet) | | A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + +### CreateRelationTupleResponse + +The response from creating a new relationship. + +| Field | Type | Label | Description | +| -------------- | ----------------------------------------------------------------- | ----- | ------------------------- | +| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The created relationship. | + + + +### DeleteRelationTuplesRequest + +| Field | Type | Label | Description | +| -------------- | --------------------------------------------------------------------------------------------------------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------- | +| query | [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) | | **Deprecated.** | +| relation_query | [RelationQuery](#ory-keto-relation_tuples-v1alpha2-RelationQuery) | | | +| namespace | [string](#string) | | **Deprecated.** The namespace this relation tuple lives in. | +| object | [string](#string) | | **Deprecated.** The object related by this tuple. It is an object in the namespace of the tuple. | +| relation | [string](#string) | | **Deprecated.** The relation between an Object and a Subject. | +| subject_id | [string](#string) | | **Deprecated.** A concrete id of the subject. | +| subject_set | [SubjectSetQuery](#ory-keto-relation_tuples-v1alpha2-SubjectSetQuery) | | **Deprecated.** A subject set that expands to more Subjects. More information are available under [concepts](../concepts/subjects.mdx). | + + + +### DeleteRelationTuplesRequest.Query + +The query for deleting relationships + +| Field | Type | Label | Description | +| --------- | ----------------------------------------------------- | ----- | ------------------------------------ | +| namespace | [string](#string) | | Optional. The namespace to query. | +| object | [string](#string) | | Optional. The object to query for. | +| relation | [string](#string) | | Optional. The relation to query for. | +| subject | [Subject](#ory-keto-relation_tuples-v1alpha2-Subject) | | Optional. The subject to query for. | + + + +### DeleteRelationTuplesResponse + + + +### RelationTupleDelta + +Write-delta for a TransactRelationTuplesRequest. + +| Field | Type | Label | Description | +| -------------- | ----------------------------------------------------------------------------------------- | ----- | -------------------------------------- | +| action | [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) | | The action to do on the RelationTuple. | +| relation_tuple | [RelationTuple](#ory-keto-relation_tuples-v1alpha2-RelationTuple) | | The target RelationTuple. | + + + +### TransactRelationTuplesRequest + +The request of a WriteService.TransactRelationTuples RPC. + +| Field | Type | Label | Description | +| --------------------- | --------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| relation_tuple_deltas | [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) | repeated | The write delta for the relationships operated in one single transaction. Either all actions succeed or no change takes effect on error. | + + + +### TransactRelationTuplesResponse + +The response of a WriteService.TransactRelationTuples rpc. + +| Field | Type | Label | Description | +| ---------- | ----------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| snaptokens | [string](#string) | repeated | This field is not implemented yet and has no effect. <!-- The list of the new latest snapshot tokens of the affected RelationTuple, with the same index as specified in the `relation_tuple_deltas` field of the TransactRelationTuplesRequest request. | + +If the RelationTupleDelta_Action was DELETE the snaptoken is empty at the same +index. --> | + + + +### RelationTupleDelta.Action + +| Name | Number | Description | +| ------------------ | ------ | ----------------------------------------------------------------------------------------------------------- | +| ACTION_UNSPECIFIED | 0 | Unspecified. The `TransactRelationTuples` RPC ignores this RelationTupleDelta if an action was unspecified. | +| ACTION_INSERT | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | +| insert | 1 | Insertion of a new RelationTuple. It is ignored if already existing. | +| ACTION_DELETE | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | +| delete | 2 | Deletion of the RelationTuple. It is ignored if it does not exist. | + + + +### WriteService + +The write service to create and delete Access Control Lists. + +This service is part of the +[write-APIs](../concepts/25_api-overview.mdx#write-apis). + +| Method Name | Request Type | Response Type | Description | +| ---------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | +| TransactRelationTuples | [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) | [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) | Writes one or more relationships in a single transaction. | +| CreateRelationTuple | [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) | [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) | Creates a relationship | +| DeleteRelationTuples | [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) | [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) | Deletes relationships based on relation query | + +## Scalar Value Types + +| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | +| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------- | ----------- | ------- | ---------- | -------------- | ------------------------------ | +| double | | double | double | float | float64 | double | float | Float | +| float | | float | float | float | float32 | float | float | Float | +| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | +| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | +| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | +| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | +| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | +| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | +| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | +| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | +| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go index 7fb1521d5..d5dd55524 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.29.0 // protoc (unknown) // source: ory/keto/opl/v1alpha1/syntax_service.proto diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.gw.go b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.gw.go index 859a32861..74b83af2d 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.gw.go +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.gw.go @@ -102,7 +102,7 @@ func RegisterSyntaxServiceHandlerServer(ctx context.Context, mux *runtime.ServeM // RegisterSyntaxServiceHandlerFromEndpoint is same as RegisterSyntaxServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterSyntaxServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_grpc.pb.go b/proto/ory/keto/opl/v1alpha1/syntax_service_grpc.pb.go index c68104c0a..4a7305a35 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_grpc.pb.go +++ b/proto/ory/keto/opl/v1alpha1/syntax_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: ory/keto/opl/v1alpha1/syntax_service.proto @@ -18,6 +18,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + SyntaxService_Check_FullMethodName = "/ory.keto.opl.v1alpha1.SyntaxService/Check" +) + // SyntaxServiceClient is the client API for SyntaxService 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. @@ -36,7 +40,7 @@ func NewSyntaxServiceClient(cc grpc.ClientConnInterface) SyntaxServiceClient { func (c *syntaxServiceClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) { out := new(CheckResponse) - err := c.cc.Invoke(ctx, "/ory.keto.opl.v1alpha1.SyntaxService/Check", in, out, opts...) + err := c.cc.Invoke(ctx, SyntaxService_Check_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -80,7 +84,7 @@ func _SyntaxService_Check_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ory.keto.opl.v1alpha1.SyntaxService/Check", + FullMethod: SyntaxService_Check_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(SyntaxServiceServer).Check(ctx, req.(*CheckRequest)) diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go index e0844827c..575e3ad35 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.29.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/check_service.proto @@ -37,19 +37,19 @@ type CheckRequest struct { // subject or due to a rewrite rule in a namespace config // this check request may involve other namespaces automatically. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto. Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // The related object in this check. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto. Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"` // The relation between the Object and the Subject. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto. Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` // The related subject in this check. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto. Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` // Types that are assignable to RestApiSubject: // @@ -134,7 +134,7 @@ func (*CheckRequest) Descriptor() ([]byte, []int) { return file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescGZIP(), []int{0} } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto. func (x *CheckRequest) GetNamespace() string { if x != nil { return x.Namespace @@ -142,7 +142,7 @@ func (x *CheckRequest) GetNamespace() string { return "" } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto. func (x *CheckRequest) GetObject() string { if x != nil { return x.Object @@ -150,7 +150,7 @@ func (x *CheckRequest) GetObject() string { return "" } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto. func (x *CheckRequest) GetRelation() string { if x != nil { return x.Relation @@ -158,7 +158,7 @@ func (x *CheckRequest) GetRelation() string { return "" } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto. func (x *CheckRequest) GetSubject() *Subject { if x != nil { return x.Subject @@ -173,7 +173,7 @@ func (m *CheckRequest) GetRestApiSubject() isCheckRequest_RestApiSubject { return nil } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto. func (x *CheckRequest) GetSubjectId() string { if x, ok := x.GetRestApiSubject().(*CheckRequest_SubjectId); ok { return x.SubjectId @@ -181,7 +181,7 @@ func (x *CheckRequest) GetSubjectId() string { return "" } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto. func (x *CheckRequest) GetSubjectSet() *SubjectSetQuery { if x, ok := x.GetRestApiSubject().(*CheckRequest_SubjectSet); ok { return x.SubjectSet @@ -224,7 +224,7 @@ type isCheckRequest_RestApiSubject interface { type CheckRequest_SubjectId struct { // A concrete id of the subject. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto. SubjectId string `protobuf:"bytes,9,opt,name=subject_id,proto3,oneof"` } @@ -232,7 +232,7 @@ type CheckRequest_SubjectSet struct { // A subject set that expands to more Subjects. // More information are available under [concepts](../concepts/subjects.mdx). // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto. SubjectSet *SubjectSetQuery `protobuf:"bytes,10,opt,name=subject_set,proto3,oneof"` } @@ -342,8 +342,8 @@ var file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDesc = []byte{ 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x14, 0x18, 0x01, 0xfa, 0xd2, - 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, + 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x14, 0xfa, 0xd2, 0xe4, 0x93, + 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x18, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.gw.go index 78d790587..64b956f71 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.gw.go @@ -283,7 +283,7 @@ func RegisterCheckServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu // RegisterCheckServiceHandlerFromEndpoint is same as RegisterCheckServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterCheckServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go index cd2279d57..5437d83dc 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/check_service.proto @@ -18,6 +18,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + CheckService_Check_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.CheckService/Check" +) + // CheckServiceClient is the client API for CheckService 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. @@ -36,7 +40,7 @@ func NewCheckServiceClient(cc grpc.ClientConnInterface) CheckServiceClient { func (c *checkServiceClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) { out := new(CheckResponse) - err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", in, out, opts...) + err := c.cc.Invoke(ctx, CheckService_Check_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -80,7 +84,7 @@ func _CheckService_Check_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", + FullMethod: CheckService_Check_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CheckServiceServer).Check(ctx, req.(*CheckRequest)) diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go index a8e5fdd9c..a4f218263 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.29.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/expand_service.proto @@ -159,15 +159,15 @@ type ExpandRequest struct { // The namespace of the object and relation // referenced in this subject set. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/expand_service.proto. Namespace string `protobuf:"bytes,4,opt,name=namespace,proto3" json:"namespace,omitempty"` // The object related by this subject set. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/expand_service.proto. Object string `protobuf:"bytes,5,opt,name=object,proto3" json:"object,omitempty"` // The relation between the object and the subjects. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/expand_service.proto. Relation string `protobuf:"bytes,6,opt,name=relation,proto3" json:"relation,omitempty"` } @@ -224,7 +224,7 @@ func (x *ExpandRequest) GetSnaptoken() string { return "" } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/expand_service.proto. func (x *ExpandRequest) GetNamespace() string { if x != nil { return x.Namespace @@ -232,7 +232,7 @@ func (x *ExpandRequest) GetNamespace() string { return "" } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/expand_service.proto. func (x *ExpandRequest) GetObject() string { if x != nil { return x.Object @@ -240,7 +240,7 @@ func (x *ExpandRequest) GetObject() string { return "" } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/expand_service.proto. func (x *ExpandRequest) GetRelation() string { if x != nil { return x.Relation @@ -310,7 +310,7 @@ type SubjectTree struct { // The subject this node represents. // Deprecated: More information is now available in the tuple field. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/expand_service.proto. Subject *Subject `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` // The relation tuple this node represents. Tuple *RelationTuple `protobuf:"bytes,4,opt,name=tuple,proto3" json:"tuple,omitempty"` @@ -359,7 +359,7 @@ func (x *SubjectTree) GetNodeType() NodeType { return NodeType_unspecified } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/expand_service.proto. func (x *SubjectTree) GetSubject() *Subject { if x != nil { return x.Subject @@ -415,11 +415,11 @@ var file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDesc = []byte 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x05, 0x18, 0x01, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x05, 0xe0, 0x41, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x05, 0x18, 0x01, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x09, 0x42, 0x05, 0xe0, 0x41, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x21, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x05, 0x18, 0x01, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x28, 0x09, 0x42, 0x05, 0xe0, 0x41, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x54, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x72, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.gw.go index a37b2aedb..0aaa87f60 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.gw.go @@ -104,7 +104,7 @@ func RegisterExpandServiceHandlerServer(ctx context.Context, mux *runtime.ServeM // RegisterExpandServiceHandlerFromEndpoint is same as RegisterExpandServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterExpandServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc.pb.go index e3fecb3f9..9f8a029d6 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/expand_service.proto @@ -18,6 +18,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + ExpandService_Expand_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand" +) + // ExpandServiceClient is the client API for ExpandService 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. @@ -36,7 +40,7 @@ func NewExpandServiceClient(cc grpc.ClientConnInterface) ExpandServiceClient { func (c *expandServiceClient) Expand(ctx context.Context, in *ExpandRequest, opts ...grpc.CallOption) (*ExpandResponse, error) { out := new(ExpandResponse) - err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand", in, out, opts...) + err := c.cc.Invoke(ctx, ExpandService_Expand_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -80,7 +84,7 @@ func _ExpandService_Expand_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand", + FullMethod: ExpandService_Expand_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ExpandServiceServer).Expand(ctx, req.(*ExpandRequest)) diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go index 25702d579..f1da5b38e 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.29.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/namespaces_service.proto diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.gw.go index b1f8847df..7f19fcd3f 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.gw.go @@ -86,7 +86,7 @@ func RegisterNamespacesServiceHandlerServer(ctx context.Context, mux *runtime.Se // RegisterNamespacesServiceHandlerFromEndpoint is same as RegisterNamespacesServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterNamespacesServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc.pb.go index f3c6f7016..d1c646793 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/namespaces_service.proto @@ -18,6 +18,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + NamespacesService_ListNamespaces_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.NamespacesService/ListNamespaces" +) + // NamespacesServiceClient is the client API for NamespacesService 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. @@ -38,7 +42,7 @@ func NewNamespacesServiceClient(cc grpc.ClientConnInterface) NamespacesServiceCl func (c *namespacesServiceClient) ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) { out := new(ListNamespacesResponse) - err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.NamespacesService/ListNamespaces", in, out, opts...) + err := c.cc.Invoke(ctx, NamespacesService_ListNamespaces_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -84,7 +88,7 @@ func _NamespacesService_ListNamespaces_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ory.keto.relation_tuples.v1alpha2.NamespacesService/ListNamespaces", + FullMethod: NamespacesService_ListNamespaces_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NamespacesServiceServer).ListNamespaces(ctx, req.(*ListNamespacesRequest)) diff --git a/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go index fbcc37d01..11068f8ec 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.29.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/openapi.proto @@ -245,44 +245,44 @@ var file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDesc = []byte{ 0x1a, 0x3a, 0x0a, 0x0c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xd1, 0x04, 0x0a, - 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xd1, 0x04, 0x92, + 0x41, 0x90, 0x03, 0x12, 0x95, 0x02, 0x0a, 0x08, 0x4f, 0x52, 0x59, 0x20, 0x4b, 0x65, 0x74, 0x6f, + 0x12, 0x9b, 0x01, 0x4f, 0x72, 0x79, 0x20, 0x4b, 0x65, 0x74, 0x6f, 0x20, 0x69, 0x73, 0x20, 0x61, + 0x20, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x20, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x62, 0x65, + 0x73, 0x74, 0x2d, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x20, 0x70, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x73, 0x20, 0x28, 0x52, 0x42, 0x41, 0x43, 0x2c, 0x20, 0x41, 0x42, 0x41, 0x43, + 0x2c, 0x20, 0x41, 0x43, 0x4c, 0x2c, 0x20, 0x41, 0x57, 0x53, 0x20, 0x49, 0x41, 0x4d, 0x20, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2c, 0x20, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x65, 0x73, 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x20, + 0x76, 0x69, 0x61, 0x20, 0x52, 0x45, 0x53, 0x54, 0x20, 0x41, 0x50, 0x49, 0x73, 0x2e, 0x22, 0x24, + 0x0a, 0x03, 0x4f, 0x52, 0x59, 0x12, 0x12, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, + 0x77, 0x77, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x73, 0x68, 0x1a, 0x09, 0x68, 0x69, 0x40, 0x6f, 0x72, + 0x79, 0x2e, 0x73, 0x68, 0x2a, 0x3d, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x32, + 0x2e, 0x30, 0x12, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, + 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, + 0x4e, 0x53, 0x45, 0x32, 0x06, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x22, 0x01, 0x2f, 0x2a, 0x02, + 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, 0x52, 0x4b, 0x0a, 0x03, 0x34, 0x30, 0x30, 0x12, 0x44, 0x0a, + 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x12, 0x34, 0x0a, + 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, - 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, - 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x92, 0x41, 0x90, 0x03, - 0x12, 0x95, 0x02, 0x0a, 0x08, 0x4f, 0x52, 0x59, 0x20, 0x4b, 0x65, 0x74, 0x6f, 0x12, 0x9b, 0x01, - 0x4f, 0x72, 0x79, 0x20, 0x4b, 0x65, 0x74, 0x6f, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x62, 0x65, 0x73, 0x74, 0x2d, - 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x20, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, - 0x73, 0x20, 0x28, 0x52, 0x42, 0x41, 0x43, 0x2c, 0x20, 0x41, 0x42, 0x41, 0x43, 0x2c, 0x20, 0x41, - 0x43, 0x4c, 0x2c, 0x20, 0x41, 0x57, 0x53, 0x20, 0x49, 0x41, 0x4d, 0x20, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x69, 0x65, 0x73, 0x2c, 0x20, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, - 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x20, 0x76, 0x69, 0x61, - 0x20, 0x52, 0x45, 0x53, 0x54, 0x20, 0x41, 0x50, 0x49, 0x73, 0x2e, 0x22, 0x24, 0x0a, 0x03, 0x4f, - 0x52, 0x59, 0x12, 0x12, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, - 0x6f, 0x72, 0x79, 0x2e, 0x73, 0x68, 0x1a, 0x09, 0x68, 0x69, 0x40, 0x6f, 0x72, 0x79, 0x2e, 0x73, - 0x68, 0x2a, 0x3d, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x32, 0x2e, 0x30, 0x12, - 0x2f, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x62, 0x6c, 0x6f, - 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, - 0x32, 0x06, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x22, 0x01, 0x2f, 0x2a, 0x02, 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, 0x52, 0x4b, 0x0a, 0x03, 0x34, 0x30, 0x30, 0x12, 0x44, 0x0a, 0x0c, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x12, 0x34, 0x0a, 0x32, 0x1a, 0x30, - 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x32, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, + 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, + 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go index 7f0f36068..06eff1893 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.29.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/read_service.proto @@ -37,7 +37,7 @@ type ListRelationTuplesRequest struct { // The RelationTuple list from ListRelationTuplesResponse // is ordered from the newest RelationTuple to the oldest. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/read_service.proto. Query *ListRelationTuplesRequest_Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` RelationQuery *RelationQuery `protobuf:"bytes,6,opt,name=relation_query,json=relationQuery,proto3" json:"relation_query,omitempty"` // This field is not implemented yet and has no effect. @@ -71,15 +71,15 @@ type ListRelationTuplesRequest struct { PageToken string `protobuf:"bytes,5,opt,name=page_token,proto3" json:"page_token,omitempty"` // The namespace // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/read_service.proto. Namespace string `protobuf:"bytes,7,opt,name=namespace,proto3" json:"namespace,omitempty"` // The related object in this check. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/read_service.proto. Object string `protobuf:"bytes,8,opt,name=object,proto3" json:"object,omitempty"` // The relation between the Object and the Subject. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/read_service.proto. Relation string `protobuf:"bytes,9,opt,name=relation,proto3" json:"relation,omitempty"` // Types that are assignable to RestApiSubject: // @@ -120,7 +120,7 @@ func (*ListRelationTuplesRequest) Descriptor() ([]byte, []int) { return file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDescGZIP(), []int{0} } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/read_service.proto. func (x *ListRelationTuplesRequest) GetQuery() *ListRelationTuplesRequest_Query { if x != nil { return x.Query @@ -163,7 +163,7 @@ func (x *ListRelationTuplesRequest) GetPageToken() string { return "" } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/read_service.proto. func (x *ListRelationTuplesRequest) GetNamespace() string { if x != nil { return x.Namespace @@ -171,7 +171,7 @@ func (x *ListRelationTuplesRequest) GetNamespace() string { return "" } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/read_service.proto. func (x *ListRelationTuplesRequest) GetObject() string { if x != nil { return x.Object @@ -179,7 +179,7 @@ func (x *ListRelationTuplesRequest) GetObject() string { return "" } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/read_service.proto. func (x *ListRelationTuplesRequest) GetRelation() string { if x != nil { return x.Relation @@ -399,8 +399,8 @@ var file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDesc = []byte{ 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x42, 0x14, 0x18, 0x01, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, - 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, + 0x42, 0x14, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, + 0x47, 0x47, 0x45, 0x52, 0x18, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.gw.go index 7ad30f1b8..0ac3fb829 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.gw.go @@ -104,7 +104,7 @@ func RegisterReadServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux // RegisterReadServiceHandlerFromEndpoint is same as RegisterReadServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterReadServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc.pb.go index 52e8fe3bf..3fa7b1ffd 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/read_service.proto @@ -18,6 +18,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + ReadService_ListRelationTuples_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples" +) + // ReadServiceClient is the client API for ReadService 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. @@ -36,7 +40,7 @@ func NewReadServiceClient(cc grpc.ClientConnInterface) ReadServiceClient { func (c *readServiceClient) ListRelationTuples(ctx context.Context, in *ListRelationTuplesRequest, opts ...grpc.CallOption) (*ListRelationTuplesResponse, error) { out := new(ListRelationTuplesResponse) - err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples", in, out, opts...) + err := c.cc.Invoke(ctx, ReadService_ListRelationTuples_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -80,7 +84,7 @@ func _ReadService_ListRelationTuples_Handler(srv interface{}, ctx context.Contex } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples", + FullMethod: ReadService_ListRelationTuples_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ReadServiceServer).ListRelationTuples(ctx, req.(*ListRelationTuplesRequest)) diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go index fcd2b5458..afde7040a 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.29.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/relation_tuples.proto @@ -113,7 +113,7 @@ func (m *RelationTuple) GetRestApiSubject() isRelationTuple_RestApiSubject { return nil } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/relation_tuples.proto. func (x *RelationTuple) GetSubjectId() string { if x, ok := x.GetRestApiSubject().(*RelationTuple_SubjectId); ok { return x.SubjectId @@ -121,7 +121,7 @@ func (x *RelationTuple) GetSubjectId() string { return "" } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/relation_tuples.proto. func (x *RelationTuple) GetSubjectSet() *SubjectSet { if x, ok := x.GetRestApiSubject().(*RelationTuple_SubjectSet); ok { return x.SubjectSet @@ -136,7 +136,7 @@ type isRelationTuple_RestApiSubject interface { type RelationTuple_SubjectId struct { // A concrete id of the subject. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/relation_tuples.proto. SubjectId string `protobuf:"bytes,5,opt,name=subject_id,proto3,oneof"` } @@ -144,7 +144,7 @@ type RelationTuple_SubjectSet struct { // A subject set that expands to more Subjects. // More information are available under [concepts](../concepts/subjects.mdx). // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/relation_tuples.proto. SubjectSet *SubjectSet `protobuf:"bytes,6,opt,name=subject_set,proto3,oneof"` } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go index 983dddc82..f907bf721 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.29.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/version.proto diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.gw.go index 1f27fa761..a4b48a0a3 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.gw.go @@ -86,7 +86,7 @@ func RegisterVersionServiceHandlerServer(ctx context.Context, mux *runtime.Serve // RegisterVersionServiceHandlerFromEndpoint is same as RegisterVersionServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterVersionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc.pb.go index 2e2a5aa46..197c1507b 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/version.proto @@ -18,6 +18,10 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + VersionService_GetVersion_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion" +) + // VersionServiceClient is the client API for VersionService 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. @@ -41,7 +45,7 @@ func NewVersionServiceClient(cc grpc.ClientConnInterface) VersionServiceClient { func (c *versionServiceClient) GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error) { out := new(GetVersionResponse) - err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion", in, out, opts...) + err := c.cc.Invoke(ctx, VersionService_GetVersion_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -90,7 +94,7 @@ func _VersionService_GetVersion_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion", + FullMethod: VersionService_GetVersion_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VersionServiceServer).GetVersion(ctx, req.(*GetVersionRequest)) diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go index 71115001d..c7b62bc75 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.29.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/write_service.proto @@ -358,21 +358,21 @@ type DeleteRelationTuplesRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto. Query *DeleteRelationTuplesRequest_Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` RelationQuery *RelationQuery `protobuf:"bytes,2,opt,name=relation_query,json=relationQuery,proto3" json:"relation_query,omitempty"` // The namespace this relation tuple lives in. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto. Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` // The object related by this tuple. // It is an object in the namespace of the tuple. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto. Object string `protobuf:"bytes,4,opt,name=object,proto3" json:"object,omitempty"` // The relation between an Object and a Subject. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto. Relation string `protobuf:"bytes,5,opt,name=relation,proto3" json:"relation,omitempty"` // Types that are assignable to RestApiSubject: // @@ -413,7 +413,7 @@ func (*DeleteRelationTuplesRequest) Descriptor() ([]byte, []int) { return file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP(), []int{5} } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto. func (x *DeleteRelationTuplesRequest) GetQuery() *DeleteRelationTuplesRequest_Query { if x != nil { return x.Query @@ -428,7 +428,7 @@ func (x *DeleteRelationTuplesRequest) GetRelationQuery() *RelationQuery { return nil } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto. func (x *DeleteRelationTuplesRequest) GetNamespace() string { if x != nil { return x.Namespace @@ -436,7 +436,7 @@ func (x *DeleteRelationTuplesRequest) GetNamespace() string { return "" } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto. func (x *DeleteRelationTuplesRequest) GetObject() string { if x != nil { return x.Object @@ -444,7 +444,7 @@ func (x *DeleteRelationTuplesRequest) GetObject() string { return "" } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto. func (x *DeleteRelationTuplesRequest) GetRelation() string { if x != nil { return x.Relation @@ -459,7 +459,7 @@ func (m *DeleteRelationTuplesRequest) GetRestApiSubject() isDeleteRelationTuples return nil } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto. func (x *DeleteRelationTuplesRequest) GetSubjectId() string { if x, ok := x.GetRestApiSubject().(*DeleteRelationTuplesRequest_SubjectId); ok { return x.SubjectId @@ -467,7 +467,7 @@ func (x *DeleteRelationTuplesRequest) GetSubjectId() string { return "" } -// Deprecated: Do not use. +// Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto. func (x *DeleteRelationTuplesRequest) GetSubjectSet() *SubjectSetQuery { if x, ok := x.GetRestApiSubject().(*DeleteRelationTuplesRequest_SubjectSet); ok { return x.SubjectSet @@ -482,7 +482,7 @@ type isDeleteRelationTuplesRequest_RestApiSubject interface { type DeleteRelationTuplesRequest_SubjectId struct { // A concrete id of the subject. // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto. SubjectId string `protobuf:"bytes,6,opt,name=subject_id,proto3,oneof"` } @@ -490,7 +490,7 @@ type DeleteRelationTuplesRequest_SubjectSet struct { // A subject set that expands to more Subjects. // More information are available under [concepts](../concepts/subjects.mdx). // - // Deprecated: Do not use. + // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto. SubjectSet *SubjectSetQuery `protobuf:"bytes,7,opt,name=subject_set,proto3,oneof"` } @@ -824,8 +824,8 @@ var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDesc = []byte{ 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x14, 0x18, 0x01, 0xfa, 0xd2, - 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x14, 0xfa, 0xd2, 0xe4, 0x93, + 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x18, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.gw.go index 9e5ab6865..461047c32 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.gw.go @@ -222,7 +222,7 @@ func RegisterWriteServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu // RegisterWriteServiceHandlerFromEndpoint is same as RegisterWriteServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterWriteServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go index 8e01bd944..bb349f9fa 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/write_service.proto @@ -18,6 +18,12 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + WriteService_TransactRelationTuples_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples" + WriteService_CreateRelationTuple_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.WriteService/CreateRelationTuple" + WriteService_DeleteRelationTuples_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples" +) + // WriteServiceClient is the client API for WriteService 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. @@ -40,7 +46,7 @@ func NewWriteServiceClient(cc grpc.ClientConnInterface) WriteServiceClient { func (c *writeServiceClient) TransactRelationTuples(ctx context.Context, in *TransactRelationTuplesRequest, opts ...grpc.CallOption) (*TransactRelationTuplesResponse, error) { out := new(TransactRelationTuplesResponse) - err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples", in, out, opts...) + err := c.cc.Invoke(ctx, WriteService_TransactRelationTuples_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -49,7 +55,7 @@ func (c *writeServiceClient) TransactRelationTuples(ctx context.Context, in *Tra func (c *writeServiceClient) CreateRelationTuple(ctx context.Context, in *CreateRelationTupleRequest, opts ...grpc.CallOption) (*CreateRelationTupleResponse, error) { out := new(CreateRelationTupleResponse) - err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.WriteService/CreateRelationTuple", in, out, opts...) + err := c.cc.Invoke(ctx, WriteService_CreateRelationTuple_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -58,7 +64,7 @@ func (c *writeServiceClient) CreateRelationTuple(ctx context.Context, in *Create func (c *writeServiceClient) DeleteRelationTuples(ctx context.Context, in *DeleteRelationTuplesRequest, opts ...grpc.CallOption) (*DeleteRelationTuplesResponse, error) { out := new(DeleteRelationTuplesResponse) - err := c.cc.Invoke(ctx, "/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples", in, out, opts...) + err := c.cc.Invoke(ctx, WriteService_DeleteRelationTuples_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -112,7 +118,7 @@ func _WriteService_TransactRelationTuples_Handler(srv interface{}, ctx context.C } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples", + FullMethod: WriteService_TransactRelationTuples_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WriteServiceServer).TransactRelationTuples(ctx, req.(*TransactRelationTuplesRequest)) @@ -130,7 +136,7 @@ func _WriteService_CreateRelationTuple_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ory.keto.relation_tuples.v1alpha2.WriteService/CreateRelationTuple", + FullMethod: WriteService_CreateRelationTuple_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WriteServiceServer).CreateRelationTuple(ctx, req.(*CreateRelationTupleRequest)) @@ -148,7 +154,7 @@ func _WriteService_DeleteRelationTuples_Handler(srv interface{}, ctx context.Con } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples", + FullMethod: WriteService_DeleteRelationTuples_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WriteServiceServer).DeleteRelationTuples(ctx, req.(*DeleteRelationTuplesRequest)) diff --git a/spec/api.swagger.json b/spec/api.swagger.json index e0cb0ef38..a5f615311 100755 --- a/spec/api.swagger.json +++ b/spec/api.swagger.json @@ -31,7 +31,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -96,13 +96,13 @@ "201": { "description": "The created relationship.", "schema": { - "$ref": "#/definitions/relationship" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -113,7 +113,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/createRelationshipBody", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship", "required": ["relationTuple"] } } @@ -134,7 +134,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -147,7 +147,8 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/relationshipDelta" + "type": "object", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta" } } } @@ -164,7 +165,7 @@ "200": { "description": "The list of namespaces.", "schema": { - "$ref": "#/definitions/relationshipNamespaces" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse" }, "examples": { "application/json": { @@ -179,7 +180,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -195,13 +196,13 @@ "200": { "description": "The result of the syntax checker", "schema": { - "$ref": "#/definitions/checkOplSyntaxResult" + "$ref": "#/definitions/ory.keto.opl.v1alpha1.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -228,13 +229,13 @@ "200": { "description": "The list of relationships.", "schema": { - "$ref": "#/definitions/relationships" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -316,19 +317,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } } }, @@ -401,19 +402,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } } }, @@ -424,7 +425,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/postCheckPermissionBody" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" } } ], @@ -440,19 +441,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } } }, @@ -525,19 +526,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } } }, @@ -548,7 +549,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/postCheckPermissionBody" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" } } ], @@ -564,13 +565,13 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/expandedPermissionTree" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -624,7 +625,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -633,18 +634,20 @@ } }, "definitions": { - "checkOplSyntaxResult": { + "ory.keto.opl.v1alpha1.CheckResponse": { "type": "object", "properties": { "parseErrors": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/ory.keto.opl.v1alpha1.ParseError" } }, "errors": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/ory.keto.opl.v1alpha1.ParseError" } } @@ -677,7 +680,7 @@ } } }, - "postCheckPermissionBody": { + "ory.keto.relation_tuples.v1alpha2.CheckRequest": { "type": "object", "properties": { "namespace": { @@ -697,7 +700,7 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/subjectSetQuery", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSetQuery", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." }, "max-depth": { @@ -708,7 +711,7 @@ }, "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object." }, - "checkPermissionResult": { + "ory.keto.relation_tuples.v1alpha2.CheckResponse": { "type": "object", "properties": { "allowed": { @@ -718,7 +721,7 @@ }, "description": "The response for a CheckService.Check rpc." }, - "createRelationshipBody": { + "ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship": { "type": "object", "properties": { "namespace": { @@ -738,7 +741,7 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/subjectSet", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } } @@ -747,7 +750,7 @@ "type": "object", "properties": { "relationTuple": { - "$ref": "#/definitions/relationship", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", "description": "The created relationship." } }, @@ -756,18 +759,18 @@ "ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse": { "type": "object" }, - "errorGeneric": { + "ory.keto.relation_tuples.v1alpha2.ErrorResponse": { "type": "object", "properties": { "error": { - "$ref": "#/definitions/errorGeneric.Error" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error" } }, "description": "The standard Ory JSON API error format.", "title": "JSON API Error Response", "required": ["error"] }, - "errorGeneric.Error": { + "ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error": { "type": "object", "properties": { "code": { @@ -824,7 +827,7 @@ "type": "object", "properties": { "tree": { - "$ref": "#/definitions/expandedPermissionTree", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree", "description": "The tree the requested subject set expands to.\nThe requested subject set is the subject of the root.\n\nThis field can be nil in some circumstances." } }, @@ -840,24 +843,26 @@ }, "description": "Response of the VersionService.GetVersion RPC." }, - "relationshipNamespaces": { + "ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse": { "type": "object", "properties": { "namespaces": { "type": "array", "items": { + "type": "object", "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.Namespace" } } } }, - "relationships": { + "ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse": { "type": "object", "properties": { "relation_tuples": { "type": "array", "items": { - "$ref": "#/definitions/relationship" + "type": "object", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" }, "description": "The relationships matching the list request." }, @@ -891,7 +896,7 @@ "default": "unspecified", "description": " - union: This node expands to a union of all children.\n - exclusion: Not implemented yet.\n - intersection: Not implemented yet.\n - leaf: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - tuple_to_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - computed_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - not: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached." }, - "relationship": { + "ory.keto.relation_tuples.v1alpha2.RelationTuple": { "type": "object", "properties": { "namespace": { @@ -911,29 +916,29 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/subjectSet", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } }, "description": "RelationTuple defines a relation between an Object and a Subject.", "required": ["namespace", "object", "relation"] }, - "relationshipDelta": { + "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta": { "type": "object", "properties": { "action": { - "$ref": "#/definitions/relationshipDelta.Action", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action", "description": "The action to do on the RelationTuple." }, "relation_tuple": { - "$ref": "#/definitions/relationship", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", "description": "The target RelationTuple." } }, "description": "Write-delta for a TransactRelationTuplesRequest.", "required": ["action", "relation_tuple"] }, - "relationshipDelta.Action": { + "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action": { "type": "string", "enum": ["ACTION_UNSPECIFIED", "insert", "delete"], "default": "ACTION_UNSPECIFIED", @@ -947,13 +952,13 @@ "description": "A concrete id of the subject." }, "set": { - "$ref": "#/definitions/subjectSet", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/15_subjects.mdx)." } }, "description": "Subject is either a concrete subject id or\na `SubjectSet` expanding to more Subjects." }, - "subjectSet": { + "ory.keto.relation_tuples.v1alpha2.SubjectSet": { "type": "object", "properties": { "namespace": { @@ -972,7 +977,7 @@ "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`.", "required": ["namespace", "object", "relation"] }, - "subjectSetQuery": { + "ory.keto.relation_tuples.v1alpha2.SubjectSetQuery": { "type": "object", "properties": { "namespace": { @@ -990,7 +995,7 @@ }, "description": "SubjectSetQuery refers to all subjects who have\nthe same `relation` on an `object`." }, - "expandedPermissionTree": { + "ory.keto.relation_tuples.v1alpha2.SubjectTree": { "type": "object", "properties": { "type": { @@ -1002,13 +1007,14 @@ "description": "The subject this node represents.\nDeprecated: More information is now available in the tuple field." }, "tuple": { - "$ref": "#/definitions/relationship", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", "description": "The relation tuple this node represents." }, "children": { "type": "array", "items": { - "$ref": "#/definitions/expandedPermissionTree" + "type": "object", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" }, "description": "The children of this node.\n\nThis is never set if `node_type` == `NODE_TYPE_LEAF`." } @@ -1018,7 +1024,6 @@ "ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse": { "type": "object", "description": "The response of a WriteService.TransactRelationTuples rpc." - }, - "UUID": { "type": "string", "format": "uuid4" } + } } } From af1c06f6a9f82523dbb72eb4a4f92e4140adff79 Mon Sep 17 00:00:00 2001 From: hperl <34397+hperl@users.noreply.github.com> Date: Mon, 13 Mar 2023 08:33:38 +0100 Subject: [PATCH 20/42] feat: configure gRPC interceptors per type --- internal/driver/daemon.go | 14 +++--- internal/driver/registry_default.go | 13 +++--- internal/driver/registry_factory.go | 22 ++++++---- ketoctx/options.go | 66 ++++++++++++++++++----------- 4 files changed, 70 insertions(+), 45 deletions(-) diff --git a/internal/driver/daemon.go b/internal/driver/daemon.go index e915a6f08..bc1783003 100644 --- a/internal/driver/daemon.go +++ b/internal/driver/daemon.go @@ -532,7 +532,7 @@ func (r *RegistryDefault) grpcRecoveryHandler(p interface{}) error { return status.Errorf(codes.Internal, "%v", p) } -func (r *RegistryDefault) unaryInterceptors(ctx context.Context) []grpc.UnaryServerInterceptor { +func (r *RegistryDefault) unaryInterceptors(ctx context.Context, additional ...grpc.UnaryServerInterceptor) []grpc.UnaryServerInterceptor { is := []grpc.UnaryServerInterceptor{ grpcRecovery.UnaryServerInterceptor(grpcRecovery.WithRecoveryHandler(r.grpcRecoveryHandler)), } @@ -540,6 +540,7 @@ func (r *RegistryDefault) unaryInterceptors(ctx context.Context) []grpc.UnarySer is = append(is, grpcOtel.UnaryServerInterceptor(grpcOtel.WithTracerProvider(otel.GetTracerProvider()))) } is = append(is, r.defaultUnaryInterceptors...) + is = append(is, additional...) is = append(is, grpcLogrus.UnaryServerInterceptor(r.l.Entry)) is = append(is, x.GlobalGRPCUnaryServerInterceptors...) if r.sqaService != nil { @@ -548,7 +549,7 @@ func (r *RegistryDefault) unaryInterceptors(ctx context.Context) []grpc.UnarySer return is } -func (r *RegistryDefault) streamInterceptors(ctx context.Context) []grpc.StreamServerInterceptor { +func (r *RegistryDefault) streamInterceptors(ctx context.Context, additional ...grpc.StreamServerInterceptor) []grpc.StreamServerInterceptor { is := []grpc.StreamServerInterceptor{ grpcRecovery.StreamServerInterceptor(grpcRecovery.WithRecoveryHandler(r.grpcRecoveryHandler)), } @@ -556,6 +557,7 @@ func (r *RegistryDefault) streamInterceptors(ctx context.Context) []grpc.StreamS is = append(is, grpcOtel.StreamServerInterceptor(grpcOtel.WithTracerProvider(otel.GetTracerProvider()))) } is = append(is, r.defaultStreamInterceptors...) + is = append(is, additional...) is = append(is, herodot.StreamErrorUnwrapInterceptor, grpcLogrus.StreamServerInterceptor(r.l.Entry), @@ -570,8 +572,8 @@ func (r *RegistryDefault) streamInterceptors(ctx context.Context) []grpc.StreamS // interceptors, but without transport credentials, to be used internally. func (r *RegistryDefault) newInternalGRPCServer(ctx context.Context) *grpc.Server { s := grpc.NewServer( - grpc.ChainStreamInterceptor(r.streamInterceptors(ctx)...), - grpc.ChainUnaryInterceptor(r.unaryInterceptors(ctx)...), + grpc.ChainStreamInterceptor(r.streamInterceptors(ctx, r.internalStreamInterceptors...)...), + grpc.ChainUnaryInterceptor(r.unaryInterceptors(ctx, r.internalUnaryInterceptors...)...), ) r.registerCommonGRPCServices(s) @@ -584,8 +586,8 @@ func (r *RegistryDefault) newInternalGRPCServer(ctx context.Context) *grpc.Serve func (r *RegistryDefault) newGrpcServer(ctx context.Context) *grpc.Server { opts := []grpc.ServerOption{ - grpc.ChainStreamInterceptor(r.streamInterceptors(ctx)...), - grpc.ChainUnaryInterceptor(r.unaryInterceptors(ctx)...), + grpc.ChainStreamInterceptor(r.streamInterceptors(ctx, r.externalStreamInterceptors...)...), + grpc.ChainUnaryInterceptor(r.unaryInterceptors(ctx, r.externalUnaryInterceptors...)...), } if r.grpcTransportCredentials != nil { opts = append(opts, grpc.Creds(r.grpcTransportCredentials)) diff --git a/internal/driver/registry_default.go b/internal/driver/registry_default.go index b0044421d..51b2fcd54 100644 --- a/internal/driver/registry_default.go +++ b/internal/driver/registry_default.go @@ -75,12 +75,13 @@ type ( pmm *prometheus.MetricsManager metricsHandler *prometheus.Handler - defaultUnaryInterceptors []grpc.UnaryServerInterceptor - defaultStreamInterceptors []grpc.StreamServerInterceptor - defaultHttpMiddlewares []func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) - grpcTransportCredentials credentials.TransportCredentials - defaultMigrationOptions []popx.MigrationBoxOption - healthReadyCheckers healthx.ReadyCheckers + defaultUnaryInterceptors, internalUnaryInterceptors, externalUnaryInterceptors []grpc.UnaryServerInterceptor + defaultStreamInterceptors, internalStreamInterceptors, externalStreamInterceptors []grpc.StreamServerInterceptor + + defaultHttpMiddlewares []func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) + grpcTransportCredentials credentials.TransportCredentials + defaultMigrationOptions []popx.MigrationBoxOption + healthReadyCheckers healthx.ReadyCheckers internalGRPC struct { initOnce sync.Once diff --git a/internal/driver/registry_factory.go b/internal/driver/registry_factory.go index ebf947932..db1101a71 100644 --- a/internal/driver/registry_factory.go +++ b/internal/driver/registry_factory.go @@ -76,15 +76,19 @@ func NewDefaultRegistry(ctx context.Context, flags *pflag.FlagSet, withoutNetwor c.WithSource(options.Contextualizer().Config(ctx, cp)) r := &RegistryDefault{ - c: c, - l: l, - tracerWrapper: options.TracerWrapper, - ctxer: options.Contextualizer(), - defaultUnaryInterceptors: options.GRPCUnaryInterceptors(), - defaultStreamInterceptors: options.GRPCStreamInterceptors(), - defaultHttpMiddlewares: options.HTTPMiddlewares(), - defaultMigrationOptions: options.MigrationOptions(), - healthReadyCheckers: options.ReadyCheckers(), + c: c, + l: l, + tracerWrapper: options.TracerWrapper, + ctxer: options.Contextualizer(), + defaultUnaryInterceptors: options.GRPCUnaryInterceptors, + defaultStreamInterceptors: options.GRPCStreamInterceptors, + internalUnaryInterceptors: options.InternalGRPCUnaryInterceptors, + internalStreamInterceptors: options.InternalGRPCStreamInterceptors, + externalUnaryInterceptors: options.ExternalGRPCUnaryInterceptors, + externalStreamInterceptors: options.ExternalGRPCStreamInterceptors, + defaultHttpMiddlewares: options.HTTPMiddlewares(), + defaultMigrationOptions: options.MigrationOptions(), + healthReadyCheckers: options.ReadyCheckers(), } init := r.Init diff --git a/ketoctx/options.go b/ketoctx/options.go index 1e0d7c4e9..309391b44 100644 --- a/ketoctx/options.go +++ b/ketoctx/options.go @@ -15,14 +15,20 @@ import ( type ( opts struct { - logger *logrusx.Logger - TracerWrapper TracerWrapper - contextualizer Contextualizer - httpMiddlewares []func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) - grpcUnaryInterceptors []grpc.UnaryServerInterceptor - grpcStreamInterceptors []grpc.StreamServerInterceptor - migrationOpts []popx.MigrationBoxOption - readyCheckers healthx.ReadyCheckers + logger *logrusx.Logger + TracerWrapper TracerWrapper + contextualizer Contextualizer + httpMiddlewares []func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) + + GRPCUnaryInterceptors []grpc.UnaryServerInterceptor + GRPCStreamInterceptors []grpc.StreamServerInterceptor + ExternalGRPCUnaryInterceptors []grpc.UnaryServerInterceptor + ExternalGRPCStreamInterceptors []grpc.StreamServerInterceptor + InternalGRPCUnaryInterceptors []grpc.UnaryServerInterceptor + InternalGRPCStreamInterceptors []grpc.StreamServerInterceptor + + migrationOpts []popx.MigrationBoxOption + readyCheckers healthx.ReadyCheckers } Option func(o *opts) TracerWrapper func(*otelx.Tracer) *otelx.Tracer @@ -52,20 +58,40 @@ func WithHTTPMiddlewares(m ...func(rw http.ResponseWriter, r *http.Request, next } } -// WithGRPCUnaryInterceptors adds gRPC unary interceptors to the list of gRPC +// WithGRPCUnaryInterceptors adds gRPC unary interceptors to the list of common gRPC // interceptors. func WithGRPCUnaryInterceptors(i ...grpc.UnaryServerInterceptor) Option { - return func(o *opts) { - o.grpcUnaryInterceptors = i - } + return func(o *opts) { o.GRPCUnaryInterceptors = i } } -// WithGRPCStreamInterceptors adds gRPC stream interceptors to the list of gRPC +// WithGRPCStreamInterceptors adds gRPC stream interceptors to the list of common gRPC // stream interceptors. func WithGRPCStreamInterceptors(i ...grpc.StreamServerInterceptor) Option { - return func(o *opts) { - o.grpcStreamInterceptors = i - } + return func(o *opts) { o.GRPCStreamInterceptors = i } +} + +// WithExternalGRPCUnaryInterceptors adds gRPC unary interceptors to the list of external gRPC +// interceptors. +func WithExternalGRPCUnaryInterceptors(i ...grpc.UnaryServerInterceptor) Option { + return func(o *opts) { o.ExternalGRPCUnaryInterceptors = i } +} + +// WithExternalGRPCStreamInterceptors adds gRPC stream interceptors to the list of external gRPC +// stream interceptors. +func WithExternalGRPCStreamInterceptors(i ...grpc.StreamServerInterceptor) Option { + return func(o *opts) { o.ExternalGRPCStreamInterceptors = i } +} + +// WithInternalGRPCUnaryInterceptors adds gRPC unary interceptors to the list of internal gRPC +// interceptors. +func WithInternalGRPCUnaryInterceptors(i ...grpc.UnaryServerInterceptor) Option { + return func(o *opts) { o.InternalGRPCUnaryInterceptors = i } +} + +// WithInternalGRPCStreamInterceptors adds gRPC stream interceptors to the list of internal gRPC +// stream interceptors. +func WithInternalGRPCStreamInterceptors(i ...grpc.StreamServerInterceptor) Option { + return func(o *opts) { o.InternalGRPCStreamInterceptors = i } } // WithMigrationOptions adds migration options to the list of migration options. @@ -99,14 +125,6 @@ func (o *opts) HTTPMiddlewares() []func(rw http.ResponseWriter, r *http.Request, return o.httpMiddlewares } -func (o *opts) GRPCUnaryInterceptors() []grpc.UnaryServerInterceptor { - return o.grpcUnaryInterceptors -} - -func (o *opts) GRPCStreamInterceptors() []grpc.StreamServerInterceptor { - return o.grpcStreamInterceptors -} - func (o *opts) MigrationOptions() []popx.MigrationBoxOption { return o.migrationOpts } From 149c9cdf588ad2c03f251857b8a8a90f2181f7aa Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Tue, 28 Mar 2023 10:34:31 +0200 Subject: [PATCH 21/42] chore: sdk --- .../keto/opl/v1alpha1/syntax_service.pb.go | 2 +- .../v1alpha2/check_service.pb.go | 2 +- .../v1alpha2/expand_service.pb.go | 2 +- .../v1alpha2/namespaces_service.pb.go | 2 +- .../relation_tuples/v1alpha2/openapi.pb.go | 2 +- .../v1alpha2/read_service.pb.go | 2 +- .../v1alpha2/relation_tuples.pb.go | 2 +- .../relation_tuples/v1alpha2/version.pb.go | 2 +- .../v1alpha2/write_service.pb.go | 2 +- .../v1alpha2/write_service.pb.validate.go | 2 +- spec/api.swagger.json | 113 +++++++++--------- 11 files changed, 67 insertions(+), 66 deletions(-) diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go index d5dd55524..3e150d080 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.0 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: ory/keto/opl/v1alpha1/syntax_service.proto diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go index 575e3ad35..e63885c10 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.0 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/check_service.proto diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go index a4f218263..2d4cb8afe 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.0 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/expand_service.proto diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go index f1da5b38e..f81187d4e 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.0 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/namespaces_service.proto diff --git a/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go index 11068f8ec..4506de0f8 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.0 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/openapi.proto diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go index 06eff1893..9aad180fa 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.0 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/read_service.proto diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go index afde7040a..9038bf41c 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.0 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/relation_tuples.proto diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go index f907bf721..4a5512cde 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.0 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/version.proto diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go index c7b62bc75..80336be05 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.0 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/write_service.proto diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.validate.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.validate.go index 9107a5b74..673d91482 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.validate.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.validate.go @@ -197,7 +197,7 @@ func (m *RelationTupleDelta) validate(all bool) error { if _, ok := _RelationTupleDelta_Action_InLookup[m.GetAction()]; !ok { err := RelationTupleDeltaValidationError{ field: "Action", - reason: "value must be in list [1 2]", + reason: "value must be in list [ACTION_INSERT ACTION_DELETE]", } if !all { return err diff --git a/spec/api.swagger.json b/spec/api.swagger.json index a5f615311..5a403e31c 100755 --- a/spec/api.swagger.json +++ b/spec/api.swagger.json @@ -31,7 +31,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -96,13 +96,13 @@ "201": { "description": "The created relationship.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" + "$ref": "#/definitions/relationship" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -113,7 +113,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship", + "$ref": "#/definitions/createRelationshipBody", "required": ["relationTuple"] } } @@ -134,7 +134,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -148,7 +148,7 @@ "type": "array", "items": { "type": "object", - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta" + "$ref": "#/definitions/relationshipDelta" } } } @@ -165,7 +165,7 @@ "200": { "description": "The list of namespaces.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse" + "$ref": "#/definitions/relationshipNamespaces" }, "examples": { "application/json": { @@ -180,7 +180,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -196,13 +196,13 @@ "200": { "description": "The result of the syntax checker", "schema": { - "$ref": "#/definitions/ory.keto.opl.v1alpha1.CheckResponse" + "$ref": "#/definitions/checkOplSyntaxResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -229,13 +229,13 @@ "200": { "description": "The list of relationships.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse" + "$ref": "#/definitions/relationships" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -317,19 +317,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } } }, @@ -402,19 +402,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } } }, @@ -425,7 +425,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" + "$ref": "#/definitions/postCheckPermissionBody" } } ], @@ -441,19 +441,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } } }, @@ -526,19 +526,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } } }, @@ -549,7 +549,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" + "$ref": "#/definitions/postCheckPermissionBody" } } ], @@ -565,13 +565,13 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" + "$ref": "#/definitions/expandedPermissionTree" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -625,7 +625,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -634,7 +634,7 @@ } }, "definitions": { - "ory.keto.opl.v1alpha1.CheckResponse": { + "checkOplSyntaxResult": { "type": "object", "properties": { "parseErrors": { @@ -680,7 +680,7 @@ } } }, - "ory.keto.relation_tuples.v1alpha2.CheckRequest": { + "postCheckPermissionBody": { "type": "object", "properties": { "namespace": { @@ -700,7 +700,7 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSetQuery", + "$ref": "#/definitions/subjectSetQuery", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." }, "max-depth": { @@ -711,7 +711,7 @@ }, "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object." }, - "ory.keto.relation_tuples.v1alpha2.CheckResponse": { + "checkPermissionResult": { "type": "object", "properties": { "allowed": { @@ -721,7 +721,7 @@ }, "description": "The response for a CheckService.Check rpc." }, - "ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship": { + "createRelationshipBody": { "type": "object", "properties": { "namespace": { @@ -741,7 +741,7 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", + "$ref": "#/definitions/subjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } } @@ -750,7 +750,7 @@ "type": "object", "properties": { "relationTuple": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", + "$ref": "#/definitions/relationship", "description": "The created relationship." } }, @@ -759,18 +759,18 @@ "ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse": { "type": "object" }, - "ory.keto.relation_tuples.v1alpha2.ErrorResponse": { + "errorGeneric": { "type": "object", "properties": { "error": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error" + "$ref": "#/definitions/errorGeneric.Error" } }, "description": "The standard Ory JSON API error format.", "title": "JSON API Error Response", "required": ["error"] }, - "ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error": { + "errorGeneric.Error": { "type": "object", "properties": { "code": { @@ -827,7 +827,7 @@ "type": "object", "properties": { "tree": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree", + "$ref": "#/definitions/expandedPermissionTree", "description": "The tree the requested subject set expands to.\nThe requested subject set is the subject of the root.\n\nThis field can be nil in some circumstances." } }, @@ -843,7 +843,7 @@ }, "description": "Response of the VersionService.GetVersion RPC." }, - "ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse": { + "relationshipNamespaces": { "type": "object", "properties": { "namespaces": { @@ -855,14 +855,14 @@ } } }, - "ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse": { + "relationships": { "type": "object", "properties": { "relation_tuples": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" + "$ref": "#/definitions/relationship" }, "description": "The relationships matching the list request." }, @@ -896,7 +896,7 @@ "default": "unspecified", "description": " - union: This node expands to a union of all children.\n - exclusion: Not implemented yet.\n - intersection: Not implemented yet.\n - leaf: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - tuple_to_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - computed_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - not: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached." }, - "ory.keto.relation_tuples.v1alpha2.RelationTuple": { + "relationship": { "type": "object", "properties": { "namespace": { @@ -916,29 +916,29 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", + "$ref": "#/definitions/subjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } }, "description": "RelationTuple defines a relation between an Object and a Subject.", "required": ["namespace", "object", "relation"] }, - "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta": { + "relationshipDelta": { "type": "object", "properties": { "action": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action", + "$ref": "#/definitions/relationshipDelta.Action", "description": "The action to do on the RelationTuple." }, "relation_tuple": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", + "$ref": "#/definitions/relationship", "description": "The target RelationTuple." } }, "description": "Write-delta for a TransactRelationTuplesRequest.", "required": ["action", "relation_tuple"] }, - "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action": { + "relationshipDelta.Action": { "type": "string", "enum": ["ACTION_UNSPECIFIED", "insert", "delete"], "default": "ACTION_UNSPECIFIED", @@ -952,13 +952,13 @@ "description": "A concrete id of the subject." }, "set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", + "$ref": "#/definitions/subjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/15_subjects.mdx)." } }, "description": "Subject is either a concrete subject id or\na `SubjectSet` expanding to more Subjects." }, - "ory.keto.relation_tuples.v1alpha2.SubjectSet": { + "subjectSet": { "type": "object", "properties": { "namespace": { @@ -977,7 +977,7 @@ "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`.", "required": ["namespace", "object", "relation"] }, - "ory.keto.relation_tuples.v1alpha2.SubjectSetQuery": { + "subjectSetQuery": { "type": "object", "properties": { "namespace": { @@ -995,7 +995,7 @@ }, "description": "SubjectSetQuery refers to all subjects who have\nthe same `relation` on an `object`." }, - "ory.keto.relation_tuples.v1alpha2.SubjectTree": { + "expandedPermissionTree": { "type": "object", "properties": { "type": { @@ -1007,14 +1007,14 @@ "description": "The subject this node represents.\nDeprecated: More information is now available in the tuple field." }, "tuple": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", + "$ref": "#/definitions/relationship", "description": "The relation tuple this node represents." }, "children": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" + "$ref": "#/definitions/expandedPermissionTree" }, "description": "The children of this node.\n\nThis is never set if `node_type` == `NODE_TYPE_LEAF`." } @@ -1024,6 +1024,7 @@ "ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse": { "type": "object", "description": "The response of a WriteService.TransactRelationTuples rpc." - } + }, + "UUID": { "type": "string", "format": "uuid4" } } } From d2d14c88272af9306d50175f9fd07f903c7f972c Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Thu, 15 Feb 2024 12:10:19 +0100 Subject: [PATCH 22/42] chore: update deps --- go.mod | 10 +++------- go.sum | 17 ++++------------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/go.mod b/go.mod index 6a2924785..1b11ad5ba 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,6 @@ module github.com/ory/keto replace github.com/ory/keto/proto => ./proto -replace github.com/opencontainers/runc => github.com/opencontainers/runc v1.1.12 - require ( github.com/cenkalti/backoff/v3 v3.2.2 github.com/dgraph-io/ristretto v0.1.1 @@ -14,12 +12,10 @@ require ( github.com/gobuffalo/httptest v1.5.2 github.com/gobuffalo/pop/v6 v6.1.1 github.com/gofrs/uuid v4.4.0+incompatible - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1 github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 github.com/julienschmidt/httprouter v1.3.0 github.com/luna-duclos/instrumentedsql v1.1.3 - github.com/ory/analytics-go/v4 v4.0.3 github.com/ory/analytics-go/v5 v5.0.1 github.com/ory/graceful v0.1.3 github.com/ory/herodot v0.10.3-0.20230626083119-d7e5192f0d88 @@ -149,7 +145,7 @@ require ( github.com/nyaruka/phonenumbers v1.1.8 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc5 // indirect - github.com/opencontainers/runc v1.1.9 // indirect + github.com/opencontainers/runc v1.1.12 // indirect github.com/openzipkin/zipkin-go v0.4.2 // indirect github.com/ory/dockertest/v3 v3.10.0 // indirect github.com/ory/go-acc v0.2.9-0.20230103102148-6b1c9a70dbbe // indirect @@ -188,10 +184,10 @@ require ( go.opentelemetry.io/otel/metric v1.21.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.15.0 // indirect + golang.org/x/crypto v0.19.0 // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.15.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect diff --git a/go.sum b/go.sum index a601cd2d5..9e1b81f5a 100644 --- a/go.sum +++ b/go.sum @@ -142,9 +142,7 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= @@ -288,8 +286,6 @@ github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7Fsg github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1 h1:HcUWd006luQPljE73d5sk+/VgYPGUReEVz2y1/qylwY= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1/go.mod h1:w9Y7gY31krpLmrVU5ZPG9H7l9fZuRu5/3R3S3FMtVQ4= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= @@ -404,7 +400,6 @@ github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLN github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -476,11 +471,8 @@ github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/ github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/openzipkin/zipkin-go v0.4.2 h1:zjqfqHjUpPmB3c1GlCvvgsM1G4LkvqQbBDueDOCg/jA= github.com/openzipkin/zipkin-go v0.4.2/go.mod h1:ZeVkFjuuBiSy13y8vpSDCjMi9GoI3hPpCJSBx/EYFhY= -github.com/ory/analytics-go/v4 v4.0.3 h1:2zNBQLlm3UiD8U7DdUGLLUBm62ZA5GtbEJ3S5U+xEOI= -github.com/ory/analytics-go/v4 v4.0.3/go.mod h1:A3Chm/3TmM8jw4nqRss+gFhAYHRI5j/HFYH3C1FRahU= github.com/ory/analytics-go/v5 v5.0.1 h1:LX8T5B9FN8KZXOtxgN+R3I4THRRVB6+28IKgKBpXmAM= github.com/ory/analytics-go/v5 v5.0.1/go.mod h1:lWCiCjAaJkKfgR/BN5DCLMol8BjKS1x+4jxBxff/FF0= github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= @@ -687,8 +679,8 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -849,8 +841,8 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -987,7 +979,6 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= From f2eea824e30d91ef3ffcbd339e11e34ebfc8e0e8 Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Thu, 15 Feb 2024 12:26:21 +0100 Subject: [PATCH 23/42] chore: bump deps --- go.mod | 11 ++++++----- go.sum | 21 +++++++++++++++++++++ internal/driver/daemon.go | 15 ++++++++------- 3 files changed, 35 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 1b11ad5ba..fe420a20d 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/ory/herodot v0.10.3-0.20230626083119-d7e5192f0d88 github.com/ory/jsonschema/v3 v3.0.8 github.com/ory/keto/proto v0.11.1-alpha.0 - github.com/ory/x v0.0.613 + github.com/ory/x v0.0.614 github.com/pelletier/go-toml v1.9.5 github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 github.com/pkg/errors v0.9.1 @@ -39,9 +39,9 @@ require ( github.com/urfave/negroni v1.0.0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 - go.opentelemetry.io/otel v1.21.0 + go.opentelemetry.io/otel v1.23.1 go.opentelemetry.io/otel/sdk v1.21.0 - go.opentelemetry.io/otel/trace v1.21.0 + go.opentelemetry.io/otel/trace v1.23.1 go.uber.org/goleak v1.2.1 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa golang.org/x/oauth2 v0.14.0 @@ -81,7 +81,7 @@ require ( github.com/felixge/fgprof v0.9.3 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.20.0 // indirect github.com/go-openapi/swag v0.22.4 // indirect @@ -99,6 +99,7 @@ require ( github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.1.2 // indirect + github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect @@ -181,7 +182,7 @@ require ( go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.21.0 // indirect go.opentelemetry.io/otel/exporters/zipkin v1.21.0 // indirect - go.opentelemetry.io/otel/metric v1.21.0 // indirect + go.opentelemetry.io/otel/metric v1.23.1 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.19.0 // indirect diff --git a/go.sum b/go.sum index 9e1b81f5a..32636b8d4 100644 --- a/go.sum +++ b/go.sum @@ -139,6 +139,8 @@ github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4 github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE= +github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -147,6 +149,8 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= @@ -223,6 +227,8 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -487,6 +493,8 @@ github.com/ory/jsonschema/v3 v3.0.8 h1:Ssdb3eJ4lDZ/+XnGkvQS/te0p+EkolqwTsDOCxr/F github.com/ory/jsonschema/v3 v3.0.8/go.mod h1:ZPzqjDkwd3QTnb2Z6PAS+OTvBE2x5i6m25wCGx54W/0= github.com/ory/x v0.0.613 h1:MHT0scH7hcrOkc3aH7qqYLzXVJkjhB0szWTwpD2lh8Q= github.com/ory/x v0.0.613/go.mod h1:uH065puz8neija0neqwIN3PmXXfDsB9VbZTZ20Znoos= +github.com/ory/x v0.0.614 h1:amqUBxoY5Z0fN+WqH1sLLtGuJa5GYOBo76LyrwJC0dc= +github.com/ory/x v0.0.614/go.mod h1:uH065puz8neija0neqwIN3PmXXfDsB9VbZTZ20Znoos= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= @@ -612,6 +620,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -634,6 +643,8 @@ go.opentelemetry.io/contrib/samplers/jaegerremote v0.15.1 h1:Qb+5A+JbIjXwO7l4HkR go.opentelemetry.io/contrib/samplers/jaegerremote v0.15.1/go.mod h1:G4vNCm7fRk0kjZ6pGNLo5SpLxAUvOfSrcaegnT8TPck= go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= +go.opentelemetry.io/otel v1.23.1 h1:Za4UzOqJYS+MUczKI320AtqZHZb7EqxO00jAHE0jmQY= +go.opentelemetry.io/otel v1.23.1/go.mod h1:Td0134eafDLcTS4y+zQ26GE8u3dEuRBiBCTUIRHaikA= go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw= @@ -644,10 +655,14 @@ go.opentelemetry.io/otel/exporters/zipkin v1.21.0 h1:D+Gv6lSfrFBWmQYyxKjDd0Zuld9 go.opentelemetry.io/otel/exporters/zipkin v1.21.0/go.mod h1:83oMKR6DzmHisFOW3I+yIMGZUTjxiWaiBI8M8+TU5zE= go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= +go.opentelemetry.io/otel/metric v1.23.1 h1:PQJmqJ9u2QaJLBOELl1cxIdPcpbwzbkjfEyelTl2rlo= +go.opentelemetry.io/otel/metric v1.23.1/go.mod h1:mpG2QPlAfnK8yNhNJAxDZruU9Y1/HubbC+KyH8FaCWI= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= +go.opentelemetry.io/otel/trace v1.23.1 h1:4LrmmEd8AU2rFvU1zegmvqW7+kWarxtNOPyeL6HmYY8= +go.opentelemetry.io/otel/trace v1.23.1/go.mod h1:4IpnpJFwr1mo/6HL8XIPJaE9y0+u1KcVmuW7dwFSVrI= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -716,6 +731,7 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= @@ -752,6 +768,7 @@ golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= @@ -781,6 +798,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -826,8 +844,10 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -919,6 +939,7 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= diff --git a/internal/driver/daemon.go b/internal/driver/daemon.go index 685e87048..ec6686525 100644 --- a/internal/driver/daemon.go +++ b/internal/driver/daemon.go @@ -38,6 +38,14 @@ import ( "github.com/ory/analytics-go/v5" "github.com/ory/graceful" "github.com/ory/herodot" + "github.com/ory/x/healthx" + "github.com/ory/x/logrusx" + "github.com/ory/x/metricsx" + "github.com/ory/x/otelx" + "github.com/ory/x/otelx/semconv" + prometheus "github.com/ory/x/prometheusx" + "github.com/ory/x/reqlog" + "github.com/ory/keto/internal/check" "github.com/ory/keto/internal/driver/config" "github.com/ory/keto/internal/expand" @@ -46,13 +54,6 @@ import ( "github.com/ory/keto/internal/schema" "github.com/ory/keto/internal/x" rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" - "github.com/ory/x/healthx" - "github.com/ory/x/logrusx" - "github.com/ory/x/metricsx" - "github.com/ory/x/otelx" - "github.com/ory/x/otelx/semconv" - prometheus "github.com/ory/x/prometheusx" - "github.com/ory/x/reqlog" ) func (r *RegistryDefault) enableSqa(cmd *cobra.Command) { From 628979f185338d37220d839c8da7dd11bad05e60 Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Thu, 15 Feb 2024 13:39:24 +0100 Subject: [PATCH 24/42] fix buf --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c5504d782..9f5874efb 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ export IMAGE_TAG := $(if $(IMAGE_TAG),$(IMAGE_TAG),latest) GO_DEPENDENCIES = golang.org/x/tools/cmd/goimports \ github.com/mattn/goveralls \ github.com/ory/go-acc \ + github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc \ github.com/bufbuild/buf/cmd/buf \ github.com/josephburnett/jd \ github.com/mikefarah/yq/v4 \ @@ -99,7 +100,7 @@ build: # Generate APIs and client stubs from the definitions # .PHONY: buf-gen -buf-gen: .bin/buf node_modules +buf-gen: .bin/buf .bin/protoc-gen-doc node_modules buf format -w buf generate proto make format From f5a960a342ed140fee4652db5f9962c3883892f8 Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Thu, 5 Sep 2024 14:13:09 +0200 Subject: [PATCH 25/42] WIP: vanguard --- go.mod | 38 +- go.sum | 103 ++---- internal/driver/daemon.go | 184 +++++---- internal/driver/registry.go | 9 +- internal/driver/registry_default.go | 18 +- internal/relationtuple/read_server_test.go | 20 +- internal/relationtuple/transact_server.go | 12 +- .../relationtuple/transact_server_test.go | 18 +- internal/x/api/api_server.go | 160 ++++++++ internal/x/api/api_test_server.go | 74 ++++ proto/go.mod | 18 +- proto/go.sum | 14 + .../keto/opl/v1alpha1/syntax_service.pb.go | 12 +- .../keto/opl/v1alpha1/syntax_service.pb.gw.go | 9 +- .../opl/v1alpha1/syntax_service_grpc.pb.go | 32 +- .../keto/opl/v1alpha1/syntax_service_pb.js | 16 +- .../v1alpha2/check_service.pb.go | 10 +- .../v1alpha2/check_service.pb.gw.go | 9 +- .../v1alpha2/check_service_grpc.pb.go | 38 +- .../v1alpha2/check_service_pb.js | 24 +- .../v1alpha2/expand_service.pb.go | 212 +++++------ .../v1alpha2/expand_service.pb.gw.go | 18 +- .../v1alpha2/expand_service_grpc.pb.go | 38 +- .../v1alpha2/expand_service_pb.js | 22 +- .../v1alpha2/namespaces_service.pb.go | 10 +- .../v1alpha2/namespaces_service.pb.gw.go | 9 +- .../v1alpha2/namespaces_service_grpc.pb.go | 36 +- .../v1alpha2/namespaces_service_pb.js | 4 +- .../relation_tuples/v1alpha2/openapi.pb.go | 148 ++++---- .../relation_tuples/v1alpha2/openapi_pb.js | 18 +- .../v1alpha2/read_service.pb.go | 12 +- .../v1alpha2/read_service.pb.gw.go | 9 +- .../v1alpha2/read_service_grpc.pb.go | 36 +- .../v1alpha2/read_service_pb.js | 34 +- .../v1alpha2/relation_tuples.pb.go | 176 ++++----- .../v1alpha2/relation_tuples_pb.js | 40 +- .../relation_tuples/v1alpha2/version.pb.go | 8 +- .../relation_tuples/v1alpha2/version.pb.gw.go | 9 +- .../v1alpha2/version_grpc.pb.go | 36 +- .../relation_tuples/v1alpha2/version_pb.js | 2 +- .../v1alpha2/write_service.pb.go | 350 +++++++++--------- .../v1alpha2/write_service.pb.gw.go | 18 +- .../v1alpha2/write_service_grpc.pb.go | 42 ++- .../v1alpha2/write_service_pb.js | 44 +-- spec/api.swagger.json | 113 +++--- 45 files changed, 1336 insertions(+), 926 deletions(-) create mode 100644 internal/x/api/api_server.go create mode 100644 internal/x/api/api_test_server.go diff --git a/go.mod b/go.mod index fe420a20d..4081f0953 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ module github.com/ory/keto replace github.com/ory/keto/proto => ./proto require ( + connectrpc.com/vanguard v0.3.0 github.com/cenkalti/backoff/v3 v3.2.2 github.com/dgraph-io/ristretto v0.1.1 github.com/ghodss/yaml v1.0.0 @@ -44,17 +45,17 @@ require ( go.opentelemetry.io/otel/trace v1.23.1 go.uber.org/goleak v1.2.1 golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa - golang.org/x/oauth2 v0.14.0 - golang.org/x/sync v0.5.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 - google.golang.org/grpc v1.59.0 - google.golang.org/protobuf v1.31.0 + golang.org/x/oauth2 v0.21.0 + golang.org/x/sync v0.7.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 + google.golang.org/grpc v1.66.0 + google.golang.org/protobuf v1.34.1 ) require ( - cloud.google.com/go/compute v1.23.3 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/compute/metadata v0.3.0 // indirect code.dny.dev/ssrf v0.2.0 // indirect + connectrpc.com/connect v1.16.2 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect @@ -64,7 +65,7 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/bradleyjkemp/cupaloy/v2 v2.8.0 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cockroachdb/cockroach-go/v2 v2.3.5 // indirect github.com/containerd/continuity v0.4.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect @@ -74,7 +75,7 @@ require ( github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect + github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect github.com/evanphx/json-patch/v5 v5.7.0 // indirect github.com/fatih/color v1.15.0 // indirect github.com/fatih/structs v1.1.0 // indirect @@ -98,8 +99,7 @@ require ( github.com/goccy/go-yaml v1.11.2 // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.2 // indirect - github.com/golang/mock v1.6.0 // indirect + github.com/golang/glog v1.2.1 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect @@ -185,16 +185,14 @@ require ( go.opentelemetry.io/otel/metric v1.23.1 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.19.0 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/sys v0.17.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.15.0 // indirect + golang.org/x/crypto v0.24.0 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 32636b8d4..0056bf2c8 100644 --- a/go.sum +++ b/go.sum @@ -23,10 +23,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= @@ -41,6 +39,12 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= code.dny.dev/ssrf v0.2.0 h1:wCBP990rQQ1CYfRpW+YK1+8xhwUjv189AQ3WMo1jQaI= code.dny.dev/ssrf v0.2.0/go.mod h1:B+91l25OnyaLIeCx0WRJN5qfJ/4/ZTZxRXgm0lj/2w8= +connectrpc.com/connect v1.16.2 h1:ybd6y+ls7GOlb7Bh5C8+ghA6SvCBajHwxssO2CGFjqE= +connectrpc.com/connect v1.16.2/go.mod h1:n2kgwskMHXC+lVqb18wngEpF95ldBHXjZYJussz5FRc= +connectrpc.com/vanguard v0.2.0 h1:78xAoVKvaOeHN8PvDetlRpJQ1OImLh2jDnWPNaT9dPo= +connectrpc.com/vanguard v0.2.0/go.mod h1:EoRa8q5sbNQua+wH5cr9NBePLFaUKIWLAjc1A8rSfDA= +connectrpc.com/vanguard v0.3.0 h1:prUKFm8rYDwvpvnOSoqdUowPMK0tRA0pbSrQoMd6Zng= +connectrpc.com/vanguard v0.3.0/go.mod h1:nxQ7+N6qhBiQczqGwdTw4oCqx1rDryIt20cEdECqToM= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= @@ -69,8 +73,8 @@ github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqy github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -78,8 +82,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b h1:ga8SEFjZ60pxLcmhnThWgvH2wg8376yUJmPhEH4H3kw= +github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/cockroach-go/v2 v2.3.5 h1:Khtm8K6fTTz/ZCWPzU9Ne3aOW9VyAnj4qIPCJgKtwK0= @@ -120,8 +124,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/evanphx/json-patch/v5 v5.7.0 h1:nJqP7uwL84RJInrohHfW0Fx3awjbm8qZeFv0nW9SYGc= github.com/evanphx/json-patch/v5 v5.7.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= @@ -139,16 +143,12 @@ github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4 github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE= -github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -215,8 +215,8 @@ github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= +github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -227,8 +227,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -244,7 +242,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -491,8 +488,6 @@ github.com/ory/herodot v0.10.3-0.20230626083119-d7e5192f0d88 h1:J0CIFKdpUeqKbVMw github.com/ory/herodot v0.10.3-0.20230626083119-d7e5192f0d88/go.mod h1:MMNmY6MG1uB6fnXYFaHoqdV23DTWctlPsmRCeq/2+wc= github.com/ory/jsonschema/v3 v3.0.8 h1:Ssdb3eJ4lDZ/+XnGkvQS/te0p+EkolqwTsDOCxr/FmU= github.com/ory/jsonschema/v3 v3.0.8/go.mod h1:ZPzqjDkwd3QTnb2Z6PAS+OTvBE2x5i6m25wCGx54W/0= -github.com/ory/x v0.0.613 h1:MHT0scH7hcrOkc3aH7qqYLzXVJkjhB0szWTwpD2lh8Q= -github.com/ory/x v0.0.613/go.mod h1:uH065puz8neija0neqwIN3PmXXfDsB9VbZTZ20Znoos= github.com/ory/x v0.0.614 h1:amqUBxoY5Z0fN+WqH1sLLtGuJa5GYOBo76LyrwJC0dc= github.com/ory/x v0.0.614/go.mod h1:uH065puz8neija0neqwIN3PmXXfDsB9VbZTZ20Znoos= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= @@ -620,7 +615,6 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -641,8 +635,6 @@ go.opentelemetry.io/contrib/propagators/jaeger v1.21.1 h1:f4beMGDKiVzg9IcX7/VuWV go.opentelemetry.io/contrib/propagators/jaeger v1.21.1/go.mod h1:U9jhkEl8d1LL+QXY7q3kneJWJugiN3kZJV2OWz3hkBY= go.opentelemetry.io/contrib/samplers/jaegerremote v0.15.1 h1:Qb+5A+JbIjXwO7l4HkRUhgIn4Bzz0GNS2q+qdmSx+0c= go.opentelemetry.io/contrib/samplers/jaegerremote v0.15.1/go.mod h1:G4vNCm7fRk0kjZ6pGNLo5SpLxAUvOfSrcaegnT8TPck= -go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= -go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= go.opentelemetry.io/otel v1.23.1 h1:Za4UzOqJYS+MUczKI320AtqZHZb7EqxO00jAHE0jmQY= go.opentelemetry.io/otel v1.23.1/go.mod h1:Td0134eafDLcTS4y+zQ26GE8u3dEuRBiBCTUIRHaikA= go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= @@ -653,14 +645,10 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.21.0 h1:digkE go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.21.0/go.mod h1:/OpE/y70qVkndM0TrxT4KBoN3RsFZP0QaofcfYrj76I= go.opentelemetry.io/otel/exporters/zipkin v1.21.0 h1:D+Gv6lSfrFBWmQYyxKjDd0Zuld9SRXpIrEsKZvE4DO4= go.opentelemetry.io/otel/exporters/zipkin v1.21.0/go.mod h1:83oMKR6DzmHisFOW3I+yIMGZUTjxiWaiBI8M8+TU5zE= -go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= -go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= go.opentelemetry.io/otel/metric v1.23.1 h1:PQJmqJ9u2QaJLBOELl1cxIdPcpbwzbkjfEyelTl2rlo= go.opentelemetry.io/otel/metric v1.23.1/go.mod h1:mpG2QPlAfnK8yNhNJAxDZruU9Y1/HubbC+KyH8FaCWI= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= -go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= -go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= go.opentelemetry.io/otel/trace v1.23.1 h1:4LrmmEd8AU2rFvU1zegmvqW7+kWarxtNOPyeL6HmYY8= go.opentelemetry.io/otel/trace v1.23.1/go.mod h1:4IpnpJFwr1mo/6HL8XIPJaE9y0+u1KcVmuW7dwFSVrI= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= @@ -694,8 +682,8 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo= -golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -731,10 +719,9 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -768,15 +755,14 @@ golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -786,8 +772,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -798,13 +784,12 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -844,10 +829,8 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -861,8 +844,8 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= -golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -876,10 +859,9 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -939,10 +921,9 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -977,8 +958,6 @@ google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1015,12 +994,10 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 h1:wpZ8pe2x1Q3f2KyT5f8oP/fa9rHAKgFPr/HZdNuS+PQ= -google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY= -google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo= -google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 h1:+rdxYoE3E5htTEWIe15GlN6IfvbURM//Jt0mmkmm6ZU= +google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117/go.mod h1:OimBR/bc1wPO9iV4NC2bpyjy3VnAwZh5EBPQdtaE5oo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1037,8 +1014,8 @@ google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= +google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= google.golang.org/grpc/examples v0.0.0-20210304020650-930c79186c99 h1:qA8rMbz1wQ4DOFfM2ouD29DG9aHWBm6ZOy9BGxiUMmY= google.golang.org/grpc/examples v0.0.0-20210304020650-930c79186c99/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -1053,8 +1030,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/internal/driver/daemon.go b/internal/driver/daemon.go index ec6686525..9f6ce393f 100644 --- a/internal/driver/daemon.go +++ b/internal/driver/daemon.go @@ -46,6 +46,8 @@ import ( prometheus "github.com/ory/x/prometheusx" "github.com/ory/x/reqlog" + "github.com/ory/keto/internal/x/api" + "github.com/ory/keto/internal/check" "github.com/ory/keto/internal/driver/config" "github.com/ory/keto/internal/expand" @@ -198,38 +200,65 @@ func (r *RegistryDefault) internalGRPCDialer() GRPCDialer { } func (r *RegistryDefault) serveRead(ctx context.Context, done chan<- struct{}) func() error { - rt, s := r.ReadRouter(ctx), r.ReadGRPCServer(ctx) + server := r.newAPIServer(ctx) + r.registerCommonGRPCServices(server.GRPCServer) + r.registerReadGRPCServices(server.GRPCServer) + + apiHandler, err := server.Handler() + if err != nil { + return func() error { return err } + } + + handler := r.ReadRouter(ctx, apiHandler) if tracer := r.Tracer(ctx); tracer.IsLoaded() { - rt = otelx.TraceHandler(rt, otelhttp.WithTracerProvider(tracer.Provider())) + handler = otelx.TraceHandler(handler, otelhttp.WithTracerProvider(tracer.Provider())) } return func() error { - return multiplexPort(ctx, r.Logger().WithField("endpoint", "read"), r.Config(ctx).ReadAPIListenOn(), rt, s, done) + return serve(ctx, r.Logger().WithField("endpoint", "read"), r.Config(ctx).ReadAPIListenOn(), handler, done) } } func (r *RegistryDefault) serveWrite(ctx context.Context, done chan<- struct{}) func() error { - rt, s := r.WriteRouter(ctx), r.WriteGRPCServer(ctx) + server := r.newAPIServer(ctx) + r.registerCommonGRPCServices(server.GRPCServer) + r.registerWriteGRPCServices(server.GRPCServer) + + apiHandler, err := server.Handler() + if err != nil { + return func() error { return err } + } + + handler := r.WriteRouter(ctx, apiHandler) if tracer := r.Tracer(ctx); tracer.IsLoaded() { - rt = otelx.TraceHandler(rt, otelhttp.WithTracerProvider(tracer.Provider())) + handler = otelx.TraceHandler(handler, otelhttp.WithTracerProvider(tracer.Provider())) } return func() error { - return multiplexPort(ctx, r.Logger().WithField("endpoint", "write"), r.Config(ctx).WriteAPIListenOn(), rt, s, done) + return serve(ctx, r.Logger().WithField("endpoint", "write"), r.Config(ctx).WriteAPIListenOn(), handler, done) } } func (r *RegistryDefault) serveOPLSyntax(ctx context.Context, done chan<- struct{}) func() error { - rt, s := r.OPLSyntaxRouter(ctx), r.OplGRPCServer(ctx) + server := r.newAPIServer(ctx) + r.registerCommonGRPCServices(server.GRPCServer) + r.registerOPLGRPCServices(server.GRPCServer) + + apiHandler, err := server.Handler() + if err != nil { + return func() error { return err } + } + + handler := r.OPLSyntaxRouter(ctx, apiHandler) if tracer := r.Tracer(ctx); tracer.IsLoaded() { - rt = otelx.TraceHandler(rt, otelhttp.WithTracerProvider(tracer.Provider())) + handler = otelx.TraceHandler(handler, otelhttp.WithTracerProvider(tracer.Provider())) } return func() error { - return multiplexPort(ctx, r.Logger().WithField("endpoint", "opl"), r.Config(ctx).OPLSyntaxAPIListenOn(), rt, s, done) + return serve(ctx, r.Logger().WithField("endpoint", "opl"), r.Config(ctx).OPLSyntaxAPIListenOn(), handler, done) } } @@ -274,6 +303,46 @@ func (r *RegistryDefault) serveMetrics(ctx context.Context, done chan<- struct{} } } +func serve(ctx context.Context, log *logrusx.Logger, addr string, router http.Handler, done chan<- struct{}) error { + //nolint:gosec // graceful.WithDefaults already sets a timeout + server := graceful.WithDefaults(&http.Server{ + Handler: router, + Addr: addr, + }) + + eg := &errgroup.Group{} + + eg.Go(func() error { + if err := server.ListenAndServe(); !errors.Is(err, http.ErrServerClosed) && !errors.Is(err, cmux.ErrServerClosed) { + return errors.WithStack(err) + } + return nil + }) + + eg.Go(func() (err error) { + defer func() { + if err != nil { + log.WithError(err).Error("graceful shutdown failed") + } else { + log.Info("gracefully shutdown server") + } + done <- struct{}{} + }() + + <-ctx.Done() + + ctx, cancel := context.WithTimeout(context.Background(), graceful.DefaultShutdownTimeout) + defer cancel() + + if err := server.Shutdown(ctx); err != nil { + return errors.WithStack(err) + } + return nil + }) + + return eg.Wait() +} + func multiplexPort(ctx context.Context, log *logrusx.Logger, addr string, router http.Handler, grpcS *grpc.Server, done chan<- struct{}) error { l, err := (&net.ListenConfig{}).Listen(ctx, "tcp", addr) if err != nil { @@ -379,6 +448,11 @@ type RouterOrGatewayHandler struct { ServeMux *runtime.ServeMux } +type RouterOrHandler struct { + Router *httprouter.Router + Handler http.Handler +} + func (h *RouterOrGatewayHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) { if handle, params, _ := h.Router.Lookup(r.Method, r.URL.Path); handle != nil { handle(rw, r, params) @@ -387,7 +461,16 @@ func (h *RouterOrGatewayHandler) ServeHTTP(rw http.ResponseWriter, r *http.Reque h.ServeMux.ServeHTTP(rw, r) } -func (r *RegistryDefault) ReadRouter(ctx context.Context) http.Handler { +func (h *RouterOrHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + if handle, params, _ := h.Router.Lookup(r.Method, r.URL.Path); handle != nil { + handle(rw, r, params) + return + } + h.Handler.ServeHTTP(rw, r) +} + +// TODO: Merge this with WriteRouter and OPLSyntaxRouter. +func (r *RegistryDefault) ReadRouter(ctx context.Context, apiHandler http.Handler) http.Handler { n := negroni.New() for _, f := range r.defaultHttpMiddlewares { n.UseFunc(f) @@ -395,31 +478,14 @@ func (r *RegistryDefault) ReadRouter(ctx context.Context) http.Handler { n.UseFunc(semconv.Middleware) n.Use(reqlog.NewMiddlewareFromLogger(r.l, "read#Ory Keto").ExcludePaths(healthx.AliveCheckPath, healthx.ReadyCheckPath)) - conn, err := r.internalGRPCDialer()() - if err != nil { - panic(err) - } - healthClient := grpcHealthV1.NewHealthClient(conn) - mux := runtime.NewServeMux(append( - x.GRPCGatewayMuxOptions, - runtime.WithHealthEndpointAt(healthClient, healthx.ReadyCheckPath), - runtime.WithHealthEndpointAt(healthClient, healthx.AliveCheckPath), - )...) - for _, h := range r.allHandlers() { - if h, ok := h.(ReadHandler); ok { - if err := h.RegisterReadGRPCGatewayConn(ctx, mux, conn); err != nil { - panic(err) - } - } - } - br := &x.ReadRouter{Router: httprouter.New()} r.PrometheusManager().RegisterRouter(br.Router) r.MetricsHandler().SetRoutes(br.Router) + r.HealthHandler().SetHealthRoutes(br.Router, false) r.HealthHandler().SetVersionRoutes(br.Router) - n.UseHandler(&RouterOrGatewayHandler{Router: br.Router, ServeMux: mux}) + n.UseHandler(&RouterOrHandler{Router: br.Router, Handler: apiHandler}) n.Use(r.PrometheusManager()) if r.sqaService != nil { @@ -435,7 +501,7 @@ func (r *RegistryDefault) ReadRouter(ctx context.Context) http.Handler { return handler } -func (r *RegistryDefault) WriteRouter(ctx context.Context) http.Handler { +func (r *RegistryDefault) WriteRouter(ctx context.Context, apiHandler http.Handler) http.Handler { n := negroni.New() for _, f := range r.defaultHttpMiddlewares { n.UseFunc(f) @@ -443,24 +509,6 @@ func (r *RegistryDefault) WriteRouter(ctx context.Context) http.Handler { n.UseFunc(semconv.Middleware) n.Use(reqlog.NewMiddlewareFromLogger(r.l, "write#Ory Keto").ExcludePaths(healthx.AliveCheckPath, healthx.ReadyCheckPath)) - conn, err := r.internalGRPCDialer()() - if err != nil { - panic(err) - } - healthClient := grpcHealthV1.NewHealthClient(conn) - mux := runtime.NewServeMux(append( - x.GRPCGatewayMuxOptions, - runtime.WithHealthEndpointAt(healthClient, healthx.ReadyCheckPath), - runtime.WithHealthEndpointAt(healthClient, healthx.AliveCheckPath), - )...) - for _, h := range r.allHandlers() { - if h, ok := h.(WriteHandler); ok { - if err := h.RegisterWriteGRPCGatewayConn(ctx, mux, conn); err != nil { - panic(err) - } - } - } - pr := &x.WriteRouter{Router: httprouter.New()} r.PrometheusManager().RegisterRouter(pr.Router) r.MetricsHandler().SetRoutes(pr.Router) @@ -468,7 +516,7 @@ func (r *RegistryDefault) WriteRouter(ctx context.Context) http.Handler { r.HealthHandler().SetHealthRoutes(pr.Router, false) r.HealthHandler().SetVersionRoutes(pr.Router) - n.UseHandler(&RouterOrGatewayHandler{Router: pr.Router, ServeMux: mux}) + n.UseHandler(&RouterOrHandler{Router: pr.Router, Handler: apiHandler}) n.Use(r.PrometheusManager()) if r.sqaService != nil { @@ -484,7 +532,7 @@ func (r *RegistryDefault) WriteRouter(ctx context.Context) http.Handler { return handler } -func (r *RegistryDefault) OPLSyntaxRouter(ctx context.Context) http.Handler { +func (r *RegistryDefault) OPLSyntaxRouter(ctx context.Context, apiHandler http.Handler) http.Handler { n := negroni.New() for _, f := range r.defaultHttpMiddlewares { n.UseFunc(f) @@ -499,25 +547,7 @@ func (r *RegistryDefault) OPLSyntaxRouter(ctx context.Context) http.Handler { r.HealthHandler().SetHealthRoutes(pr.Router, false) r.HealthHandler().SetVersionRoutes(pr.Router) - conn, err := r.internalGRPCDialer()() - if err != nil { - panic(err) - } - healthClient := grpcHealthV1.NewHealthClient(conn) - mux := runtime.NewServeMux(append( - x.GRPCGatewayMuxOptions, - runtime.WithHealthEndpointAt(healthClient, healthx.ReadyCheckPath), - runtime.WithHealthEndpointAt(healthClient, healthx.AliveCheckPath), - )...) - for _, h := range r.allHandlers() { - if h, ok := h.(OPLSyntaxHandler); ok { - if err := h.RegisterSyntaxGRPCGatewayConn(ctx, mux, conn); err != nil { - panic(err) - } - } - } - - n.UseHandler(&RouterOrGatewayHandler{Router: pr.Router, ServeMux: mux}) + n.UseHandler(&RouterOrHandler{Router: pr.Router, Handler: apiHandler}) n.Use(r.PrometheusManager()) if r.sqaService != nil { @@ -606,8 +636,20 @@ func (r *RegistryDefault) newGrpcServer(ctx context.Context) *grpc.Server { if r.grpcTransportCredentials != nil { opts = append(opts, grpc.Creds(r.grpcTransportCredentials)) } - server := grpc.NewServer(opts...) - return server + + return grpc.NewServer(opts...) +} + +func (r *RegistryDefault) newAPIServer(ctx context.Context) *api.Server { + opts := []api.ServerOption{ + api.WithGRPCOption(grpc.ChainStreamInterceptor(r.streamInterceptors(r.externalStreamInterceptors...)...)), + api.WithGRPCOption(grpc.ChainUnaryInterceptor(r.unaryInterceptors(r.externalUnaryInterceptors...)...)), + } + if r.grpcTransportCredentials != nil { + opts = append(opts, api.WithGRPCOption(grpc.Creds(r.grpcTransportCredentials))) + } + + return api.NewServer(opts...) } func (r *RegistryDefault) registerCommonGRPCServices(s *grpc.Server) { diff --git a/internal/driver/registry.go b/internal/driver/registry.go index f5c028ff5..a343d776c 100644 --- a/internal/driver/registry.go +++ b/internal/driver/registry.go @@ -8,11 +8,12 @@ import ( "net/http" "github.com/gobuffalo/pop/v6" + "github.com/spf13/cobra" + "google.golang.org/grpc" + "github.com/ory/x/healthx" "github.com/ory/x/otelx" prometheus "github.com/ory/x/prometheusx" - "github.com/spf13/cobra" - "google.golang.org/grpc" "github.com/ory/keto/internal/check" "github.com/ory/keto/internal/driver/config" @@ -44,8 +45,8 @@ type ( MetricsHandler() *prometheus.Handler PrometheusManager() *prometheus.MetricsManager - ReadRouter(ctx context.Context) http.Handler - WriteRouter(ctx context.Context) http.Handler + ReadRouter(ctx context.Context, apiHandler http.Handler) http.Handler + WriteRouter(ctx context.Context, apiHandler http.Handler) http.Handler ReadGRPCServer(ctx context.Context) *grpc.Server WriteGRPCServer(ctx context.Context) *grpc.Server diff --git a/internal/driver/registry_default.go b/internal/driver/registry_default.go index 2a7a99e0a..9813cd38c 100644 --- a/internal/driver/registry_default.go +++ b/internal/driver/registry_default.go @@ -11,7 +11,12 @@ import ( "github.com/gobuffalo/pop/v6" "github.com/gofrs/uuid" - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/pkg/errors" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/health" + "google.golang.org/grpc/test/bufconn" + "github.com/ory/herodot" "github.com/ory/x/dbal" "github.com/ory/x/fsx" @@ -22,11 +27,6 @@ import ( "github.com/ory/x/otelx" "github.com/ory/x/popx" prometheus "github.com/ory/x/prometheusx" - "github.com/pkg/errors" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/health" - "google.golang.org/grpc/test/bufconn" "github.com/ory/keto/internal/check" "github.com/ory/keto/internal/driver/config" @@ -93,18 +93,12 @@ type ( } ReadHandler interface { RegisterReadGRPC(s *grpc.Server) - RegisterReadGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error - RegisterReadGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error } WriteHandler interface { RegisterWriteGRPC(s *grpc.Server) - RegisterWriteGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error - RegisterWriteGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error } OPLSyntaxHandler interface { RegisterSyntaxGRPC(s *grpc.Server) - RegisterSyntaxGRPCGateway(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts ...grpc.DialOption) error - RegisterSyntaxGRPCGatewayConn(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error } Handler interface{} ) diff --git a/internal/relationtuple/read_server_test.go b/internal/relationtuple/read_server_test.go index df0fffdf4..8a59af147 100644 --- a/internal/relationtuple/read_server_test.go +++ b/internal/relationtuple/read_server_test.go @@ -12,30 +12,26 @@ import ( "net/url" "testing" - "github.com/ory/x/pointerx" - - rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" - - "github.com/ory/keto/ketoapi" - - "github.com/ory/keto/internal/driver/config" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "github.com/tidwall/gjson" - "github.com/stretchr/testify/require" + "github.com/ory/x/pointerx" "github.com/ory/keto/internal/driver" + "github.com/ory/keto/internal/driver/config" "github.com/ory/keto/internal/namespace" "github.com/ory/keto/internal/relationtuple" - "github.com/ory/keto/internal/x" + "github.com/ory/keto/internal/x/api" + "github.com/ory/keto/ketoapi" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" ) func TestReadHandlers(t *testing.T) { ctx := context.Background() reg := driver.NewSqliteTestRegistry(t, false) - endpoints := x.NewTestEndpoints(t, relationtuple.NewHandler(reg)) + endpoints := api.NewTestServer(t, relationtuple.NewHandler(reg)) ts := endpoints.HTTP @@ -206,7 +202,7 @@ func TestReadHandlers(t *testing.T) { body, err := io.ReadAll(resp.Body) require.NoError(t, err) assert.Equal(t, http.StatusBadRequest, resp.StatusCode) - assert.Contains(t, string(body), "invalid syntax") + assert.Contains(t, string(body), "invalid parameter \\\"page_size\\\"") }) }) diff --git a/internal/relationtuple/transact_server.go b/internal/relationtuple/transact_server.go index ad7e9153a..dae0c28cf 100644 --- a/internal/relationtuple/transact_server.go +++ b/internal/relationtuple/transact_server.go @@ -13,6 +13,8 @@ import ( "github.com/ory/herodot" + "github.com/ory/keto/internal/x/api" + "github.com/ory/keto/ketoapi" rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" "github.com/ory/keto/x/events" @@ -82,8 +84,8 @@ func (h *handler) CreateRelationTuple(ctx context.Context, request *rts.CreateRe return nil, err } - _ = grpc.SetHeader(ctx, metadata.Pairs("x-http-code", "201")) - _ = grpc.SetHeader(ctx, metadata.Pairs("x-http-location", ReadRouteBase+"?"+tuple.ToURLQuery().Encode())) + api.SetStatusCode(ctx, 201) + api.SetLocationHeader(ctx, ReadRouteBase+"?"+tuple.ToURLQuery().Encode()) return &rts.CreateRelationTupleResponse{RelationTuple: tuple.ToProto()}, nil } @@ -93,7 +95,7 @@ func (h *handler) DeleteRelationTuples(ctx context.Context, req *rts.DeleteRelat if md, ok := metadata.FromIncomingContext(ctx); ok { if hasBody := md["hasbody"]; len(hasBody) > 0 && hasBody[0] == "true" { - _ = grpc.SetHeader(ctx, metadata.Pairs("x-http-code", "400")) + api.SetStatusCode(ctx, 400) return nil, errors.WithStack(herodot.ErrBadRequest.WithReason("body is not allowed for this request")) } } @@ -110,7 +112,7 @@ func (h *handler) DeleteRelationTuples(ctx context.Context, req *rts.DeleteRelat } if q.Namespace == nil || *q.Namespace == "" { - _ = grpc.SetHeader(ctx, metadata.Pairs("x-http-code", "400")) + api.SetStatusCode(ctx, 400) return nil, errors.WithStack(herodot.ErrBadRequest.WithReason("Namespace must be set")) } @@ -123,7 +125,7 @@ func (h *handler) DeleteRelationTuples(ctx context.Context, req *rts.DeleteRelat } trace.SpanFromContext(ctx).AddEvent(events.NewRelationtuplesDeleted(ctx)) - _ = grpc.SetHeader(ctx, metadata.Pairs("x-http-code", "204")) + api.SetStatusCode(ctx, 204) return &rts.DeleteRelationTuplesResponse{}, nil } diff --git a/internal/relationtuple/transact_server_test.go b/internal/relationtuple/transact_server_test.go index ba9927111..d052bbc1e 100644 --- a/internal/relationtuple/transact_server_test.go +++ b/internal/relationtuple/transact_server_test.go @@ -13,15 +13,17 @@ import ( "strings" "testing" - "github.com/ory/x/pointerx" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/ory/x/pointerx" + "github.com/ory/keto/internal/driver" "github.com/ory/keto/internal/driver/config" "github.com/ory/keto/internal/namespace" "github.com/ory/keto/internal/relationtuple" "github.com/ory/keto/internal/x" + "github.com/ory/keto/internal/x/api" "github.com/ory/keto/ketoapi" ) @@ -41,7 +43,7 @@ func TestWriteHandlers(t *testing.T) { return n } - endpoints := x.NewTestEndpoints(t, relationtuple.NewHandler(reg)) + endpoints := api.NewTestServer(t, relationtuple.NewHandler(reg)) ts := endpoints.HTTP t.Run("method=create", func(t *testing.T) { @@ -100,8 +102,10 @@ func TestWriteHandlers(t *testing.T) { }) t.Run("case=returns bad request on JSON parse error", func(t *testing.T) { - resp := doCreate([]byte("foo")) + resp := doCreate([]byte(`{"invalid]`)) assert.Equal(t, http.StatusBadRequest, resp.StatusCode) + body, _ := io.ReadAll(resp.Body) + require.NotEmpty(t, body) }) t.Run("case=special chars", func(t *testing.T) { @@ -161,9 +165,7 @@ func TestWriteHandlers(t *testing.T) { require.NoError(t, err) resp, err := ts.Client().Do(req) require.NoError(t, err) - body, err := io.ReadAll(resp.Body) - require.NoError(t, err) - assert.Equal(t, http.StatusNoContent, resp.StatusCode, string(body)) + assert.Equal(t, http.StatusNoContent, resp.StatusCode) // set a size > 1 just to make sure it gets all actualRTs, _, err := reg.RelationTupleManager().GetRelationTuples(ctx, &relationtuple.RelationQuery{Namespace: &nspace.Name}, x.WithSize(10)) @@ -236,6 +238,8 @@ func TestWriteHandlers(t *testing.T) { resp, err := ts.Client().Do(req) require.NoError(t, err) assert.Equal(t, http.StatusBadRequest, resp.StatusCode) + body, _ := io.ReadAll(resp.Body) + require.NotEmpty(t, body) } assertTuplesExist := func(t *testing.T) { @@ -482,7 +486,7 @@ func TestWriteHandlers(t *testing.T) { defer resp.Body.Close() errContent, err := io.ReadAll(resp.Body) require.NoError(t, err) - assert.Contains(t, string(errContent), "unknown_action_foo") + assert.Contains(t, string(errContent), "value must be in list [ACTION_INSERT ACTION_DELETE]") }) }) } diff --git a/internal/x/api/api_server.go b/internal/x/api/api_server.go new file mode 100644 index 000000000..71ead3ee2 --- /dev/null +++ b/internal/x/api/api_server.go @@ -0,0 +1,160 @@ +package api + +import ( + "context" + "encoding/json" + "log" + "maps" + "net/http" + "net/http/httptest" + "strconv" + "strings" + + "connectrpc.com/vanguard/vanguardgrpc" + "github.com/urfave/negroni" + "google.golang.org/genproto/googleapis/rpc/errdetails" + statuspb "google.golang.org/genproto/googleapis/rpc/status" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/reflection" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/encoding/protojson" + + v1alpha2 "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" +) + +type ( + Server struct { + GRPCServer *grpc.Server + } + + ServerOption func(o *serverOptions) + + serverOptions struct { + grpcOptions []grpc.ServerOption + } +) + +func WithGRPCOption(grpcOption grpc.ServerOption) ServerOption { + return func(o *serverOptions) { + o.grpcOptions = append(o.grpcOptions, grpcOption) + } +} + +func NewServer(opt ...ServerOption) *Server { + options := new(serverOptions) + for _, o := range opt { + o(options) + } + + grpcServer := grpc.NewServer(options.grpcOptions...) + reflection.Register(grpcServer) + + return &Server{GRPCServer: grpcServer} +} + +func (s *Server) Handler() (http.Handler, error) { + // Create a vanguard handler for all services registered in grpcServer + handler, err := vanguardgrpc.NewTranscoder(s.GRPCServer) + if err != nil { + return nil, err + } + + mux := http.NewServeMux() + mux.Handle("/", handler) + mw := negroni.New() + mw.Use(setErrorResponse) + mw.Use(setRequestPath) + mw.UseHandler(mux) + + return mw, nil +} + +func (s *Server) RegisterService(desc *grpc.ServiceDesc, impl any) { + s.GRPCServer.RegisterService(desc, impl) +} + +var setErrorResponse = negroni.HandlerFunc(func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) { + if ct := r.Header.Get("content-type"); strings.HasPrefix(ct, "application/grpc") || strings.HasPrefix(ct, "application/connect") { + next(w, r) + return + } + + rr := httptest.NewRecorder() + next(rr, r) + + maps.Copy(w.Header(), rr.Header()) + + var spb statuspb.Status + body := rr.Body.Bytes() + protojson.Unmarshal(body, &spb) + + if spb.Code == int32(codes.Unknown) && strings.HasPrefix(spb.Message, "proto: ") { + // Special case: error deserializing request into a protobuf is a bad request. + w.WriteHeader(http.StatusBadRequest) + } else if w.Header().Get("x-http-code") != "" { + statusCode, err := strconv.Atoi(w.Header().Get("x-http-code")) + if err != nil { + log.Println("error:", err) + } + w.Header().Del("x-http-code") + w.WriteHeader(statusCode) + } else { + w.WriteHeader(rr.Code) + } + + if spb.Code == 0 && spb.Message == "" { + _, _ = w.Write(body) + return + } + + s := status.FromProto(&spb) + errResponse := v1alpha2.ErrorResponse{ + Error: &v1alpha2.ErrorResponse_Error{ + Code: int64(rr.Code), + Status: http.StatusText(rr.Code), + Message: s.Message(), + }, + } + for _, detail := range s.Details() { + switch t := detail.(type) { + case *errdetails.ErrorInfo: + errResponse.Error.Reason = t.Reason + case *errdetails.DebugInfo: + errResponse.Error.Debug = t.Detail + case *errdetails.RequestInfo: + errResponse.Error.Request = t.RequestId + case *errdetails.BadRequest: + errResponse.Error.Details = make(map[string]string, len(t.FieldViolations)) + for _, v := range t.FieldViolations { + errResponse.Error.Details[v.Field] = v.Description + } + } + } + + json.NewEncoder(w).Encode(&errResponse) +}) + +var setRequestPath = negroni.HandlerFunc(func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) { + r.Header.Set("x-path", r.URL.Path) + next(w, r) +}) + +func SetStatusCode(ctx context.Context, statusCode int) { + _ = grpc.SetHeader(ctx, metadata.Pairs("x-http-code", strconv.Itoa(statusCode))) +} + +func SetLocationHeader(ctx context.Context, location string) { + _ = grpc.SetHeader(ctx, metadata.Pairs("Location", location)) +} + +func RequestPath(ctx context.Context) string { + if md, ok := metadata.FromIncomingContext(ctx); ok { + path := md["x-path"] + if len(path) > 0 { + return path[0] + } + } + return "" +} diff --git a/internal/x/api/api_test_server.go b/internal/x/api/api_test_server.go new file mode 100644 index 000000000..6ff3c6331 --- /dev/null +++ b/internal/x/api/api_test_server.go @@ -0,0 +1,74 @@ +package api + +import ( + "net/http/httptest" + "strings" + "testing" + + "connectrpc.com/vanguard" + "connectrpc.com/vanguard/vanguardgrpc" + "github.com/stretchr/testify/require" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/encoding" + "google.golang.org/protobuf/encoding/protojson" + + "github.com/ory/keto/internal/x" +) + +type ( + TestServer struct { + GRPC *grpc.ClientConn + HTTP *httptest.Server + } + readHandler interface { + RegisterReadGRPC(s *grpc.Server) + } + writeHandler interface { + RegisterWriteGRPC(s *grpc.Server) + } + oplSyntaxHandler interface { + RegisterSyntaxGRPC(s *grpc.Server) + } +) + +func init() { + encoding.RegisterCodec(vanguardgrpc.NewCodec(&vanguard.JSONCodec{ + MarshalOptions: protojson.MarshalOptions{EmitUnpopulated: true}, + UnmarshalOptions: protojson.UnmarshalOptions{DiscardUnknown: true}, + })) +} + +func NewTestServer(t *testing.T, handler any) *TestServer { + apiServer := NewServer(WithGRPCOption(grpc.ChainUnaryInterceptor(x.GlobalGRPCUnaryServerInterceptors...))) + + if h, ok := handler.(readHandler); ok { + h.RegisterReadGRPC(apiServer.GRPCServer) + } + if h, ok := handler.(writeHandler); ok { + h.RegisterWriteGRPC(apiServer.GRPCServer) + } + if h, ok := handler.(oplSyntaxHandler); ok { + h.RegisterSyntaxGRPC(apiServer.GRPCServer) + } + + h, err := apiServer.Handler() + require.NoError(t, err) + ts := httptest.NewUnstartedServer(h) + ts.EnableHTTP2 = true + ts.StartTLS() + ts.TLS.InsecureSkipVerify = true + t.Cleanup(ts.Close) + + conn, err := grpc.Dial( + strings.TrimPrefix(ts.URL, "https://"), + grpc.WithTransportCredentials(credentials.NewTLS(ts.TLS)), + ) + require.NoError(t, err) + t.Cleanup(func() { _ = conn.Close() }) + + return &TestServer{ + GRPC: conn, + HTTP: ts, + } +} diff --git a/proto/go.mod b/proto/go.mod index bcbb13352..461036eee 100644 --- a/proto/go.mod +++ b/proto/go.mod @@ -1,14 +1,16 @@ module github.com/ory/keto/proto -go 1.19 +go 1.21 + +toolchain go1.22.5 require ( - github.com/envoyproxy/protoc-gen-validate v1.0.2 + github.com/envoyproxy/protoc-gen-validate v1.0.4 github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 github.com/stretchr/testify v1.8.4 google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d - google.golang.org/grpc v1.59.0 - google.golang.org/protobuf v1.31.0 + google.golang.org/grpc v1.66.0 + google.golang.org/protobuf v1.34.1 ) require ( @@ -16,10 +18,10 @@ require ( github.com/golang/protobuf v1.5.3 // indirect github.com/kr/text v0.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/net v0.14.0 // indirect - golang.org/x/sys v0.11.0 // indirect - golang.org/x/text v0.12.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/proto/go.sum b/proto/go.sum index 93e6d17c9..a4568817a 100644 --- a/proto/go.sum +++ b/proto/go.sum @@ -2,6 +2,7 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -20,20 +21,33 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY= google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= +google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go index 99563989b..7ff3d3cdf 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: ory/keto/opl/v1alpha1/syntax_service.proto @@ -322,7 +322,7 @@ func file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDescGZIP() []byte { } var file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_ory_keto_opl_v1alpha1_syntax_service_proto_goTypes = []interface{}{ +var file_ory_keto_opl_v1alpha1_syntax_service_proto_goTypes = []any{ (*CheckRequest)(nil), // 0: ory.keto.opl.v1alpha1.CheckRequest (*CheckResponse)(nil), // 1: ory.keto.opl.v1alpha1.CheckResponse (*ParseError)(nil), // 2: ory.keto.opl.v1alpha1.ParseError @@ -348,7 +348,7 @@ func file_ory_keto_opl_v1alpha1_syntax_service_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*CheckRequest); i { case 0: return &v.state @@ -360,7 +360,7 @@ func file_ory_keto_opl_v1alpha1_syntax_service_proto_init() { return nil } } - file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CheckResponse); i { case 0: return &v.state @@ -372,7 +372,7 @@ func file_ory_keto_opl_v1alpha1_syntax_service_proto_init() { return nil } } - file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ParseError); i { case 0: return &v.state @@ -384,7 +384,7 @@ func file_ory_keto_opl_v1alpha1_syntax_service_proto_init() { return nil } } - file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*SourcePosition); i { case 0: return &v.state diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.gw.go b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.gw.go index 011201d7e..eef8a162b 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.gw.go +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.gw.go @@ -61,6 +61,7 @@ func local_request_SyntaxService_Check_0(ctx context.Context, marshaler runtime. // UnaryRPC :call SyntaxServiceServer 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 RegisterSyntaxServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterSyntaxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SyntaxServiceServer) error { mux.Handle("POST", pattern_SyntaxService_Check_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -94,21 +95,21 @@ func RegisterSyntaxServiceHandlerServer(ctx context.Context, mux *runtime.ServeM // RegisterSyntaxServiceHandlerFromEndpoint is same as RegisterSyntaxServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterSyntaxServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -126,7 +127,7 @@ func RegisterSyntaxServiceHandler(ctx context.Context, mux *runtime.ServeMux, co // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SyntaxServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SyntaxServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "SyntaxServiceClient" to call the correct interceptors. +// "SyntaxServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterSyntaxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SyntaxServiceClient) error { mux.Handle("POST", pattern_SyntaxService_Check_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_grpc.pb.go b/proto/ory/keto/opl/v1alpha1/syntax_service_grpc.pb.go index 4a7305a35..d0cd8bfab 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_grpc.pb.go +++ b/proto/ory/keto/opl/v1alpha1/syntax_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: ory/keto/opl/v1alpha1/syntax_service.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( SyntaxService_Check_FullMethodName = "/ory.keto.opl.v1alpha1.SyntaxService/Check" @@ -25,6 +25,8 @@ const ( // SyntaxServiceClient is the client API for SyntaxService 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. +// +// The service that checks the syntax of an OPL file. type SyntaxServiceClient interface { // Performs a syntax check request. Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) @@ -39,8 +41,9 @@ func NewSyntaxServiceClient(cc grpc.ClientConnInterface) SyntaxServiceClient { } func (c *syntaxServiceClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CheckResponse) - err := c.cc.Invoke(ctx, SyntaxService_Check_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, SyntaxService_Check_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -49,19 +52,25 @@ func (c *syntaxServiceClient) Check(ctx context.Context, in *CheckRequest, opts // SyntaxServiceServer is the server API for SyntaxService service. // All implementations should embed UnimplementedSyntaxServiceServer -// for forward compatibility +// for forward compatibility. +// +// The service that checks the syntax of an OPL file. type SyntaxServiceServer interface { // Performs a syntax check request. Check(context.Context, *CheckRequest) (*CheckResponse, error) } -// UnimplementedSyntaxServiceServer should be embedded to have forward compatible implementations. -type UnimplementedSyntaxServiceServer struct { -} +// UnimplementedSyntaxServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedSyntaxServiceServer struct{} func (UnimplementedSyntaxServiceServer) Check(context.Context, *CheckRequest) (*CheckResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Check not implemented") } +func (UnimplementedSyntaxServiceServer) testEmbeddedByValue() {} // UnsafeSyntaxServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to SyntaxServiceServer will @@ -71,6 +80,13 @@ type UnsafeSyntaxServiceServer interface { } func RegisterSyntaxServiceServer(s grpc.ServiceRegistrar, srv SyntaxServiceServer) { + // If the following call pancis, it indicates UnimplementedSyntaxServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&SyntaxService_ServiceDesc, srv) } diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js index a024fd933..18b12de5c 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js +++ b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js @@ -145,7 +145,7 @@ proto.ory.keto.opl.v1alpha1.CheckRequest.prototype.toObject = function(opt_inclu */ proto.ory.keto.opl.v1alpha1.CheckRequest.toObject = function(includeInstance, msg) { var f, obj = { - content: msg.getContent_asB64() +content: msg.getContent_asB64() }; if (includeInstance) { @@ -306,9 +306,9 @@ proto.ory.keto.opl.v1alpha1.CheckResponse.prototype.toObject = function(opt_incl */ proto.ory.keto.opl.v1alpha1.CheckResponse.toObject = function(includeInstance, msg) { var f, obj = { - parseErrorsList: jspb.Message.toObjectList(msg.getParseErrorsList(), +parseErrorsList: jspb.Message.toObjectList(msg.getParseErrorsList(), proto.ory.keto.opl.v1alpha1.ParseError.toObject, includeInstance), - errorsList: jspb.Message.toObjectList(msg.getErrorsList(), +errorsList: jspb.Message.toObjectList(msg.getErrorsList(), proto.ory.keto.opl.v1alpha1.ParseError.toObject, includeInstance) }; @@ -512,9 +512,9 @@ proto.ory.keto.opl.v1alpha1.ParseError.prototype.toObject = function(opt_include */ proto.ory.keto.opl.v1alpha1.ParseError.toObject = function(includeInstance, msg) { var f, obj = { - message: jspb.Message.getFieldWithDefault(msg, 1, ""), - start: (f = msg.getStart()) && proto.ory.keto.opl.v1alpha1.SourcePosition.toObject(includeInstance, f), - end: (f = msg.getEnd()) && proto.ory.keto.opl.v1alpha1.SourcePosition.toObject(includeInstance, f) +message: jspb.Message.getFieldWithDefault(msg, 1, ""), +start: (f = msg.getStart()) && proto.ory.keto.opl.v1alpha1.SourcePosition.toObject(includeInstance, f), +end: (f = msg.getEnd()) && proto.ory.keto.opl.v1alpha1.SourcePosition.toObject(includeInstance, f) }; if (includeInstance) { @@ -744,8 +744,8 @@ proto.ory.keto.opl.v1alpha1.SourcePosition.prototype.toObject = function(opt_inc */ proto.ory.keto.opl.v1alpha1.SourcePosition.toObject = function(includeInstance, msg) { var f, obj = { - line: jspb.Message.getFieldWithDefault(msg, 1, 0), - column: jspb.Message.getFieldWithDefault(msg, 2, 0) +line: jspb.Message.getFieldWithDefault(msg, 1, 0), +column: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go index 8750d9d26..e0ab04b3a 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/check_service.proto @@ -446,7 +446,7 @@ func file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDescGZIP() [] } var file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_ory_keto_relation_tuples_v1alpha2_check_service_proto_goTypes = []interface{}{ +var file_ory_keto_relation_tuples_v1alpha2_check_service_proto_goTypes = []any{ (*CheckRequest)(nil), // 0: ory.keto.relation_tuples.v1alpha2.CheckRequest (*CheckResponse)(nil), // 1: ory.keto.relation_tuples.v1alpha2.CheckResponse (*Subject)(nil), // 2: ory.keto.relation_tuples.v1alpha2.Subject @@ -473,7 +473,7 @@ func file_ory_keto_relation_tuples_v1alpha2_check_service_proto_init() { } file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() if !protoimpl.UnsafeEnabled { - file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*CheckRequest); i { case 0: return &v.state @@ -485,7 +485,7 @@ func file_ory_keto_relation_tuples_v1alpha2_check_service_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*CheckResponse); i { case 0: return &v.state @@ -498,7 +498,7 @@ func file_ory_keto_relation_tuples_v1alpha2_check_service_proto_init() { } } } - file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[0].OneofWrappers = []any{ (*CheckRequest_SubjectId)(nil), (*CheckRequest_SubjectSet)(nil), } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.gw.go index 3dead190e..4d18815cb 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.gw.go @@ -159,6 +159,7 @@ func local_request_CheckService_Check_3(ctx context.Context, marshaler runtime.M // UnaryRPC :call CheckServiceServer 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 RegisterCheckServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterCheckServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CheckServiceServer) error { mux.Handle("GET", pattern_CheckService_Check_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -267,21 +268,21 @@ func RegisterCheckServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu // RegisterCheckServiceHandlerFromEndpoint is same as RegisterCheckServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterCheckServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -299,7 +300,7 @@ func RegisterCheckServiceHandler(ctx context.Context, mux *runtime.ServeMux, con // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CheckServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CheckServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "CheckServiceClient" to call the correct interceptors. +// "CheckServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterCheckServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CheckServiceClient) error { mux.Handle("GET", pattern_CheckService_Check_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go index 5437d83dc..ee5d6e350 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/check_service.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( CheckService_Check_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.CheckService/Check" @@ -25,6 +25,11 @@ const ( // CheckServiceClient is the client API for CheckService 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. +// +// The service that performs authorization checks +// based on the stored Access Control Lists. +// +// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis). type CheckServiceClient interface { // Performs an authorization check. Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) @@ -39,8 +44,9 @@ func NewCheckServiceClient(cc grpc.ClientConnInterface) CheckServiceClient { } func (c *checkServiceClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CheckResponse) - err := c.cc.Invoke(ctx, CheckService_Check_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, CheckService_Check_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -49,19 +55,28 @@ func (c *checkServiceClient) Check(ctx context.Context, in *CheckRequest, opts . // CheckServiceServer is the server API for CheckService service. // All implementations should embed UnimplementedCheckServiceServer -// for forward compatibility +// for forward compatibility. +// +// The service that performs authorization checks +// based on the stored Access Control Lists. +// +// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis). type CheckServiceServer interface { // Performs an authorization check. Check(context.Context, *CheckRequest) (*CheckResponse, error) } -// UnimplementedCheckServiceServer should be embedded to have forward compatible implementations. -type UnimplementedCheckServiceServer struct { -} +// UnimplementedCheckServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedCheckServiceServer struct{} func (UnimplementedCheckServiceServer) Check(context.Context, *CheckRequest) (*CheckResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Check not implemented") } +func (UnimplementedCheckServiceServer) testEmbeddedByValue() {} // UnsafeCheckServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CheckServiceServer will @@ -71,6 +86,13 @@ type UnsafeCheckServiceServer interface { } func RegisterCheckServiceServer(s grpc.ServiceRegistrar, srv CheckServiceServer) { + // If the following call pancis, it indicates UnimplementedCheckServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&CheckService_ServiceDesc, srv) } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js index fa456826f..3d9386769 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js @@ -132,16 +132,16 @@ proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.prototype.toObject = functi */ proto.ory.keto.relation_tuples.v1alpha2.CheckRequest.toObject = function(includeInstance, msg) { var f, obj = { - namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), - object: jspb.Message.getFieldWithDefault(msg, 2, ""), - relation: jspb.Message.getFieldWithDefault(msg, 3, ""), - subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f), - subjectId: jspb.Message.getFieldWithDefault(msg, 9, ""), - subjectSet: (f = msg.getSubjectSet()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.toObject(includeInstance, f), - tuple: (f = msg.getTuple()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.toObject(includeInstance, f), - latest: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), - snaptoken: jspb.Message.getFieldWithDefault(msg, 6, ""), - maxDepth: jspb.Message.getFieldWithDefault(msg, 7, 0) +namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), +object: jspb.Message.getFieldWithDefault(msg, 2, ""), +relation: jspb.Message.getFieldWithDefault(msg, 3, ""), +subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f), +subjectId: (f = jspb.Message.getField(msg, 9)) == null ? undefined : f, +subjectSet: (f = msg.getSubjectSet()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.toObject(includeInstance, f), +tuple: (f = msg.getTuple()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.toObject(includeInstance, f), +latest: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), +snaptoken: jspb.Message.getFieldWithDefault(msg, 6, ""), +maxDepth: jspb.Message.getFieldWithDefault(msg, 7, 0) }; if (includeInstance) { @@ -613,8 +613,8 @@ proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.prototype.toObject = funct */ proto.ory.keto.relation_tuples.v1alpha2.CheckResponse.toObject = function(includeInstance, msg) { var f, obj = { - allowed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - snaptoken: jspb.Message.getFieldWithDefault(msg, 2, "") +allowed: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), +snaptoken: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go index 60f15a806..eab77d151 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/expand_service.proto @@ -402,7 +402,7 @@ var file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDesc = []byte 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, 0xa0, 0x02, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x22, 0xa3, 0x02, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x58, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, @@ -413,111 +413,111 @@ var file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDesc = []byte 0x09, 0x6d, 0x61, 0x78, 0x2d, 0x64, 0x65, 0x70, 0x74, 0x68, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, - 0x52, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x09, + 0x52, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x24, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x05, 0xe0, 0x41, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x1d, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x05, 0xe0, 0x41, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0x21, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x05, 0xe0, 0x41, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x54, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x72, 0x65, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, - 0x72, 0x65, 0x65, 0x52, 0x04, 0x74, 0x72, 0x65, 0x65, 0x22, 0xb6, 0x02, 0x0a, 0x0b, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x12, 0x49, 0x0a, 0x09, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, + 0x06, 0xe2, 0x41, 0x01, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x06, 0xe2, 0x41, 0x01, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x22, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0x41, 0x01, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x54, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x72, 0x65, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, + 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x52, 0x04, 0x74, 0x72, 0x65, 0x65, 0x22, 0xb7, 0x02, 0x0a, + 0x0b, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x12, 0x4a, 0x0a, 0x09, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2b, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x04, 0xe2, 0x41, + 0x01, 0x02, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, + 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x46, 0x0a, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, + 0x70, 0x6c, 0x65, 0x52, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x4a, 0x0a, 0x08, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, - 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, - 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x46, - 0x0a, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, - 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, - 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x4a, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, - 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, - 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, - 0x65, 0x6e, 0x2a, 0x86, 0x04, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, - 0x12, 0x2d, 0x0a, 0x15, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, - 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, - 0x09, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x27, 0x0a, 0x0f, 0x4e, 0x4f, - 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x1a, + 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x52, 0x08, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x2a, 0x86, 0x04, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x10, 0x00, 0x12, 0x2d, 0x0a, 0x15, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, - 0x47, 0x45, 0x52, 0x12, 0x0d, 0x0a, 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, - 0x10, 0x02, 0x12, 0x2b, 0x0a, 0x13, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, - 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, - 0x10, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, - 0x03, 0x12, 0x2e, 0x0a, 0x16, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, - 0x4e, 0x54, 0x45, 0x52, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x1a, 0x12, 0xfa, - 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, - 0x52, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x65, 0x61, 0x66, 0x10, 0x04, 0x12, 0x26, 0x0a, 0x0e, 0x4e, - 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x45, 0x41, 0x46, 0x10, 0x04, 0x1a, + 0x47, 0x45, 0x52, 0x12, 0x09, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x27, + 0x0a, 0x0f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x4f, + 0x4e, 0x10, 0x01, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, + 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x0d, 0x0a, 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, + 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x02, 0x12, 0x2b, 0x0a, 0x13, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, - 0x47, 0x45, 0x52, 0x12, 0x18, 0x0a, 0x14, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x5f, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x05, 0x12, 0x36, 0x0a, - 0x1e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x55, 0x50, 0x4c, 0x45, - 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x53, 0x45, 0x54, 0x10, - 0x05, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, - 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x18, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, - 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x06, 0x12, - 0x36, 0x0a, 0x1e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x4d, - 0x50, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x53, 0x45, - 0x54, 0x10, 0x06, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, - 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x07, 0x0a, 0x03, 0x6e, 0x6f, 0x74, 0x10, 0x07, - 0x12, 0x25, 0x0a, 0x0d, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x4f, - 0x54, 0x10, 0x07, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, - 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x1a, 0x02, 0x10, 0x01, 0x32, 0xa7, 0x03, 0x0a, 0x0d, - 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x95, 0x03, - 0x0a, 0x06, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, - 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, 0x78, 0x70, - 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, - 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa5, 0x02, - 0x92, 0x41, 0xfc, 0x01, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x2a, 0x11, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x32, 0x21, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x75, 0x72, 0x6c, 0x65, - 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x4a, 0xb7, 0x01, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0xaf, - 0x01, 0x0a, 0x79, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, - 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x63, 0x61, 0x73, 0x65, - 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x2e, 0x20, - 0x46, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x60, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, - 0x69, 0x60, 0x20, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x73, - 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x32, 0x30, 0x30, 0x2e, 0x12, 0x32, 0x0a, 0x30, - 0x1a, 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x62, 0x04, 0x74, 0x72, 0x65, 0x65, 0x12, 0x17, 0x2f, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x65, - 0x78, 0x70, 0x61, 0x6e, 0x64, 0x42, 0xc3, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x12, - 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, - 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, - 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x47, 0x45, 0x52, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x10, 0x03, 0x12, 0x2e, 0x0a, 0x16, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, + 0x03, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, + 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x65, 0x61, 0x66, 0x10, 0x04, 0x12, + 0x26, 0x0a, 0x0e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x45, 0x41, + 0x46, 0x10, 0x04, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, + 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x18, 0x0a, 0x14, 0x74, 0x75, 0x70, 0x6c, 0x65, + 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x10, + 0x05, 0x12, 0x36, 0x0a, 0x1e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, + 0x55, 0x50, 0x4c, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, + 0x53, 0x45, 0x54, 0x10, 0x05, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, + 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x18, 0x0a, 0x14, 0x63, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, + 0x74, 0x10, 0x06, 0x12, 0x36, 0x0a, 0x1e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, + 0x54, 0x5f, 0x53, 0x45, 0x54, 0x10, 0x06, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, + 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x07, 0x0a, 0x03, 0x6e, + 0x6f, 0x74, 0x10, 0x07, 0x12, 0x25, 0x0a, 0x0d, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x10, 0x07, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, + 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x1a, 0x02, 0x10, 0x01, 0x32, + 0xa7, 0x03, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x95, 0x03, 0x0a, 0x06, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x30, 0x2e, 0x6f, + 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x2e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, + 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x2e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0xa5, 0x02, 0x92, 0x41, 0xfc, 0x01, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x11, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x50, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x21, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, 0x72, 0x6d, 0x2d, + 0x75, 0x72, 0x6c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x4a, 0xb7, 0x01, 0x0a, 0x03, 0x32, + 0x30, 0x30, 0x12, 0xaf, 0x01, 0x0a, 0x79, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2c, 0x20, 0x69, 0x6e, 0x20, + 0x63, 0x61, 0x73, 0x65, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, + 0x65, 0x64, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x60, 0x2f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x60, 0x20, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, + 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x63, 0x6f, 0x64, + 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x32, 0x30, 0x30, 0x2e, + 0x12, 0x32, 0x0a, 0x30, 0x1a, 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x54, 0x72, 0x65, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x62, 0x04, 0x74, 0x72, 0x65, 0x65, + 0x12, 0x17, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x42, 0xc3, 0x01, 0x0a, 0x24, 0x73, 0x68, + 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x42, 0x12, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, + 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, + 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -534,7 +534,7 @@ func file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDescGZIP() [ var file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_goTypes = []interface{}{ +var file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_goTypes = []any{ (NodeType)(0), // 0: ory.keto.relation_tuples.v1alpha2.NodeType (*ExpandRequest)(nil), // 1: ory.keto.relation_tuples.v1alpha2.ExpandRequest (*ExpandResponse)(nil), // 2: ory.keto.relation_tuples.v1alpha2.ExpandResponse @@ -565,7 +565,7 @@ func file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_init() { } file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() if !protoimpl.UnsafeEnabled { - file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ExpandRequest); i { case 0: return &v.state @@ -577,7 +577,7 @@ func file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ExpandResponse); i { case 0: return &v.state @@ -589,7 +589,7 @@ func file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*SubjectTree); i { case 0: return &v.state diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.gw.go index 0aaa87f60..75c156920 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.gw.go @@ -71,6 +71,7 @@ func local_request_ExpandService_Expand_0(ctx context.Context, marshaler runtime // UnaryRPC :call ExpandServiceServer 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 RegisterExpandServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterExpandServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExpandServiceServer) error { mux.Handle("GET", pattern_ExpandService_Expand_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -94,7 +95,7 @@ func RegisterExpandServiceHandlerServer(ctx context.Context, mux *runtime.ServeM return } - forward_ExpandService_Expand_0(annotatedContext, mux, outboundMarshaler, w, req, response_ExpandService_Expand_0{resp}, mux.GetForwardResponseOptions()...) + forward_ExpandService_Expand_0(annotatedContext, mux, outboundMarshaler, w, req, response_ExpandService_Expand_0{resp.(*ExpandResponse)}, mux.GetForwardResponseOptions()...) }) @@ -104,21 +105,21 @@ func RegisterExpandServiceHandlerServer(ctx context.Context, mux *runtime.ServeM // RegisterExpandServiceHandlerFromEndpoint is same as RegisterExpandServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterExpandServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -136,7 +137,7 @@ func RegisterExpandServiceHandler(ctx context.Context, mux *runtime.ServeMux, co // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ExpandServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ExpandServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ExpandServiceClient" to call the correct interceptors. +// "ExpandServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterExpandServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExpandServiceClient) error { mux.Handle("GET", pattern_ExpandService_Expand_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -157,7 +158,7 @@ func RegisterExpandServiceHandlerClient(ctx context.Context, mux *runtime.ServeM return } - forward_ExpandService_Expand_0(annotatedContext, mux, outboundMarshaler, w, req, response_ExpandService_Expand_0{resp}, mux.GetForwardResponseOptions()...) + forward_ExpandService_Expand_0(annotatedContext, mux, outboundMarshaler, w, req, response_ExpandService_Expand_0{resp.(*ExpandResponse)}, mux.GetForwardResponseOptions()...) }) @@ -165,12 +166,11 @@ func RegisterExpandServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } type response_ExpandService_Expand_0 struct { - proto.Message + *ExpandResponse } func (m response_ExpandService_Expand_0) XXX_ResponseBody() interface{} { - response := m.Message.(*ExpandResponse) - return response.Tree + return m.Tree } var ( diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc.pb.go index 9f8a029d6..472a3feff 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/expand_service.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( ExpandService_Expand_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand" @@ -25,6 +25,11 @@ const ( // ExpandServiceClient is the client API for ExpandService 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. +// +// The service that performs subject set expansion +// based on the stored Access Control Lists. +// +// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis). type ExpandServiceClient interface { // Expands the subject set into a tree of subjects. Expand(ctx context.Context, in *ExpandRequest, opts ...grpc.CallOption) (*ExpandResponse, error) @@ -39,8 +44,9 @@ func NewExpandServiceClient(cc grpc.ClientConnInterface) ExpandServiceClient { } func (c *expandServiceClient) Expand(ctx context.Context, in *ExpandRequest, opts ...grpc.CallOption) (*ExpandResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ExpandResponse) - err := c.cc.Invoke(ctx, ExpandService_Expand_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ExpandService_Expand_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -49,19 +55,28 @@ func (c *expandServiceClient) Expand(ctx context.Context, in *ExpandRequest, opt // ExpandServiceServer is the server API for ExpandService service. // All implementations should embed UnimplementedExpandServiceServer -// for forward compatibility +// for forward compatibility. +// +// The service that performs subject set expansion +// based on the stored Access Control Lists. +// +// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis). type ExpandServiceServer interface { // Expands the subject set into a tree of subjects. Expand(context.Context, *ExpandRequest) (*ExpandResponse, error) } -// UnimplementedExpandServiceServer should be embedded to have forward compatible implementations. -type UnimplementedExpandServiceServer struct { -} +// UnimplementedExpandServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedExpandServiceServer struct{} func (UnimplementedExpandServiceServer) Expand(context.Context, *ExpandRequest) (*ExpandResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Expand not implemented") } +func (UnimplementedExpandServiceServer) testEmbeddedByValue() {} // UnsafeExpandServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ExpandServiceServer will @@ -71,6 +86,13 @@ type UnsafeExpandServiceServer interface { } func RegisterExpandServiceServer(s grpc.ServiceRegistrar, srv ExpandServiceServer) { + // If the following call pancis, it indicates UnimplementedExpandServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&ExpandService_ServiceDesc, srv) } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js index dd2b726ef..8a1e53e92 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js @@ -130,12 +130,12 @@ proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.prototype.toObject = funct */ proto.ory.keto.relation_tuples.v1alpha2.ExpandRequest.toObject = function(includeInstance, msg) { var f, obj = { - subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f), - maxDepth: jspb.Message.getFieldWithDefault(msg, 2, 0), - snaptoken: jspb.Message.getFieldWithDefault(msg, 3, ""), - namespace: jspb.Message.getFieldWithDefault(msg, 4, ""), - object: jspb.Message.getFieldWithDefault(msg, 5, ""), - relation: jspb.Message.getFieldWithDefault(msg, 6, "") +subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f), +maxDepth: jspb.Message.getFieldWithDefault(msg, 2, 0), +snaptoken: jspb.Message.getFieldWithDefault(msg, 3, ""), +namespace: jspb.Message.getFieldWithDefault(msg, 4, ""), +object: jspb.Message.getFieldWithDefault(msg, 5, ""), +relation: jspb.Message.getFieldWithDefault(msg, 6, "") }; if (includeInstance) { @@ -431,7 +431,7 @@ proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.prototype.toObject = func */ proto.ory.keto.relation_tuples.v1alpha2.ExpandResponse.toObject = function(includeInstance, msg) { var f, obj = { - tree: (f = msg.getTree()) && proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.toObject(includeInstance, f) +tree: (f = msg.getTree()) && proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.toObject(includeInstance, f) }; if (includeInstance) { @@ -589,10 +589,10 @@ proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.prototype.toObject = functio */ proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.toObject = function(includeInstance, msg) { var f, obj = { - nodeType: jspb.Message.getFieldWithDefault(msg, 1, 0), - subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f), - tuple: (f = msg.getTuple()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.toObject(includeInstance, f), - childrenList: jspb.Message.toObjectList(msg.getChildrenList(), +nodeType: jspb.Message.getFieldWithDefault(msg, 1, 0), +subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f), +tuple: (f = msg.getTuple()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.toObject(includeInstance, f), +childrenList: jspb.Message.toObjectList(msg.getChildrenList(), proto.ory.keto.relation_tuples.v1alpha2.SubjectTree.toObject, includeInstance) }; diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go index adbccb1de..5e070f5b2 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/namespaces_service.proto @@ -234,7 +234,7 @@ func file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_rawDescGZIP } var file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_goTypes = []interface{}{ +var file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_goTypes = []any{ (*ListNamespacesRequest)(nil), // 0: ory.keto.relation_tuples.v1alpha2.ListNamespacesRequest (*ListNamespacesResponse)(nil), // 1: ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse (*Namespace)(nil), // 2: ory.keto.relation_tuples.v1alpha2.Namespace @@ -256,7 +256,7 @@ func file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ListNamespacesRequest); i { case 0: return &v.state @@ -268,7 +268,7 @@ func file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ListNamespacesResponse); i { case 0: return &v.state @@ -280,7 +280,7 @@ func file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Namespace); i { case 0: return &v.state diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.gw.go index 7f19fcd3f..5d48cb06e 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.gw.go @@ -53,6 +53,7 @@ func local_request_NamespacesService_ListNamespaces_0(ctx context.Context, marsh // UnaryRPC :call NamespacesServiceServer 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 RegisterNamespacesServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterNamespacesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NamespacesServiceServer) error { mux.Handle("GET", pattern_NamespacesService_ListNamespaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -86,21 +87,21 @@ func RegisterNamespacesServiceHandlerServer(ctx context.Context, mux *runtime.Se // RegisterNamespacesServiceHandlerFromEndpoint is same as RegisterNamespacesServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterNamespacesServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -118,7 +119,7 @@ func RegisterNamespacesServiceHandler(ctx context.Context, mux *runtime.ServeMux // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NamespacesServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NamespacesServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "NamespacesServiceClient" to call the correct interceptors. +// "NamespacesServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterNamespacesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NamespacesServiceClient) error { mux.Handle("GET", pattern_NamespacesService_ListNamespaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc.pb.go index d1c646793..bfc69dc78 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/namespaces_service.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( NamespacesService_ListNamespaces_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.NamespacesService/ListNamespaces" @@ -25,6 +25,10 @@ const ( // NamespacesServiceClient is the client API for NamespacesService 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. +// +// The service to query namespaces. +// +// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis). type NamespacesServiceClient interface { // Lists Namespaces // @@ -41,8 +45,9 @@ func NewNamespacesServiceClient(cc grpc.ClientConnInterface) NamespacesServiceCl } func (c *namespacesServiceClient) ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListNamespacesResponse) - err := c.cc.Invoke(ctx, NamespacesService_ListNamespaces_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, NamespacesService_ListNamespaces_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -51,7 +56,11 @@ func (c *namespacesServiceClient) ListNamespaces(ctx context.Context, in *ListNa // NamespacesServiceServer is the server API for NamespacesService service. // All implementations should embed UnimplementedNamespacesServiceServer -// for forward compatibility +// for forward compatibility. +// +// The service to query namespaces. +// +// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis). type NamespacesServiceServer interface { // Lists Namespaces // @@ -59,13 +68,17 @@ type NamespacesServiceServer interface { ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) } -// UnimplementedNamespacesServiceServer should be embedded to have forward compatible implementations. -type UnimplementedNamespacesServiceServer struct { -} +// UnimplementedNamespacesServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedNamespacesServiceServer struct{} func (UnimplementedNamespacesServiceServer) ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListNamespaces not implemented") } +func (UnimplementedNamespacesServiceServer) testEmbeddedByValue() {} // UnsafeNamespacesServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to NamespacesServiceServer will @@ -75,6 +88,13 @@ type UnsafeNamespacesServiceServer interface { } func RegisterNamespacesServiceServer(s grpc.ServiceRegistrar, srv NamespacesServiceServer) { + // If the following call pancis, it indicates UnimplementedNamespacesServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&NamespacesService_ServiceDesc, srv) } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js index 7f1a6ac43..5d477e914 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js @@ -231,7 +231,7 @@ proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.prototype.toObjec */ proto.ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse.toObject = function(includeInstance, msg) { var f, obj = { - namespacesList: jspb.Message.toObjectList(msg.getNamespacesList(), +namespacesList: jspb.Message.toObjectList(msg.getNamespacesList(), proto.ory.keto.relation_tuples.v1alpha2.Namespace.toObject, includeInstance) }; @@ -384,7 +384,7 @@ proto.ory.keto.relation_tuples.v1alpha2.Namespace.prototype.toObject = function( */ proto.ory.keto.relation_tuples.v1alpha2.Namespace.toObject = function(includeInstance, msg) { var f, obj = { - name: jspb.Message.getFieldWithDefault(msg, 1, "") +name: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go index 3ec021839..ee4a51c2b 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/openapi.proto @@ -211,79 +211,79 @@ var file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDesc = []byte{ 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, 0xa4, 0x04, 0x0a, 0x0d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x04, 0x0a, 0x0d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x03, - 0xe0, 0x41, 0x02, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0xbf, 0x03, 0x0a, 0x05, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x42, 0x08, 0x92, 0x41, 0x05, 0x4a, 0x03, 0x34, 0x30, 0x34, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x12, 0x5d, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x6f, 0x72, 0x79, 0x2e, - 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, - 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4e, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0x92, 0x41, 0x2e, 0x4a, 0x2c, 0x22, - 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6e, 0x6f, 0x74, - 0x20, 0x62, 0x65, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x22, 0xe0, 0x41, 0x02, 0x52, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, - 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, - 0x45, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x2b, 0x92, 0x41, 0x28, 0x4a, 0x26, 0x22, 0x64, 0x37, 0x65, 0x66, 0x35, 0x34, 0x62, 0x31, - 0x2d, 0x65, 0x63, 0x31, 0x35, 0x2d, 0x34, 0x36, 0x65, 0x36, 0x2d, 0x62, 0x63, 0x63, 0x62, 0x2d, - 0x35, 0x32, 0x34, 0x62, 0x38, 0x32, 0x63, 0x30, 0x33, 0x35, 0x65, 0x36, 0x22, 0x52, 0x07, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0x92, 0x41, 0x0d, 0x4a, 0x0b, 0x22, 0x4e, 0x6f, - 0x74, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x1a, 0x3a, 0x0a, 0x0c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xd1, 0x04, 0x92, - 0x41, 0x90, 0x03, 0x12, 0x95, 0x02, 0x0a, 0x08, 0x4f, 0x52, 0x59, 0x20, 0x4b, 0x65, 0x74, 0x6f, - 0x12, 0x9b, 0x01, 0x4f, 0x72, 0x79, 0x20, 0x4b, 0x65, 0x74, 0x6f, 0x20, 0x69, 0x73, 0x20, 0x61, - 0x20, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x20, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x62, 0x65, - 0x73, 0x74, 0x2d, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x20, 0x70, 0x61, 0x74, 0x74, - 0x65, 0x72, 0x6e, 0x73, 0x20, 0x28, 0x52, 0x42, 0x41, 0x43, 0x2c, 0x20, 0x41, 0x42, 0x41, 0x43, - 0x2c, 0x20, 0x41, 0x43, 0x4c, 0x2c, 0x20, 0x41, 0x57, 0x53, 0x20, 0x49, 0x41, 0x4d, 0x20, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2c, 0x20, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x65, 0x73, 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x20, - 0x76, 0x69, 0x61, 0x20, 0x52, 0x45, 0x53, 0x54, 0x20, 0x41, 0x50, 0x49, 0x73, 0x2e, 0x22, 0x24, - 0x0a, 0x03, 0x4f, 0x52, 0x59, 0x12, 0x12, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, - 0x77, 0x77, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x73, 0x68, 0x1a, 0x09, 0x68, 0x69, 0x40, 0x6f, 0x72, - 0x79, 0x2e, 0x73, 0x68, 0x2a, 0x3d, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x32, - 0x2e, 0x30, 0x12, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, - 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, - 0x4e, 0x53, 0x45, 0x32, 0x06, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x22, 0x01, 0x2f, 0x2a, 0x02, - 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, 0x52, 0x4b, 0x0a, 0x03, 0x34, 0x30, 0x30, 0x12, 0x44, 0x0a, - 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x12, 0x34, 0x0a, - 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, - 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x61, - 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, - 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, - 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x04, + 0xe2, 0x41, 0x01, 0x02, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0xc0, 0x03, 0x0a, 0x05, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x42, 0x08, 0x92, 0x41, 0x05, 0x4a, 0x03, 0x34, 0x30, 0x34, 0x52, 0x04, 0x63, + 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x12, 0x5d, 0x0a, 0x07, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4f, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0x92, 0x41, 0x2e, 0x4a, 0x2c, + 0x22, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6e, 0x6f, + 0x74, 0x20, 0x62, 0x65, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x22, 0xe2, 0x41, 0x01, 0x02, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x12, 0x45, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x2b, 0x92, 0x41, 0x28, 0x4a, 0x26, 0x22, 0x64, 0x37, 0x65, 0x66, 0x35, 0x34, + 0x62, 0x31, 0x2d, 0x65, 0x63, 0x31, 0x35, 0x2d, 0x34, 0x36, 0x65, 0x36, 0x2d, 0x62, 0x63, 0x63, + 0x62, 0x2d, 0x35, 0x32, 0x34, 0x62, 0x38, 0x32, 0x63, 0x30, 0x33, 0x35, 0x65, 0x36, 0x22, 0x52, + 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0x92, 0x41, 0x0d, 0x4a, 0x0b, 0x22, + 0x4e, 0x6f, 0x74, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xd1, + 0x04, 0x92, 0x41, 0x90, 0x03, 0x12, 0x95, 0x02, 0x0a, 0x08, 0x4f, 0x52, 0x59, 0x20, 0x4b, 0x65, + 0x74, 0x6f, 0x12, 0x9b, 0x01, 0x4f, 0x72, 0x79, 0x20, 0x4b, 0x65, 0x74, 0x6f, 0x20, 0x69, 0x73, + 0x20, 0x61, 0x20, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x20, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x69, 0x6e, 0x67, 0x20, + 0x62, 0x65, 0x73, 0x74, 0x2d, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x20, 0x70, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x20, 0x28, 0x52, 0x42, 0x41, 0x43, 0x2c, 0x20, 0x41, 0x42, + 0x41, 0x43, 0x2c, 0x20, 0x41, 0x43, 0x4c, 0x2c, 0x20, 0x41, 0x57, 0x53, 0x20, 0x49, 0x41, 0x4d, + 0x20, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2c, 0x20, 0x4b, 0x75, 0x62, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x65, 0x73, 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, + 0x29, 0x20, 0x76, 0x69, 0x61, 0x20, 0x52, 0x45, 0x53, 0x54, 0x20, 0x41, 0x50, 0x49, 0x73, 0x2e, + 0x22, 0x24, 0x0a, 0x03, 0x4f, 0x52, 0x59, 0x12, 0x12, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, + 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x73, 0x68, 0x1a, 0x09, 0x68, 0x69, 0x40, + 0x6f, 0x72, 0x79, 0x2e, 0x73, 0x68, 0x2a, 0x3d, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, + 0x20, 0x32, 0x2e, 0x30, 0x12, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, + 0x6f, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, + 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x06, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x22, 0x01, 0x2f, + 0x2a, 0x02, 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, 0x52, 0x4b, 0x0a, 0x03, 0x34, 0x30, 0x30, 0x12, + 0x44, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x12, + 0x34, 0x0a, 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x0c, 0x4f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, + 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, + 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -299,7 +299,7 @@ func file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDescGZIP() []byte { } var file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_ory_keto_relation_tuples_v1alpha2_openapi_proto_goTypes = []interface{}{ +var file_ory_keto_relation_tuples_v1alpha2_openapi_proto_goTypes = []any{ (*ErrorResponse)(nil), // 0: ory.keto.relation_tuples.v1alpha2.ErrorResponse (*ErrorResponse_Error)(nil), // 1: ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error nil, // 2: ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.DetailsEntry @@ -320,7 +320,7 @@ func file_ory_keto_relation_tuples_v1alpha2_openapi_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ErrorResponse); i { case 0: return &v.state @@ -332,7 +332,7 @@ func file_ory_keto_relation_tuples_v1alpha2_openapi_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ErrorResponse_Error); i { case 0: return &v.state diff --git a/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.js index cf12badd6..84c75890b 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/openapi_pb.js @@ -101,7 +101,7 @@ proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.prototype.toObject = funct */ proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.toObject = function(includeInstance, msg) { var f, obj = { - error: (f = msg.getError()) && proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.toObject(includeInstance, f) +error: (f = msg.getError()) && proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.toObject(includeInstance, f) }; if (includeInstance) { @@ -215,14 +215,14 @@ proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.prototype.toObject = */ proto.ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error.toObject = function(includeInstance, msg) { var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - debug: jspb.Message.getFieldWithDefault(msg, 2, ""), - detailsMap: (f = msg.getDetailsMap()) ? f.toObject(includeInstance, undefined) : [], - id: jspb.Message.getFieldWithDefault(msg, 4, ""), - message: jspb.Message.getFieldWithDefault(msg, 5, ""), - reason: jspb.Message.getFieldWithDefault(msg, 6, ""), - request: jspb.Message.getFieldWithDefault(msg, 7, ""), - status: jspb.Message.getFieldWithDefault(msg, 8, "") +code: jspb.Message.getFieldWithDefault(msg, 1, 0), +debug: jspb.Message.getFieldWithDefault(msg, 2, ""), +detailsMap: (f = msg.getDetailsMap()) ? f.toObject(includeInstance, undefined) : [], +id: jspb.Message.getFieldWithDefault(msg, 4, ""), +message: jspb.Message.getFieldWithDefault(msg, 5, ""), +reason: jspb.Message.getFieldWithDefault(msg, 6, ""), +request: jspb.Message.getFieldWithDefault(msg, 7, ""), +status: jspb.Message.getFieldWithDefault(msg, 8, "") }; if (includeInstance) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go index 599f9674d..a421e9fc0 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/read_service.proto @@ -506,7 +506,7 @@ func file_ory_keto_relation_tuples_v1alpha2_read_service_proto_rawDescGZIP() []b } var file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_ory_keto_relation_tuples_v1alpha2_read_service_proto_goTypes = []interface{}{ +var file_ory_keto_relation_tuples_v1alpha2_read_service_proto_goTypes = []any{ (*ListRelationTuplesRequest)(nil), // 0: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest (*ListRelationTuplesResponse)(nil), // 1: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse (*ListRelationTuplesRequest_Query)(nil), // 2: ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query @@ -539,7 +539,7 @@ func file_ory_keto_relation_tuples_v1alpha2_read_service_proto_init() { } file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() if !protoimpl.UnsafeEnabled { - file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*ListRelationTuplesRequest); i { case 0: return &v.state @@ -551,7 +551,7 @@ func file_ory_keto_relation_tuples_v1alpha2_read_service_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*ListRelationTuplesResponse); i { case 0: return &v.state @@ -563,7 +563,7 @@ func file_ory_keto_relation_tuples_v1alpha2_read_service_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ListRelationTuplesRequest_Query); i { case 0: return &v.state @@ -576,7 +576,7 @@ func file_ory_keto_relation_tuples_v1alpha2_read_service_proto_init() { } } } - file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[0].OneofWrappers = []any{ (*ListRelationTuplesRequest_SubjectId)(nil), (*ListRelationTuplesRequest_SubjectSet)(nil), } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.gw.go index 0ac3fb829..694155369 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.gw.go @@ -71,6 +71,7 @@ func local_request_ReadService_ListRelationTuples_0(ctx context.Context, marshal // UnaryRPC :call ReadServiceServer 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 RegisterReadServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterReadServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ReadServiceServer) error { mux.Handle("GET", pattern_ReadService_ListRelationTuples_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -104,21 +105,21 @@ func RegisterReadServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux // RegisterReadServiceHandlerFromEndpoint is same as RegisterReadServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterReadServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -136,7 +137,7 @@ func RegisterReadServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ReadServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ReadServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ReadServiceClient" to call the correct interceptors. +// "ReadServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterReadServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ReadServiceClient) error { mux.Handle("GET", pattern_ReadService_ListRelationTuples_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc.pb.go index 3fa7b1ffd..ac58f6a7f 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/read_service.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( ReadService_ListRelationTuples_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples" @@ -25,6 +25,10 @@ const ( // ReadServiceClient is the client API for ReadService 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. +// +// The service to query relationships. +// +// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis). type ReadServiceClient interface { // Lists ACL relationships. ListRelationTuples(ctx context.Context, in *ListRelationTuplesRequest, opts ...grpc.CallOption) (*ListRelationTuplesResponse, error) @@ -39,8 +43,9 @@ func NewReadServiceClient(cc grpc.ClientConnInterface) ReadServiceClient { } func (c *readServiceClient) ListRelationTuples(ctx context.Context, in *ListRelationTuplesRequest, opts ...grpc.CallOption) (*ListRelationTuplesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListRelationTuplesResponse) - err := c.cc.Invoke(ctx, ReadService_ListRelationTuples_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ReadService_ListRelationTuples_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -49,19 +54,27 @@ func (c *readServiceClient) ListRelationTuples(ctx context.Context, in *ListRela // ReadServiceServer is the server API for ReadService service. // All implementations should embed UnimplementedReadServiceServer -// for forward compatibility +// for forward compatibility. +// +// The service to query relationships. +// +// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis). type ReadServiceServer interface { // Lists ACL relationships. ListRelationTuples(context.Context, *ListRelationTuplesRequest) (*ListRelationTuplesResponse, error) } -// UnimplementedReadServiceServer should be embedded to have forward compatible implementations. -type UnimplementedReadServiceServer struct { -} +// UnimplementedReadServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedReadServiceServer struct{} func (UnimplementedReadServiceServer) ListRelationTuples(context.Context, *ListRelationTuplesRequest) (*ListRelationTuplesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListRelationTuples not implemented") } +func (UnimplementedReadServiceServer) testEmbeddedByValue() {} // UnsafeReadServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ReadServiceServer will @@ -71,6 +84,13 @@ type UnsafeReadServiceServer interface { } func RegisterReadServiceServer(s grpc.ServiceRegistrar, srv ReadServiceServer) { + // If the following call pancis, it indicates UnimplementedReadServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&ReadService_ServiceDesc, srv) } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js index 447946a0b..341395e27 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js @@ -156,17 +156,17 @@ proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.prototype.toOb */ proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.toObject = function(includeInstance, msg) { var f, obj = { - query: (f = msg.getQuery()) && proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.toObject(includeInstance, f), - relationQuery: (f = msg.getRelationQuery()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.toObject(includeInstance, f), - expandMask: (f = msg.getExpandMask()) && google_protobuf_field_mask_pb.FieldMask.toObject(includeInstance, f), - snaptoken: jspb.Message.getFieldWithDefault(msg, 3, ""), - pageSize: jspb.Message.getFieldWithDefault(msg, 4, 0), - pageToken: jspb.Message.getFieldWithDefault(msg, 5, ""), - namespace: jspb.Message.getFieldWithDefault(msg, 7, ""), - object: jspb.Message.getFieldWithDefault(msg, 8, ""), - relation: jspb.Message.getFieldWithDefault(msg, 9, ""), - subjectId: jspb.Message.getFieldWithDefault(msg, 10, ""), - subjectSet: (f = msg.getSubjectSet()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.toObject(includeInstance, f) +query: (f = msg.getQuery()) && proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.toObject(includeInstance, f), +relationQuery: (f = msg.getRelationQuery()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.toObject(includeInstance, f), +expandMask: (f = msg.getExpandMask()) && google_protobuf_field_mask_pb.FieldMask.toObject(includeInstance, f), +snaptoken: jspb.Message.getFieldWithDefault(msg, 3, ""), +pageSize: jspb.Message.getFieldWithDefault(msg, 4, 0), +pageToken: jspb.Message.getFieldWithDefault(msg, 5, ""), +namespace: jspb.Message.getFieldWithDefault(msg, 7, ""), +object: jspb.Message.getFieldWithDefault(msg, 8, ""), +relation: jspb.Message.getFieldWithDefault(msg, 9, ""), +subjectId: (f = jspb.Message.getField(msg, 10)) == null ? undefined : f, +subjectSet: (f = msg.getSubjectSet()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.toObject(includeInstance, f) }; if (includeInstance) { @@ -396,10 +396,10 @@ proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.prototyp */ proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesRequest.Query.toObject = function(includeInstance, msg) { var f, obj = { - namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), - object: jspb.Message.getFieldWithDefault(msg, 2, ""), - relation: jspb.Message.getFieldWithDefault(msg, 3, ""), - subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f) +namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), +object: jspb.Message.getFieldWithDefault(msg, 2, ""), +relation: jspb.Message.getFieldWithDefault(msg, 3, ""), +subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f) }; if (includeInstance) { @@ -936,9 +936,9 @@ proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.prototype.toO */ proto.ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse.toObject = function(includeInstance, msg) { var f, obj = { - relationTuplesList: jspb.Message.toObjectList(msg.getRelationTuplesList(), +relationTuplesList: jspb.Message.toObjectList(msg.getRelationTuplesList(), ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.toObject, includeInstance), - nextPageToken: jspb.Message.getFieldWithDefault(msg, 2, "") +nextPageToken: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go index 87248ff00..1fc05aaee 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/relation_tuples.proto @@ -566,85 +566,85 @@ var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDesc = []byt 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x02, 0x0a, 0x0d, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x09, + 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xde, 0x02, 0x0a, 0x0d, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1f, 0x0a, 0x08, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, - 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, - 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, - 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x07, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, - 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x55, 0x0a, - 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, - 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x73, 0x65, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, 0x69, - 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xed, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, - 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, - 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x08, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x49, 0x0a, 0x07, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, - 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, - 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x03, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, - 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, - 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x65, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x41, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, - 0x74, 0x48, 0x00, 0x52, 0x03, 0x73, 0x65, 0x74, 0x42, 0x05, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x22, - 0x6d, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x12, 0x21, 0x0a, + 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x1c, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x20, + 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x58, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x12, 0xfa, + 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, + 0x52, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x0a, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, + 0x18, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x12, 0x55, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x53, 0x65, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x5f, + 0x61, 0x70, 0x69, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xed, 0x01, 0x0a, 0x0d, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x48, 0x00, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1f, 0x0a, - 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6f, - 0x0a, 0x0c, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x46, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, - 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x48, 0x00, 0x52, 0x03, 0x73, 0x65, 0x74, 0x42, 0x05, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x22, - 0x72, 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x12, 0x21, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0xc4, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, - 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x13, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, - 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, - 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, - 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x48, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, + 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x02, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x49, + 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x03, 0x52, 0x07, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x65, 0x0a, 0x07, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x41, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x03, 0x73, 0x65, 0x74, 0x42, 0x05, 0x0a, 0x03, 0x72, + 0x65, 0x66, 0x22, 0x70, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, + 0x12, 0x22, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x20, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6f, 0x0a, 0x0c, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x46, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, + 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x00, 0x52, 0x03, 0x73, 0x65, 0x74, 0x42, 0x05, + 0x0a, 0x03, 0x72, 0x65, 0x66, 0x22, 0x75, 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x53, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x22, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, + 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x06, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, + 0x01, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x20, 0x0a, 0x08, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, + 0x01, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xc4, 0x01, 0x0a, + 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x13, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, + 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, + 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, + 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -660,7 +660,7 @@ func file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescGZIP() } var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_goTypes = []interface{}{ +var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_goTypes = []any{ (*RelationTuple)(nil), // 0: ory.keto.relation_tuples.v1alpha2.RelationTuple (*RelationQuery)(nil), // 1: ory.keto.relation_tuples.v1alpha2.RelationQuery (*Subject)(nil), // 2: ory.keto.relation_tuples.v1alpha2.Subject @@ -687,7 +687,7 @@ func file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*RelationTuple); i { case 0: return &v.state @@ -699,7 +699,7 @@ func file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*RelationQuery); i { case 0: return &v.state @@ -711,7 +711,7 @@ func file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Subject); i { case 0: return &v.state @@ -723,7 +723,7 @@ func file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*SubjectSet); i { case 0: return &v.state @@ -735,7 +735,7 @@ func file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*SubjectQuery); i { case 0: return &v.state @@ -747,7 +747,7 @@ func file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*SubjectSetQuery); i { case 0: return &v.state @@ -760,16 +760,16 @@ func file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() { } } } - file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[0].OneofWrappers = []interface{}{ + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[0].OneofWrappers = []any{ (*RelationTuple_SubjectId)(nil), (*RelationTuple_SubjectSet)(nil), } - file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[1].OneofWrappers = []any{} + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[2].OneofWrappers = []any{ (*Subject_Id)(nil), (*Subject_Set)(nil), } - file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[4].OneofWrappers = []interface{}{ + file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[4].OneofWrappers = []any{ (*SubjectQuery_Id)(nil), (*SubjectQuery_Set)(nil), } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js index 040b272c5..82c1678dc 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js @@ -218,12 +218,12 @@ proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.prototype.toObject = funct */ proto.ory.keto.relation_tuples.v1alpha2.RelationTuple.toObject = function(includeInstance, msg) { var f, obj = { - namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), - object: jspb.Message.getFieldWithDefault(msg, 2, ""), - relation: jspb.Message.getFieldWithDefault(msg, 3, ""), - subject: (f = msg.getSubject()) && proto.ory.keto.relation_tuples.v1alpha2.Subject.toObject(includeInstance, f), - subjectId: jspb.Message.getFieldWithDefault(msg, 5, ""), - subjectSet: (f = msg.getSubjectSet()) && proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.toObject(includeInstance, f) +namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), +object: jspb.Message.getFieldWithDefault(msg, 2, ""), +relation: jspb.Message.getFieldWithDefault(msg, 3, ""), +subject: (f = msg.getSubject()) && proto.ory.keto.relation_tuples.v1alpha2.Subject.toObject(includeInstance, f), +subjectId: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +subjectSet: (f = msg.getSubjectSet()) && proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.toObject(includeInstance, f) }; if (includeInstance) { @@ -558,10 +558,10 @@ proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.prototype.toObject = funct */ proto.ory.keto.relation_tuples.v1alpha2.RelationQuery.toObject = function(includeInstance, msg) { var f, obj = { - namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), - object: jspb.Message.getFieldWithDefault(msg, 2, ""), - relation: jspb.Message.getFieldWithDefault(msg, 3, ""), - subject: (f = msg.getSubject()) && proto.ory.keto.relation_tuples.v1alpha2.Subject.toObject(includeInstance, f) +namespace: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +object: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +relation: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +subject: (f = msg.getSubject()) && proto.ory.keto.relation_tuples.v1alpha2.Subject.toObject(includeInstance, f) }; if (includeInstance) { @@ -879,8 +879,8 @@ proto.ory.keto.relation_tuples.v1alpha2.Subject.prototype.toObject = function(op */ proto.ory.keto.relation_tuples.v1alpha2.Subject.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - set: (f = msg.getSet()) && proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.toObject(includeInstance, f) +id: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +set: (f = msg.getSet()) && proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.toObject(includeInstance, f) }; if (includeInstance) { @@ -1078,9 +1078,9 @@ proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.prototype.toObject = function */ proto.ory.keto.relation_tuples.v1alpha2.SubjectSet.toObject = function(includeInstance, msg) { var f, obj = { - namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), - object: jspb.Message.getFieldWithDefault(msg, 2, ""), - relation: jspb.Message.getFieldWithDefault(msg, 3, "") +namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), +object: jspb.Message.getFieldWithDefault(msg, 2, ""), +relation: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -1294,8 +1294,8 @@ proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.prototype.toObject = functi */ proto.ory.keto.relation_tuples.v1alpha2.SubjectQuery.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - set: (f = msg.getSet()) && proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.toObject(includeInstance, f) +id: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +set: (f = msg.getSet()) && proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.toObject(includeInstance, f) }; if (includeInstance) { @@ -1493,9 +1493,9 @@ proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.prototype.toObject = fun */ proto.ory.keto.relation_tuples.v1alpha2.SubjectSetQuery.toObject = function(includeInstance, msg) { var f, obj = { - namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), - object: jspb.Message.getFieldWithDefault(msg, 2, ""), - relation: jspb.Message.getFieldWithDefault(msg, 3, "") +namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), +object: jspb.Message.getFieldWithDefault(msg, 2, ""), +relation: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go index ad46aed75..1ef9f9803 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/version.proto @@ -174,7 +174,7 @@ func file_ory_keto_relation_tuples_v1alpha2_version_proto_rawDescGZIP() []byte { } var file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_ory_keto_relation_tuples_v1alpha2_version_proto_goTypes = []interface{}{ +var file_ory_keto_relation_tuples_v1alpha2_version_proto_goTypes = []any{ (*GetVersionRequest)(nil), // 0: ory.keto.relation_tuples.v1alpha2.GetVersionRequest (*GetVersionResponse)(nil), // 1: ory.keto.relation_tuples.v1alpha2.GetVersionResponse } @@ -194,7 +194,7 @@ func file_ory_keto_relation_tuples_v1alpha2_version_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*GetVersionRequest); i { case 0: return &v.state @@ -206,7 +206,7 @@ func file_ory_keto_relation_tuples_v1alpha2_version_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*GetVersionResponse); i { case 0: return &v.state diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.gw.go index a4b48a0a3..cae6413d2 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.gw.go @@ -53,6 +53,7 @@ func local_request_VersionService_GetVersion_0(ctx context.Context, marshaler ru // UnaryRPC :call VersionServiceServer 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 RegisterVersionServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterVersionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VersionServiceServer) error { mux.Handle("GET", pattern_VersionService_GetVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -86,21 +87,21 @@ func RegisterVersionServiceHandlerServer(ctx context.Context, mux *runtime.Serve // RegisterVersionServiceHandlerFromEndpoint is same as RegisterVersionServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterVersionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -118,7 +119,7 @@ func RegisterVersionServiceHandler(ctx context.Context, mux *runtime.ServeMux, c // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "VersionServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "VersionServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "VersionServiceClient" to call the correct interceptors. +// "VersionServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterVersionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client VersionServiceClient) error { mux.Handle("GET", pattern_VersionService_GetVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc.pb.go index 197c1507b..c87f69f7b 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/version_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/version.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( VersionService_GetVersion_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion" @@ -25,6 +25,10 @@ const ( // VersionServiceClient is the client API for VersionService 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. +// +// The service returning the specific Ory Keto instance version. +// +// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis) and [write-APIs](../concepts/25_api-overview.mdx#write-apis). type VersionServiceClient interface { // Returns the version of the Ory Keto instance. // @@ -44,8 +48,9 @@ func NewVersionServiceClient(cc grpc.ClientConnInterface) VersionServiceClient { } func (c *versionServiceClient) GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetVersionResponse) - err := c.cc.Invoke(ctx, VersionService_GetVersion_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, VersionService_GetVersion_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -54,7 +59,11 @@ func (c *versionServiceClient) GetVersion(ctx context.Context, in *GetVersionReq // VersionServiceServer is the server API for VersionService service. // All implementations should embed UnimplementedVersionServiceServer -// for forward compatibility +// for forward compatibility. +// +// The service returning the specific Ory Keto instance version. +// +// This service is part of the [read-APIs](../concepts/25_api-overview.mdx#read-apis) and [write-APIs](../concepts/25_api-overview.mdx#write-apis). type VersionServiceServer interface { // Returns the version of the Ory Keto instance. // @@ -65,13 +74,17 @@ type VersionServiceServer interface { GetVersion(context.Context, *GetVersionRequest) (*GetVersionResponse, error) } -// UnimplementedVersionServiceServer should be embedded to have forward compatible implementations. -type UnimplementedVersionServiceServer struct { -} +// UnimplementedVersionServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedVersionServiceServer struct{} func (UnimplementedVersionServiceServer) GetVersion(context.Context, *GetVersionRequest) (*GetVersionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented") } +func (UnimplementedVersionServiceServer) testEmbeddedByValue() {} // UnsafeVersionServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to VersionServiceServer will @@ -81,6 +94,13 @@ type UnsafeVersionServiceServer interface { } func RegisterVersionServiceServer(s grpc.ServiceRegistrar, srv VersionServiceServer) { + // If the following call pancis, it indicates UnimplementedVersionServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&VersionService_ServiceDesc, srv) } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js index 007df68f8..4b66caf20 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js @@ -202,7 +202,7 @@ proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.prototype.toObject = */ proto.ory.keto.relation_tuples.v1alpha2.GetVersionResponse.toObject = function(includeInstance, msg) { var f, obj = { - version: jspb.Message.getFieldWithDefault(msg, 1, "") +version: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go index 414c35b1e..3475c2813 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.32.0 +// protoc-gen-go v1.34.2 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/write_service.proto @@ -757,183 +757,183 @@ var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDesc = []byte{ 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x13, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, - 0x65, 0x6c, 0x74, 0x61, 0x73, 0x22, 0xed, 0x02, 0x0a, 0x12, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x63, 0x0a, 0x06, + 0x65, 0x6c, 0x74, 0x61, 0x73, 0x22, 0xef, 0x02, 0x0a, 0x12, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x64, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, - 0x6c, 0x74, 0x61, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0xe0, 0x41, 0x02, 0xfa, - 0x42, 0x07, 0x82, 0x01, 0x04, 0x18, 0x01, 0x18, 0x02, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x65, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, - 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, - 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x42, 0x0b, 0xe0, 0x41, 0x02, - 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x06, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x25, 0x0a, 0x0d, 0x41, - 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x10, 0x01, 0x1a, 0x12, - 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, - 0x45, 0x52, 0x12, 0x0a, 0x0a, 0x06, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x10, 0x01, 0x12, 0x25, - 0x0a, 0x0d, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, - 0x02, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, - 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x0a, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, - 0x02, 0x1a, 0x02, 0x10, 0x01, 0x22, 0x54, 0x0a, 0x1e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, 0xd2, 0xe4, - 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, - 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0xff, 0x02, 0x0a, 0x1a, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x7e, 0x0a, 0x0e, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x42, 0x0b, - 0xe0, 0x41, 0x02, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x1a, 0xe0, 0x01, 0x0a, 0x0c, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, - 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, - 0x51, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, - 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x76, 0x0a, - 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0e, + 0x6c, 0x74, 0x61, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0xe2, 0x41, 0x01, 0x02, + 0xfa, 0x42, 0x07, 0x82, 0x01, 0x04, 0x18, 0x01, 0x18, 0x02, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x66, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x42, 0x0c, 0xe2, 0x41, + 0x01, 0x02, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x06, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x25, 0x0a, + 0x0d, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x10, 0x01, + 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, + 0x47, 0x47, 0x45, 0x52, 0x12, 0x0a, 0x0a, 0x06, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x10, 0x01, + 0x12, 0x25, 0x0a, 0x0d, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, + 0x45, 0x10, 0x02, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, + 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x0a, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x10, 0x02, 0x1a, 0x02, 0x10, 0x01, 0x22, 0x54, 0x0a, 0x1e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x73, 0x6e, 0x61, + 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, + 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, + 0x52, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0x80, 0x03, + 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x7f, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x22, 0x92, 0x05, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x70, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x14, 0xfa, 0xd2, 0xe4, 0x93, - 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x18, 0x01, - 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, - 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x5a, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, - 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x73, 0x65, 0x74, 0x1a, 0x9f, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, + 0x42, 0x0c, 0xe2, 0x41, 0x01, 0x02, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0d, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x1a, 0xe0, 0x01, + 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, - 0x70, 0x69, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x1e, 0x0a, 0x1c, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb8, 0x07, 0x0a, 0x0c, 0x57, - 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xaf, 0x02, 0x0a, 0x16, + 0x12, 0x20, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x69, 0x64, 0x12, 0x51, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x22, 0x76, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x57, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x22, 0x92, 0x05, 0x0a, 0x1b, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x70, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x14, 0xfa, + 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, + 0x52, 0x18, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x0e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, + 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x06, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, + 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x5a, 0x0a, 0x0b, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x32, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x1a, 0x9f, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x73, + 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x1e, 0x0a, + 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb8, 0x07, + 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xaf, + 0x02, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x40, 0x2e, 0x6f, 0x72, 0x79, 0x2e, + 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x6f, 0x72, + 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x40, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, - 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8f, + 0x01, 0x92, 0x41, 0x57, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, + 0x69, 0x70, 0x2a, 0x12, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x4a, 0x33, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x2c, 0x0a, + 0x12, 0x41, 0x6e, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x22, 0x16, 0x0a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x12, 0x02, 0x7b, 0x7d, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2f, 0x3a, 0x15, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x32, 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x12, 0xd4, 0x02, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x3d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8f, 0x01, 0x92, 0x41, - 0x57, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, - 0x12, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, - 0x69, 0x70, 0x73, 0x4a, 0x33, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x2c, 0x0a, 0x12, 0x41, 0x6e, - 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, - 0x22, 0x16, 0x0a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, - 0x6a, 0x73, 0x6f, 0x6e, 0x12, 0x02, 0x7b, 0x7d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x15, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x64, - 0x65, 0x6c, 0x74, 0x61, 0x73, 0x32, 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0xd4, 0x02, - 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x3d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, - 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbd, 0x01, 0x92, 0x41, 0x7c, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x4a, 0x58, 0x0a, 0x03, - 0x32, 0x30, 0x31, 0x12, 0x51, 0x0a, 0x19, 0x54, 0x68, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, - 0x12, 0x34, 0x0a, 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x3a, 0x0e, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x62, 0x0e, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x1a, 0x16, 0x2f, 0x61, - 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x12, 0x9e, 0x02, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x3e, 0x2e, - 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbd, 0x01, 0x92, 0x41, 0x7c, 0x0a, 0x0c, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x12, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x4a, + 0x58, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x51, 0x0a, 0x19, 0x54, 0x68, 0x65, 0x20, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, + 0x69, 0x70, 0x2e, 0x12, 0x34, 0x0a, 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, + 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x3a, + 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x62, + 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x1a, + 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x9e, 0x02, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x12, 0x3e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x3f, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x84, 0x01, 0x92, 0x41, 0x63, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x32, 0x21, 0x61, 0x70, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, + 0x72, 0x6d, 0x2d, 0x75, 0x72, 0x6c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x4a, 0x1b, 0x0a, + 0x03, 0x32, 0x30, 0x34, 0x12, 0x14, 0x0a, 0x12, 0x41, 0x6e, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, + 0x2a, 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x42, 0xc2, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x84, - 0x01, 0x92, 0x41, 0x63, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, - 0x69, 0x70, 0x2a, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x32, 0x21, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, 0x72, 0x6d, 0x2d, - 0x75, 0x72, 0x6c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x4a, 0x1b, 0x0a, 0x03, 0x32, 0x30, - 0x34, 0x12, 0x14, 0x0a, 0x12, 0x41, 0x6e, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, - 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x42, 0xc2, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x11, - 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, - 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, - 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, - 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x32, 0x42, 0x11, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, + 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, + 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -950,7 +950,7 @@ func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDescGZIP() [] var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_goTypes = []interface{}{ +var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_goTypes = []any{ (RelationTupleDelta_Action)(0), // 0: ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action (*TransactRelationTuplesRequest)(nil), // 1: ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest (*RelationTupleDelta)(nil), // 2: ory.keto.relation_tuples.v1alpha2.RelationTupleDelta @@ -998,7 +998,7 @@ func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() { } file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() if !protoimpl.UnsafeEnabled { - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*TransactRelationTuplesRequest); i { case 0: return &v.state @@ -1010,7 +1010,7 @@ func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*RelationTupleDelta); i { case 0: return &v.state @@ -1022,7 +1022,7 @@ func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*TransactRelationTuplesResponse); i { case 0: return &v.state @@ -1034,7 +1034,7 @@ func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*CreateRelationTupleRequest); i { case 0: return &v.state @@ -1046,7 +1046,7 @@ func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*CreateRelationTupleResponse); i { case 0: return &v.state @@ -1058,7 +1058,7 @@ func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*DeleteRelationTuplesRequest); i { case 0: return &v.state @@ -1070,7 +1070,7 @@ func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*DeleteRelationTuplesResponse); i { case 0: return &v.state @@ -1082,7 +1082,7 @@ func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*CreateRelationTupleRequest_Relationship); i { case 0: return &v.state @@ -1094,7 +1094,7 @@ func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() { return nil } } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*DeleteRelationTuplesRequest_Query); i { case 0: return &v.state @@ -1107,11 +1107,11 @@ func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() { } } } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5].OneofWrappers = []interface{}{ + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5].OneofWrappers = []any{ (*DeleteRelationTuplesRequest_SubjectId)(nil), (*DeleteRelationTuplesRequest_SubjectSet)(nil), } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[7].OneofWrappers = []interface{}{ + file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[7].OneofWrappers = []any{ (*CreateRelationTupleRequest_Relationship_SubjectId)(nil), (*CreateRelationTupleRequest_Relationship_SubjectSet)(nil), } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.gw.go index f00b5de3b..08b8fe2a7 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.gw.go @@ -123,6 +123,7 @@ func local_request_WriteService_DeleteRelationTuples_0(ctx context.Context, mars // UnaryRPC :call WriteServiceServer 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 RegisterWriteServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterWriteServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WriteServiceServer) error { mux.Handle("PATCH", pattern_WriteService_TransactRelationTuples_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -171,7 +172,7 @@ func RegisterWriteServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu return } - forward_WriteService_CreateRelationTuple_0(annotatedContext, mux, outboundMarshaler, w, req, response_WriteService_CreateRelationTuple_0{resp}, mux.GetForwardResponseOptions()...) + forward_WriteService_CreateRelationTuple_0(annotatedContext, mux, outboundMarshaler, w, req, response_WriteService_CreateRelationTuple_0{resp.(*CreateRelationTupleResponse)}, mux.GetForwardResponseOptions()...) }) @@ -206,21 +207,21 @@ func RegisterWriteServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu // RegisterWriteServiceHandlerFromEndpoint is same as RegisterWriteServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterWriteServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() @@ -238,7 +239,7 @@ func RegisterWriteServiceHandler(ctx context.Context, mux *runtime.ServeMux, con // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WriteServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WriteServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "WriteServiceClient" to call the correct interceptors. +// "WriteServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterWriteServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WriteServiceClient) error { mux.Handle("PATCH", pattern_WriteService_TransactRelationTuples_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -281,7 +282,7 @@ func RegisterWriteServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu return } - forward_WriteService_CreateRelationTuple_0(annotatedContext, mux, outboundMarshaler, w, req, response_WriteService_CreateRelationTuple_0{resp}, mux.GetForwardResponseOptions()...) + forward_WriteService_CreateRelationTuple_0(annotatedContext, mux, outboundMarshaler, w, req, response_WriteService_CreateRelationTuple_0{resp.(*CreateRelationTupleResponse)}, mux.GetForwardResponseOptions()...) }) @@ -311,12 +312,11 @@ func RegisterWriteServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu } type response_WriteService_CreateRelationTuple_0 struct { - proto.Message + *CreateRelationTupleResponse } func (m response_WriteService_CreateRelationTuple_0) XXX_ResponseBody() interface{} { - response := m.Message.(*CreateRelationTupleResponse) - return response.RelationTuple + return m.RelationTuple } var ( diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go index bb349f9fa..dca2d2736 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.3.0 +// - protoc-gen-go-grpc v1.5.1 // - protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/write_service.proto @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 const ( WriteService_TransactRelationTuples_FullMethodName = "/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples" @@ -27,6 +27,10 @@ const ( // WriteServiceClient is the client API for WriteService 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. +// +// The write service to create and delete Access Control Lists. +// +// This service is part of the [write-APIs](../concepts/25_api-overview.mdx#write-apis). type WriteServiceClient interface { // Writes one or more relationships in a single transaction. TransactRelationTuples(ctx context.Context, in *TransactRelationTuplesRequest, opts ...grpc.CallOption) (*TransactRelationTuplesResponse, error) @@ -45,8 +49,9 @@ func NewWriteServiceClient(cc grpc.ClientConnInterface) WriteServiceClient { } func (c *writeServiceClient) TransactRelationTuples(ctx context.Context, in *TransactRelationTuplesRequest, opts ...grpc.CallOption) (*TransactRelationTuplesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(TransactRelationTuplesResponse) - err := c.cc.Invoke(ctx, WriteService_TransactRelationTuples_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, WriteService_TransactRelationTuples_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -54,8 +59,9 @@ func (c *writeServiceClient) TransactRelationTuples(ctx context.Context, in *Tra } func (c *writeServiceClient) CreateRelationTuple(ctx context.Context, in *CreateRelationTupleRequest, opts ...grpc.CallOption) (*CreateRelationTupleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateRelationTupleResponse) - err := c.cc.Invoke(ctx, WriteService_CreateRelationTuple_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, WriteService_CreateRelationTuple_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -63,8 +69,9 @@ func (c *writeServiceClient) CreateRelationTuple(ctx context.Context, in *Create } func (c *writeServiceClient) DeleteRelationTuples(ctx context.Context, in *DeleteRelationTuplesRequest, opts ...grpc.CallOption) (*DeleteRelationTuplesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteRelationTuplesResponse) - err := c.cc.Invoke(ctx, WriteService_DeleteRelationTuples_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, WriteService_DeleteRelationTuples_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -73,7 +80,11 @@ func (c *writeServiceClient) DeleteRelationTuples(ctx context.Context, in *Delet // WriteServiceServer is the server API for WriteService service. // All implementations should embed UnimplementedWriteServiceServer -// for forward compatibility +// for forward compatibility. +// +// The write service to create and delete Access Control Lists. +// +// This service is part of the [write-APIs](../concepts/25_api-overview.mdx#write-apis). type WriteServiceServer interface { // Writes one or more relationships in a single transaction. TransactRelationTuples(context.Context, *TransactRelationTuplesRequest) (*TransactRelationTuplesResponse, error) @@ -83,9 +94,12 @@ type WriteServiceServer interface { DeleteRelationTuples(context.Context, *DeleteRelationTuplesRequest) (*DeleteRelationTuplesResponse, error) } -// UnimplementedWriteServiceServer should be embedded to have forward compatible implementations. -type UnimplementedWriteServiceServer struct { -} +// UnimplementedWriteServiceServer should be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedWriteServiceServer struct{} func (UnimplementedWriteServiceServer) TransactRelationTuples(context.Context, *TransactRelationTuplesRequest) (*TransactRelationTuplesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TransactRelationTuples not implemented") @@ -96,6 +110,7 @@ func (UnimplementedWriteServiceServer) CreateRelationTuple(context.Context, *Cre func (UnimplementedWriteServiceServer) DeleteRelationTuples(context.Context, *DeleteRelationTuplesRequest) (*DeleteRelationTuplesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteRelationTuples not implemented") } +func (UnimplementedWriteServiceServer) testEmbeddedByValue() {} // UnsafeWriteServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to WriteServiceServer will @@ -105,6 +120,13 @@ type UnsafeWriteServiceServer interface { } func RegisterWriteServiceServer(s grpc.ServiceRegistrar, srv WriteServiceServer) { + // If the following call pancis, it indicates UnimplementedWriteServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } s.RegisterService(&WriteService_ServiceDesc, srv) } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js index bd9ed46ba..6af70cc9f 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js @@ -273,7 +273,7 @@ proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.prototype. */ proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesRequest.toObject = function(includeInstance, msg) { var f, obj = { - relationTupleDeltasList: jspb.Message.toObjectList(msg.getRelationTupleDeltasList(), +relationTupleDeltasList: jspb.Message.toObjectList(msg.getRelationTupleDeltasList(), proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.toObject, includeInstance) }; @@ -426,8 +426,8 @@ proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.prototype.toObject = */ proto.ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.toObject = function(includeInstance, msg) { var f, obj = { - action: jspb.Message.getFieldWithDefault(msg, 1, 0), - relationTuple: (f = msg.getRelationTuple()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.toObject(includeInstance, f) +action: jspb.Message.getFieldWithDefault(msg, 1, 0), +relationTuple: (f = msg.getRelationTuple()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.toObject(includeInstance, f) }; if (includeInstance) { @@ -625,7 +625,7 @@ proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.prototype */ proto.ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse.toObject = function(includeInstance, msg) { var f, obj = { - snaptokensList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f +snaptokensList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; if (includeInstance) { @@ -774,7 +774,7 @@ proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.prototype.toO */ proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.toObject = function(includeInstance, msg) { var f, obj = { - relationTuple: (f = msg.getRelationTuple()) && proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.toObject(includeInstance, f) +relationTuple: (f = msg.getRelationTuple()) && proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.toObject(includeInstance, f) }; if (includeInstance) { @@ -914,11 +914,11 @@ proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship. */ proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship.toObject = function(includeInstance, msg) { var f, obj = { - namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), - object: jspb.Message.getFieldWithDefault(msg, 2, ""), - relation: jspb.Message.getFieldWithDefault(msg, 3, ""), - subjectId: jspb.Message.getFieldWithDefault(msg, 5, ""), - subjectSet: (f = msg.getSubjectSet()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSet.toObject(includeInstance, f) +namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), +object: jspb.Message.getFieldWithDefault(msg, 2, ""), +relation: jspb.Message.getFieldWithDefault(msg, 3, ""), +subjectId: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +subjectSet: (f = msg.getSubjectSet()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSet.toObject(includeInstance, f) }; if (includeInstance) { @@ -1240,7 +1240,7 @@ proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse.prototype.to */ proto.ory.keto.relation_tuples.v1alpha2.CreateRelationTupleResponse.toObject = function(includeInstance, msg) { var f, obj = { - relationTuple: (f = msg.getRelationTuple()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.toObject(includeInstance, f) +relationTuple: (f = msg.getRelationTuple()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationTuple.toObject(includeInstance, f) }; if (includeInstance) { @@ -1417,13 +1417,13 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.prototype.to */ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.toObject = function(includeInstance, msg) { var f, obj = { - query: (f = msg.getQuery()) && proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.toObject(includeInstance, f), - relationQuery: (f = msg.getRelationQuery()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.toObject(includeInstance, f), - namespace: jspb.Message.getFieldWithDefault(msg, 3, ""), - object: jspb.Message.getFieldWithDefault(msg, 4, ""), - relation: jspb.Message.getFieldWithDefault(msg, 5, ""), - subjectId: jspb.Message.getFieldWithDefault(msg, 6, ""), - subjectSet: (f = msg.getSubjectSet()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.toObject(includeInstance, f) +query: (f = msg.getQuery()) && proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.toObject(includeInstance, f), +relationQuery: (f = msg.getRelationQuery()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.RelationQuery.toObject(includeInstance, f), +namespace: jspb.Message.getFieldWithDefault(msg, 3, ""), +object: jspb.Message.getFieldWithDefault(msg, 4, ""), +relation: jspb.Message.getFieldWithDefault(msg, 5, ""), +subjectId: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f, +subjectSet: (f = msg.getSubjectSet()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.SubjectSetQuery.toObject(includeInstance, f) }; if (includeInstance) { @@ -1607,10 +1607,10 @@ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.protot */ proto.ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesRequest.Query.toObject = function(includeInstance, msg) { var f, obj = { - namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), - object: jspb.Message.getFieldWithDefault(msg, 2, ""), - relation: jspb.Message.getFieldWithDefault(msg, 3, ""), - subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f) +namespace: jspb.Message.getFieldWithDefault(msg, 1, ""), +object: jspb.Message.getFieldWithDefault(msg, 2, ""), +relation: jspb.Message.getFieldWithDefault(msg, 3, ""), +subject: (f = msg.getSubject()) && ory_keto_relation_tuples_v1alpha2_relation_tuples_pb.Subject.toObject(includeInstance, f) }; if (includeInstance) { diff --git a/spec/api.swagger.json b/spec/api.swagger.json index 5a403e31c..a5f615311 100755 --- a/spec/api.swagger.json +++ b/spec/api.swagger.json @@ -31,7 +31,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -96,13 +96,13 @@ "201": { "description": "The created relationship.", "schema": { - "$ref": "#/definitions/relationship" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -113,7 +113,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/createRelationshipBody", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship", "required": ["relationTuple"] } } @@ -134,7 +134,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -148,7 +148,7 @@ "type": "array", "items": { "type": "object", - "$ref": "#/definitions/relationshipDelta" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta" } } } @@ -165,7 +165,7 @@ "200": { "description": "The list of namespaces.", "schema": { - "$ref": "#/definitions/relationshipNamespaces" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse" }, "examples": { "application/json": { @@ -180,7 +180,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -196,13 +196,13 @@ "200": { "description": "The result of the syntax checker", "schema": { - "$ref": "#/definitions/checkOplSyntaxResult" + "$ref": "#/definitions/ory.keto.opl.v1alpha1.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -229,13 +229,13 @@ "200": { "description": "The list of relationships.", "schema": { - "$ref": "#/definitions/relationships" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -317,19 +317,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } } }, @@ -402,19 +402,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } } }, @@ -425,7 +425,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/postCheckPermissionBody" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" } } ], @@ -441,19 +441,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } } }, @@ -526,19 +526,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/checkPermissionResult" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" } } }, @@ -549,7 +549,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/postCheckPermissionBody" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" } } ], @@ -565,13 +565,13 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/expandedPermissionTree" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -625,7 +625,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/errorGeneric" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" } } }, @@ -634,7 +634,7 @@ } }, "definitions": { - "checkOplSyntaxResult": { + "ory.keto.opl.v1alpha1.CheckResponse": { "type": "object", "properties": { "parseErrors": { @@ -680,7 +680,7 @@ } } }, - "postCheckPermissionBody": { + "ory.keto.relation_tuples.v1alpha2.CheckRequest": { "type": "object", "properties": { "namespace": { @@ -700,7 +700,7 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/subjectSetQuery", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSetQuery", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." }, "max-depth": { @@ -711,7 +711,7 @@ }, "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object." }, - "checkPermissionResult": { + "ory.keto.relation_tuples.v1alpha2.CheckResponse": { "type": "object", "properties": { "allowed": { @@ -721,7 +721,7 @@ }, "description": "The response for a CheckService.Check rpc." }, - "createRelationshipBody": { + "ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship": { "type": "object", "properties": { "namespace": { @@ -741,7 +741,7 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/subjectSet", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } } @@ -750,7 +750,7 @@ "type": "object", "properties": { "relationTuple": { - "$ref": "#/definitions/relationship", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", "description": "The created relationship." } }, @@ -759,18 +759,18 @@ "ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse": { "type": "object" }, - "errorGeneric": { + "ory.keto.relation_tuples.v1alpha2.ErrorResponse": { "type": "object", "properties": { "error": { - "$ref": "#/definitions/errorGeneric.Error" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error" } }, "description": "The standard Ory JSON API error format.", "title": "JSON API Error Response", "required": ["error"] }, - "errorGeneric.Error": { + "ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error": { "type": "object", "properties": { "code": { @@ -827,7 +827,7 @@ "type": "object", "properties": { "tree": { - "$ref": "#/definitions/expandedPermissionTree", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree", "description": "The tree the requested subject set expands to.\nThe requested subject set is the subject of the root.\n\nThis field can be nil in some circumstances." } }, @@ -843,7 +843,7 @@ }, "description": "Response of the VersionService.GetVersion RPC." }, - "relationshipNamespaces": { + "ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse": { "type": "object", "properties": { "namespaces": { @@ -855,14 +855,14 @@ } } }, - "relationships": { + "ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse": { "type": "object", "properties": { "relation_tuples": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/relationship" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" }, "description": "The relationships matching the list request." }, @@ -896,7 +896,7 @@ "default": "unspecified", "description": " - union: This node expands to a union of all children.\n - exclusion: Not implemented yet.\n - intersection: Not implemented yet.\n - leaf: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - tuple_to_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - computed_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - not: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached." }, - "relationship": { + "ory.keto.relation_tuples.v1alpha2.RelationTuple": { "type": "object", "properties": { "namespace": { @@ -916,29 +916,29 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/subjectSet", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } }, "description": "RelationTuple defines a relation between an Object and a Subject.", "required": ["namespace", "object", "relation"] }, - "relationshipDelta": { + "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta": { "type": "object", "properties": { "action": { - "$ref": "#/definitions/relationshipDelta.Action", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action", "description": "The action to do on the RelationTuple." }, "relation_tuple": { - "$ref": "#/definitions/relationship", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", "description": "The target RelationTuple." } }, "description": "Write-delta for a TransactRelationTuplesRequest.", "required": ["action", "relation_tuple"] }, - "relationshipDelta.Action": { + "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action": { "type": "string", "enum": ["ACTION_UNSPECIFIED", "insert", "delete"], "default": "ACTION_UNSPECIFIED", @@ -952,13 +952,13 @@ "description": "A concrete id of the subject." }, "set": { - "$ref": "#/definitions/subjectSet", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/15_subjects.mdx)." } }, "description": "Subject is either a concrete subject id or\na `SubjectSet` expanding to more Subjects." }, - "subjectSet": { + "ory.keto.relation_tuples.v1alpha2.SubjectSet": { "type": "object", "properties": { "namespace": { @@ -977,7 +977,7 @@ "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`.", "required": ["namespace", "object", "relation"] }, - "subjectSetQuery": { + "ory.keto.relation_tuples.v1alpha2.SubjectSetQuery": { "type": "object", "properties": { "namespace": { @@ -995,7 +995,7 @@ }, "description": "SubjectSetQuery refers to all subjects who have\nthe same `relation` on an `object`." }, - "expandedPermissionTree": { + "ory.keto.relation_tuples.v1alpha2.SubjectTree": { "type": "object", "properties": { "type": { @@ -1007,14 +1007,14 @@ "description": "The subject this node represents.\nDeprecated: More information is now available in the tuple field." }, "tuple": { - "$ref": "#/definitions/relationship", + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", "description": "The relation tuple this node represents." }, "children": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/expandedPermissionTree" + "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" }, "description": "The children of this node.\n\nThis is never set if `node_type` == `NODE_TYPE_LEAF`." } @@ -1024,7 +1024,6 @@ "ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse": { "type": "object", "description": "The response of a WriteService.TransactRelationTuples rpc." - }, - "UUID": { "type": "string", "format": "uuid4" } + } } } From e7aa65d1a72621f88a234ebf665075dd6ff140c0 Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Mon, 14 Oct 2024 09:34:45 +0200 Subject: [PATCH 26/42] WIP --- cmd/status/root_test.go | 5 +++-- internal/check/handler.go | 19 +++++++++---------- internal/check/handler_test.go | 22 ++++++++++++++-------- internal/driver/daemon.go | 2 -- internal/driver/daemon_test.go | 11 +++++++++++ internal/x/api/api_server.go | 28 ++++++++++++++++++++++------ internal/x/api/api_test_server.go | 11 ----------- 7 files changed, 59 insertions(+), 39 deletions(-) diff --git a/cmd/status/root_test.go b/cmd/status/root_test.go index df879b2dd..b9a160977 100644 --- a/cmd/status/root_test.go +++ b/cmd/status/root_test.go @@ -12,7 +12,6 @@ import ( "testing" "time" - "github.com/ory/x/cmdx" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" @@ -20,6 +19,8 @@ import ( grpcHealthV1 "google.golang.org/grpc/health/grpc_health_v1" "google.golang.org/grpc/metadata" + "github.com/ory/x/cmdx" + "github.com/ory/keto/cmd/client" "github.com/ory/keto/internal/driver" "github.com/ory/keto/internal/namespace" @@ -37,7 +38,7 @@ func TestStatusCmd(t *testing.T) { defer cancel() stdErr := cmdx.ExecExpectedErrCtx(ctx, t, newStatusCmd(), "--"+FlagEndpoint, string(serverType), "--"+ts.FlagRemote, ts.Addr[:len(ts.Addr)-1]) - assert.Equal(t, "context deadline exceeded", stdErr) + assert.Contains(t, stdErr, "context deadline exceeded") }) t.Run("case=noblock", func(t *testing.T) { diff --git a/internal/check/handler.go b/internal/check/handler.go index 527dc9921..97e817953 100644 --- a/internal/check/handler.go +++ b/internal/check/handler.go @@ -5,12 +5,13 @@ package check import ( "context" + "net/http" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/pkg/errors" - "google.golang.org/grpc/metadata" "github.com/ory/herodot" + "github.com/ory/keto/internal/x/api" "github.com/ory/keto/ketoapi" @@ -62,15 +63,13 @@ func (h *Handler) Check(ctx context.Context, req *rts.CheckRequest) (res *rts.Ch tuple := (&ketoapi.RelationTuple{}).FromCheckRequest(req) // Check if we should set the HTTP status code to 403 instead of 200 if the check fails. - if md, ok := metadata.FromIncomingContext(ctx); ok { - path := md["path"] - if len(path) > 0 && path[0] == RouteBase { - defer func() { - if res != nil && !res.Allowed { - _ = grpc.SetHeader(ctx, metadata.Pairs("x-http-code", "403")) - } - }() - } + + if api.RequestPath(ctx) == RouteBase { + defer func() { + if res != nil && !res.Allowed { + api.SetStatusCode(ctx, http.StatusForbidden) + } + }() } if tuple.SubjectID == nil && tuple.SubjectSet == nil { diff --git a/internal/check/handler_test.go b/internal/check/handler_test.go index d7e0747e5..b38935323 100644 --- a/internal/check/handler_test.go +++ b/internal/check/handler_test.go @@ -8,13 +8,14 @@ import ( "io" "net/http" "net/url" + "strings" "testing" - "github.com/ory/x/pointerx" - - "github.com/ory/keto/ketoapi" - "github.com/ory/keto/internal/driver/config" + "github.com/ory/keto/internal/relationtuple" + "github.com/ory/keto/internal/x/api" + "github.com/ory/keto/ketoapi" + "github.com/ory/x/pointerx" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -23,8 +24,6 @@ import ( "github.com/ory/keto/internal/check" "github.com/ory/keto/internal/driver" "github.com/ory/keto/internal/namespace" - "github.com/ory/keto/internal/relationtuple" - "github.com/ory/keto/internal/x" ) func assertAllowed(t *testing.T, resp *http.Response) { @@ -65,7 +64,8 @@ func TestRESTHandler(t *testing.T) { reg := driver.NewSqliteTestRegistry(t, false) require.NoError(t, reg.Config(ctx).Set(config.KeyNamespaces, nspaces)) - endpoints := x.NewTestEndpoints(t, check.NewHandler(reg)) + endpoints := api.NewTestServer(t, check.NewHandler(reg)) + ts := endpoints.HTTP for _, suite := range []struct { @@ -86,7 +86,7 @@ func TestRESTHandler(t *testing.T) { assert.Equal(t, http.StatusBadRequest, resp.StatusCode) body, err := io.ReadAll(resp.Body) require.NoError(t, err) - assert.Contains(t, string(body), "invalid syntax") + assert.Contains(t, string(body), "invalid parameter \\\"max_depth\\\"") }) t.Run("case=returns bad request on malformed input", func(t *testing.T) { @@ -97,6 +97,12 @@ func TestRESTHandler(t *testing.T) { assert.Equal(t, http.StatusBadRequest, resp.StatusCode) }) + t.Run("case=returns bad request invalid json", func(t *testing.T) { + resp, err := ts.Client().Post(ts.URL+suite.base, "", strings.NewReader(`{"invalid]`)) + require.NoError(t, err) + body, _ := io.ReadAll(resp.Body) + assert.Equal(t, http.StatusBadRequest, resp.StatusCode, body) + }) t.Run("case=returns bad request on missing subject", func(t *testing.T) { resp, err := ts.Client().Get(ts.URL + suite.base) diff --git a/internal/driver/daemon.go b/internal/driver/daemon.go index 9f6ce393f..577d3ffed 100644 --- a/internal/driver/daemon.go +++ b/internal/driver/daemon.go @@ -31,7 +31,6 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials/insecure" grpcHealthV1 "google.golang.org/grpc/health/grpc_health_v1" - "google.golang.org/grpc/reflection" "google.golang.org/grpc/status" "google.golang.org/grpc/test/bufconn" @@ -655,7 +654,6 @@ func (r *RegistryDefault) newAPIServer(ctx context.Context) *api.Server { func (r *RegistryDefault) registerCommonGRPCServices(s *grpc.Server) { grpcHealthV1.RegisterHealthServer(s, r.HealthServer()) rts.RegisterVersionServiceServer(s, r) - reflection.Register(s) r.pmm.Register(s) } diff --git a/internal/driver/daemon_test.go b/internal/driver/daemon_test.go index 942f0f80c..12980dd33 100644 --- a/internal/driver/daemon_test.go +++ b/internal/driver/daemon_test.go @@ -21,6 +21,7 @@ import ( grpcHealthV1 "google.golang.org/grpc/health/grpc_health_v1" "google.golang.org/grpc/status" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" prometheus "github.com/ory/x/prometheusx" "github.com/ory/keto/internal/driver/config" @@ -50,7 +51,17 @@ func TestScrapingEndpoint(t *testing.T) { require.NoError(t, err) defer conn.Close() + versionClient := rts.NewVersionServiceClient(conn) + versionRes, err := versionClient.GetVersion(ctx, &rts.GetVersionRequest{}) + require.NoError(t, err) + assert.Equal(t, "dev", versionRes.Version) + cl := grpcHealthV1.NewHealthClient(conn) + + res, err := cl.Check(ctx, &grpcHealthV1.HealthCheckRequest{}) + require.NoError(t, err) + assert.Equal(t, grpcHealthV1.HealthCheckResponse_SERVING, res.Status) + watcher, err := cl.Watch(ctx, &grpcHealthV1.HealthCheckRequest{}) require.NoError(t, err) require.NoError(t, watcher.CloseSend()) diff --git a/internal/x/api/api_server.go b/internal/x/api/api_server.go index 71ead3ee2..a025ebf9d 100644 --- a/internal/x/api/api_server.go +++ b/internal/x/api/api_server.go @@ -7,15 +7,17 @@ import ( "maps" "net/http" "net/http/httptest" + "regexp" "strconv" "strings" + "connectrpc.com/vanguard" "connectrpc.com/vanguard/vanguardgrpc" "github.com/urfave/negroni" "google.golang.org/genproto/googleapis/rpc/errdetails" statuspb "google.golang.org/genproto/googleapis/rpc/status" "google.golang.org/grpc" - "google.golang.org/grpc/codes" + "google.golang.org/grpc/encoding" "google.golang.org/grpc/metadata" "google.golang.org/grpc/reflection" "google.golang.org/grpc/status" @@ -24,6 +26,13 @@ import ( v1alpha2 "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" ) +func init() { + encoding.RegisterCodec(vanguardgrpc.NewCodec(&vanguard.JSONCodec{ + MarshalOptions: protojson.MarshalOptions{EmitUnpopulated: true}, + UnmarshalOptions: protojson.UnmarshalOptions{DiscardUnknown: true}, + })) +} + type ( Server struct { GRPCServer *grpc.Server @@ -90,19 +99,26 @@ var setErrorResponse = negroni.HandlerFunc(func(w http.ResponseWriter, r *http.R body := rr.Body.Bytes() protojson.Unmarshal(body, &spb) - if spb.Code == int32(codes.Unknown) && strings.HasPrefix(spb.Message, "proto: ") { + invalidFieldPathRe := regexp.MustCompile(`in field path ".*":`) + unexpectedBodyRe := regexp.MustCompile(`request should have no body; instead got \d bytes`) + + // Proto errors in the REST request path are always bad requests. + if strings.HasPrefix(spb.Message, "proto:") || + spb.Message == "empty field path" || + invalidFieldPathRe.MatchString(spb.Message) || + unexpectedBodyRe.MatchString(spb.Message) || + strings.HasPrefix(spb.Message, "grpc: error unmarshalling request:") { // Special case: error deserializing request into a protobuf is a bad request. - w.WriteHeader(http.StatusBadRequest) + rr.Code = http.StatusBadRequest } else if w.Header().Get("x-http-code") != "" { statusCode, err := strconv.Atoi(w.Header().Get("x-http-code")) if err != nil { log.Println("error:", err) } w.Header().Del("x-http-code") - w.WriteHeader(statusCode) - } else { - w.WriteHeader(rr.Code) + rr.Code = statusCode } + w.WriteHeader(rr.Code) if spb.Code == 0 && spb.Message == "" { _, _ = w.Write(body) diff --git a/internal/x/api/api_test_server.go b/internal/x/api/api_test_server.go index 6ff3c6331..ed22aa2f8 100644 --- a/internal/x/api/api_test_server.go +++ b/internal/x/api/api_test_server.go @@ -5,13 +5,9 @@ import ( "strings" "testing" - "connectrpc.com/vanguard" - "connectrpc.com/vanguard/vanguardgrpc" "github.com/stretchr/testify/require" "google.golang.org/grpc" "google.golang.org/grpc/credentials" - "google.golang.org/grpc/encoding" - "google.golang.org/protobuf/encoding/protojson" "github.com/ory/keto/internal/x" ) @@ -32,13 +28,6 @@ type ( } ) -func init() { - encoding.RegisterCodec(vanguardgrpc.NewCodec(&vanguard.JSONCodec{ - MarshalOptions: protojson.MarshalOptions{EmitUnpopulated: true}, - UnmarshalOptions: protojson.UnmarshalOptions{DiscardUnknown: true}, - })) -} - func NewTestServer(t *testing.T, handler any) *TestServer { apiServer := NewServer(WithGRPCOption(grpc.ChainUnaryInterceptor(x.GlobalGRPCUnaryServerInterceptors...))) From 2293c22cf719997ea5d24496b030ad4f588b6a76 Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Tue, 17 Dec 2024 15:12:00 +0100 Subject: [PATCH 27/42] fix all tests --- internal/check/handler.go | 1 + internal/check/handler_test.go | 3 +- internal/driver/daemon.go | 163 +---- internal/driver/daemon_test.go | 159 ----- internal/driver/registry_default.go | 7 - internal/e2e/scraping_endpoint_test.go | 142 ++++ internal/e2e/sdk_client_test.go | 11 +- internal/httpclient/api/openapi.yaml | 2 +- internal/httpclient/api_relationship.go | 2 +- internal/httpclient/docs/RelationshipApi.md | 2 +- internal/x/api/api_server.go | 7 +- internal/x/dbx/dsn_testutils.go | 83 ++- proto/buf.lock | 14 +- proto/buf.yaml | 1 + .../keto/opl/v1alpha1/syntax_service.pb.go | 171 ++--- .../keto/opl/v1alpha1/syntax_service.pb.gw.go | 58 +- .../keto/opl/v1alpha1/syntax_service.proto | 1 - .../v1alpha2/check_service.pb.go | 86 +-- .../v1alpha2/check_service.pb.gw.go | 182 ++--- .../v1alpha2/expand_service.pb.go | 299 ++++----- .../v1alpha2/expand_service.pb.gw.go | 56 +- .../v1alpha2/namespaces_service.pb.go | 88 +-- .../v1alpha2/namespaces_service.pb.gw.go | 52 +- .../relation_tuples/v1alpha2/openapi.pb.go | 206 +++--- .../v1alpha2/read_service.pb.go | 113 +--- .../v1alpha2/read_service.pb.gw.go | 56 +- .../v1alpha2/relation_tuples.pb.go | 400 +++++------ .../relation_tuples/v1alpha2/version.pb.go | 61 +- .../relation_tuples/v1alpha2/version.pb.gw.go | 52 +- .../v1alpha2/write_service.pb.go | 632 +++++++----------- .../v1alpha2/write_service.pb.gw.go | 150 ++--- spec/api.json | 2 +- spec/api.swagger.json | 116 ++-- 33 files changed, 1285 insertions(+), 2093 deletions(-) delete mode 100644 internal/driver/daemon_test.go create mode 100644 internal/e2e/scraping_endpoint_test.go diff --git a/internal/check/handler.go b/internal/check/handler.go index 97e817953..5e5069f38 100644 --- a/internal/check/handler.go +++ b/internal/check/handler.go @@ -11,6 +11,7 @@ import ( "github.com/pkg/errors" "github.com/ory/herodot" + "github.com/ory/keto/internal/x/api" "github.com/ory/keto/ketoapi" diff --git a/internal/check/handler_test.go b/internal/check/handler_test.go index b38935323..2696e1910 100644 --- a/internal/check/handler_test.go +++ b/internal/check/handler_test.go @@ -11,11 +11,12 @@ import ( "strings" "testing" + "github.com/ory/x/pointerx" + "github.com/ory/keto/internal/driver/config" "github.com/ory/keto/internal/relationtuple" "github.com/ory/keto/internal/x/api" "github.com/ory/keto/ketoapi" - "github.com/ory/x/pointerx" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/driver/daemon.go b/internal/driver/daemon.go index 577d3ffed..c41f62def 100644 --- a/internal/driver/daemon.go +++ b/internal/driver/daemon.go @@ -5,7 +5,6 @@ package driver import ( "context" - "net" "net/http" "os" "os/signal" @@ -16,7 +15,6 @@ import ( grpcLogrus "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging" grpcRecovery "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/recovery" - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/julienschmidt/httprouter" "github.com/pkg/errors" "github.com/rs/cors" @@ -26,13 +24,13 @@ import ( grpcOtel "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" "go.opentelemetry.io/otel" + "golang.org/x/net/http2" + "golang.org/x/net/http2/h2c" "golang.org/x/sync/errgroup" "google.golang.org/grpc" "google.golang.org/grpc/codes" - "google.golang.org/grpc/credentials/insecure" grpcHealthV1 "google.golang.org/grpc/health/grpc_health_v1" "google.golang.org/grpc/status" - "google.golang.org/grpc/test/bufconn" "github.com/ory/analytics-go/v5" "github.com/ory/graceful" @@ -135,7 +133,7 @@ func (r *RegistryDefault) ServeAll(ctx context.Context) error { // We need to separate the setup (invoking the functions that return the serve functions) from running the serve // functions to mitigate race contitions in the HTTP router. for _, serve := range []func() error{ - r.serveInternalGRPC(innerCtx), + //r.serveInternalGRPC(innerCtx), r.serveRead(innerCtx, doneShutdown), r.serveWrite(innerCtx, doneShutdown), r.serveOPLSyntax(innerCtx, doneShutdown), @@ -147,57 +145,6 @@ func (r *RegistryDefault) ServeAll(ctx context.Context) error { return eg.Wait() } -func (r *RegistryDefault) initInternalGRPC() { - r.internalGRPC.listener = bufconn.Listen(1024 * 1024 * 10) - r.internalGRPC.dialer = func() (*grpc.ClientConn, error) { - return grpc.Dial("bufnet", - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) { return r.internalGRPC.listener.Dial() }), - ) - } - -} - -func (r *RegistryDefault) serveInternalGRPC(ctx context.Context) func() error { - return func() error { - serverDone := make(chan struct{}) - internalGRPCServer := r.newInternalGRPCServer(ctx) - eg := &errgroup.Group{} - - eg.Go(func() error { - err := internalGRPCServer.Serve(r.internalGRPCListener()) - close(serverDone) - return err - }) - - eg.Go(func() (err error) { - <-ctx.Done() - - internalGRPCServer.GracefulStop() - select { - case <-serverDone: - return nil - case <-time.After(graceful.DefaultShutdownTimeout): - internalGRPCServer.Stop() - return errors.New("graceful stop of internal gRPC server canceled, had to force it") - } - }) - - err := eg.Wait() - return err - } -} - -func (r *RegistryDefault) internalGRPCListener() net.Listener { - r.internalGRPC.initOnce.Do(r.initInternalGRPC) - return r.internalGRPC.listener -} - -func (r *RegistryDefault) internalGRPCDialer() GRPCDialer { - r.internalGRPC.initOnce.Do(r.initInternalGRPC) - return r.internalGRPC.dialer -} - func (r *RegistryDefault) serveRead(ctx context.Context, done chan<- struct{}) func() error { server := r.newAPIServer(ctx) r.registerCommonGRPCServices(server.GRPCServer) @@ -302,10 +249,10 @@ func (r *RegistryDefault) serveMetrics(ctx context.Context, done chan<- struct{} } } -func serve(ctx context.Context, log *logrusx.Logger, addr string, router http.Handler, done chan<- struct{}) error { +func serve(ctx context.Context, log *logrusx.Logger, addr string, handler http.Handler, done chan<- struct{}) error { //nolint:gosec // graceful.WithDefaults already sets a timeout server := graceful.WithDefaults(&http.Server{ - Handler: router, + Handler: h2c.NewHandler(handler, &http2.Server{}), Addr: addr, }) @@ -342,93 +289,6 @@ func serve(ctx context.Context, log *logrusx.Logger, addr string, router http.Ha return eg.Wait() } -func multiplexPort(ctx context.Context, log *logrusx.Logger, addr string, router http.Handler, grpcS *grpc.Server, done chan<- struct{}) error { - l, err := (&net.ListenConfig{}).Listen(ctx, "tcp", addr) - if err != nil { - return err - } - - m := cmux.New(l) - m.SetReadTimeout(graceful.DefaultReadTimeout) - - grpcL := m.MatchWithWriters(cmux.HTTP2MatchHeaderFieldSendSettings("content-type", "application/grpc")) - httpL := m.Match(cmux.HTTP1()) - - //nolint:gosec // graceful.WithDefaults already sets a timeout - restS := graceful.WithDefaults(&http.Server{ - Handler: router, - }) - - eg := &errgroup.Group{} - - eg.Go(func() error { - if err := grpcS.Serve(grpcL); !errors.Is(err, cmux.ErrServerClosed) { - return errors.WithStack(err) - } - return nil - }) - - eg.Go(func() error { - if err := restS.Serve(httpL); !errors.Is(err, http.ErrServerClosed) && !errors.Is(err, cmux.ErrServerClosed) { - return errors.WithStack(err) - } - return nil - }) - - eg.Go(func() error { - err := m.Serve() - if err != nil && !errors.Is(err, net.ErrClosed) { - // unexpected error - return errors.WithStack(err) - } - return nil - }) - - eg.Go(func() (err error) { - defer func() { - if err != nil { - log.WithError(err).Error("graceful shutdown failed") - } else { - log.Info("gracefully shutdown server") - } - done <- struct{}{} - }() - - <-ctx.Done() - - ctx, cancel := context.WithTimeout(context.Background(), graceful.DefaultShutdownTimeout) - defer cancel() - - shutdownEg := errgroup.Group{} - shutdownEg.Go(func() error { - // we ignore net.ErrClosed, because a cmux listener's close func is actually the one of the root listener (which is closed in a racy fashion) - if err := restS.Shutdown(ctx); !(err == nil || errors.Is(err, http.ErrServerClosed) || errors.Is(err, net.ErrClosed)) { - // unexpected error - return errors.WithStack(err) - } - return nil - }) - shutdownEg.Go(func() error { - gracefulDone := make(chan struct{}) - go func() { - grpcS.GracefulStop() - close(gracefulDone) - }() - select { - case <-gracefulDone: - return nil - case <-ctx.Done(): - grpcS.Stop() - return errors.New("graceful stop of gRPC server canceled, had to force it") - } - }) - - return shutdownEg.Wait() - }) - - return eg.Wait() -} - func (r *RegistryDefault) allHandlers() []Handler { if len(r.handlers) == 0 { r.handlers = []Handler{ @@ -442,24 +302,11 @@ func (r *RegistryDefault) allHandlers() []Handler { return r.handlers } -type RouterOrGatewayHandler struct { - Router *httprouter.Router - ServeMux *runtime.ServeMux -} - type RouterOrHandler struct { Router *httprouter.Router Handler http.Handler } -func (h *RouterOrGatewayHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - if handle, params, _ := h.Router.Lookup(r.Method, r.URL.Path); handle != nil { - handle(rw, r, params) - return - } - h.ServeMux.ServeHTTP(rw, r) -} - func (h *RouterOrHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) { if handle, params, _ := h.Router.Lookup(r.Method, r.URL.Path); handle != nil { handle(rw, r, params) diff --git a/internal/driver/daemon_test.go b/internal/driver/daemon_test.go deleted file mode 100644 index 12980dd33..000000000 --- a/internal/driver/daemon_test.go +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright © 2023 Ory Corp -// SPDX-License-Identifier: Apache-2.0 - -package driver - -import ( - "context" - "fmt" - "net/http" - "testing" - - "github.com/phayes/freeport" - ioprometheusclient "github.com/prometheus/client_model/go" - "github.com/prometheus/common/expfmt" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "golang.org/x/sync/errgroup" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/credentials/insecure" - grpcHealthV1 "google.golang.org/grpc/health/grpc_health_v1" - "google.golang.org/grpc/status" - - rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" - prometheus "github.com/ory/x/prometheusx" - - "github.com/ory/keto/internal/driver/config" -) - -func TestScrapingEndpoint(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - port, err := freeport.GetFreePort() - require.NoError(t, err) - - r := NewSqliteTestRegistry(t, false) - require.NoError(t, r.Config(ctx).Set(config.KeyWriteAPIPort, port)) - - //metrics port - portMetrics, err := freeport.GetFreePort() - require.NoError(t, err) - require.NoError(t, r.Config(ctx).Set(config.KeyMetricsPort, portMetrics)) - - eg := errgroup.Group{} - doneShutdown := make(chan struct{}) - eg.Go(r.serveWrite(ctx, doneShutdown)) - eg.Go(r.serveMetrics(ctx, doneShutdown)) - - conn, err := grpc.DialContext(ctx, fmt.Sprintf("127.0.0.1:%d", port), grpc.WithTransportCredentials(insecure.NewCredentials())) - require.NoError(t, err) - defer conn.Close() - - versionClient := rts.NewVersionServiceClient(conn) - versionRes, err := versionClient.GetVersion(ctx, &rts.GetVersionRequest{}) - require.NoError(t, err) - assert.Equal(t, "dev", versionRes.Version) - - cl := grpcHealthV1.NewHealthClient(conn) - - res, err := cl.Check(ctx, &grpcHealthV1.HealthCheckRequest{}) - require.NoError(t, err) - assert.Equal(t, grpcHealthV1.HealthCheckResponse_SERVING, res.Status) - - watcher, err := cl.Watch(ctx, &grpcHealthV1.HealthCheckRequest{}) - require.NoError(t, err) - require.NoError(t, watcher.CloseSend()) - for err := status.Error(codes.Unavailable, "init"); status.Code(err) != codes.Unavailable; _, err = watcher.Recv() { - } - - promresp, err := http.Get(fmt.Sprintf("http://127.0.0.1:%d", portMetrics) + prometheus.MetricsPrometheusPath) - require.NoError(t, err) - require.EqualValues(t, http.StatusOK, promresp.StatusCode) - - textParser := expfmt.TextParser{} - text, err := textParser.TextToMetricFamilies(promresp.Body) - require.NoError(t, err) - require.EqualValues(t, "grpc_server_handled_total", *text["grpc_server_handled_total"].Name) - require.EqualValues(t, "Check", getLabelValue("grpc_method", text["grpc_server_handled_total"].Metric)) - require.EqualValues(t, "grpc.health.v1.Health", getLabelValue("grpc_service", text["grpc_server_handled_total"].Metric)) - - require.EqualValues(t, "grpc_server_msg_sent_total", *text["grpc_server_msg_sent_total"].Name) - require.EqualValues(t, "Check", getLabelValue("grpc_method", text["grpc_server_msg_sent_total"].Metric)) - require.EqualValues(t, "grpc.health.v1.Health", getLabelValue("grpc_service", text["grpc_server_msg_sent_total"].Metric)) - - require.EqualValues(t, "grpc_server_msg_received_total", *text["grpc_server_msg_received_total"].Name) - require.EqualValues(t, "Check", getLabelValue("grpc_method", text["grpc_server_msg_received_total"].Metric)) - require.EqualValues(t, "grpc.health.v1.Health", getLabelValue("grpc_service", text["grpc_server_msg_received_total"].Metric)) - - cancel() - <-doneShutdown - <-doneShutdown - require.NoError(t, eg.Wait()) -} - -func TestPanicRecovery(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - - unaryPanicInterceptor := func(context.Context, interface{}, *grpc.UnaryServerInfo, grpc.UnaryHandler) (interface{}, error) { - panic("test panic") - } - streamPanicInterceptor := func(context.Context, interface{}, *grpc.UnaryServerInfo, grpc.UnaryHandler) (interface{}, error) { - panic("test panic") - } - port, err := freeport.GetFreePort() - require.NoError(t, err) - - r := NewSqliteTestRegistry(t, false, WithGRPCUnaryInterceptors(unaryPanicInterceptor), WithGRPCUnaryInterceptors(streamPanicInterceptor)) - require.NoError(t, r.Config(ctx).Set(config.KeyWriteAPIPort, port)) - - eg := errgroup.Group{} - doneShutdown := make(chan struct{}) - eg.Go(r.serveWrite(ctx, doneShutdown)) - - conn, err := grpc.DialContext(ctx, fmt.Sprintf("127.0.0.1:%d", port), - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithBlock(), - ) - require.NoError(t, err) - defer conn.Close() - - cl := grpcHealthV1.NewHealthClient(conn) - - watcher, err := cl.Watch(ctx, &grpcHealthV1.HealthCheckRequest{}) - require.NoError(t, err) - require.NoError(t, watcher.CloseSend()) - for err := status.Error(codes.Unavailable, "init"); status.Code(err) != codes.Unavailable; _, err = watcher.Recv() { - } - - // we want to ensure the server is still running after the panic - for i := 0; i < 10; i++ { - // Unary call - resp, err := cl.Check(ctx, &grpcHealthV1.HealthCheckRequest{}) - require.Error(t, err, "%+v", resp) - assert.Equal(t, codes.Internal, status.Code(err)) - - // Streaming call - wResp, err := cl.Watch(ctx, &grpcHealthV1.HealthCheckRequest{}) - require.NoError(t, err) - err = wResp.RecvMsg(nil) - require.Error(t, err) - assert.Equal(t, codes.Internal, status.Code(err)) - } - - cancel() - <-doneShutdown - require.NoError(t, eg.Wait()) -} - -func getLabelValue(name string, metric []*ioprometheusclient.Metric) string { - for _, label := range metric[0].Label { - if *label.Name == name { - return *label.Value - } - } - - return "" -} diff --git a/internal/driver/registry_default.go b/internal/driver/registry_default.go index 9813cd38c..c99756a82 100644 --- a/internal/driver/registry_default.go +++ b/internal/driver/registry_default.go @@ -15,7 +15,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/health" - "google.golang.org/grpc/test/bufconn" "github.com/ory/herodot" "github.com/ory/x/dbal" @@ -84,12 +83,6 @@ type ( grpcTransportCredentials credentials.TransportCredentials defaultMigrationOptions []popx.MigrationBoxOption healthReadyCheckers healthx.ReadyCheckers - - internalGRPC struct { - initOnce sync.Once - listener *bufconn.Listener - dialer GRPCDialer - } } ReadHandler interface { RegisterReadGRPC(s *grpc.Server) diff --git a/internal/e2e/scraping_endpoint_test.go b/internal/e2e/scraping_endpoint_test.go new file mode 100644 index 000000000..a4f431d0c --- /dev/null +++ b/internal/e2e/scraping_endpoint_test.go @@ -0,0 +1,142 @@ +// Copyright © 2023 Ory Corp +// SPDX-License-Identifier: Apache-2.0 + +package e2e + +import ( + "fmt" + "net/http" + "testing" + + ioprometheusclient "github.com/prometheus/client_model/go" + "github.com/prometheus/common/expfmt" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + grpcHealthV1 "google.golang.org/grpc/health/grpc_health_v1" + "google.golang.org/grpc/status" + + prometheus "github.com/ory/x/prometheusx" + + "github.com/ory/keto/internal/x/dbx" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" +) + +func TestScrapingEndpoint(t *testing.T) { + dsn := dbx.GetSqlite(t, dbx.SQLiteMemory) + ctx, reg, _ := newInitializedReg(t, dsn, nil) + closeServer := startServer(ctx, t, reg) + t.Cleanup(closeServer) + + client := &grpcClient{ + readRemote: reg.Config(ctx).ReadAPIListenOn(), + writeRemote: reg.Config(ctx).WriteAPIListenOn(), + ctx: ctx, + } + + client.waitUntilLive(t) + + conn := client.readConn(t) + defer conn.Close() + + versionClient := rts.NewVersionServiceClient(conn) + versionRes, err := versionClient.GetVersion(ctx, &rts.GetVersionRequest{}) + require.NoError(t, err) + assert.Equal(t, "master", versionRes.Version) + + cl := grpcHealthV1.NewHealthClient(conn) + + res, err := cl.Check(ctx, &grpcHealthV1.HealthCheckRequest{}) + require.NoError(t, err) + assert.Equal(t, grpcHealthV1.HealthCheckResponse_SERVING, res.Status) + + watcher, err := cl.Watch(ctx, &grpcHealthV1.HealthCheckRequest{}) + require.NoError(t, err) + require.NoError(t, watcher.CloseSend()) + for err := status.Error(codes.Unavailable, "init"); status.Code(err) != codes.Unavailable; _, err = watcher.Recv() { + } + + promresp, err := http.Get(fmt.Sprintf("http://%s%s", reg.Config(ctx).MetricsListenOn(), prometheus.MetricsPrometheusPath)) + require.NoError(t, err) + require.EqualValues(t, http.StatusOK, promresp.StatusCode) + + textParser := expfmt.TextParser{} + text, err := textParser.TextToMetricFamilies(promresp.Body) + require.NoError(t, err) + require.EqualValues(t, "grpc_server_handled_total", *text["grpc_server_handled_total"].Name) + require.EqualValues(t, "Check", getLabelValue("grpc_method", text["grpc_server_handled_total"].Metric)) + require.EqualValues(t, "grpc.health.v1.Health", getLabelValue("grpc_service", text["grpc_server_handled_total"].Metric)) + + require.EqualValues(t, "grpc_server_msg_sent_total", *text["grpc_server_msg_sent_total"].Name) + require.EqualValues(t, "Check", getLabelValue("grpc_method", text["grpc_server_msg_sent_total"].Metric)) + require.EqualValues(t, "grpc.health.v1.Health", getLabelValue("grpc_service", text["grpc_server_msg_sent_total"].Metric)) + + require.EqualValues(t, "grpc_server_msg_received_total", *text["grpc_server_msg_received_total"].Name) + require.EqualValues(t, "Check", getLabelValue("grpc_method", text["grpc_server_msg_received_total"].Metric)) + require.EqualValues(t, "grpc.health.v1.Health", getLabelValue("grpc_service", text["grpc_server_msg_received_total"].Metric)) +} + +//func TestPanicRecovery(t *testing.T) { +// ctx, cancel := context.WithCancel(context.Background()) +// defer cancel() +// +// unaryPanicInterceptor := func(context.Context, interface{}, *grpc.UnaryServerInfo, grpc.UnaryHandler) (interface{}, error) { +// panic("test panic") +// } +// streamPanicInterceptor := func(context.Context, interface{}, *grpc.UnaryServerInfo, grpc.UnaryHandler) (interface{}, error) { +// panic("test panic") +// } +// port, err := freeport.GetFreePort() +// require.NoError(t, err) +// +// r := driver.NewSqliteTestRegistry(t, false, driver.WithGRPCUnaryInterceptors(unaryPanicInterceptor), driver.WithGRPCUnaryInterceptors(streamPanicInterceptor)) +// require.NoError(t, r.Config(ctx).Set(config.KeyWriteAPIPort, port)) +// +// eg := errgroup.Group{} +// doneShutdown := make(chan struct{}) +// eg.Go(r.serveWrite(ctx, doneShutdown)) +// +// conn, err := grpc.DialContext(ctx, fmt.Sprintf("127.0.0.1:%d", port), +// grpc.WithTransportCredentials(insecure.NewCredentials()), +// grpc.WithBlock(), +// ) +// require.NoError(t, err) +// defer conn.Close() +// +// cl := grpcHealthV1.NewHealthClient(conn) +// +// watcher, err := cl.Watch(ctx, &grpcHealthV1.HealthCheckRequest{}) +// require.NoError(t, err) +// require.NoError(t, watcher.CloseSend()) +// for err := status.Error(codes.Unavailable, "init"); status.Code(err) != codes.Unavailable; _, err = watcher.Recv() { +// } +// +// // we want to ensure the server is still running after the panic +// for i := 0; i < 10; i++ { +// // Unary call +// resp, err := cl.Check(ctx, &grpcHealthV1.HealthCheckRequest{}) +// require.Error(t, err, "%+v", resp) +// assert.Equal(t, codes.Internal, status.Code(err)) +// +// // Streaming call +// wResp, err := cl.Watch(ctx, &grpcHealthV1.HealthCheckRequest{}) +// require.NoError(t, err) +// err = wResp.RecvMsg(nil) +// require.Error(t, err) +// assert.Equal(t, codes.Internal, status.Code(err)) +// } +// +// cancel() +// <-doneShutdown +// require.NoError(t, eg.Wait()) +//} + +func getLabelValue(name string, metric []*ioprometheusclient.Metric) string { + for _, label := range metric[0].Label { + if *label.Name == name { + return *label.Value + } + } + + return "" +} diff --git a/internal/e2e/sdk_client_test.go b/internal/e2e/sdk_client_test.go index b9a5f317a..0bc7e45fb 100644 --- a/internal/e2e/sdk_client_test.go +++ b/internal/e2e/sdk_client_test.go @@ -9,11 +9,12 @@ import ( "net/http" "time" - "github.com/ory/herodot" - "github.com/ory/x/pointerx" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/ory/herodot" + "github.com/ory/x/pointerx" + httpclient "github.com/ory/keto/internal/httpclient" "github.com/ory/keto/internal/x" "github.com/ory/keto/ketoapi" @@ -36,12 +37,12 @@ func (c *sdkClient) requestCtx() context.Context { } func (c *sdkClient) oplCheckSyntax(t require.TestingT, content []byte) (parseErrors []*ketoapi.ParseError) { - body, err := json.Marshal(content) + enc, err := json.Marshal(content) require.NoError(t, err) res, _, err := c.getOPLSyntaxClient(). RelationshipApi. CheckOplSyntax(c.requestCtx()). - Body(string(body)). + Body(string(enc)). Execute() require.NoError(t, err) @@ -288,7 +289,7 @@ func (c *sdkClient) waitUntilLive(t require.TestingT) { for err != nil { resp, _, err = c.getReadClient().MetadataApi.IsReady(c.requestCtx()).Execute() } - require.Equal(t, "SERVING", resp.Status) + require.Equal(t, "ok", resp.Status) } func (c *sdkClient) queryNamespaces(t require.TestingT) (response ketoapi.GetNamespacesResponse) { diff --git a/internal/httpclient/api/openapi.yaml b/internal/httpclient/api/openapi.yaml index 9fc4d0e30..b7bb8c3c7 100644 --- a/internal/httpclient/api/openapi.yaml +++ b/internal/httpclient/api/openapi.yaml @@ -220,7 +220,7 @@ paths: operationId: checkOplSyntax requestBody: content: - text/plain: + application/json: schema: format: byte type: string diff --git a/internal/httpclient/api_relationship.go b/internal/httpclient/api_relationship.go index 156a62c6f..f835ae7ae 100644 --- a/internal/httpclient/api_relationship.go +++ b/internal/httpclient/api_relationship.go @@ -163,7 +163,7 @@ func (a *RelationshipApiService) CheckOplSyntaxExecute(r RelationshipApiApiCheck } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"text/plain"} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) diff --git a/internal/httpclient/docs/RelationshipApi.md b/internal/httpclient/docs/RelationshipApi.md index e3f50e135..bf42d18e4 100644 --- a/internal/httpclient/docs/RelationshipApi.md +++ b/internal/httpclient/docs/RelationshipApi.md @@ -69,7 +69,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: text/plain +- **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/internal/x/api/api_server.go b/internal/x/api/api_server.go index a025ebf9d..e0766764e 100644 --- a/internal/x/api/api_server.go +++ b/internal/x/api/api_server.go @@ -2,7 +2,6 @@ package api import ( "context" - "encoding/json" "log" "maps" "net/http" @@ -149,7 +148,11 @@ var setErrorResponse = negroni.HandlerFunc(func(w http.ResponseWriter, r *http.R } } - json.NewEncoder(w).Encode(&errResponse) + out, err := protojson.Marshal(&errResponse) + if err != nil { + log.Println("error:", err) + } + _, _ = w.Write(out) }) var setRequestPath = negroni.HandlerFunc(func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) { diff --git a/internal/x/dbx/dsn_testutils.go b/internal/x/dbx/dsn_testutils.go index f13ba8dd1..a7b44cfc7 100644 --- a/internal/x/dbx/dsn_testutils.go +++ b/internal/x/dbx/dsn_testutils.go @@ -15,7 +15,6 @@ import ( "github.com/go-sql-driver/mysql" "github.com/gobuffalo/pop/v6" - "github.com/ory/x/sqlcon/dockertest" "github.com/stretchr/testify/require" "github.com/tidwall/sjson" ) @@ -106,47 +105,47 @@ func createDB(t testing.TB, url string, dbName string) (err error) { func GetDSNs(t testing.TB, debugSqliteOnDisk bool) []*DsnT { dsns := allSqlite(t, debugSqliteOnDisk) - if !testing.Short() { - var mysql, postgres, cockroach string - testDB := dbName(t.Name()) - - dockertest.Parallel([]func(){ - func() { - mysql = RunMySQL(t, testDB) - }, - func() { - postgres = RunPostgres(t, testDB) - }, - func() { - cockroach = RunCockroach(t, testDB) - }, - }) - - if mysql != "" { - dsns = append(dsns, &DsnT{ - Name: "mysql", - Conn: mysql, - MigrateUp: true, - MigrateDown: true, - }) - } - if postgres != "" { - dsns = append(dsns, &DsnT{ - Name: "postgres", - Conn: postgres, - MigrateUp: true, - MigrateDown: true, - }) - } - if cockroach != "" { - dsns = append(dsns, &DsnT{ - Name: "cockroach", - Conn: cockroach, - MigrateUp: true, - MigrateDown: true, - }) - } - } + //if !testing.Short() { + // var mysql, postgres, cockroach string + // testDB := dbName(t.Name()) + // + // dockertest.Parallel([]func(){ + // func() { + // mysql = RunMySQL(t, testDB) + // }, + // func() { + // postgres = RunPostgres(t, testDB) + // }, + // func() { + // cockroach = RunCockroach(t, testDB) + // }, + // }) + // + // if mysql != "" { + // dsns = append(dsns, &DsnT{ + // Name: "mysql", + // Conn: mysql, + // MigrateUp: true, + // MigrateDown: true, + // }) + // } + // if postgres != "" { + // dsns = append(dsns, &DsnT{ + // Name: "postgres", + // Conn: postgres, + // MigrateUp: true, + // MigrateDown: true, + // }) + // } + // if cockroach != "" { + // dsns = append(dsns, &DsnT{ + // Name: "cockroach", + // Conn: cockroach, + // MigrateUp: true, + // MigrateDown: true, + // }) + // } + //} require.NotZero(t, len(dsns), "expected to run against at least one database") return dsns diff --git a/proto/buf.lock b/proto/buf.lock index 99e2d27c7..4ff91d2b9 100644 --- a/proto/buf.lock +++ b/proto/buf.lock @@ -4,12 +4,20 @@ deps: - remote: buf.build owner: envoyproxy repository: protoc-gen-validate - commit: 6607b10f00ed4a3d98f906807131c44a + commit: daf171c6cdb54629b5f51e345a79e4dd + digest: shake256:4ae167d7eed10da5f83a3f5df8c670d249170f11b1f2fd19afda06be2cff4d47dcc95e9e4a15151ecc8ce2d3d3614caf9a04d3ad82fb768a3870dedfa9455f36 - remote: buf.build owner: googleapis repository: googleapis - commit: 75b4300737fb4efca0831636be94e517 + commit: acd896313c55464b993332136ded1b6e + digest: shake256:66626d5e4d9c8ecf25cd72bdbfbbf62b9a68e9e9c33dab6b9b39a53a67063eeba6b8493247dd6d6240b1ac1c32eb2dc311484e67dd7d271884a960c2e5ce8c9a - remote: buf.build owner: grpc-ecosystem repository: grpc-gateway - commit: a1ecdc58eccd49aa8bea2a7a9022dc27 + commit: a48fcebcf8f140dd9d09359b9bb185a4 + digest: shake256:a926173f0ec3e1a929462c350acda846e546134b5ce2bb83fe44f02f9330a42b1c9b292f64b951b06a4d2c47e2ce4d477d6a2cb31502a15637ada35ecedefcf6 + - remote: buf.build + owner: grpc + repository: grpc + commit: 5197c4709c1b4017a2b88e0dabbf5dad + digest: shake256:d1f2a60110187ea7849543ea06e5e91f6bfc279ce3d8a7efd3bd4a51faf63a112cd1ca7d001ca5353d0862e3e39cbb36355ddce4d350b51c99a4aec5fb332d06 diff --git a/proto/buf.yaml b/proto/buf.yaml index 21d440bd2..4adc9fd08 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -17,6 +17,7 @@ breaking: use: - FILE deps: + - buf.build/grpc/grpc - buf.build/googleapis/googleapis - buf.build/grpc-ecosystem/grpc-gateway - buf.build/envoyproxy/protoc-gen-validate diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go index 7ff3d3cdf..e523c766f 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.0 // protoc (unknown) // source: ory/keto/opl/v1alpha1/syntax_service.proto @@ -23,20 +23,17 @@ const ( ) type CheckRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` unknownFields protoimpl.UnknownFields - - Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CheckRequest) Reset() { *x = CheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckRequest) String() string { @@ -47,7 +44,7 @@ func (*CheckRequest) ProtoMessage() {} func (x *CheckRequest) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -70,21 +67,18 @@ func (x *CheckRequest) GetContent() []byte { } type CheckResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + ParseErrors []*ParseError `protobuf:"bytes,1,rep,name=parse_errors,json=parseErrors,proto3" json:"parse_errors,omitempty"` + Errors []*ParseError `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` unknownFields protoimpl.UnknownFields - - ParseErrors []*ParseError `protobuf:"bytes,1,rep,name=parse_errors,json=parseErrors,proto3" json:"parse_errors,omitempty"` - Errors []*ParseError `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` + sizeCache protoimpl.SizeCache } func (x *CheckResponse) Reset() { *x = CheckResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckResponse) String() string { @@ -95,7 +89,7 @@ func (*CheckResponse) ProtoMessage() {} func (x *CheckResponse) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125,22 +119,19 @@ func (x *CheckResponse) GetErrors() []*ParseError { } type ParseError struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + Start *SourcePosition `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"` + End *SourcePosition `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"` unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - Start *SourcePosition `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"` - End *SourcePosition `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ParseError) Reset() { *x = ParseError{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ParseError) String() string { @@ -151,7 +142,7 @@ func (*ParseError) ProtoMessage() {} func (x *ParseError) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -188,21 +179,18 @@ func (x *ParseError) GetEnd() *SourcePosition { } type SourcePosition struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Line uint32 `protobuf:"varint,1,opt,name=line,json=Line,proto3" json:"line,omitempty"` + Column uint32 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"` unknownFields protoimpl.UnknownFields - - Line uint32 `protobuf:"varint,1,opt,name=line,json=Line,proto3" json:"line,omitempty"` - Column uint32 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"` + sizeCache protoimpl.SizeCache } func (x *SourcePosition) Reset() { *x = SourcePosition{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SourcePosition) String() string { @@ -213,7 +201,7 @@ func (*SourcePosition) ProtoMessage() {} func (x *SourcePosition) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,34 +267,33 @@ var file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDesc = []byte{ 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x32, 0x8b, 0x02, 0x0a, 0x0d, - 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xf9, 0x01, + 0x01, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x32, 0xff, 0x01, 0x0a, 0x0d, + 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xed, 0x01, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x23, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0xa4, 0x01, 0x92, 0x41, 0x7f, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x73, 0x65, 0x22, 0x98, 0x01, 0x92, 0x41, 0x73, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x0e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x70, 0x6c, - 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x32, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x6c, 0x61, - 0x69, 0x6e, 0x4a, 0x53, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x4c, 0x0a, 0x20, 0x54, 0x68, 0x65, - 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, - 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x28, 0x0a, - 0x26, 0x1a, 0x24, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x11, 0x2f, 0x6f, 0x70, 0x6c, 0x2f, 0x73, 0x79, 0x6e, - 0x74, 0x61, 0x78, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x95, 0x01, 0x0a, 0x18, 0x73, 0x68, - 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x12, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, - 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, - 0x2f, 0x6f, 0x70, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6f, 0x70, - 0x6c, 0xaa, 0x02, 0x15, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x4f, 0x70, 0x6c, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, 0x4f, 0x72, 0x79, 0x5c, - 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x4f, 0x70, 0x6c, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x4a, 0x53, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x4c, 0x0a, + 0x20, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, + 0x72, 0x12, 0x28, 0x0a, 0x26, 0x1a, 0x24, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1c, 0x3a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x11, 0x2f, 0x6f, 0x70, 0x6c, + 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x95, 0x01, + 0x0a, 0x18, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, + 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x12, 0x53, 0x79, 0x6e, 0x74, + 0x61, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, + 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, + 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x6f, 0x70, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x3b, 0x6f, 0x70, 0x6c, 0xaa, 0x02, 0x15, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, + 0x2e, 0x4f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, + 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x4f, 0x70, 0x6c, 0x5c, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -347,56 +334,6 @@ func file_ory_keto_opl_v1alpha1_syntax_service_proto_init() { if File_ory_keto_opl_v1alpha1_syntax_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CheckResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ParseError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_opl_v1alpha1_syntax_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SourcePosition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.gw.go b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.gw.go index eef8a162b..1d155c437 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.gw.go +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.gw.go @@ -10,6 +10,7 @@ package opl import ( "context" + "errors" "io" "net/http" @@ -24,37 +25,38 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_SyntaxService_Check_0(ctx context.Context, marshaler runtime.Marshaler, client SyntaxServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CheckRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Content); err != nil && err != io.EOF { + var ( + protoReq CheckRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Content); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Check(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SyntaxService_Check_0(ctx context.Context, marshaler runtime.Marshaler, server SyntaxServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CheckRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Content); err != nil && err != io.EOF { + var ( + protoReq CheckRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.Content); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Check(ctx, &protoReq) return msg, metadata, err - } // RegisterSyntaxServiceHandlerServer registers the http handlers for service SyntaxService to "mux". @@ -63,16 +65,13 @@ func local_request_SyntaxService_Check_0(ctx context.Context, marshaler runtime. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSyntaxServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterSyntaxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SyntaxServiceServer) error { - - mux.Handle("POST", pattern_SyntaxService_Check_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_SyntaxService_Check_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.opl.v1alpha1.SyntaxService/Check", runtime.WithHTTPPathPattern("/opl/syntax/check")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.opl.v1alpha1.SyntaxService/Check", runtime.WithHTTPPathPattern("/opl/syntax/check")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -84,9 +83,7 @@ func RegisterSyntaxServiceHandlerServer(ctx context.Context, mux *runtime.ServeM runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SyntaxService_Check_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -113,7 +110,6 @@ func RegisterSyntaxServiceHandlerFromEndpoint(ctx context.Context, mux *runtime. } }() }() - return RegisterSyntaxServiceHandler(ctx, mux, conn) } @@ -129,14 +125,11 @@ func RegisterSyntaxServiceHandler(ctx context.Context, mux *runtime.ServeMux, co // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "SyntaxServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterSyntaxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SyntaxServiceClient) error { - - mux.Handle("POST", pattern_SyntaxService_Check_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_SyntaxService_Check_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.opl.v1alpha1.SyntaxService/Check", runtime.WithHTTPPathPattern("/opl/syntax/check")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/ory.keto.opl.v1alpha1.SyntaxService/Check", runtime.WithHTTPPathPattern("/opl/syntax/check")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -147,11 +140,8 @@ func RegisterSyntaxServiceHandlerClient(ctx context.Context, mux *runtime.ServeM runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SyntaxService_Check_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.proto b/proto/ory/keto/opl/v1alpha1/syntax_service.proto index 6dc97c687..948d0e8f7 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.proto +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.proto @@ -20,7 +20,6 @@ service SyntaxService { body: "content" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - consumes: "text/plain"; tags: "relationship"; operation_id: "checkOplSyntax"; responses: { diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go index e0ab04b3a..63e752299 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/check_service.proto @@ -26,10 +26,7 @@ const ( // The request for a CheckService.Check RPC. // Checks whether a specific subject is related to an object. type CheckRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The namespace to evaluate the check. // // Note: If you use the expand-API and the check @@ -51,7 +48,7 @@ type CheckRequest struct { // // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto. Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` - // Types that are assignable to RestApiSubject: + // Types that are valid to be assigned to RestApiSubject: // // *CheckRequest_SubjectId // *CheckRequest_SubjectSet @@ -99,16 +96,16 @@ type CheckRequest struct { // // If the value is less than 1 or greater than the global // max-depth then the global max-depth will be used instead. - MaxDepth int32 `protobuf:"varint,7,opt,name=max_depth,json=max-depth,proto3" json:"max_depth,omitempty"` + MaxDepth int32 `protobuf:"varint,7,opt,name=max_depth,json=max-depth,proto3" json:"max_depth,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CheckRequest) Reset() { *x = CheckRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckRequest) String() string { @@ -119,7 +116,7 @@ func (*CheckRequest) ProtoMessage() {} func (x *CheckRequest) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -166,25 +163,29 @@ func (x *CheckRequest) GetSubject() *Subject { return nil } -func (m *CheckRequest) GetRestApiSubject() isCheckRequest_RestApiSubject { - if m != nil { - return m.RestApiSubject +func (x *CheckRequest) GetRestApiSubject() isCheckRequest_RestApiSubject { + if x != nil { + return x.RestApiSubject } return nil } // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto. func (x *CheckRequest) GetSubjectId() string { - if x, ok := x.GetRestApiSubject().(*CheckRequest_SubjectId); ok { - return x.SubjectId + if x != nil { + if x, ok := x.RestApiSubject.(*CheckRequest_SubjectId); ok { + return x.SubjectId + } } return "" } // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/check_service.proto. func (x *CheckRequest) GetSubjectSet() *SubjectSetQuery { - if x, ok := x.GetRestApiSubject().(*CheckRequest_SubjectSet); ok { - return x.SubjectSet + if x != nil { + if x, ok := x.RestApiSubject.(*CheckRequest_SubjectSet); ok { + return x.SubjectSet + } } return nil } @@ -242,10 +243,7 @@ func (*CheckRequest_SubjectSet) isCheckRequest_RestApiSubject() {} // The response for a CheckService.Check rpc. type CheckResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Whether the specified subject (id) // is related to the requested object. // @@ -264,16 +262,16 @@ type CheckResponse struct { // for subsequent requests to have minimal latency, // but allow slightly stale responses (only some milliseconds or seconds). // --> - Snaptoken string `protobuf:"bytes,2,opt,name=snaptoken,proto3" json:"snaptoken,omitempty"` + Snaptoken string `protobuf:"bytes,2,opt,name=snaptoken,proto3" json:"snaptoken,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CheckResponse) Reset() { *x = CheckResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CheckResponse) String() string { @@ -284,7 +282,7 @@ func (*CheckResponse) ProtoMessage() {} func (x *CheckResponse) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -472,32 +470,6 @@ func file_ory_keto_relation_tuples_v1alpha2_check_service_proto_init() { return } file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() - if !protoimpl.UnsafeEnabled { - file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*CheckRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*CheckResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_ory_keto_relation_tuples_v1alpha2_check_service_proto_msgTypes[0].OneofWrappers = []any{ (*CheckRequest_SubjectId)(nil), (*CheckRequest_SubjectSet)(nil), diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.gw.go index 4d18815cb..102dc86a9 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.gw.go @@ -10,6 +10,7 @@ package rts import ( "context" + "errors" "io" "net/http" @@ -24,135 +25,126 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - var ( - filter_CheckService_Check_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) -func request_CheckService_Check_0(ctx context.Context, marshaler runtime.Marshaler, client CheckServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CheckRequest - var metadata runtime.ServerMetadata +var filter_CheckService_Check_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_CheckService_Check_0(ctx context.Context, marshaler runtime.Marshaler, client CheckServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq CheckRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CheckService_Check_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Check(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_CheckService_Check_0(ctx context.Context, marshaler runtime.Marshaler, server CheckServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CheckRequest - var metadata runtime.ServerMetadata - + var ( + protoReq CheckRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CheckService_Check_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Check(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_CheckService_Check_1 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_CheckService_Check_1 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_CheckService_Check_1(ctx context.Context, marshaler runtime.Marshaler, client CheckServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CheckRequest - var metadata runtime.ServerMetadata - + var ( + protoReq CheckRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CheckService_Check_1); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Check(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_CheckService_Check_1(ctx context.Context, marshaler runtime.Marshaler, server CheckServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CheckRequest - var metadata runtime.ServerMetadata - + var ( + protoReq CheckRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CheckService_Check_1); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Check(ctx, &protoReq) return msg, metadata, err - } func request_CheckService_Check_2(ctx context.Context, marshaler runtime.Marshaler, client CheckServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CheckRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CheckRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Check(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_CheckService_Check_2(ctx context.Context, marshaler runtime.Marshaler, server CheckServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CheckRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CheckRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Check(ctx, &protoReq) return msg, metadata, err - } func request_CheckService_Check_3(ctx context.Context, marshaler runtime.Marshaler, client CheckServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CheckRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CheckRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Check(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_CheckService_Check_3(ctx context.Context, marshaler runtime.Marshaler, server CheckServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CheckRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + protoReq CheckRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Check(ctx, &protoReq) return msg, metadata, err - } // RegisterCheckServiceHandlerServer registers the http handlers for service CheckService to "mux". @@ -161,16 +153,13 @@ func local_request_CheckService_Check_3(ctx context.Context, marshaler runtime.M // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCheckServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterCheckServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CheckServiceServer) error { - - mux.Handle("GET", pattern_CheckService_Check_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_CheckService_Check_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -182,20 +171,15 @@ func RegisterCheckServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_CheckService_Check_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_CheckService_Check_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_CheckService_Check_1, 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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check/openapi")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check/openapi")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -207,20 +191,15 @@ func RegisterCheckServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_CheckService_Check_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_CheckService_Check_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_CheckService_Check_2, 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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -232,20 +211,15 @@ func RegisterCheckServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_CheckService_Check_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_CheckService_Check_3, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_CheckService_Check_3, 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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check/openapi")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check/openapi")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -257,9 +231,7 @@ func RegisterCheckServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_CheckService_Check_3(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -286,7 +258,6 @@ func RegisterCheckServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.S } }() }() - return RegisterCheckServiceHandler(ctx, mux, conn) } @@ -302,14 +273,11 @@ func RegisterCheckServiceHandler(ctx context.Context, mux *runtime.ServeMux, con // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "CheckServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterCheckServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CheckServiceClient) error { - - mux.Handle("GET", pattern_CheckService_Check_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_CheckService_Check_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -320,18 +288,13 @@ func RegisterCheckServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_CheckService_Check_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("GET", pattern_CheckService_Check_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_CheckService_Check_1, 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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check/openapi")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check/openapi")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -342,18 +305,13 @@ func RegisterCheckServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_CheckService_Check_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_CheckService_Check_2, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_CheckService_Check_2, 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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -364,18 +322,13 @@ func RegisterCheckServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_CheckService_Check_2(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_CheckService_Check_3, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPost, pattern_CheckService_Check_3, 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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check/openapi")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.CheckService/Check", runtime.WithHTTPPathPattern("/relation-tuples/check/openapi")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -386,30 +339,21 @@ func RegisterCheckServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_CheckService_Check_3(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } var ( pattern_CheckService_Check_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"relation-tuples", "check"}, "")) - pattern_CheckService_Check_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"relation-tuples", "check", "openapi"}, "")) - pattern_CheckService_Check_2 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"relation-tuples", "check"}, "")) - pattern_CheckService_Check_3 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"relation-tuples", "check", "openapi"}, "")) ) var ( forward_CheckService_Check_0 = runtime.ForwardResponseMessage - forward_CheckService_Check_1 = runtime.ForwardResponseMessage - forward_CheckService_Check_2 = runtime.ForwardResponseMessage - forward_CheckService_Check_3 = runtime.ForwardResponseMessage ) diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go index eab77d151..7eb4e4e67 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/expand_service.proto @@ -125,10 +125,7 @@ func (NodeType) EnumDescriptor() ([]byte, []int) { // The request for an ExpandService.Expand RPC. // Expands the given subject set. type ExpandRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The subject to expand. Subject *Subject `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` // The maximum depth of tree to build. @@ -168,16 +165,16 @@ type ExpandRequest struct { // The relation between the object and the subjects. // // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/expand_service.proto. - Relation string `protobuf:"bytes,6,opt,name=relation,proto3" json:"relation,omitempty"` + Relation string `protobuf:"bytes,6,opt,name=relation,proto3" json:"relation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExpandRequest) Reset() { *x = ExpandRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExpandRequest) String() string { @@ -188,7 +185,7 @@ func (*ExpandRequest) ProtoMessage() {} func (x *ExpandRequest) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -250,24 +247,21 @@ func (x *ExpandRequest) GetRelation() string { // The response for a ExpandService.Expand RPC. type ExpandResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The tree the requested subject set expands to. // The requested subject set is the subject of the root. // // This field can be nil in some circumstances. - Tree *SubjectTree `protobuf:"bytes,1,opt,name=tree,proto3" json:"tree,omitempty"` + Tree *SubjectTree `protobuf:"bytes,1,opt,name=tree,proto3" json:"tree,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ExpandResponse) Reset() { *x = ExpandResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ExpandResponse) String() string { @@ -278,7 +272,7 @@ func (*ExpandResponse) ProtoMessage() {} func (x *ExpandResponse) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -301,10 +295,7 @@ func (x *ExpandResponse) GetTree() *SubjectTree { } type SubjectTree struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The type of the node. NodeType NodeType `protobuf:"varint,1,opt,name=node_type,json=type,proto3,enum=ory.keto.relation_tuples.v1alpha2.NodeType" json:"node_type,omitempty"` // The subject this node represents. @@ -317,16 +308,16 @@ type SubjectTree struct { // The children of this node. // // This is never set if `node_type` == `NODE_TYPE_LEAF`. - Children []*SubjectTree `protobuf:"bytes,3,rep,name=children,proto3" json:"children,omitempty"` + Children []*SubjectTree `protobuf:"bytes,3,rep,name=children,proto3" json:"children,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SubjectTree) Reset() { *x = SubjectTree{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubjectTree) String() string { @@ -337,7 +328,7 @@ func (*SubjectTree) ProtoMessage() {} func (x *SubjectTree) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -402,7 +393,7 @@ var file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDesc = []byte 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, 0xa3, 0x02, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x22, 0xa0, 0x02, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x58, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, @@ -413,111 +404,111 @@ var file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_rawDesc = []byte 0x09, 0x6d, 0x61, 0x78, 0x2d, 0x64, 0x65, 0x70, 0x74, 0x68, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, - 0x52, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x24, 0x0a, 0x09, + 0x52, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x06, 0xe2, 0x41, 0x01, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x06, 0xe2, 0x41, 0x01, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x22, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe2, 0x41, 0x01, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x54, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x72, 0x65, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, - 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x52, 0x04, 0x74, 0x72, 0x65, 0x65, 0x22, 0xb7, 0x02, 0x0a, - 0x0b, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x12, 0x4a, 0x0a, 0x09, - 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x2b, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x32, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x04, 0xe2, 0x41, - 0x01, 0x02, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, - 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x46, 0x0a, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x52, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x4a, 0x0a, 0x08, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, + 0x05, 0xe0, 0x41, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x1d, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x05, 0xe0, 0x41, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x12, 0x21, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x05, 0xe0, 0x41, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x54, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x72, 0x65, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, + 0x72, 0x65, 0x65, 0x52, 0x04, 0x74, 0x72, 0x65, 0x65, 0x22, 0xb6, 0x02, 0x0a, 0x0b, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x12, 0x49, 0x0a, 0x09, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, - 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x52, 0x08, 0x63, 0x68, - 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x2a, 0x86, 0x04, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x10, 0x00, 0x12, 0x2d, 0x0a, 0x15, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, + 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x46, + 0x0a, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, + 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, + 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x4a, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, + 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, + 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, + 0x65, 0x6e, 0x2a, 0x86, 0x04, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x0f, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0x00, + 0x12, 0x2d, 0x0a, 0x15, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, + 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, + 0x09, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x27, 0x0a, 0x0f, 0x4e, 0x4f, + 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, - 0x47, 0x45, 0x52, 0x12, 0x09, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x27, - 0x0a, 0x0f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x49, 0x4f, - 0x4e, 0x10, 0x01, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, - 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x0d, 0x0a, 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, - 0x73, 0x69, 0x6f, 0x6e, 0x10, 0x02, 0x12, 0x2b, 0x0a, 0x13, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x1a, + 0x47, 0x45, 0x52, 0x12, 0x0d, 0x0a, 0x09, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, + 0x10, 0x02, 0x12, 0x2b, 0x0a, 0x13, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x45, 0x58, 0x43, 0x4c, 0x55, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, + 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, + 0x10, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, + 0x03, 0x12, 0x2e, 0x0a, 0x16, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, + 0x4e, 0x54, 0x45, 0x52, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x1a, 0x12, 0xfa, + 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, + 0x52, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x65, 0x61, 0x66, 0x10, 0x04, 0x12, 0x26, 0x0a, 0x0e, 0x4e, + 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x45, 0x41, 0x46, 0x10, 0x04, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, - 0x47, 0x45, 0x52, 0x12, 0x10, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x10, 0x03, 0x12, 0x2e, 0x0a, 0x16, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, - 0x03, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, - 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x08, 0x0a, 0x04, 0x6c, 0x65, 0x61, 0x66, 0x10, 0x04, 0x12, - 0x26, 0x0a, 0x0e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4c, 0x45, 0x41, - 0x46, 0x10, 0x04, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, - 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x18, 0x0a, 0x14, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x10, - 0x05, 0x12, 0x36, 0x0a, 0x1e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, - 0x55, 0x50, 0x4c, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, - 0x53, 0x45, 0x54, 0x10, 0x05, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, - 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x18, 0x0a, 0x14, 0x63, 0x6f, 0x6d, - 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, - 0x74, 0x10, 0x06, 0x12, 0x36, 0x0a, 0x1e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, - 0x54, 0x5f, 0x53, 0x45, 0x54, 0x10, 0x06, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, - 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x07, 0x0a, 0x03, 0x6e, - 0x6f, 0x74, 0x10, 0x07, 0x12, 0x25, 0x0a, 0x0d, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x10, 0x07, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, - 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x1a, 0x02, 0x10, 0x01, 0x32, - 0xa7, 0x03, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x95, 0x03, 0x0a, 0x06, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x30, 0x2e, 0x6f, - 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, - 0x2e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, - 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x32, 0x2e, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xa5, 0x02, 0x92, 0x41, 0xfc, 0x01, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x11, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x50, 0x65, 0x72, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0x21, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, 0x72, 0x6d, 0x2d, - 0x75, 0x72, 0x6c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x4a, 0xb7, 0x01, 0x0a, 0x03, 0x32, - 0x30, 0x30, 0x12, 0xaf, 0x01, 0x0a, 0x79, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2c, 0x20, 0x69, 0x6e, 0x20, - 0x63, 0x61, 0x73, 0x65, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x65, 0x64, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x60, 0x2f, 0x6f, 0x70, - 0x65, 0x6e, 0x61, 0x70, 0x69, 0x60, 0x20, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x63, 0x6f, 0x64, - 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x32, 0x30, 0x30, 0x2e, - 0x12, 0x32, 0x0a, 0x30, 0x1a, 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x54, 0x72, 0x65, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x62, 0x04, 0x74, 0x72, 0x65, 0x65, - 0x12, 0x17, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x42, 0xc3, 0x01, 0x0a, 0x24, 0x73, 0x68, - 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x32, 0x42, 0x12, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, - 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, - 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x47, 0x45, 0x52, 0x12, 0x18, 0x0a, 0x14, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x5f, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x05, 0x12, 0x36, 0x0a, + 0x1e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x55, 0x50, 0x4c, 0x45, + 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x53, 0x45, 0x54, 0x10, + 0x05, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, + 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x18, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x10, 0x06, 0x12, + 0x36, 0x0a, 0x1e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x4d, + 0x50, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x53, 0x45, + 0x54, 0x10, 0x06, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, + 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x07, 0x0a, 0x03, 0x6e, 0x6f, 0x74, 0x10, 0x07, + 0x12, 0x25, 0x0a, 0x0d, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x4f, + 0x54, 0x10, 0x07, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, + 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x1a, 0x02, 0x10, 0x01, 0x32, 0xa7, 0x03, 0x0a, 0x0d, + 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x95, 0x03, + 0x0a, 0x06, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x12, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, + 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, 0x78, 0x70, + 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, + 0x78, 0x70, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa5, 0x02, + 0x92, 0x41, 0xfc, 0x01, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x2a, 0x11, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x32, 0x21, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x75, 0x72, 0x6c, 0x65, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x4a, 0xb7, 0x01, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0xaf, + 0x01, 0x0a, 0x79, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x63, 0x61, 0x73, 0x65, + 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x2e, 0x20, + 0x46, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x60, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x60, 0x20, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x73, + 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x32, 0x30, 0x30, 0x2e, 0x12, 0x32, 0x0a, 0x30, + 0x1a, 0x2e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x62, 0x04, 0x74, 0x72, 0x65, 0x65, 0x12, 0x17, 0x2f, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x65, + 0x78, 0x70, 0x61, 0x6e, 0x64, 0x42, 0xc3, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x12, + 0x45, 0x78, 0x70, 0x61, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, + 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, + 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -564,44 +555,6 @@ func file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_init() { return } file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() - if !protoimpl.UnsafeEnabled { - file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ExpandRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ExpandResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_expand_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*SubjectTree); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.gw.go index 75c156920..c7dd1b2d8 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service.pb.gw.go @@ -10,6 +10,7 @@ package rts import ( "context" + "errors" "io" "net/http" @@ -24,47 +25,46 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - var ( - filter_ExpandService_Expand_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) -func request_ExpandService_Expand_0(ctx context.Context, marshaler runtime.Marshaler, client ExpandServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ExpandRequest - var metadata runtime.ServerMetadata +var filter_ExpandService_Expand_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_ExpandService_Expand_0(ctx context.Context, marshaler runtime.Marshaler, client ExpandServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq ExpandRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ExpandService_Expand_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.Expand(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ExpandService_Expand_0(ctx context.Context, marshaler runtime.Marshaler, server ExpandServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ExpandRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ExpandRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ExpandService_Expand_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.Expand(ctx, &protoReq) return msg, metadata, err - } // RegisterExpandServiceHandlerServer registers the http handlers for service ExpandService to "mux". @@ -73,16 +73,13 @@ func local_request_ExpandService_Expand_0(ctx context.Context, marshaler runtime // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterExpandServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterExpandServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExpandServiceServer) error { - - mux.Handle("GET", pattern_ExpandService_Expand_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_ExpandService_Expand_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand", runtime.WithHTTPPathPattern("/relation-tuples/expand")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand", runtime.WithHTTPPathPattern("/relation-tuples/expand")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -94,9 +91,7 @@ func RegisterExpandServiceHandlerServer(ctx context.Context, mux *runtime.ServeM runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ExpandService_Expand_0(annotatedContext, mux, outboundMarshaler, w, req, response_ExpandService_Expand_0{resp.(*ExpandResponse)}, mux.GetForwardResponseOptions()...) - }) return nil @@ -123,7 +118,6 @@ func RegisterExpandServiceHandlerFromEndpoint(ctx context.Context, mux *runtime. } }() }() - return RegisterExpandServiceHandler(ctx, mux, conn) } @@ -139,14 +133,11 @@ func RegisterExpandServiceHandler(ctx context.Context, mux *runtime.ServeMux, co // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ExpandServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterExpandServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExpandServiceClient) error { - - mux.Handle("GET", pattern_ExpandService_Expand_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_ExpandService_Expand_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand", runtime.WithHTTPPathPattern("/relation-tuples/expand")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.ExpandService/Expand", runtime.WithHTTPPathPattern("/relation-tuples/expand")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -157,11 +148,8 @@ func RegisterExpandServiceHandlerClient(ctx context.Context, mux *runtime.ServeM runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ExpandService_Expand_0(annotatedContext, mux, outboundMarshaler, w, req, response_ExpandService_Expand_0{resp.(*ExpandResponse)}, mux.GetForwardResponseOptions()...) - }) - return nil } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go index 5e070f5b2..e633b4af4 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/namespaces_service.proto @@ -24,18 +24,16 @@ const ( // Request for ReadService.ListNamespaces RPC. type ListNamespacesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListNamespacesRequest) Reset() { *x = ListNamespacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNamespacesRequest) String() string { @@ -46,7 +44,7 @@ func (*ListNamespacesRequest) ProtoMessage() {} func (x *ListNamespacesRequest) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -62,20 +60,17 @@ func (*ListNamespacesRequest) Descriptor() ([]byte, []int) { } type ListNamespacesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Namespaces []*Namespace `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces,omitempty"` unknownFields protoimpl.UnknownFields - - Namespaces []*Namespace `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ListNamespacesResponse) Reset() { *x = ListNamespacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListNamespacesResponse) String() string { @@ -86,7 +81,7 @@ func (*ListNamespacesResponse) ProtoMessage() {} func (x *ListNamespacesResponse) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -109,20 +104,17 @@ func (x *ListNamespacesResponse) GetNamespaces() []*Namespace { } type Namespace struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + sizeCache protoimpl.SizeCache } func (x *Namespace) Reset() { *x = Namespace{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Namespace) String() string { @@ -133,7 +125,7 @@ func (*Namespace) ProtoMessage() {} func (x *Namespace) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -255,44 +247,6 @@ func file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_init() { if File_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListNamespacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListNamespacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_namespaces_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Namespace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.gw.go index 5d48cb06e..cca22f981 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service.pb.gw.go @@ -10,6 +10,7 @@ package rts import ( "context" + "errors" "io" "net/http" @@ -24,29 +25,32 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_NamespacesService_ListNamespaces_0(ctx context.Context, marshaler runtime.Marshaler, client NamespacesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListNamespacesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListNamespacesRequest + metadata runtime.ServerMetadata + ) msg, err := client.ListNamespaces(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NamespacesService_ListNamespaces_0(ctx context.Context, marshaler runtime.Marshaler, server NamespacesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListNamespacesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListNamespacesRequest + metadata runtime.ServerMetadata + ) msg, err := server.ListNamespaces(ctx, &protoReq) return msg, metadata, err - } // RegisterNamespacesServiceHandlerServer registers the http handlers for service NamespacesService to "mux". @@ -55,16 +59,13 @@ func local_request_NamespacesService_ListNamespaces_0(ctx context.Context, marsh // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNamespacesServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterNamespacesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NamespacesServiceServer) error { - - mux.Handle("GET", pattern_NamespacesService_ListNamespaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NamespacesService_ListNamespaces_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.NamespacesService/ListNamespaces", runtime.WithHTTPPathPattern("/namespaces")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.NamespacesService/ListNamespaces", runtime.WithHTTPPathPattern("/namespaces")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -76,9 +77,7 @@ func RegisterNamespacesServiceHandlerServer(ctx context.Context, mux *runtime.Se runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NamespacesService_ListNamespaces_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -105,7 +104,6 @@ func RegisterNamespacesServiceHandlerFromEndpoint(ctx context.Context, mux *runt } }() }() - return RegisterNamespacesServiceHandler(ctx, mux, conn) } @@ -121,14 +119,11 @@ func RegisterNamespacesServiceHandler(ctx context.Context, mux *runtime.ServeMux // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "NamespacesServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterNamespacesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NamespacesServiceClient) error { - - mux.Handle("GET", pattern_NamespacesService_ListNamespaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_NamespacesService_ListNamespaces_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.NamespacesService/ListNamespaces", runtime.WithHTTPPathPattern("/namespaces")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.NamespacesService/ListNamespaces", runtime.WithHTTPPathPattern("/namespaces")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -139,11 +134,8 @@ func RegisterNamespacesServiceHandlerClient(ctx context.Context, mux *runtime.Se runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NamespacesService_ListNamespaces_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go index ee4a51c2b..cc122aab6 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/openapi.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/openapi.proto @@ -26,20 +26,17 @@ const ( // // The standard Ory JSON API error format. type ErrorResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + Error *ErrorResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` unknownFields protoimpl.UnknownFields - - Error *ErrorResponse_Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` + sizeCache protoimpl.SizeCache } func (x *ErrorResponse) Reset() { *x = ErrorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorResponse) String() string { @@ -50,7 +47,7 @@ func (*ErrorResponse) ProtoMessage() {} func (x *ErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -73,10 +70,7 @@ func (x *ErrorResponse) GetError() *ErrorResponse_Error { } type ErrorResponse_Error struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The status code Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // Debug information @@ -86,7 +80,7 @@ type ErrorResponse_Error struct { // Further error details // // Further details about the error. - Details map[string]string `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Details map[string]string `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // The error ID // // The error ID is useful when trying to identify various errors in application logic. @@ -107,16 +101,16 @@ type ErrorResponse_Error struct { // The status description // // Status holds the human-readable HTTP status code. - Status string `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"` + Status string `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ErrorResponse_Error) Reset() { *x = ErrorResponse_Error{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ErrorResponse_Error) String() string { @@ -127,7 +121,7 @@ func (*ErrorResponse_Error) ProtoMessage() {} func (x *ErrorResponse_Error) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -211,79 +205,79 @@ var file_ory_keto_relation_tuples_v1alpha2_openapi_proto_rawDesc = []byte{ 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, 0xa6, 0x04, 0x0a, 0x0d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa4, 0x04, 0x0a, 0x0d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x04, - 0xe2, 0x41, 0x01, 0x02, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0xc0, 0x03, 0x0a, 0x05, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x42, 0x08, 0x92, 0x41, 0x05, 0x4a, 0x03, 0x34, 0x30, 0x34, 0x52, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x12, 0x5d, 0x0a, 0x07, 0x64, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4f, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0x92, 0x41, 0x2e, 0x4a, 0x2c, - 0x22, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6e, 0x6f, - 0x74, 0x20, 0x62, 0x65, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x22, 0xe2, 0x41, 0x01, 0x02, - 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, - 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, - 0x6e, 0x12, 0x45, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x2b, 0x92, 0x41, 0x28, 0x4a, 0x26, 0x22, 0x64, 0x37, 0x65, 0x66, 0x35, 0x34, - 0x62, 0x31, 0x2d, 0x65, 0x63, 0x31, 0x35, 0x2d, 0x34, 0x36, 0x65, 0x36, 0x2d, 0x62, 0x63, 0x63, - 0x62, 0x2d, 0x35, 0x32, 0x34, 0x62, 0x38, 0x32, 0x63, 0x30, 0x33, 0x35, 0x65, 0x36, 0x22, 0x52, - 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0x92, 0x41, 0x0d, 0x4a, 0x0b, 0x22, - 0x4e, 0x6f, 0x74, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xd1, - 0x04, 0x92, 0x41, 0x90, 0x03, 0x12, 0x95, 0x02, 0x0a, 0x08, 0x4f, 0x52, 0x59, 0x20, 0x4b, 0x65, - 0x74, 0x6f, 0x12, 0x9b, 0x01, 0x4f, 0x72, 0x79, 0x20, 0x4b, 0x65, 0x74, 0x6f, 0x20, 0x69, 0x73, - 0x20, 0x61, 0x20, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x20, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x69, 0x6e, 0x67, 0x20, - 0x62, 0x65, 0x73, 0x74, 0x2d, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x20, 0x70, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x20, 0x28, 0x52, 0x42, 0x41, 0x43, 0x2c, 0x20, 0x41, 0x42, - 0x41, 0x43, 0x2c, 0x20, 0x41, 0x43, 0x4c, 0x2c, 0x20, 0x41, 0x57, 0x53, 0x20, 0x49, 0x41, 0x4d, - 0x20, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2c, 0x20, 0x4b, 0x75, 0x62, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x65, 0x73, 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, - 0x29, 0x20, 0x76, 0x69, 0x61, 0x20, 0x52, 0x45, 0x53, 0x54, 0x20, 0x41, 0x50, 0x49, 0x73, 0x2e, - 0x22, 0x24, 0x0a, 0x03, 0x4f, 0x52, 0x59, 0x12, 0x12, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, - 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x73, 0x68, 0x1a, 0x09, 0x68, 0x69, 0x40, - 0x6f, 0x72, 0x79, 0x2e, 0x73, 0x68, 0x2a, 0x3d, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, - 0x20, 0x32, 0x2e, 0x30, 0x12, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, - 0x6f, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, - 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x06, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x22, 0x01, 0x2f, - 0x2a, 0x02, 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, 0x52, 0x4b, 0x0a, 0x03, 0x34, 0x30, 0x30, 0x12, - 0x44, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x12, - 0x34, 0x0a, 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x0c, 0x4f, 0x70, 0x65, - 0x6e, 0x61, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, - 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, - 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0xbf, 0x03, 0x0a, 0x05, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x42, 0x08, 0x92, 0x41, 0x05, 0x4a, 0x03, 0x34, 0x30, 0x34, 0x52, 0x04, 0x63, 0x6f, + 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x12, 0x5d, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x6f, 0x72, 0x79, 0x2e, + 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4e, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x34, 0x92, 0x41, 0x2e, 0x4a, 0x2c, 0x22, + 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6e, 0x6f, 0x74, + 0x20, 0x62, 0x65, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x22, 0xe0, 0x41, 0x02, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, + 0x45, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2b, 0x92, 0x41, 0x28, 0x4a, 0x26, 0x22, 0x64, 0x37, 0x65, 0x66, 0x35, 0x34, 0x62, 0x31, + 0x2d, 0x65, 0x63, 0x31, 0x35, 0x2d, 0x34, 0x36, 0x65, 0x36, 0x2d, 0x62, 0x63, 0x63, 0x62, 0x2d, + 0x35, 0x32, 0x34, 0x62, 0x38, 0x32, 0x63, 0x30, 0x33, 0x35, 0x65, 0x36, 0x22, 0x52, 0x07, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x10, 0x92, 0x41, 0x0d, 0x4a, 0x0b, 0x22, 0x4e, 0x6f, + 0x74, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x1a, 0x3a, 0x0a, 0x0c, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0xd1, 0x04, 0x92, + 0x41, 0x90, 0x03, 0x12, 0x95, 0x02, 0x0a, 0x08, 0x4f, 0x52, 0x59, 0x20, 0x4b, 0x65, 0x74, 0x6f, + 0x12, 0x9b, 0x01, 0x4f, 0x72, 0x79, 0x20, 0x4b, 0x65, 0x74, 0x6f, 0x20, 0x69, 0x73, 0x20, 0x61, + 0x20, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x20, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x62, 0x65, + 0x73, 0x74, 0x2d, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x20, 0x70, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x73, 0x20, 0x28, 0x52, 0x42, 0x41, 0x43, 0x2c, 0x20, 0x41, 0x42, 0x41, 0x43, + 0x2c, 0x20, 0x41, 0x43, 0x4c, 0x2c, 0x20, 0x41, 0x57, 0x53, 0x20, 0x49, 0x41, 0x4d, 0x20, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2c, 0x20, 0x4b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x65, 0x73, 0x20, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x2c, 0x20, 0x2e, 0x2e, 0x2e, 0x29, 0x20, + 0x76, 0x69, 0x61, 0x20, 0x52, 0x45, 0x53, 0x54, 0x20, 0x41, 0x50, 0x49, 0x73, 0x2e, 0x22, 0x24, + 0x0a, 0x03, 0x4f, 0x52, 0x59, 0x12, 0x12, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, + 0x77, 0x77, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x73, 0x68, 0x1a, 0x09, 0x68, 0x69, 0x40, 0x6f, 0x72, + 0x79, 0x2e, 0x73, 0x68, 0x2a, 0x3d, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x32, + 0x2e, 0x30, 0x12, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, + 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, + 0x4e, 0x53, 0x45, 0x32, 0x06, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x22, 0x01, 0x2f, 0x2a, 0x02, + 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, 0x52, 0x4b, 0x0a, 0x03, 0x34, 0x30, 0x30, 0x12, 0x44, 0x0a, + 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x12, 0x34, 0x0a, + 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x0c, 0x4f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, + 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, + 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -319,32 +313,6 @@ func file_ory_keto_relation_tuples_v1alpha2_openapi_proto_init() { if File_ory_keto_relation_tuples_v1alpha2_openapi_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ErrorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_openapi_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ErrorResponse_Error); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go index a421e9fc0..bd95dba89 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/read_service.proto @@ -27,10 +27,7 @@ const ( // Request for ReadService.ListRelationTuples RPC. // See `ListRelationTuplesRequest_Query` for how to filter the query. type ListRelationTuplesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // All query constraints are concatenated // with a logical AND operator. // @@ -81,20 +78,20 @@ type ListRelationTuplesRequest struct { // // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/read_service.proto. Relation string `protobuf:"bytes,9,opt,name=relation,proto3" json:"relation,omitempty"` - // Types that are assignable to RestApiSubject: + // Types that are valid to be assigned to RestApiSubject: // // *ListRelationTuplesRequest_SubjectId // *ListRelationTuplesRequest_SubjectSet RestApiSubject isListRelationTuplesRequest_RestApiSubject `protobuf_oneof:"rest_api_subject"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListRelationTuplesRequest) Reset() { *x = ListRelationTuplesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRelationTuplesRequest) String() string { @@ -105,7 +102,7 @@ func (*ListRelationTuplesRequest) ProtoMessage() {} func (x *ListRelationTuplesRequest) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -187,23 +184,27 @@ func (x *ListRelationTuplesRequest) GetRelation() string { return "" } -func (m *ListRelationTuplesRequest) GetRestApiSubject() isListRelationTuplesRequest_RestApiSubject { - if m != nil { - return m.RestApiSubject +func (x *ListRelationTuplesRequest) GetRestApiSubject() isListRelationTuplesRequest_RestApiSubject { + if x != nil { + return x.RestApiSubject } return nil } func (x *ListRelationTuplesRequest) GetSubjectId() string { - if x, ok := x.GetRestApiSubject().(*ListRelationTuplesRequest_SubjectId); ok { - return x.SubjectId + if x != nil { + if x, ok := x.RestApiSubject.(*ListRelationTuplesRequest_SubjectId); ok { + return x.SubjectId + } } return "" } func (x *ListRelationTuplesRequest) GetSubjectSet() *SubjectSetQuery { - if x, ok := x.GetRestApiSubject().(*ListRelationTuplesRequest_SubjectSet); ok { - return x.SubjectSet + if x != nil { + if x, ok := x.RestApiSubject.(*ListRelationTuplesRequest_SubjectSet); ok { + return x.SubjectSet + } } return nil } @@ -229,24 +230,21 @@ func (*ListRelationTuplesRequest_SubjectSet) isListRelationTuplesRequest_RestApi // The response of a ReadService.ListRelationTuples RPC. type ListRelationTuplesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The relationships matching the list request. RelationTuples []*RelationTuple `protobuf:"bytes,1,rep,name=relation_tuples,proto3" json:"relation_tuples,omitempty"` // The token required to get the next page. // If this is the last page, the token will be the empty string. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,proto3" json:"next_page_token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListRelationTuplesResponse) Reset() { *x = ListRelationTuplesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRelationTuplesResponse) String() string { @@ -257,7 +255,7 @@ func (*ListRelationTuplesResponse) ProtoMessage() {} func (x *ListRelationTuplesResponse) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -297,10 +295,7 @@ func (x *ListRelationTuplesResponse) GetNextPageToken() string { // - subject & relation: display all groups a subject belongs to; display all objects a subject has access to // - object & relation & subject: check whether the relation tuple already exists type ListRelationTuplesRequest_Query struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Required. The namespace to query. Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // Optional. The object to query for. @@ -308,16 +303,16 @@ type ListRelationTuplesRequest_Query struct { // Optional. The relation to query for. Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` // Optional. The subject to query for. - Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` + Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *ListRelationTuplesRequest_Query) Reset() { *x = ListRelationTuplesRequest_Query{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListRelationTuplesRequest_Query) String() string { @@ -328,7 +323,7 @@ func (*ListRelationTuplesRequest_Query) ProtoMessage() {} func (x *ListRelationTuplesRequest_Query) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -538,44 +533,6 @@ func file_ory_keto_relation_tuples_v1alpha2_read_service_proto_init() { return } file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() - if !protoimpl.UnsafeEnabled { - file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ListRelationTuplesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ListRelationTuplesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListRelationTuplesRequest_Query); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_ory_keto_relation_tuples_v1alpha2_read_service_proto_msgTypes[0].OneofWrappers = []any{ (*ListRelationTuplesRequest_SubjectId)(nil), (*ListRelationTuplesRequest_SubjectSet)(nil), diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.gw.go index 694155369..cac983215 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.gw.go @@ -10,6 +10,7 @@ package rts import ( "context" + "errors" "io" "net/http" @@ -24,47 +25,46 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - var ( - filter_ReadService_ListRelationTuples_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) -func request_ReadService_ListRelationTuples_0(ctx context.Context, marshaler runtime.Marshaler, client ReadServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListRelationTuplesRequest - var metadata runtime.ServerMetadata +var filter_ReadService_ListRelationTuples_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_ReadService_ListRelationTuples_0(ctx context.Context, marshaler runtime.Marshaler, client ReadServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq ListRelationTuplesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ReadService_ListRelationTuples_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ListRelationTuples(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ReadService_ListRelationTuples_0(ctx context.Context, marshaler runtime.Marshaler, server ReadServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListRelationTuplesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListRelationTuplesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ReadService_ListRelationTuples_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ListRelationTuples(ctx, &protoReq) return msg, metadata, err - } // RegisterReadServiceHandlerServer registers the http handlers for service ReadService to "mux". @@ -73,16 +73,13 @@ func local_request_ReadService_ListRelationTuples_0(ctx context.Context, marshal // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterReadServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterReadServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ReadServiceServer) error { - - mux.Handle("GET", pattern_ReadService_ListRelationTuples_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_ReadService_ListRelationTuples_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples", runtime.WithHTTPPathPattern("/relation-tuples")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples", runtime.WithHTTPPathPattern("/relation-tuples")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -94,9 +91,7 @@ func RegisterReadServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ReadService_ListRelationTuples_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -123,7 +118,6 @@ func RegisterReadServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.Se } }() }() - return RegisterReadServiceHandler(ctx, mux, conn) } @@ -139,14 +133,11 @@ func RegisterReadServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ReadServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterReadServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ReadServiceClient) error { - - mux.Handle("GET", pattern_ReadService_ListRelationTuples_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_ReadService_ListRelationTuples_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples", runtime.WithHTTPPathPattern("/relation-tuples")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.ReadService/ListRelationTuples", runtime.WithHTTPPathPattern("/relation-tuples")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -157,11 +148,8 @@ func RegisterReadServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ReadService_ListRelationTuples_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go index 1fc05aaee..f2a0d7b9e 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/relation_tuples.proto @@ -24,10 +24,7 @@ const ( // RelationTuple defines a relation between an Object and a Subject. type RelationTuple struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The namespace this relation tuple lives in. Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // The object related by this tuple. @@ -39,20 +36,20 @@ type RelationTuple struct { // A Subject either represents a concrete subject id or // a `SubjectSet` that expands to more Subjects. Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` - // Types that are assignable to RestApiSubject: + // Types that are valid to be assigned to RestApiSubject: // // *RelationTuple_SubjectId // *RelationTuple_SubjectSet RestApiSubject isRelationTuple_RestApiSubject `protobuf_oneof:"rest_api_subject"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RelationTuple) Reset() { *x = RelationTuple{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelationTuple) String() string { @@ -63,7 +60,7 @@ func (*RelationTuple) ProtoMessage() {} func (x *RelationTuple) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106,25 +103,29 @@ func (x *RelationTuple) GetSubject() *Subject { return nil } -func (m *RelationTuple) GetRestApiSubject() isRelationTuple_RestApiSubject { - if m != nil { - return m.RestApiSubject +func (x *RelationTuple) GetRestApiSubject() isRelationTuple_RestApiSubject { + if x != nil { + return x.RestApiSubject } return nil } // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/relation_tuples.proto. func (x *RelationTuple) GetSubjectId() string { - if x, ok := x.GetRestApiSubject().(*RelationTuple_SubjectId); ok { - return x.SubjectId + if x != nil { + if x, ok := x.RestApiSubject.(*RelationTuple_SubjectId); ok { + return x.SubjectId + } } return "" } // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/relation_tuples.proto. func (x *RelationTuple) GetSubjectSet() *SubjectSet { - if x, ok := x.GetRestApiSubject().(*RelationTuple_SubjectSet); ok { - return x.SubjectSet + if x != nil { + if x, ok := x.RestApiSubject.(*RelationTuple_SubjectSet); ok { + return x.SubjectSet + } } return nil } @@ -163,10 +164,7 @@ func (*RelationTuple_SubjectSet) isRelationTuple_RestApiSubject() {} // - subject & relation: display all groups a subject belongs to; display all objects a subject has access to // - object & relation & subject: check whether the relation tuple already exists type RelationQuery struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The namespace this relation tuple lives in. Namespace *string `protobuf:"bytes,1,opt,name=namespace,proto3,oneof" json:"namespace,omitempty"` // The object related by this tuple. @@ -177,16 +175,16 @@ type RelationQuery struct { // The subject related by this tuple. // A Subject either represents a concrete subject id or // a `SubjectSet` that expands to more Subjects. - Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3,oneof" json:"subject,omitempty"` + Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3,oneof" json:"subject,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RelationQuery) Reset() { *x = RelationQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelationQuery) String() string { @@ -197,7 +195,7 @@ func (*RelationQuery) ProtoMessage() {} func (x *RelationQuery) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -243,26 +241,23 @@ func (x *RelationQuery) GetSubject() *Subject { // Subject is either a concrete subject id or // a `SubjectSet` expanding to more Subjects. type Subject struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The reference of this abstract subject. // - // Types that are assignable to Ref: + // Types that are valid to be assigned to Ref: // // *Subject_Id // *Subject_Set - Ref isSubject_Ref `protobuf_oneof:"ref"` + Ref isSubject_Ref `protobuf_oneof:"ref"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *Subject) Reset() { *x = Subject{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Subject) String() string { @@ -273,7 +268,7 @@ func (*Subject) ProtoMessage() {} func (x *Subject) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -288,23 +283,27 @@ func (*Subject) Descriptor() ([]byte, []int) { return file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescGZIP(), []int{2} } -func (m *Subject) GetRef() isSubject_Ref { - if m != nil { - return m.Ref +func (x *Subject) GetRef() isSubject_Ref { + if x != nil { + return x.Ref } return nil } func (x *Subject) GetId() string { - if x, ok := x.GetRef().(*Subject_Id); ok { - return x.Id + if x != nil { + if x, ok := x.Ref.(*Subject_Id); ok { + return x.Id + } } return "" } func (x *Subject) GetSet() *SubjectSet { - if x, ok := x.GetRef().(*Subject_Set); ok { - return x.Set + if x != nil { + if x, ok := x.Ref.(*Subject_Set); ok { + return x.Set + } } return nil } @@ -331,26 +330,23 @@ func (*Subject_Set) isSubject_Ref() {} // SubjectSet refers to all subjects who have // the same `relation` on an `object`. type SubjectSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The namespace of the object and relation // referenced in this subject set. Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // The object related by this subject set. Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"` // The relation between the object and the subjects. - Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` + Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SubjectSet) Reset() { *x = SubjectSet{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubjectSet) String() string { @@ -361,7 +357,7 @@ func (*SubjectSet) ProtoMessage() {} func (x *SubjectSet) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -400,26 +396,23 @@ func (x *SubjectSet) GetRelation() string { // SubjectQuery is either a concrete subject id or // a `SubjectSet` expanding to more Subjects. type SubjectQuery struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The reference of this abstract subject. // - // Types that are assignable to Ref: + // Types that are valid to be assigned to Ref: // // *SubjectQuery_Id // *SubjectQuery_Set - Ref isSubjectQuery_Ref `protobuf_oneof:"ref"` + Ref isSubjectQuery_Ref `protobuf_oneof:"ref"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SubjectQuery) Reset() { *x = SubjectQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubjectQuery) String() string { @@ -430,7 +423,7 @@ func (*SubjectQuery) ProtoMessage() {} func (x *SubjectQuery) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -445,23 +438,27 @@ func (*SubjectQuery) Descriptor() ([]byte, []int) { return file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDescGZIP(), []int{4} } -func (m *SubjectQuery) GetRef() isSubjectQuery_Ref { - if m != nil { - return m.Ref +func (x *SubjectQuery) GetRef() isSubjectQuery_Ref { + if x != nil { + return x.Ref } return nil } func (x *SubjectQuery) GetId() string { - if x, ok := x.GetRef().(*SubjectQuery_Id); ok { - return x.Id + if x != nil { + if x, ok := x.Ref.(*SubjectQuery_Id); ok { + return x.Id + } } return "" } func (x *SubjectQuery) GetSet() *SubjectSetQuery { - if x, ok := x.GetRef().(*SubjectQuery_Set); ok { - return x.Set + if x != nil { + if x, ok := x.Ref.(*SubjectQuery_Set); ok { + return x.Set + } } return nil } @@ -488,26 +485,23 @@ func (*SubjectQuery_Set) isSubjectQuery_Ref() {} // SubjectSetQuery refers to all subjects who have // the same `relation` on an `object`. type SubjectSetQuery struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The namespace of the object and relation // referenced in this subject set. Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // The object related by this subject set. Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"` // The relation between the object and the subjects. - Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` + Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *SubjectSetQuery) Reset() { *x = SubjectSetQuery{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SubjectSetQuery) String() string { @@ -518,7 +512,7 @@ func (*SubjectSetQuery) ProtoMessage() {} func (x *SubjectSetQuery) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -566,85 +560,85 @@ var file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_rawDesc = []byt 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xde, 0x02, 0x0a, 0x0d, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x09, + 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x02, 0x0a, 0x0d, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x1c, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x20, - 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x58, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x12, 0xfa, - 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, - 0x52, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x0a, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, - 0x18, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, - 0x12, 0x55, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, - 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x53, 0x65, 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x5f, - 0x61, 0x70, 0x69, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xed, 0x01, 0x0a, 0x0d, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x21, 0x0a, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1f, 0x0a, 0x08, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, + 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, + 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x07, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, + 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x55, 0x0a, + 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, + 0x74, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x73, 0x65, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, 0x69, + 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xed, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x21, 0x0a, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, + 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x08, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x49, 0x0a, 0x07, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, + 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x03, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, + 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, + 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x65, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x41, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, + 0x74, 0x48, 0x00, 0x52, 0x03, 0x73, 0x65, 0x74, 0x42, 0x05, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x22, + 0x6d, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, - 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x02, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x49, - 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x03, 0x52, 0x07, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x0a, 0x0a, 0x08, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x65, 0x0a, 0x07, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x41, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, - 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x03, 0x73, 0x65, 0x74, 0x42, 0x05, 0x0a, 0x03, 0x72, - 0x65, 0x66, 0x22, 0x70, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, - 0x12, 0x22, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x20, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6f, 0x0a, 0x0c, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x46, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, - 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x00, 0x52, 0x03, 0x73, 0x65, 0x74, 0x42, 0x05, - 0x0a, 0x03, 0x72, 0x65, 0x66, 0x22, 0x75, 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x53, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x22, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, - 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x06, - 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, - 0x01, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x20, 0x0a, 0x08, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, - 0x01, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xc4, 0x01, 0x0a, - 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x13, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, - 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, - 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, - 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, - 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1f, 0x0a, + 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6f, + 0x0a, 0x0c, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x46, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, + 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x48, 0x00, 0x52, 0x03, 0x73, 0x65, 0x74, 0x42, 0x05, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x22, + 0x72, 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x12, 0x21, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x1f, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0xc4, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, + 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x13, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, + 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, + 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -686,80 +680,6 @@ func file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() { if File_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*RelationTuple); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RelationQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Subject); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SubjectSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*SubjectQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SubjectSetQuery); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_msgTypes[0].OneofWrappers = []any{ (*RelationTuple_SubjectId)(nil), (*RelationTuple_SubjectSet)(nil), diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go index 1ef9f9803..7f9c1706b 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/version.proto @@ -24,18 +24,16 @@ const ( // Request for the VersionService.GetVersion RPC. type GetVersionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetVersionRequest) Reset() { *x = GetVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVersionRequest) String() string { @@ -46,7 +44,7 @@ func (*GetVersionRequest) ProtoMessage() {} func (x *GetVersionRequest) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -63,21 +61,18 @@ func (*GetVersionRequest) Descriptor() ([]byte, []int) { // Response of the VersionService.GetVersion RPC. type GetVersionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The version string of the Ory Keto instance. - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *GetVersionResponse) Reset() { *x = GetVersionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetVersionResponse) String() string { @@ -88,7 +83,7 @@ func (*GetVersionResponse) ProtoMessage() {} func (x *GetVersionResponse) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -193,32 +188,6 @@ func file_ory_keto_relation_tuples_v1alpha2_version_proto_init() { if File_ory_keto_relation_tuples_v1alpha2_version_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_version_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetVersionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.gw.go index cae6413d2..13ea25740 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/version.pb.gw.go @@ -10,6 +10,7 @@ package rts import ( "context" + "errors" "io" "net/http" @@ -24,29 +25,32 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_VersionService_GetVersion_0(ctx context.Context, marshaler runtime.Marshaler, client VersionServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetVersionRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetVersionRequest + metadata runtime.ServerMetadata + ) msg, err := client.GetVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_VersionService_GetVersion_0(ctx context.Context, marshaler runtime.Marshaler, server VersionServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetVersionRequest - var metadata runtime.ServerMetadata - + var ( + protoReq GetVersionRequest + metadata runtime.ServerMetadata + ) msg, err := server.GetVersion(ctx, &protoReq) return msg, metadata, err - } // RegisterVersionServiceHandlerServer registers the http handlers for service VersionService to "mux". @@ -55,16 +59,13 @@ func local_request_VersionService_GetVersion_0(ctx context.Context, marshaler ru // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterVersionServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterVersionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server VersionServiceServer) error { - - mux.Handle("GET", pattern_VersionService_GetVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_VersionService_GetVersion_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion", runtime.WithHTTPPathPattern("/version")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion", runtime.WithHTTPPathPattern("/version")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -76,9 +77,7 @@ func RegisterVersionServiceHandlerServer(ctx context.Context, mux *runtime.Serve runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_VersionService_GetVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -105,7 +104,6 @@ func RegisterVersionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime } }() }() - return RegisterVersionServiceHandler(ctx, mux, conn) } @@ -121,14 +119,11 @@ func RegisterVersionServiceHandler(ctx context.Context, mux *runtime.ServeMux, c // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "VersionServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterVersionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client VersionServiceClient) error { - - mux.Handle("GET", pattern_VersionService_GetVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_VersionService_GetVersion_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion", runtime.WithHTTPPathPattern("/version")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.VersionService/GetVersion", runtime.WithHTTPPathPattern("/version")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -139,11 +134,8 @@ func RegisterVersionServiceHandlerClient(ctx context.Context, mux *runtime.Serve runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_VersionService_GetVersion_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go index 3475c2813..7e4d802d3 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.36.0 // protoc (unknown) // source: ory/keto/relation_tuples/v1alpha2/write_service.proto @@ -92,22 +92,19 @@ func (RelationTupleDelta_Action) EnumDescriptor() ([]byte, []int) { // The request of a WriteService.TransactRelationTuples RPC. type TransactRelationTuplesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The write delta for the relationships operated in one single transaction. // Either all actions succeed or no change takes effect on error. RelationTupleDeltas []*RelationTupleDelta `protobuf:"bytes,1,rep,name=relation_tuple_deltas,json=relationTupleDeltas,proto3" json:"relation_tuple_deltas,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TransactRelationTuplesRequest) Reset() { *x = TransactRelationTuplesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactRelationTuplesRequest) String() string { @@ -118,7 +115,7 @@ func (*TransactRelationTuplesRequest) ProtoMessage() {} func (x *TransactRelationTuplesRequest) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -142,23 +139,20 @@ func (x *TransactRelationTuplesRequest) GetRelationTupleDeltas() []*RelationTupl // Write-delta for a TransactRelationTuplesRequest. type RelationTupleDelta struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The action to do on the RelationTuple. Action RelationTupleDelta_Action `protobuf:"varint,1,opt,name=action,proto3,enum=ory.keto.relation_tuples.v1alpha2.RelationTupleDelta_Action" json:"action,omitempty"` // The target RelationTuple. RelationTuple *RelationTuple `protobuf:"bytes,2,opt,name=relation_tuple,proto3" json:"relation_tuple,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *RelationTupleDelta) Reset() { *x = RelationTupleDelta{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *RelationTupleDelta) String() string { @@ -169,7 +163,7 @@ func (*RelationTupleDelta) ProtoMessage() {} func (x *RelationTupleDelta) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -200,10 +194,7 @@ func (x *RelationTupleDelta) GetRelationTuple() *RelationTuple { // The response of a WriteService.TransactRelationTuples rpc. type TransactRelationTuplesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // This field is not implemented yet and has no effect. // - Snaptokens []string `protobuf:"bytes,1,rep,name=snaptokens,proto3" json:"snaptokens,omitempty"` + Snaptokens []string `protobuf:"bytes,1,rep,name=snaptokens,proto3" json:"snaptokens,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TransactRelationTuplesResponse) Reset() { *x = TransactRelationTuplesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TransactRelationTuplesResponse) String() string { @@ -233,7 +224,7 @@ func (*TransactRelationTuplesResponse) ProtoMessage() {} func (x *TransactRelationTuplesResponse) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -257,21 +248,18 @@ func (x *TransactRelationTuplesResponse) GetSnaptokens() []string { // The request to create a new relationship. type CreateRelationTupleRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The relationship to create. RelationTuple *CreateRelationTupleRequest_Relationship `protobuf:"bytes,1,opt,name=relation_tuple,json=relationTuple,proto3" json:"relation_tuple,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreateRelationTupleRequest) Reset() { *x = CreateRelationTupleRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRelationTupleRequest) String() string { @@ -282,7 +270,7 @@ func (*CreateRelationTupleRequest) ProtoMessage() {} func (x *CreateRelationTupleRequest) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,21 +294,18 @@ func (x *CreateRelationTupleRequest) GetRelationTuple() *CreateRelationTupleRequ // The response from creating a new relationship. type CreateRelationTupleResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The created relationship. RelationTuple *RelationTuple `protobuf:"bytes,1,opt,name=relation_tuple,json=relationTuple,proto3" json:"relation_tuple,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreateRelationTupleResponse) Reset() { *x = CreateRelationTupleResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRelationTupleResponse) String() string { @@ -331,7 +316,7 @@ func (*CreateRelationTupleResponse) ProtoMessage() {} func (x *CreateRelationTupleResponse) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -354,10 +339,7 @@ func (x *CreateRelationTupleResponse) GetRelationTuple() *RelationTuple { } type DeleteRelationTuplesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto. Query *DeleteRelationTuplesRequest_Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` RelationQuery *RelationQuery `protobuf:"bytes,2,opt,name=relation_query,json=relationQuery,proto3" json:"relation_query,omitempty"` @@ -374,20 +356,20 @@ type DeleteRelationTuplesRequest struct { // // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto. Relation string `protobuf:"bytes,5,opt,name=relation,proto3" json:"relation,omitempty"` - // Types that are assignable to RestApiSubject: + // Types that are valid to be assigned to RestApiSubject: // // *DeleteRelationTuplesRequest_SubjectId // *DeleteRelationTuplesRequest_SubjectSet RestApiSubject isDeleteRelationTuplesRequest_RestApiSubject `protobuf_oneof:"rest_api_subject"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeleteRelationTuplesRequest) Reset() { *x = DeleteRelationTuplesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRelationTuplesRequest) String() string { @@ -398,7 +380,7 @@ func (*DeleteRelationTuplesRequest) ProtoMessage() {} func (x *DeleteRelationTuplesRequest) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -452,25 +434,29 @@ func (x *DeleteRelationTuplesRequest) GetRelation() string { return "" } -func (m *DeleteRelationTuplesRequest) GetRestApiSubject() isDeleteRelationTuplesRequest_RestApiSubject { - if m != nil { - return m.RestApiSubject +func (x *DeleteRelationTuplesRequest) GetRestApiSubject() isDeleteRelationTuplesRequest_RestApiSubject { + if x != nil { + return x.RestApiSubject } return nil } // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto. func (x *DeleteRelationTuplesRequest) GetSubjectId() string { - if x, ok := x.GetRestApiSubject().(*DeleteRelationTuplesRequest_SubjectId); ok { - return x.SubjectId + if x != nil { + if x, ok := x.RestApiSubject.(*DeleteRelationTuplesRequest_SubjectId); ok { + return x.SubjectId + } } return "" } // Deprecated: Marked as deprecated in ory/keto/relation_tuples/v1alpha2/write_service.proto. func (x *DeleteRelationTuplesRequest) GetSubjectSet() *SubjectSetQuery { - if x, ok := x.GetRestApiSubject().(*DeleteRelationTuplesRequest_SubjectSet); ok { - return x.SubjectSet + if x != nil { + if x, ok := x.RestApiSubject.(*DeleteRelationTuplesRequest_SubjectSet); ok { + return x.SubjectSet + } } return nil } @@ -499,18 +485,16 @@ func (*DeleteRelationTuplesRequest_SubjectId) isDeleteRelationTuplesRequest_Rest func (*DeleteRelationTuplesRequest_SubjectSet) isDeleteRelationTuplesRequest_RestApiSubject() {} type DeleteRelationTuplesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeleteRelationTuplesResponse) Reset() { *x = DeleteRelationTuplesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRelationTuplesResponse) String() string { @@ -521,7 +505,7 @@ func (*DeleteRelationTuplesResponse) ProtoMessage() {} func (x *DeleteRelationTuplesResponse) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -537,10 +521,7 @@ func (*DeleteRelationTuplesResponse) Descriptor() ([]byte, []int) { } type CreateRelationTupleRequest_Relationship struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // The namespace this relation tuple lives in. Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // The object related by this tuple. @@ -548,20 +529,20 @@ type CreateRelationTupleRequest_Relationship struct { Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"` // The relation between an Object and a Subject. Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` - // Types that are assignable to Subject: + // Types that are valid to be assigned to Subject: // // *CreateRelationTupleRequest_Relationship_SubjectId // *CreateRelationTupleRequest_Relationship_SubjectSet - Subject isCreateRelationTupleRequest_Relationship_Subject `protobuf_oneof:"subject"` + Subject isCreateRelationTupleRequest_Relationship_Subject `protobuf_oneof:"subject"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *CreateRelationTupleRequest_Relationship) Reset() { *x = CreateRelationTupleRequest_Relationship{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CreateRelationTupleRequest_Relationship) String() string { @@ -572,7 +553,7 @@ func (*CreateRelationTupleRequest_Relationship) ProtoMessage() {} func (x *CreateRelationTupleRequest_Relationship) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -608,23 +589,27 @@ func (x *CreateRelationTupleRequest_Relationship) GetRelation() string { return "" } -func (m *CreateRelationTupleRequest_Relationship) GetSubject() isCreateRelationTupleRequest_Relationship_Subject { - if m != nil { - return m.Subject +func (x *CreateRelationTupleRequest_Relationship) GetSubject() isCreateRelationTupleRequest_Relationship_Subject { + if x != nil { + return x.Subject } return nil } func (x *CreateRelationTupleRequest_Relationship) GetSubjectId() string { - if x, ok := x.GetSubject().(*CreateRelationTupleRequest_Relationship_SubjectId); ok { - return x.SubjectId + if x != nil { + if x, ok := x.Subject.(*CreateRelationTupleRequest_Relationship_SubjectId); ok { + return x.SubjectId + } } return "" } func (x *CreateRelationTupleRequest_Relationship) GetSubjectSet() *SubjectSet { - if x, ok := x.GetSubject().(*CreateRelationTupleRequest_Relationship_SubjectSet); ok { - return x.SubjectSet + if x != nil { + if x, ok := x.Subject.(*CreateRelationTupleRequest_Relationship_SubjectSet); ok { + return x.SubjectSet + } } return nil } @@ -652,10 +637,7 @@ func (*CreateRelationTupleRequest_Relationship_SubjectSet) isCreateRelationTuple // The query for deleting relationships type DeleteRelationTuplesRequest_Query struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - + state protoimpl.MessageState `protogen:"open.v1"` // Optional. The namespace to query. Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` // Optional. The object to query for. @@ -663,16 +645,16 @@ type DeleteRelationTuplesRequest_Query struct { // Optional. The relation to query for. Relation string `protobuf:"bytes,3,opt,name=relation,proto3" json:"relation,omitempty"` // Optional. The subject to query for. - Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` + Subject *Subject `protobuf:"bytes,4,opt,name=subject,proto3" json:"subject,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *DeleteRelationTuplesRequest_Query) Reset() { *x = DeleteRelationTuplesRequest_Query{} - if protoimpl.UnsafeEnabled { - mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteRelationTuplesRequest_Query) String() string { @@ -683,7 +665,7 @@ func (*DeleteRelationTuplesRequest_Query) ProtoMessage() {} func (x *DeleteRelationTuplesRequest_Query) ProtoReflect() protoreflect.Message { mi := &file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -757,183 +739,183 @@ var file_ory_keto_relation_tuples_v1alpha2_write_service_proto_rawDesc = []byte{ 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x13, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, - 0x65, 0x6c, 0x74, 0x61, 0x73, 0x22, 0xef, 0x02, 0x0a, 0x12, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x64, 0x0a, 0x06, + 0x65, 0x6c, 0x74, 0x61, 0x73, 0x22, 0xed, 0x02, 0x0a, 0x12, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x63, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x44, 0x65, - 0x6c, 0x74, 0x61, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0xe2, 0x41, 0x01, 0x02, - 0xfa, 0x42, 0x07, 0x82, 0x01, 0x04, 0x18, 0x01, 0x18, 0x02, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x66, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x42, 0x0c, 0xe2, 0x41, - 0x01, 0x02, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x06, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x25, 0x0a, - 0x0d, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x10, 0x01, - 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, - 0x47, 0x47, 0x45, 0x52, 0x12, 0x0a, 0x0a, 0x06, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x10, 0x01, - 0x12, 0x25, 0x0a, 0x0d, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, - 0x45, 0x10, 0x02, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, - 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x0a, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x10, 0x02, 0x1a, 0x02, 0x10, 0x01, 0x22, 0x54, 0x0a, 0x1e, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x73, 0x6e, 0x61, - 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, - 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, - 0x52, 0x52, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0x80, 0x03, - 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x7f, 0x0a, 0x0e, + 0x6c, 0x74, 0x61, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0xe0, 0x41, 0x02, 0xfa, + 0x42, 0x07, 0x82, 0x01, 0x04, 0x18, 0x01, 0x18, 0x02, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x65, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, + 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x42, 0x0b, 0xe0, 0x41, 0x02, + 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x06, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x25, 0x0a, 0x0d, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x10, 0x01, 0x1a, 0x12, + 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, + 0x45, 0x52, 0x12, 0x0a, 0x0a, 0x06, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x10, 0x01, 0x12, 0x25, + 0x0a, 0x0d, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, + 0x02, 0x1a, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, + 0x41, 0x47, 0x47, 0x45, 0x52, 0x12, 0x0a, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, + 0x02, 0x1a, 0x02, 0x10, 0x01, 0x22, 0x54, 0x0a, 0x1e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x12, 0xfa, 0xd2, 0xe4, + 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, + 0x0a, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0xff, 0x02, 0x0a, 0x1a, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, + 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x7e, 0x0a, 0x0e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x42, 0x0b, + 0xe0, 0x41, 0x02, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x1a, 0xe0, 0x01, 0x0a, 0x0c, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, + 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, + 0x51, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, + 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x76, 0x0a, + 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, - 0x42, 0x0c, 0xe2, 0x41, 0x01, 0x02, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0d, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x1a, 0xe0, 0x01, - 0x0a, 0x0c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x1c, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x22, 0x92, 0x05, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x70, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x14, 0xfa, 0xd2, 0xe4, 0x93, + 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x18, 0x01, + 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, + 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x5a, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, + 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x73, 0x65, 0x74, 0x1a, 0x9f, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x20, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x69, 0x64, 0x12, 0x51, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x5f, 0x73, 0x65, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x22, 0x76, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x57, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x22, 0x92, 0x05, 0x0a, 0x1b, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x70, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x14, 0xfa, - 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, - 0x52, 0x18, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x0e, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, - 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x06, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, - 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, 0x5a, 0x0a, 0x0b, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x32, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x1a, 0x9f, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x73, - 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x1e, 0x0a, - 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb8, 0x07, - 0x0a, 0x0c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xaf, - 0x02, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x40, 0x2e, 0x6f, 0x72, 0x79, 0x2e, - 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x6f, 0x72, - 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, + 0x12, 0x44, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, + 0x70, 0x69, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x1e, 0x0a, 0x1c, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb8, 0x07, 0x0a, 0x0c, 0x57, + 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xaf, 0x02, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8f, - 0x01, 0x92, 0x41, 0x57, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, - 0x69, 0x70, 0x2a, 0x12, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x4a, 0x33, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x2c, 0x0a, - 0x12, 0x41, 0x6e, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x22, 0x16, 0x0a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x12, 0x02, 0x7b, 0x7d, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2f, 0x3a, 0x15, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x32, 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, - 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x12, 0xd4, 0x02, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x3d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x40, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, + 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, - 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbd, 0x01, 0x92, 0x41, 0x7c, 0x0a, 0x0c, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x12, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x4a, - 0x58, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x51, 0x0a, 0x19, 0x54, 0x68, 0x65, 0x20, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, - 0x69, 0x70, 0x2e, 0x12, 0x34, 0x0a, 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, - 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x3a, - 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x62, - 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x1a, - 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x9e, 0x02, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x12, 0x3e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x3f, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x84, 0x01, 0x92, 0x41, 0x63, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x32, 0x21, 0x61, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, - 0x72, 0x6d, 0x2d, 0x75, 0x72, 0x6c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x4a, 0x1b, 0x0a, - 0x03, 0x32, 0x30, 0x34, 0x12, 0x14, 0x0a, 0x12, 0x41, 0x6e, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, - 0x2a, 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x42, 0xc2, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, + 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, + 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8f, 0x01, 0x92, 0x41, + 0x57, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, + 0x12, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, + 0x69, 0x70, 0x73, 0x4a, 0x33, 0x0a, 0x03, 0x32, 0x30, 0x34, 0x12, 0x2c, 0x0a, 0x12, 0x41, 0x6e, + 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x22, 0x16, 0x0a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x6a, 0x73, 0x6f, 0x6e, 0x12, 0x02, 0x7b, 0x7d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x15, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x64, + 0x65, 0x6c, 0x74, 0x61, 0x73, 0x32, 0x16, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0xd4, 0x02, + 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x3d, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbd, 0x01, 0x92, 0x41, 0x7c, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x4a, 0x58, 0x0a, 0x03, + 0x32, 0x30, 0x31, 0x12, 0x51, 0x0a, 0x19, 0x54, 0x68, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2e, + 0x12, 0x34, 0x0a, 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x3a, 0x0e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x62, 0x0e, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x1a, 0x16, 0x2f, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, + 0x70, 0x6c, 0x65, 0x73, 0x12, 0x9e, 0x02, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x3e, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x32, 0x42, 0x11, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, - 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, - 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, + 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x84, + 0x01, 0x92, 0x41, 0x63, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, + 0x69, 0x70, 0x2a, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x73, 0x32, 0x21, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, 0x72, 0x6d, 0x2d, + 0x75, 0x72, 0x6c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x4a, 0x1b, 0x0a, 0x03, 0x32, 0x30, + 0x34, 0x12, 0x14, 0x0a, 0x12, 0x41, 0x6e, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x42, 0xc2, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x11, + 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, + 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, + 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -997,116 +979,6 @@ func file_ory_keto_relation_tuples_v1alpha2_write_service_proto_init() { return } file_ory_keto_relation_tuples_v1alpha2_relation_tuples_proto_init() - if !protoimpl.UnsafeEnabled { - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*TransactRelationTuplesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*RelationTupleDelta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TransactRelationTuplesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CreateRelationTupleRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CreateRelationTupleResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRelationTuplesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRelationTuplesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*CreateRelationTupleRequest_Relationship); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*DeleteRelationTuplesRequest_Query); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_ory_keto_relation_tuples_v1alpha2_write_service_proto_msgTypes[5].OneofWrappers = []any{ (*DeleteRelationTuplesRequest_SubjectId)(nil), (*DeleteRelationTuplesRequest_SubjectSet)(nil), diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.gw.go b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.gw.go index 08b8fe2a7..dfffbbf83 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.gw.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service.pb.gw.go @@ -10,6 +10,7 @@ package rts import ( "context" + "errors" "io" "net/http" @@ -24,99 +25,94 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_WriteService_TransactRelationTuples_0(ctx context.Context, marshaler runtime.Marshaler, client WriteServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq TransactRelationTuplesRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.RelationTupleDeltas); err != nil && err != io.EOF { + var ( + protoReq TransactRelationTuplesRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.RelationTupleDeltas); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.TransactRelationTuples(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_WriteService_TransactRelationTuples_0(ctx context.Context, marshaler runtime.Marshaler, server WriteServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq TransactRelationTuplesRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.RelationTupleDeltas); err != nil && err != io.EOF { + var ( + protoReq TransactRelationTuplesRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.RelationTupleDeltas); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.TransactRelationTuples(ctx, &protoReq) return msg, metadata, err - } func request_WriteService_CreateRelationTuple_0(ctx context.Context, marshaler runtime.Marshaler, client WriteServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRelationTupleRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.RelationTuple); err != nil && err != io.EOF { + var ( + protoReq CreateRelationTupleRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.RelationTuple); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.CreateRelationTuple(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_WriteService_CreateRelationTuple_0(ctx context.Context, marshaler runtime.Marshaler, server WriteServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRelationTupleRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.RelationTuple); err != nil && err != io.EOF { + var ( + protoReq CreateRelationTupleRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq.RelationTuple); err != nil && !errors.Is(err, io.EOF) { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreateRelationTuple(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_WriteService_DeleteRelationTuples_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_WriteService_DeleteRelationTuples_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_WriteService_DeleteRelationTuples_0(ctx context.Context, marshaler runtime.Marshaler, client WriteServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRelationTuplesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteRelationTuplesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WriteService_DeleteRelationTuples_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DeleteRelationTuples(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_WriteService_DeleteRelationTuples_0(ctx context.Context, marshaler runtime.Marshaler, server WriteServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRelationTuplesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq DeleteRelationTuplesRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WriteService_DeleteRelationTuples_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DeleteRelationTuples(ctx, &protoReq) return msg, metadata, err - } // RegisterWriteServiceHandlerServer registers the http handlers for service WriteService to "mux". @@ -125,16 +121,13 @@ func local_request_WriteService_DeleteRelationTuples_0(ctx context.Context, mars // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWriteServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterWriteServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WriteServiceServer) error { - - mux.Handle("PATCH", pattern_WriteService_TransactRelationTuples_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPatch, pattern_WriteService_TransactRelationTuples_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples", runtime.WithHTTPPathPattern("/admin/relation-tuples")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples", runtime.WithHTTPPathPattern("/admin/relation-tuples")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -146,20 +139,15 @@ func RegisterWriteServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_WriteService_TransactRelationTuples_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("PUT", pattern_WriteService_CreateRelationTuple_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPut, pattern_WriteService_CreateRelationTuple_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/CreateRelationTuple", runtime.WithHTTPPathPattern("/admin/relation-tuples")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/CreateRelationTuple", runtime.WithHTTPPathPattern("/admin/relation-tuples")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -171,20 +159,15 @@ func RegisterWriteServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_WriteService_CreateRelationTuple_0(annotatedContext, mux, outboundMarshaler, w, req, response_WriteService_CreateRelationTuple_0{resp.(*CreateRelationTupleResponse)}, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_WriteService_DeleteRelationTuples_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_WriteService_DeleteRelationTuples_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples", runtime.WithHTTPPathPattern("/admin/relation-tuples")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples", runtime.WithHTTPPathPattern("/admin/relation-tuples")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -196,9 +179,7 @@ func RegisterWriteServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_WriteService_DeleteRelationTuples_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -225,7 +206,6 @@ func RegisterWriteServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.S } }() }() - return RegisterWriteServiceHandler(ctx, mux, conn) } @@ -241,14 +221,11 @@ func RegisterWriteServiceHandler(ctx context.Context, mux *runtime.ServeMux, con // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "WriteServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterWriteServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WriteServiceClient) error { - - mux.Handle("PATCH", pattern_WriteService_TransactRelationTuples_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPatch, pattern_WriteService_TransactRelationTuples_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples", runtime.WithHTTPPathPattern("/admin/relation-tuples")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/TransactRelationTuples", runtime.WithHTTPPathPattern("/admin/relation-tuples")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -259,18 +236,13 @@ func RegisterWriteServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_WriteService_TransactRelationTuples_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("PUT", pattern_WriteService_CreateRelationTuple_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodPut, pattern_WriteService_CreateRelationTuple_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/CreateRelationTuple", runtime.WithHTTPPathPattern("/admin/relation-tuples")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/CreateRelationTuple", runtime.WithHTTPPathPattern("/admin/relation-tuples")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -281,18 +253,13 @@ func RegisterWriteServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_WriteService_CreateRelationTuple_0(annotatedContext, mux, outboundMarshaler, w, req, response_WriteService_CreateRelationTuple_0{resp.(*CreateRelationTupleResponse)}, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("DELETE", pattern_WriteService_DeleteRelationTuples_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodDelete, pattern_WriteService_DeleteRelationTuples_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples", runtime.WithHTTPPathPattern("/admin/relation-tuples")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/ory.keto.relation_tuples.v1alpha2.WriteService/DeleteRelationTuples", runtime.WithHTTPPathPattern("/admin/relation-tuples")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -303,11 +270,8 @@ func RegisterWriteServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_WriteService_DeleteRelationTuples_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - return nil } @@ -321,16 +285,12 @@ func (m response_WriteService_CreateRelationTuple_0) XXX_ResponseBody() interfac var ( pattern_WriteService_TransactRelationTuples_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"admin", "relation-tuples"}, "")) - - pattern_WriteService_CreateRelationTuple_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"admin", "relation-tuples"}, "")) - - pattern_WriteService_DeleteRelationTuples_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"admin", "relation-tuples"}, "")) + pattern_WriteService_CreateRelationTuple_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"admin", "relation-tuples"}, "")) + pattern_WriteService_DeleteRelationTuples_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"admin", "relation-tuples"}, "")) ) var ( forward_WriteService_TransactRelationTuples_0 = runtime.ForwardResponseMessage - - forward_WriteService_CreateRelationTuple_0 = runtime.ForwardResponseMessage - - forward_WriteService_DeleteRelationTuples_0 = runtime.ForwardResponseMessage + forward_WriteService_CreateRelationTuple_0 = runtime.ForwardResponseMessage + forward_WriteService_DeleteRelationTuples_0 = runtime.ForwardResponseMessage ) diff --git a/spec/api.json b/spec/api.json index 48a9b0e14..dfc783c6d 100755 --- a/spec/api.json +++ b/spec/api.json @@ -667,7 +667,7 @@ "operationId": "checkOplSyntax", "requestBody": { "content": { - "text/plain": { + "application/json": { "schema": { "format": "byte", "type": "string" diff --git a/spec/api.swagger.json b/spec/api.swagger.json index a5f615311..edceb97ca 100755 --- a/spec/api.swagger.json +++ b/spec/api.swagger.json @@ -31,7 +31,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -96,13 +96,13 @@ "201": { "description": "The created relationship.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" + "$ref": "#/definitions/relationship" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -113,7 +113,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship", + "$ref": "#/definitions/createRelationshipBody", "required": ["relationTuple"] } } @@ -134,7 +134,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -148,7 +148,7 @@ "type": "array", "items": { "type": "object", - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta" + "$ref": "#/definitions/relationshipDelta" } } } @@ -165,7 +165,7 @@ "200": { "description": "The list of namespaces.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse" + "$ref": "#/definitions/relationshipNamespaces" }, "examples": { "application/json": { @@ -180,7 +180,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -196,13 +196,13 @@ "200": { "description": "The result of the syntax checker", "schema": { - "$ref": "#/definitions/ory.keto.opl.v1alpha1.CheckResponse" + "$ref": "#/definitions/checkOplSyntaxResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -217,8 +217,7 @@ } } ], - "tags": ["relationship"], - "consumes": ["text/plain"] + "tags": ["relationship"] } }, "/relation-tuples": { @@ -229,13 +228,13 @@ "200": { "description": "The list of relationships.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse" + "$ref": "#/definitions/relationships" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -317,19 +316,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } } }, @@ -402,19 +401,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } } }, @@ -425,7 +424,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" + "$ref": "#/definitions/postCheckPermissionBody" } } ], @@ -441,19 +440,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } } }, @@ -526,19 +525,19 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } }, "403": { "description": "The response of the permission check, in case it is not allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckResponse" + "$ref": "#/definitions/checkPermissionResult" } } }, @@ -549,7 +548,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.CheckRequest" + "$ref": "#/definitions/postCheckPermissionBody" } } ], @@ -565,13 +564,13 @@ "200": { "description": "The response of the permission check, in case it is allowed. For the `/openapi` endpoints, the status code is always 200.", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" + "$ref": "#/definitions/expandedPermissionTree" } }, "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -625,7 +624,7 @@ "400": { "description": "errorGeneric", "schema": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse" + "$ref": "#/definitions/errorGeneric" } } }, @@ -634,7 +633,7 @@ } }, "definitions": { - "ory.keto.opl.v1alpha1.CheckResponse": { + "checkOplSyntaxResult": { "type": "object", "properties": { "parseErrors": { @@ -680,7 +679,7 @@ } } }, - "ory.keto.relation_tuples.v1alpha2.CheckRequest": { + "postCheckPermissionBody": { "type": "object", "properties": { "namespace": { @@ -700,7 +699,7 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSetQuery", + "$ref": "#/definitions/subjectSetQuery", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." }, "max-depth": { @@ -711,7 +710,7 @@ }, "description": "The request for a CheckService.Check RPC.\nChecks whether a specific subject is related to an object." }, - "ory.keto.relation_tuples.v1alpha2.CheckResponse": { + "checkPermissionResult": { "type": "object", "properties": { "allowed": { @@ -721,7 +720,7 @@ }, "description": "The response for a CheckService.Check rpc." }, - "ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship": { + "createRelationshipBody": { "type": "object", "properties": { "namespace": { @@ -741,7 +740,7 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", + "$ref": "#/definitions/subjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } } @@ -750,7 +749,7 @@ "type": "object", "properties": { "relationTuple": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", + "$ref": "#/definitions/relationship", "description": "The created relationship." } }, @@ -759,18 +758,18 @@ "ory.keto.relation_tuples.v1alpha2.DeleteRelationTuplesResponse": { "type": "object" }, - "ory.keto.relation_tuples.v1alpha2.ErrorResponse": { + "errorGeneric": { "type": "object", "properties": { "error": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error" + "$ref": "#/definitions/errorGeneric.Error" } }, "description": "The standard Ory JSON API error format.", "title": "JSON API Error Response", "required": ["error"] }, - "ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error": { + "errorGeneric.Error": { "type": "object", "properties": { "code": { @@ -827,7 +826,7 @@ "type": "object", "properties": { "tree": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree", + "$ref": "#/definitions/expandedPermissionTree", "description": "The tree the requested subject set expands to.\nThe requested subject set is the subject of the root.\n\nThis field can be nil in some circumstances." } }, @@ -843,7 +842,7 @@ }, "description": "Response of the VersionService.GetVersion RPC." }, - "ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse": { + "relationshipNamespaces": { "type": "object", "properties": { "namespaces": { @@ -855,14 +854,14 @@ } } }, - "ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse": { + "relationships": { "type": "object", "properties": { "relation_tuples": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple" + "$ref": "#/definitions/relationship" }, "description": "The relationships matching the list request." }, @@ -896,7 +895,7 @@ "default": "unspecified", "description": " - union: This node expands to a union of all children.\n - exclusion: Not implemented yet.\n - intersection: Not implemented yet.\n - leaf: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - tuple_to_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - computed_subject_set: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached.\n - not: This node is a leaf and contains no children.\nIts subject is a `SubjectID` unless `max_depth` was reached." }, - "ory.keto.relation_tuples.v1alpha2.RelationTuple": { + "relationship": { "type": "object", "properties": { "namespace": { @@ -916,29 +915,29 @@ "description": "A concrete id of the subject." }, "subject_set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", + "$ref": "#/definitions/subjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/subjects.mdx)." } }, "description": "RelationTuple defines a relation between an Object and a Subject.", "required": ["namespace", "object", "relation"] }, - "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta": { + "relationshipDelta": { "type": "object", "properties": { "action": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action", + "$ref": "#/definitions/relationshipDelta.Action", "description": "The action to do on the RelationTuple." }, "relation_tuple": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", + "$ref": "#/definitions/relationship", "description": "The target RelationTuple." } }, "description": "Write-delta for a TransactRelationTuplesRequest.", "required": ["action", "relation_tuple"] }, - "ory.keto.relation_tuples.v1alpha2.RelationTupleDelta.Action": { + "relationshipDelta.Action": { "type": "string", "enum": ["ACTION_UNSPECIFIED", "insert", "delete"], "default": "ACTION_UNSPECIFIED", @@ -952,13 +951,13 @@ "description": "A concrete id of the subject." }, "set": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectSet", + "$ref": "#/definitions/subjectSet", "description": "A subject set that expands to more Subjects.\nMore information are available under [concepts](../concepts/15_subjects.mdx)." } }, "description": "Subject is either a concrete subject id or\na `SubjectSet` expanding to more Subjects." }, - "ory.keto.relation_tuples.v1alpha2.SubjectSet": { + "subjectSet": { "type": "object", "properties": { "namespace": { @@ -977,7 +976,7 @@ "description": "SubjectSet refers to all subjects who have\nthe same `relation` on an `object`.", "required": ["namespace", "object", "relation"] }, - "ory.keto.relation_tuples.v1alpha2.SubjectSetQuery": { + "subjectSetQuery": { "type": "object", "properties": { "namespace": { @@ -995,7 +994,7 @@ }, "description": "SubjectSetQuery refers to all subjects who have\nthe same `relation` on an `object`." }, - "ory.keto.relation_tuples.v1alpha2.SubjectTree": { + "expandedPermissionTree": { "type": "object", "properties": { "type": { @@ -1007,14 +1006,14 @@ "description": "The subject this node represents.\nDeprecated: More information is now available in the tuple field." }, "tuple": { - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.RelationTuple", + "$ref": "#/definitions/relationship", "description": "The relation tuple this node represents." }, "children": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/ory.keto.relation_tuples.v1alpha2.SubjectTree" + "$ref": "#/definitions/expandedPermissionTree" }, "description": "The children of this node.\n\nThis is never set if `node_type` == `NODE_TYPE_LEAF`." } @@ -1024,6 +1023,7 @@ "ory.keto.relation_tuples.v1alpha2.TransactRelationTuplesResponse": { "type": "object", "description": "The response of a WriteService.TransactRelationTuples rpc." - } + }, + "UUID": { "type": "string", "format": "uuid4" } } } From d95d5269c5a7702a9f750a99655c57fbba220a21 Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Thu, 19 Dec 2024 14:36:48 +0100 Subject: [PATCH 28/42] fix API breakages --- .schema/openapi/patches/health.yaml | 6 + .schema/openapi/patches/replacements.sed | 1 + internal/driver/daemon.go | 21 + internal/e2e/rest_client_test.go | 13 +- internal/e2e/sdk_client_test.go | 13 +- internal/httpclient/.openapi-generator/FILES | 8 +- internal/httpclient/README.md | 4 +- internal/httpclient/api/openapi.yaml | 48 +- internal/httpclient/api_metadata.go | 10 +- internal/httpclient/api_relationship.go | 22 +- .../httpclient/docs/CheckPermissionResult.md | 9 +- internal/httpclient/docs/MetadataApi.md | 2 +- internal/httpclient/docs/RelationshipApi.md | 10 +- ...ationshipDelta.md => RelationshipPatch.md} | 28 +- ...taAction.md => RelationshipPatchAction.md} | 2 +- .../model_check_permission_result.go | 35 +- .../model_relationship_delta_action.go | 85 - ...p_delta.go => model_relationship_patch.go} | 56 +- .../model_relationship_patch_action.go | 85 + internal/x/dbx/dsn_testutils.go | 84 +- proto/buf.md | 2 +- .../keto/opl/v1alpha1/syntax_service.pb.go | 56 +- .../keto/opl/v1alpha1/syntax_service.proto | 20 + .../v1alpha2/check_service.pb.go | 218 +-- .../v1alpha2/check_service.proto | 5 +- .../v1alpha2/check_service_grpc_pb.d.ts | 1 + .../v1alpha2/check_service_grpc_pb.js | 1 + .../v1alpha2/check_service_pb.d.ts | 1 + .../v1alpha2/check_service_pb.js | 2 + spec/api.json | 55 +- spec/api.swagger.json | 21 +- spec/master.api.json | 1419 +++++++++++++++++ 32 files changed, 1944 insertions(+), 399 deletions(-) rename internal/httpclient/docs/{RelationshipDelta.md => RelationshipPatch.md} (61%) rename internal/httpclient/docs/{RelationshipDeltaAction.md => RelationshipPatchAction.md} (91%) delete mode 100644 internal/httpclient/model_relationship_delta_action.go rename internal/httpclient/{model_relationship_delta.go => model_relationship_patch.go} (55%) create mode 100644 internal/httpclient/model_relationship_patch_action.go mode change 100755 => 100644 spec/api.json create mode 100755 spec/master.api.json diff --git a/.schema/openapi/patches/health.yaml b/.schema/openapi/patches/health.yaml index 0ae4c0ded..4e9a02067 100644 --- a/.schema/openapi/patches/health.yaml +++ b/.schema/openapi/patches/health.yaml @@ -73,6 +73,12 @@ type: object type: object description: Ory Kratos is not yet ready to accept requests. + default: + content: + text/plain: + schema: + type: string + description: Unexpected error summary: Check HTTP Server and Database Status tags: {{ .HealthPathTags | toJson }} - op: replace diff --git a/.schema/openapi/patches/replacements.sed b/.schema/openapi/patches/replacements.sed index f18d381bd..f93c64404 100644 --- a/.schema/openapi/patches/replacements.sed +++ b/.schema/openapi/patches/replacements.sed @@ -3,6 +3,7 @@ s/ory.keto.relation_tuples.v1alpha2.ErrorResponse.Error/genericError/g s/ory.keto.relation_tuples.v1alpha2.CreateRelationTupleRequest.Relationship/createRelationshipBody/g s/ory.keto.relation_tuples.v1alpha2.SubjectSet/subjectSet/g s/ory.keto.relation_tuples.v1alpha2.SubjectTree/expandedPermissionTree/g +s/ory.keto.relation_tuples.v1alpha2.RelationTupleDelta/relationshipPatch/g s/ory.keto.relation_tuples.v1alpha2.RelationTuple/relationship/g s/ory.keto.relation_tuples.v1alpha2.ListRelationTuplesResponse/relationships/g s/ory.keto.relation_tuples.v1alpha2.ListNamespacesResponse/relationshipNamespaces/g diff --git a/internal/driver/daemon.go b/internal/driver/daemon.go index c41f62def..99763b326 100644 --- a/internal/driver/daemon.go +++ b/internal/driver/daemon.go @@ -4,7 +4,10 @@ package driver import ( + "bytes" "context" + "encoding/json" + "io" "net/http" "os" "os/signal" @@ -385,6 +388,24 @@ func (r *RegistryDefault) OPLSyntaxRouter(ctx context.Context, apiHandler http.H } n.UseFunc(semconv.Middleware) n.Use(reqlog.NewMiddlewareFromLogger(r.l, "syntax#Ory Keto").ExcludePaths(healthx.AliveCheckPath, healthx.ReadyCheckPath)) + n.UseFunc(func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) { + if r.URL.Path == "/opl/syntax/check" && r.Header.Get("Content-Type") != "application/json" { + body, err := io.ReadAll(r.Body) + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + newBody, err := json.Marshal(body) + if err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + r.Body = io.NopCloser(bytes.NewReader(newBody)) + r.ContentLength = int64(len(newBody)) + r.Header.Set("Content-Type", "application/json") + } + next(w, r) + }) pr := &x.OPLSyntaxRouter{Router: httprouter.New()} r.PrometheusManager().RegisterRouter(pr.Router) diff --git a/internal/e2e/rest_client_test.go b/internal/e2e/rest_client_test.go index b0192f72b..93351bf21 100644 --- a/internal/e2e/rest_client_test.go +++ b/internal/e2e/rest_client_test.go @@ -18,9 +18,10 @@ import ( "github.com/ory/keto/ketoapi" rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" - "github.com/ory/herodot" "github.com/tidwall/gjson" + "github.com/ory/herodot" + "github.com/ory/keto/internal/x" "github.com/stretchr/testify/assert" @@ -46,9 +47,7 @@ func (rc *restClient) queryNamespaces(t require.TestingT) (res ketoapi.GetNamesp } func (rc *restClient) oplCheckSyntax(t require.TestingT, content []byte) []*ketoapi.ParseError { - enc, err := json.Marshal(content) - require.NoError(t, err) - body, code := rc.makeRequest(t, http.MethodPost, schema.RouteBase, string(enc), rc.oplSyntaxURL) + body, code := rc.makeRequest(t, http.MethodPost, schema.RouteBase, string(content), rc.oplSyntaxURL) assert.Equal(t, http.StatusOK, code, body) var response ketoapi.CheckOPLSyntaxResponse require.NoError(t, json.Unmarshal([]byte(body), &response)) @@ -171,8 +170,10 @@ func (rc *restClient) expand(t require.TestingT, r *ketoapi.SubjectSet, depth in return tree } -func healthReady(_ require.TestingT, readURL string) bool { - resp, err := http.Get(readURL + healthx.ReadyCheckPath) +func healthReady(t require.TestingT, readURL string) bool { + req, err := http.NewRequest("GET", readURL+healthx.ReadyCheckPath, nil) + require.NoError(t, err) + resp, err := http.DefaultClient.Do(req) if err != nil { return false } diff --git a/internal/e2e/sdk_client_test.go b/internal/e2e/sdk_client_test.go index 0bc7e45fb..a7451f822 100644 --- a/internal/e2e/sdk_client_test.go +++ b/internal/e2e/sdk_client_test.go @@ -37,15 +37,22 @@ func (c *sdkClient) requestCtx() context.Context { } func (c *sdkClient) oplCheckSyntax(t require.TestingT, content []byte) (parseErrors []*ketoapi.ParseError) { - enc, err := json.Marshal(content) - require.NoError(t, err) res, _, err := c.getOPLSyntaxClient(). RelationshipApi. CheckOplSyntax(c.requestCtx()). - Body(string(enc)). + Body(string(content)). Execute() require.NoError(t, err) + //enc, err := json.Marshal(content) + //require.NoError(t, err) + //res, _, err := c.getOPLSyntaxClient(). + // RelationshipApi. + // CheckOplSyntax(c.requestCtx()). + // Body(string(enc)). + // Execute() + //require.NoError(t, err) + raw, err := json.Marshal(res.Errors) require.NoError(t, err) err = json.Unmarshal(raw, &parseErrors) diff --git a/internal/httpclient/.openapi-generator/FILES b/internal/httpclient/.openapi-generator/FILES index 9952d74ce..70e4141fc 100644 --- a/internal/httpclient/.openapi-generator/FILES +++ b/internal/httpclient/.openapi-generator/FILES @@ -31,9 +31,9 @@ docs/PermissionApi.md docs/PostCheckPermissionBody.md docs/Relationship.md docs/RelationshipApi.md -docs/RelationshipDelta.md -docs/RelationshipDeltaAction.md docs/RelationshipNamespaces.md +docs/RelationshipPatch.md +docs/RelationshipPatchAction.md docs/Relationships.md docs/SubjectSet.md docs/SubjectSetQuery.md @@ -60,9 +60,9 @@ model_ory_keto_relation_tuples_v1alpha2_node_type.go model_ory_keto_relation_tuples_v1alpha2_subject.go model_post_check_permission_body.go model_relationship.go -model_relationship_delta.go -model_relationship_delta_action.go model_relationship_namespaces.go +model_relationship_patch.go +model_relationship_patch_action.go model_relationships.go model_subject_set.go model_subject_set_query.go diff --git a/internal/httpclient/README.md b/internal/httpclient/README.md index 42a29fd1d..fbb514201 100644 --- a/internal/httpclient/README.md +++ b/internal/httpclient/README.md @@ -117,9 +117,9 @@ Class | Method | HTTP request | Description - [OryKetoRelationTuplesV1alpha2Subject](docs/OryKetoRelationTuplesV1alpha2Subject.md) - [PostCheckPermissionBody](docs/PostCheckPermissionBody.md) - [Relationship](docs/Relationship.md) - - [RelationshipDelta](docs/RelationshipDelta.md) - - [RelationshipDeltaAction](docs/RelationshipDeltaAction.md) - [RelationshipNamespaces](docs/RelationshipNamespaces.md) + - [RelationshipPatch](docs/RelationshipPatch.md) + - [RelationshipPatchAction](docs/RelationshipPatchAction.md) - [Relationships](docs/Relationships.md) - [SubjectSet](docs/SubjectSet.md) - [SubjectSetQuery](docs/SubjectSetQuery.md) diff --git a/internal/httpclient/api/openapi.yaml b/internal/httpclient/api/openapi.yaml index b7bb8c3c7..591af18e8 100644 --- a/internal/httpclient/api/openapi.yaml +++ b/internal/httpclient/api/openapi.yaml @@ -94,7 +94,7 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/relationshipDelta' + $ref: '#/components/schemas/relationshipPatch' type: array description: |- The write delta for the relationships operated in one single transaction. @@ -192,6 +192,12 @@ paths: schema: $ref: '#/components/schemas/isReady_503_response' description: Ory Kratos is not yet ready to accept requests. + default: + content: + text/plain: + schema: + type: string + description: Unexpected error summary: Check HTTP Server and Database Status tags: - metadata @@ -220,7 +226,7 @@ paths: operationId: checkOplSyntax requestBody: content: - application/json: + text/plain: schema: format: byte type: string @@ -239,6 +245,12 @@ paths: schema: $ref: '#/components/schemas/errorGeneric' description: errorGeneric + default: + content: + application/json: + schema: + $ref: '#/components/schemas/errorGeneric' + description: errorGeneric summary: Performs a syntax check request. tags: - relationship @@ -767,7 +779,7 @@ components: type: array type: object checkPermissionResult: - description: The response for a CheckService.Check rpc. + description: The response for a permission check. example: allowed: true properties: @@ -778,6 +790,8 @@ components: It is false by default if no ACL matches. type: boolean + required: + - allowed type: object createRelationshipBody: properties: @@ -1061,18 +1075,29 @@ components: - object - relation type: object - relationshipDelta: + relationshipNamespaces: + example: + namespaces: + - name: name + - name: name + properties: + namespaces: + items: + $ref: '#/components/schemas/ory.keto.relation_tuples.v1alpha2.Namespace' + type: array + type: object + relationshipPatch: description: Write-delta for a TransactRelationTuplesRequest. properties: action: - $ref: '#/components/schemas/relationshipDelta.Action' + $ref: '#/components/schemas/relationshipPatch.Action' relation_tuple: $ref: '#/components/schemas/relationship' required: - action - relation_tuple type: object - relationshipDelta.Action: + relationshipPatch.Action: default: ACTION_UNSPECIFIED description: |2- - ACTION_UNSPECIFIED: Unspecified. @@ -1087,17 +1112,6 @@ components: - insert - delete type: string - relationshipNamespaces: - example: - namespaces: - - name: name - - name: name - properties: - namespaces: - items: - $ref: '#/components/schemas/ory.keto.relation_tuples.v1alpha2.Namespace' - type: array - type: object relationships: description: The response of a ReadService.ListRelationTuples RPC. example: diff --git a/internal/httpclient/api_metadata.go b/internal/httpclient/api_metadata.go index 7d003de93..1950e4941 100644 --- a/internal/httpclient/api_metadata.go +++ b/internal/httpclient/api_metadata.go @@ -382,7 +382,7 @@ func (a *MetadataApiService) IsReadyExecute(r MetadataApiApiIsReadyRequest) (*Is } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -419,7 +419,15 @@ func (a *MetadataApiService) IsReadyExecute(r MetadataApiApiIsReadyRequest) (*Is return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/internal/httpclient/api_relationship.go b/internal/httpclient/api_relationship.go index f835ae7ae..2f7bcbbef 100644 --- a/internal/httpclient/api_relationship.go +++ b/internal/httpclient/api_relationship.go @@ -163,7 +163,7 @@ func (a *RelationshipApiService) CheckOplSyntaxExecute(r RelationshipApiApiCheck } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{"text/plain"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -211,7 +211,15 @@ func (a *RelationshipApiService) CheckOplSyntaxExecute(r RelationshipApiApiCheck return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + var v ErrorGeneric + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr } + newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } @@ -797,11 +805,11 @@ func (a *RelationshipApiService) ListRelationshipNamespacesExecute(r Relationshi type RelationshipApiApiPatchRelationshipsRequest struct { ctx context.Context ApiService RelationshipApi - relationshipDelta *[]RelationshipDelta + relationshipPatch *[]RelationshipPatch } -func (r RelationshipApiApiPatchRelationshipsRequest) RelationshipDelta(relationshipDelta []RelationshipDelta) RelationshipApiApiPatchRelationshipsRequest { - r.relationshipDelta = &relationshipDelta +func (r RelationshipApiApiPatchRelationshipsRequest) RelationshipPatch(relationshipPatch []RelationshipPatch) RelationshipApiApiPatchRelationshipsRequest { + r.relationshipPatch = &relationshipPatch return r } @@ -843,8 +851,8 @@ func (a *RelationshipApiService) PatchRelationshipsExecute(r RelationshipApiApiP localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.relationshipDelta == nil { - return nil, reportError("relationshipDelta is required and must be specified") + if r.relationshipPatch == nil { + return nil, reportError("relationshipPatch is required and must be specified") } // to determine the Content-Type header @@ -865,7 +873,7 @@ func (a *RelationshipApiService) PatchRelationshipsExecute(r RelationshipApiApiP localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.relationshipDelta + localVarPostBody = r.relationshipPatch req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err diff --git a/internal/httpclient/docs/CheckPermissionResult.md b/internal/httpclient/docs/CheckPermissionResult.md index 1317f8845..edb267aed 100644 --- a/internal/httpclient/docs/CheckPermissionResult.md +++ b/internal/httpclient/docs/CheckPermissionResult.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Allowed** | Pointer to **bool** | Whether the specified subject (id) is related to the requested object. It is false by default if no ACL matches. | [optional] +**Allowed** | **bool** | Whether the specified subject (id) is related to the requested object. It is false by default if no ACL matches. | ## Methods ### NewCheckPermissionResult -`func NewCheckPermissionResult() *CheckPermissionResult` +`func NewCheckPermissionResult(allowed bool, ) *CheckPermissionResult` NewCheckPermissionResult instantiates a new CheckPermissionResult object This constructor will assign default values to properties that have it defined, @@ -44,11 +44,6 @@ and a boolean to check if the value has been set. SetAllowed sets Allowed field to given value. -### HasAllowed - -`func (o *CheckPermissionResult) HasAllowed() bool` - -HasAllowed returns a boolean if a field has been set. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/internal/httpclient/docs/MetadataApi.md b/internal/httpclient/docs/MetadataApi.md index 4a18c694f..7fd0ca030 100644 --- a/internal/httpclient/docs/MetadataApi.md +++ b/internal/httpclient/docs/MetadataApi.md @@ -186,7 +186,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **Accept**: application/json, text/plain [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) diff --git a/internal/httpclient/docs/RelationshipApi.md b/internal/httpclient/docs/RelationshipApi.md index bf42d18e4..294f55230 100644 --- a/internal/httpclient/docs/RelationshipApi.md +++ b/internal/httpclient/docs/RelationshipApi.md @@ -69,7 +69,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: text/plain - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -358,7 +358,7 @@ No authorization required ## PatchRelationships -> PatchRelationships(ctx).RelationshipDelta(relationshipDelta).Execute() +> PatchRelationships(ctx).RelationshipPatch(relationshipPatch).Execute() Writes one or more relationships in a single transaction. @@ -375,11 +375,11 @@ import ( ) func main() { - relationshipDelta := []openapiclient.RelationshipDelta{*openapiclient.NewRelationshipDelta(openapiclient.relationshipDelta.Action("ACTION_UNSPECIFIED"), *openapiclient.NewRelationship("Namespace_example", "Object_example", "Relation_example"))} // []RelationshipDelta | The write delta for the relationships operated in one single transaction. Either all actions succeed or no change takes effect on error. + relationshipPatch := []openapiclient.RelationshipPatch{*openapiclient.NewRelationshipPatch(openapiclient.relationshipPatch.Action("ACTION_UNSPECIFIED"), *openapiclient.NewRelationship("Namespace_example", "Object_example", "Relation_example"))} // []RelationshipPatch | The write delta for the relationships operated in one single transaction. Either all actions succeed or no change takes effect on error. configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.RelationshipApi.PatchRelationships(context.Background()).RelationshipDelta(relationshipDelta).Execute() + resp, r, err := apiClient.RelationshipApi.PatchRelationships(context.Background()).RelationshipPatch(relationshipPatch).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RelationshipApi.PatchRelationships``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -398,7 +398,7 @@ Other parameters are passed through a pointer to a apiPatchRelationshipsRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **relationshipDelta** | [**[]RelationshipDelta**](RelationshipDelta.md) | The write delta for the relationships operated in one single transaction. Either all actions succeed or no change takes effect on error. | + **relationshipPatch** | [**[]RelationshipPatch**](RelationshipPatch.md) | The write delta for the relationships operated in one single transaction. Either all actions succeed or no change takes effect on error. | ### Return type diff --git a/internal/httpclient/docs/RelationshipDelta.md b/internal/httpclient/docs/RelationshipPatch.md similarity index 61% rename from internal/httpclient/docs/RelationshipDelta.md rename to internal/httpclient/docs/RelationshipPatch.md index 54c52bffb..c5edd9edb 100644 --- a/internal/httpclient/docs/RelationshipDelta.md +++ b/internal/httpclient/docs/RelationshipPatch.md @@ -1,67 +1,67 @@ -# RelationshipDelta +# RelationshipPatch ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Action** | [**RelationshipDeltaAction**](RelationshipDeltaAction.md) | | [default to RELATIONSHIPDELTAACTION_ACTION_UNSPECIFIED] +**Action** | [**RelationshipPatchAction**](RelationshipPatchAction.md) | | [default to RELATIONSHIPPATCHACTION_ACTION_UNSPECIFIED] **RelationTuple** | [**Relationship**](Relationship.md) | | ## Methods -### NewRelationshipDelta +### NewRelationshipPatch -`func NewRelationshipDelta(action RelationshipDeltaAction, relationTuple Relationship, ) *RelationshipDelta` +`func NewRelationshipPatch(action RelationshipPatchAction, relationTuple Relationship, ) *RelationshipPatch` -NewRelationshipDelta instantiates a new RelationshipDelta object +NewRelationshipPatch instantiates a new RelationshipPatch object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed -### NewRelationshipDeltaWithDefaults +### NewRelationshipPatchWithDefaults -`func NewRelationshipDeltaWithDefaults() *RelationshipDelta` +`func NewRelationshipPatchWithDefaults() *RelationshipPatch` -NewRelationshipDeltaWithDefaults instantiates a new RelationshipDelta object +NewRelationshipPatchWithDefaults instantiates a new RelationshipPatch object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetAction -`func (o *RelationshipDelta) GetAction() RelationshipDeltaAction` +`func (o *RelationshipPatch) GetAction() RelationshipPatchAction` GetAction returns the Action field if non-nil, zero value otherwise. ### GetActionOk -`func (o *RelationshipDelta) GetActionOk() (*RelationshipDeltaAction, bool)` +`func (o *RelationshipPatch) GetActionOk() (*RelationshipPatchAction, bool)` GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAction -`func (o *RelationshipDelta) SetAction(v RelationshipDeltaAction)` +`func (o *RelationshipPatch) SetAction(v RelationshipPatchAction)` SetAction sets Action field to given value. ### GetRelationTuple -`func (o *RelationshipDelta) GetRelationTuple() Relationship` +`func (o *RelationshipPatch) GetRelationTuple() Relationship` GetRelationTuple returns the RelationTuple field if non-nil, zero value otherwise. ### GetRelationTupleOk -`func (o *RelationshipDelta) GetRelationTupleOk() (*Relationship, bool)` +`func (o *RelationshipPatch) GetRelationTupleOk() (*Relationship, bool)` GetRelationTupleOk returns a tuple with the RelationTuple field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRelationTuple -`func (o *RelationshipDelta) SetRelationTuple(v Relationship)` +`func (o *RelationshipPatch) SetRelationTuple(v Relationship)` SetRelationTuple sets RelationTuple field to given value. diff --git a/internal/httpclient/docs/RelationshipDeltaAction.md b/internal/httpclient/docs/RelationshipPatchAction.md similarity index 91% rename from internal/httpclient/docs/RelationshipDeltaAction.md rename to internal/httpclient/docs/RelationshipPatchAction.md index b881ac6c9..656af3ae7 100644 --- a/internal/httpclient/docs/RelationshipDeltaAction.md +++ b/internal/httpclient/docs/RelationshipPatchAction.md @@ -1,4 +1,4 @@ -# RelationshipDeltaAction +# RelationshipPatchAction ## Enum diff --git a/internal/httpclient/model_check_permission_result.go b/internal/httpclient/model_check_permission_result.go index 31017b137..d8d2c199b 100644 --- a/internal/httpclient/model_check_permission_result.go +++ b/internal/httpclient/model_check_permission_result.go @@ -15,18 +15,19 @@ import ( "encoding/json" ) -// CheckPermissionResult The response for a CheckService.Check rpc. +// CheckPermissionResult The response for a permission check. type CheckPermissionResult struct { // Whether the specified subject (id) is related to the requested object. It is false by default if no ACL matches. - Allowed *bool `json:"allowed,omitempty"` + Allowed bool `json:"allowed"` } // NewCheckPermissionResult instantiates a new CheckPermissionResult object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCheckPermissionResult() *CheckPermissionResult { +func NewCheckPermissionResult(allowed bool) *CheckPermissionResult { this := CheckPermissionResult{} + this.Allowed = allowed return &this } @@ -38,41 +39,33 @@ func NewCheckPermissionResultWithDefaults() *CheckPermissionResult { return &this } -// GetAllowed returns the Allowed field value if set, zero value otherwise. +// GetAllowed returns the Allowed field value func (o *CheckPermissionResult) GetAllowed() bool { - if o == nil || o.Allowed == nil { + if o == nil { var ret bool return ret } - return *o.Allowed + + return o.Allowed } -// GetAllowedOk returns a tuple with the Allowed field value if set, nil otherwise +// GetAllowedOk returns a tuple with the Allowed field value // and a boolean to check if the value has been set. func (o *CheckPermissionResult) GetAllowedOk() (*bool, bool) { - if o == nil || o.Allowed == nil { + if o == nil { return nil, false } - return o.Allowed, true -} - -// HasAllowed returns a boolean if a field has been set. -func (o *CheckPermissionResult) HasAllowed() bool { - if o != nil && o.Allowed != nil { - return true - } - - return false + return &o.Allowed, true } -// SetAllowed gets a reference to the given bool and assigns it to the Allowed field. +// SetAllowed sets field value func (o *CheckPermissionResult) SetAllowed(v bool) { - o.Allowed = &v + o.Allowed = v } func (o CheckPermissionResult) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} - if o.Allowed != nil { + if true { toSerialize["allowed"] = o.Allowed } return json.Marshal(toSerialize) diff --git a/internal/httpclient/model_relationship_delta_action.go b/internal/httpclient/model_relationship_delta_action.go deleted file mode 100644 index 9e891a21c..000000000 --- a/internal/httpclient/model_relationship_delta_action.go +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Ory Keto API - * - * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. - * - * API version: - * Contact: hi@ory.sh - */ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package client - -import ( - "encoding/json" - "fmt" -) - -// RelationshipDeltaAction - ACTION_UNSPECIFIED: Unspecified. The `TransactRelationTuples` RPC ignores this RelationTupleDelta if an action was unspecified. - insert: Insertion of a new RelationTuple. It is ignored if already existing. - delete: Deletion of the RelationTuple. It is ignored if it does not exist. -type RelationshipDeltaAction string - -// List of relationshipDelta.Action -const ( - RELATIONSHIPDELTAACTION_ACTION_UNSPECIFIED RelationshipDeltaAction = "ACTION_UNSPECIFIED" - RELATIONSHIPDELTAACTION_INSERT RelationshipDeltaAction = "insert" - RELATIONSHIPDELTAACTION_DELETE RelationshipDeltaAction = "delete" -) - -func (v *RelationshipDeltaAction) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := RelationshipDeltaAction(value) - for _, existing := range []RelationshipDeltaAction{"ACTION_UNSPECIFIED", "insert", "delete"} { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid RelationshipDeltaAction", value) -} - -// Ptr returns reference to relationshipDelta.Action value -func (v RelationshipDeltaAction) Ptr() *RelationshipDeltaAction { - return &v -} - -type NullableRelationshipDeltaAction struct { - value *RelationshipDeltaAction - isSet bool -} - -func (v NullableRelationshipDeltaAction) Get() *RelationshipDeltaAction { - return v.value -} - -func (v *NullableRelationshipDeltaAction) Set(val *RelationshipDeltaAction) { - v.value = val - v.isSet = true -} - -func (v NullableRelationshipDeltaAction) IsSet() bool { - return v.isSet -} - -func (v *NullableRelationshipDeltaAction) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRelationshipDeltaAction(val *RelationshipDeltaAction) *NullableRelationshipDeltaAction { - return &NullableRelationshipDeltaAction{value: val, isSet: true} -} - -func (v NullableRelationshipDeltaAction) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRelationshipDeltaAction) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/internal/httpclient/model_relationship_delta.go b/internal/httpclient/model_relationship_patch.go similarity index 55% rename from internal/httpclient/model_relationship_delta.go rename to internal/httpclient/model_relationship_patch.go index 5b8ca62a7..f444d4ed0 100644 --- a/internal/httpclient/model_relationship_delta.go +++ b/internal/httpclient/model_relationship_patch.go @@ -15,37 +15,37 @@ import ( "encoding/json" ) -// RelationshipDelta Write-delta for a TransactRelationTuplesRequest. -type RelationshipDelta struct { - Action RelationshipDeltaAction `json:"action"` +// RelationshipPatch Write-delta for a TransactRelationTuplesRequest. +type RelationshipPatch struct { + Action RelationshipPatchAction `json:"action"` RelationTuple Relationship `json:"relation_tuple"` } -// NewRelationshipDelta instantiates a new RelationshipDelta object +// NewRelationshipPatch instantiates a new RelationshipPatch object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewRelationshipDelta(action RelationshipDeltaAction, relationTuple Relationship) *RelationshipDelta { - this := RelationshipDelta{} +func NewRelationshipPatch(action RelationshipPatchAction, relationTuple Relationship) *RelationshipPatch { + this := RelationshipPatch{} this.Action = action this.RelationTuple = relationTuple return &this } -// NewRelationshipDeltaWithDefaults instantiates a new RelationshipDelta object +// NewRelationshipPatchWithDefaults instantiates a new RelationshipPatch object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set -func NewRelationshipDeltaWithDefaults() *RelationshipDelta { - this := RelationshipDelta{} - var action RelationshipDeltaAction = RELATIONSHIPDELTAACTION_ACTION_UNSPECIFIED +func NewRelationshipPatchWithDefaults() *RelationshipPatch { + this := RelationshipPatch{} + var action RelationshipPatchAction = RELATIONSHIPPATCHACTION_ACTION_UNSPECIFIED this.Action = action return &this } // GetAction returns the Action field value -func (o *RelationshipDelta) GetAction() RelationshipDeltaAction { +func (o *RelationshipPatch) GetAction() RelationshipPatchAction { if o == nil { - var ret RelationshipDeltaAction + var ret RelationshipPatchAction return ret } @@ -54,7 +54,7 @@ func (o *RelationshipDelta) GetAction() RelationshipDeltaAction { // GetActionOk returns a tuple with the Action field value // and a boolean to check if the value has been set. -func (o *RelationshipDelta) GetActionOk() (*RelationshipDeltaAction, bool) { +func (o *RelationshipPatch) GetActionOk() (*RelationshipPatchAction, bool) { if o == nil { return nil, false } @@ -62,12 +62,12 @@ func (o *RelationshipDelta) GetActionOk() (*RelationshipDeltaAction, bool) { } // SetAction sets field value -func (o *RelationshipDelta) SetAction(v RelationshipDeltaAction) { +func (o *RelationshipPatch) SetAction(v RelationshipPatchAction) { o.Action = v } // GetRelationTuple returns the RelationTuple field value -func (o *RelationshipDelta) GetRelationTuple() Relationship { +func (o *RelationshipPatch) GetRelationTuple() Relationship { if o == nil { var ret Relationship return ret @@ -78,7 +78,7 @@ func (o *RelationshipDelta) GetRelationTuple() Relationship { // GetRelationTupleOk returns a tuple with the RelationTuple field value // and a boolean to check if the value has been set. -func (o *RelationshipDelta) GetRelationTupleOk() (*Relationship, bool) { +func (o *RelationshipPatch) GetRelationTupleOk() (*Relationship, bool) { if o == nil { return nil, false } @@ -86,11 +86,11 @@ func (o *RelationshipDelta) GetRelationTupleOk() (*Relationship, bool) { } // SetRelationTuple sets field value -func (o *RelationshipDelta) SetRelationTuple(v Relationship) { +func (o *RelationshipPatch) SetRelationTuple(v Relationship) { o.RelationTuple = v } -func (o RelationshipDelta) MarshalJSON() ([]byte, error) { +func (o RelationshipPatch) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { toSerialize["action"] = o.Action @@ -101,38 +101,38 @@ func (o RelationshipDelta) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableRelationshipDelta struct { - value *RelationshipDelta +type NullableRelationshipPatch struct { + value *RelationshipPatch isSet bool } -func (v NullableRelationshipDelta) Get() *RelationshipDelta { +func (v NullableRelationshipPatch) Get() *RelationshipPatch { return v.value } -func (v *NullableRelationshipDelta) Set(val *RelationshipDelta) { +func (v *NullableRelationshipPatch) Set(val *RelationshipPatch) { v.value = val v.isSet = true } -func (v NullableRelationshipDelta) IsSet() bool { +func (v NullableRelationshipPatch) IsSet() bool { return v.isSet } -func (v *NullableRelationshipDelta) Unset() { +func (v *NullableRelationshipPatch) Unset() { v.value = nil v.isSet = false } -func NewNullableRelationshipDelta(val *RelationshipDelta) *NullableRelationshipDelta { - return &NullableRelationshipDelta{value: val, isSet: true} +func NewNullableRelationshipPatch(val *RelationshipPatch) *NullableRelationshipPatch { + return &NullableRelationshipPatch{value: val, isSet: true} } -func (v NullableRelationshipDelta) MarshalJSON() ([]byte, error) { +func (v NullableRelationshipPatch) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableRelationshipDelta) UnmarshalJSON(src []byte) error { +func (v *NullableRelationshipPatch) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/internal/httpclient/model_relationship_patch_action.go b/internal/httpclient/model_relationship_patch_action.go new file mode 100644 index 000000000..24541f3f9 --- /dev/null +++ b/internal/httpclient/model_relationship_patch_action.go @@ -0,0 +1,85 @@ +/* + * Ory Keto API + * + * Documentation for all of Ory Keto's REST APIs. gRPC is documented separately. + * + * API version: + * Contact: hi@ory.sh + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package client + +import ( + "encoding/json" + "fmt" +) + +// RelationshipPatchAction - ACTION_UNSPECIFIED: Unspecified. The `TransactRelationTuples` RPC ignores this RelationTupleDelta if an action was unspecified. - insert: Insertion of a new RelationTuple. It is ignored if already existing. - delete: Deletion of the RelationTuple. It is ignored if it does not exist. +type RelationshipPatchAction string + +// List of relationshipPatch.Action +const ( + RELATIONSHIPPATCHACTION_ACTION_UNSPECIFIED RelationshipPatchAction = "ACTION_UNSPECIFIED" + RELATIONSHIPPATCHACTION_INSERT RelationshipPatchAction = "insert" + RELATIONSHIPPATCHACTION_DELETE RelationshipPatchAction = "delete" +) + +func (v *RelationshipPatchAction) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := RelationshipPatchAction(value) + for _, existing := range []RelationshipPatchAction{"ACTION_UNSPECIFIED", "insert", "delete"} { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid RelationshipPatchAction", value) +} + +// Ptr returns reference to relationshipPatch.Action value +func (v RelationshipPatchAction) Ptr() *RelationshipPatchAction { + return &v +} + +type NullableRelationshipPatchAction struct { + value *RelationshipPatchAction + isSet bool +} + +func (v NullableRelationshipPatchAction) Get() *RelationshipPatchAction { + return v.value +} + +func (v *NullableRelationshipPatchAction) Set(val *RelationshipPatchAction) { + v.value = val + v.isSet = true +} + +func (v NullableRelationshipPatchAction) IsSet() bool { + return v.isSet +} + +func (v *NullableRelationshipPatchAction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRelationshipPatchAction(val *RelationshipPatchAction) *NullableRelationshipPatchAction { + return &NullableRelationshipPatchAction{value: val, isSet: true} +} + +func (v NullableRelationshipPatchAction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRelationshipPatchAction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/internal/x/dbx/dsn_testutils.go b/internal/x/dbx/dsn_testutils.go index a7b44cfc7..4332ffd0e 100644 --- a/internal/x/dbx/dsn_testutils.go +++ b/internal/x/dbx/dsn_testutils.go @@ -17,6 +17,8 @@ import ( "github.com/gobuffalo/pop/v6" "github.com/stretchr/testify/require" "github.com/tidwall/sjson" + + "github.com/ory/x/sqlcon/dockertest" ) type DsnT struct { @@ -105,47 +107,47 @@ func createDB(t testing.TB, url string, dbName string) (err error) { func GetDSNs(t testing.TB, debugSqliteOnDisk bool) []*DsnT { dsns := allSqlite(t, debugSqliteOnDisk) - //if !testing.Short() { - // var mysql, postgres, cockroach string - // testDB := dbName(t.Name()) - // - // dockertest.Parallel([]func(){ - // func() { - // mysql = RunMySQL(t, testDB) - // }, - // func() { - // postgres = RunPostgres(t, testDB) - // }, - // func() { - // cockroach = RunCockroach(t, testDB) - // }, - // }) - // - // if mysql != "" { - // dsns = append(dsns, &DsnT{ - // Name: "mysql", - // Conn: mysql, - // MigrateUp: true, - // MigrateDown: true, - // }) - // } - // if postgres != "" { - // dsns = append(dsns, &DsnT{ - // Name: "postgres", - // Conn: postgres, - // MigrateUp: true, - // MigrateDown: true, - // }) - // } - // if cockroach != "" { - // dsns = append(dsns, &DsnT{ - // Name: "cockroach", - // Conn: cockroach, - // MigrateUp: true, - // MigrateDown: true, - // }) - // } - //} + if !testing.Short() { + var mysql, postgres, cockroach string + testDB := dbName(t.Name()) + + dockertest.Parallel([]func(){ + func() { + mysql = RunMySQL(t, testDB) + }, + func() { + postgres = RunPostgres(t, testDB) + }, + func() { + cockroach = RunCockroach(t, testDB) + }, + }) + + if mysql != "" { + dsns = append(dsns, &DsnT{ + Name: "mysql", + Conn: mysql, + MigrateUp: true, + MigrateDown: true, + }) + } + if postgres != "" { + dsns = append(dsns, &DsnT{ + Name: "postgres", + Conn: postgres, + MigrateUp: true, + MigrateDown: true, + }) + } + if cockroach != "" { + dsns = append(dsns, &DsnT{ + Name: "cockroach", + Conn: cockroach, + MigrateUp: true, + MigrateDown: true, + }) + } + } require.NotZero(t, len(dsns), "expected to run against at least one database") return dsns diff --git a/proto/buf.md b/proto/buf.md index e52cb7b77..0d8b98208 100644 --- a/proto/buf.md +++ b/proto/buf.md @@ -269,7 +269,7 @@ related to an object. ### CheckResponse -The response for a CheckService.Check rpc. +The response for a permission check. | Field | Type | Label | Description | | --------- | ----------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go index e523c766f..4cd839bff 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.pb.go @@ -267,33 +267,45 @@ var file_ory_keto_opl_v1alpha1_syntax_service_proto_rawDesc = []byte{ 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x32, 0xff, 0x01, 0x0a, 0x0d, - 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xed, 0x01, + 0x01, 0x28, 0x0d, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x32, 0xbc, 0x03, 0x0a, 0x0d, + 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xaa, 0x03, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x23, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x98, 0x01, 0x92, 0x41, 0x73, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x0e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x70, 0x6c, - 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x4a, 0x53, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x4c, 0x0a, - 0x20, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, - 0x72, 0x12, 0x28, 0x0a, 0x26, 0x1a, 0x24, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, - 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1c, 0x3a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x11, 0x2f, 0x6f, 0x70, 0x6c, - 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x95, 0x01, - 0x0a, 0x18, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, - 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x12, 0x53, 0x79, 0x6e, 0x74, - 0x61, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, - 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, - 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x6f, 0x70, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x3b, 0x6f, 0x70, 0x6c, 0xaa, 0x02, 0x15, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, - 0x2e, 0x4f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, - 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x4f, 0x70, 0x6c, 0x5c, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x22, 0xd5, 0x02, 0x92, 0x41, 0xaf, 0x02, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x2a, 0x0e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x4f, 0x70, + 0x6c, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x32, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x6c, + 0x61, 0x69, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x4a, 0x53, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x4c, 0x0a, 0x20, + 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x72, + 0x12, 0x28, 0x0a, 0x26, 0x1a, 0x24, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, + 0x6f, 0x70, 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4a, 0x4b, 0x0a, 0x03, 0x34, 0x30, + 0x30, 0x12, 0x44, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, + 0x63, 0x12, 0x34, 0x0a, 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4a, 0x4f, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x12, 0x44, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x69, 0x63, 0x12, 0x34, 0x0a, 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, + 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x11, 0x2f, 0x6f, 0x70, 0x6c, 0x2f, 0x73, 0x79, + 0x6e, 0x74, 0x61, 0x78, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x42, 0x95, 0x01, 0x0a, 0x18, 0x73, + 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x6f, 0x70, 0x6c, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x12, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, + 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, + 0x6f, 0x2f, 0x6f, 0x70, 0x6c, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6f, + 0x70, 0x6c, 0xaa, 0x02, 0x15, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x4f, 0x70, + 0x6c, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x15, 0x4f, 0x72, 0x79, + 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x4f, 0x70, 0x6c, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service.proto b/proto/ory/keto/opl/v1alpha1/syntax_service.proto index 948d0e8f7..86a6a5f8b 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service.proto +++ b/proto/ory/keto/opl/v1alpha1/syntax_service.proto @@ -22,6 +22,8 @@ service SyntaxService { option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { tags: "relationship"; operation_id: "checkOplSyntax"; + consumes: "text/plain"; + produces: "application/json"; responses: { key: "200" value: { @@ -31,6 +33,24 @@ service SyntaxService { } } } + responses: { + key: "400"; + value: { + description: "errorGeneric"; + schema: { + json_schema: {ref: ".ory.keto.relation_tuples.v1alpha2.ErrorResponse"} + } + } + } + responses: { + key: "default"; + value: { + description: "errorGeneric"; + schema: { + json_schema: {ref: ".ory.keto.relation_tuples.v1alpha2.ErrorResponse"} + } + } + } }; } } diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go index 63e752299..ffb9649f7 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go @@ -241,7 +241,7 @@ func (*CheckRequest_SubjectId) isCheckRequest_RestApiSubject() {} func (*CheckRequest_SubjectSet) isCheckRequest_RestApiSubject() {} -// The response for a CheckService.Check rpc. +// The response for a permission check. type CheckResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // Whether the specified subject (id) @@ -321,114 +321,116 @@ var file_ory_keto_relation_tuples_v1alpha2_check_service_proto_rawDesc = []byte{ 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 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, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 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, 0xb6, - 0x04, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x20, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x12, 0x1a, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, - 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5a, 0x0a, - 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x14, 0xfa, 0xd2, 0xe4, 0x93, - 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x18, 0x01, - 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x0a, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, - 0x01, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x12, - 0x5a, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x53, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x12, 0x5a, 0x0a, 0x05, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, 0x79, - 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x42, 0x12, 0xfa, 0xd2, - 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, - 0x52, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x6c, 0x61, 0x74, 0x65, 0x73, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, - 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x06, 0x6c, 0x61, 0x74, - 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, - 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, - 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x2d, 0x64, 0x65, - 0x70, 0x74, 0x68, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x5f, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x5b, 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x6c, 0x6f, - 0x77, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x65, 0x64, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, - 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xc1, 0x05, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xb0, 0x05, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, - 0x2f, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, + 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x37, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, + 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 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, + 0xb6, 0x04, 0x0a, 0x0c, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, + 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x02, 0x18, 0x01, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5a, + 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0xc3, 0x04, 0x92, 0x41, 0xbd, 0x03, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x21, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x75, 0x72, - 0x6c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x4a, 0xb9, 0x01, 0x0a, 0x03, 0x32, - 0x30, 0x30, 0x12, 0xb1, 0x01, 0x0a, 0x79, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2c, 0x20, 0x69, 0x6e, 0x20, - 0x63, 0x61, 0x73, 0x65, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x65, 0x64, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x60, 0x2f, 0x6f, 0x70, - 0x65, 0x6e, 0x61, 0x70, 0x69, 0x60, 0x20, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x63, 0x6f, 0x64, - 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x32, 0x30, 0x30, 0x2e, - 0x12, 0x34, 0x0a, 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4a, 0xbd, 0x01, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0xb5, - 0x01, 0x0a, 0x7d, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, - 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x63, 0x61, 0x73, 0x65, - 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x65, 0x64, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x60, 0x2f, 0x6f, 0x70, - 0x65, 0x6e, 0x61, 0x70, 0x69, 0x60, 0x20, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x63, 0x6f, 0x64, - 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x32, 0x30, 0x30, 0x2e, - 0x12, 0x34, 0x0a, 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x7c, 0x5a, 0x20, 0x12, 0x1e, - 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, - 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x5a, 0x1b, - 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5a, 0x23, 0x3a, 0x01, 0x2a, - 0x22, 0x1e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, - 0x12, 0x16, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, - 0x65, 0x73, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x42, 0xc2, 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, - 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x32, 0x42, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, - 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, - 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, - 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x14, 0xfa, 0xd2, 0xe4, + 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x18, + 0x01, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x0a, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, + 0x18, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x12, 0x5a, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x53, 0x65, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, + 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x12, 0x5a, 0x0a, 0x05, + 0x74, 0x75, 0x70, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x72, + 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x42, 0x12, 0xfa, + 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, + 0x52, 0x52, 0x05, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x6c, 0x61, 0x74, 0x65, + 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, + 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x06, 0x6c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0xfa, 0xd2, 0xe4, 0x93, 0x02, 0x0c, 0x12, + 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, 0x09, 0x73, 0x6e, 0x61, + 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, + 0x70, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x2d, 0x64, + 0x65, 0x70, 0x74, 0x68, 0x42, 0x12, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, 0x69, + 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x60, 0x0a, 0x0d, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x09, 0x73, 0x6e, 0x61, 0x70, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x12, 0xfa, 0xd2, 0xe4, + 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x4e, 0x4f, 0x5f, 0x53, 0x57, 0x41, 0x47, 0x47, 0x45, 0x52, 0x52, + 0x09, 0x73, 0x6e, 0x61, 0x70, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xc1, 0x05, 0x0a, 0x0c, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xb0, 0x05, 0x0a, 0x05, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x2f, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, + 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, + 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc3, 0x04, 0x92, 0x41, 0xbd, 0x03, 0x0a, + 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x21, 0x61, 0x70, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78, 0x2d, 0x77, 0x77, 0x77, 0x2d, 0x66, + 0x6f, 0x72, 0x6d, 0x2d, 0x75, 0x72, 0x6c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x32, 0x10, + 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, + 0x4a, 0xb9, 0x01, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0xb1, 0x01, 0x0a, 0x79, 0x54, 0x68, 0x65, + 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x63, 0x61, 0x73, 0x65, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, + 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x60, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x60, 0x20, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, + 0x73, 0x20, 0x32, 0x30, 0x30, 0x2e, 0x12, 0x34, 0x0a, 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4a, 0xbd, 0x01, 0x0a, + 0x03, 0x34, 0x30, 0x33, 0x12, 0xb5, 0x01, 0x0a, 0x7d, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2c, 0x20, 0x69, + 0x6e, 0x20, 0x63, 0x61, 0x73, 0x65, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, + 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x60, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x60, 0x20, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, + 0x73, 0x20, 0x32, 0x30, 0x30, 0x2e, 0x12, 0x34, 0x0a, 0x32, 0x1a, 0x30, 0x2e, 0x6f, 0x72, 0x79, + 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, + 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x2e, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x7c, 0x5a, 0x20, 0x12, 0x1e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2d, + 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2f, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x5a, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x5a, 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x12, 0x16, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2d, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x42, 0xc2, + 0x01, 0x0a, 0x24, 0x73, 0x68, 0x2e, 0x6f, 0x72, 0x79, 0x2e, 0x6b, 0x65, 0x74, 0x6f, 0x2e, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x42, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, + 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x74, 0x6f, + 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, 0x3b, 0x72, 0x74, 0x73, 0xaa, 0x02, 0x20, + 0x4f, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x32, + 0xca, 0x02, 0x20, 0x4f, 0x72, 0x79, 0x5c, 0x4b, 0x65, 0x74, 0x6f, 0x5c, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x5c, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service.proto b/proto/ory/keto/relation_tuples/v1alpha2/check_service.proto index ff7bab6ec..07a7a6657 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service.proto +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package ory.keto.relation_tuples.v1alpha2; import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; import "google/api/visibility.proto"; import "ory/keto/relation_tuples/v1alpha2/relation_tuples.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; @@ -139,13 +140,13 @@ message CheckRequest { int32 max_depth = 7 [json_name = "max-depth"]; } -// The response for a CheckService.Check rpc. +// The response for a permission check. message CheckResponse { // Whether the specified subject (id) // is related to the requested object. // // It is false by default if no ACL matches. - bool allowed = 1; + bool allowed = 1 [(google.api.field_behavior) = REQUIRED]; // This field is not implemented yet and has no effect. // + + + + + + + + + +

Top

+ +## google/protobuf/descriptor.proto + + + +### DescriptorProto + +Describes a message type. + +| Field | Type | Label | Description | +| --------------- | --------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- | +| name | [string](#string) | optional | | +| field | [FieldDescriptorProto](#google-protobuf-FieldDescriptorProto) | repeated | | +| extension | [FieldDescriptorProto](#google-protobuf-FieldDescriptorProto) | repeated | | +| nested_type | [DescriptorProto](#google-protobuf-DescriptorProto) | repeated | | +| enum_type | [EnumDescriptorProto](#google-protobuf-EnumDescriptorProto) | repeated | | +| extension_range | [DescriptorProto.ExtensionRange](#google-protobuf-DescriptorProto-ExtensionRange) | repeated | | +| oneof_decl | [OneofDescriptorProto](#google-protobuf-OneofDescriptorProto) | repeated | | +| options | [MessageOptions](#google-protobuf-MessageOptions) | optional | | +| reserved_range | [DescriptorProto.ReservedRange](#google-protobuf-DescriptorProto-ReservedRange) | repeated | | +| reserved_name | [string](#string) | repeated | Reserved field names, which may not be used by fields in the same message.
A given name may only be reserved once. | + + + +### DescriptorProto.ExtensionRange + +| Field | Type | Label | Description | +| ------- | --------------------------------------------------------------- | -------- | ----------- | +| start | [int32](#int32) | optional | Inclusive. | +| end | [int32](#int32) | optional | Exclusive. | +| options | [ExtensionRangeOptions](#google-protobuf-ExtensionRangeOptions) | optional | | + + + +### DescriptorProto.ReservedRange + +Range of reserved tag numbers. Reserved tag numbers may not be used by fields or +extension ranges in the same message. Reserved ranges may not overlap. + +| Field | Type | Label | Description | +| ----- | --------------- | -------- | ----------- | +| start | [int32](#int32) | optional | Inclusive. | +| end | [int32](#int32) | optional | Exclusive. | + + + +### EnumDescriptorProto + +Describes an enum type. + +| Field | Type | Label | Description | +| -------------- | ----------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| name | [string](#string) | optional | | +| value | [EnumValueDescriptorProto](#google-protobuf-EnumValueDescriptorProto) | repeated | | +| options | [EnumOptions](#google-protobuf-EnumOptions) | optional | | +| reserved_range | [EnumDescriptorProto.EnumReservedRange](#google-protobuf-EnumDescriptorProto-EnumReservedRange) | repeated | Range of reserved numeric values. Reserved numeric values may not be used
by enum values in the same enum declaration. Reserved ranges may not
overlap. | +| reserved_name | [string](#string) | repeated | Reserved enum value names, which may not be reused. A given name may only
be reserved once. | + + + +### EnumDescriptorProto.EnumReservedRange + +Range of reserved numeric values. Reserved values may not be used by entries in +the same enum. Reserved ranges may not overlap. + +Note that this is distinct from DescriptorProto.ReservedRange in that it is +inclusive such that it can appropriately represent the entire int32 domain. + +| Field | Type | Label | Description | +| ----- | --------------- | -------- | ----------- | +| start | [int32](#int32) | optional | Inclusive. | +| end | [int32](#int32) | optional | Inclusive. | + + + +### EnumOptions + +| Field | Type | Label | Description | +| -------------------------------------- | ----------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| allow_alias | [bool](#bool) | optional | Set this option to true to allow mapping different tag names to the same
value. | +| deprecated | [bool](#bool) | optional | Is this enum deprecated?
Depending on the target platform, this can emit Deprecated annotations
for the enum, or it will be completely ignored; in the very least, this
is a formalization for deprecating enums. Default: false | +| deprecated_legacy_json_field_conflicts | [bool](#bool) | optional | **Deprecated.** Enable the legacy handling of JSON field name conflicts. This lowercases
and strips underscored from the fields before comparison in proto3 only.
The new behavior takes `json_name` into account and applies to proto2 as
well.
TODO Remove this legacy behavior once downstream teams have
had time to migrate. | +| features | [FeatureSet](#google-protobuf-FeatureSet) | optional | Any features defined in the specific edition. | +| uninterpreted_option | [UninterpretedOption](#google-protobuf-UninterpretedOption) | repeated | The parser stores options it doesn't recognize here. See above. | + + + +### EnumValueDescriptorProto + +Describes a value within an enum. + +| Field | Type | Label | Description | +| ------- | ----------------------------------------------------- | -------- | ----------- | +| name | [string](#string) | optional | | +| number | [int32](#int32) | optional | | +| options | [EnumValueOptions](#google-protobuf-EnumValueOptions) | optional | | + + + +### EnumValueOptions + +| Field | Type | Label | Description | +| -------------------- | ----------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| deprecated | [bool](#bool) | optional | Is this enum value deprecated?
Depending on the target platform, this can emit Deprecated annotations
for the enum value, or it will be completely ignored; in the very least,
this is a formalization for deprecating enum values. Default: false | +| features | [FeatureSet](#google-protobuf-FeatureSet) | optional | Any features defined in the specific edition. | +| debug_redact | [bool](#bool) | optional | Indicate that fields annotated with this enum value should not be printed
out when using debug formats, e.g. when the field contains sensitive
credentials. Default: false | +| uninterpreted_option | [UninterpretedOption](#google-protobuf-UninterpretedOption) | repeated | The parser stores options it doesn't recognize here. See above. | + + + +### ExtensionRangeOptions + +| Field | Type | Label | Description | +| -------------------- | --------------------------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| uninterpreted_option | [UninterpretedOption](#google-protobuf-UninterpretedOption) | repeated | The parser stores options it doesn't recognize here. See above. | +| declaration | [ExtensionRangeOptions.Declaration](#google-protobuf-ExtensionRangeOptions-Declaration) | repeated | For external users: DO NOT USE. We are in the process of open sourcing
extension declaration and executing internal cleanups before it can be
used externally. | +| features | [FeatureSet](#google-protobuf-FeatureSet) | optional | Any features defined in the specific edition. | +| verification | [ExtensionRangeOptions.VerificationState](#google-protobuf-ExtensionRangeOptions-VerificationState) | optional | The verification state of the range.
TODO: flip the default to DECLARATION once all empty ranges
are marked as UNVERIFIED. Default: UNVERIFIED | + + + +### ExtensionRangeOptions.Declaration + +| Field | Type | Label | Description | +| --------- | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| number | [int32](#int32) | optional | The extension number declared within the extension range. | +| full_name | [string](#string) | optional | The fully-qualified name of the extension field. There must be a leading
dot in front of the full name. | +| type | [string](#string) | optional | The fully-qualified type name of the extension field. Unlike
Metadata.type, Declaration.type must have a leading dot for messages
and enums. | +| reserved | [bool](#bool) | optional | If true, indicates that the number is reserved in the extension range,
and any extension field with the number will fail to compile. Set this
when a declared extension field is deleted. | +| repeated | [bool](#bool) | optional | If true, indicates that the extension must be defined as repeated.
Otherwise the extension must be defined as optional. | + + + +### FeatureSet + +TODO Enums in C++ gencode (and potentially other languages) are not well scoped. +This means that each of the feature enums below can clash with each other. The +short names we've chosen maximize call-site readability, but leave us very open +to this scenario. A future feature will be designed and implemented to handle +this, hopefully before we ever hit a conflict here. + +| Field | Type | Label | Description | +| ----------------------- | ------------------------------------------------------------------------------------- | -------- | ----------- | +| field_presence | [FeatureSet.FieldPresence](#google-protobuf-FeatureSet-FieldPresence) | optional | | +| enum_type | [FeatureSet.EnumType](#google-protobuf-FeatureSet-EnumType) | optional | | +| repeated_field_encoding | [FeatureSet.RepeatedFieldEncoding](#google-protobuf-FeatureSet-RepeatedFieldEncoding) | optional | | +| utf8_validation | [FeatureSet.Utf8Validation](#google-protobuf-FeatureSet-Utf8Validation) | optional | | +| message_encoding | [FeatureSet.MessageEncoding](#google-protobuf-FeatureSet-MessageEncoding) | optional | | +| json_format | [FeatureSet.JsonFormat](#google-protobuf-FeatureSet-JsonFormat) | optional | | + + + +### FeatureSetDefaults + +A compiled specification for the defaults of a set of features. These messages +are generated from FeatureSet extensions and can be used to seed feature +resolution. The resolution with this object becomes a simple search for the +closest matching edition, followed by proto merges. + +| Field | Type | Label | Description | +| --------------- | ----------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------- | +| defaults | [FeatureSetDefaults.FeatureSetEditionDefault](#google-protobuf-FeatureSetDefaults-FeatureSetEditionDefault) | repeated | | +| minimum_edition | [Edition](#google-protobuf-Edition) | optional | The minimum supported edition (inclusive) when this was constructed.
Editions before this will not have defaults. | +| maximum_edition | [Edition](#google-protobuf-Edition) | optional | The maximum known edition (inclusive) when this was constructed. Editions
after this will not have reliable defaults. | + + + +### FeatureSetDefaults.FeatureSetEditionDefault + +A map from every known edition with a unique set of defaults to its defaults. +Not all editions may be contained here. For a given edition, the defaults at the +closest matching edition ordered at or before it should be used. This field must +be in strict ascending order by edition. + +| Field | Type | Label | Description | +| -------- | ----------------------------------------- | -------- | ----------- | +| edition | [Edition](#google-protobuf-Edition) | optional | | +| features | [FeatureSet](#google-protobuf-FeatureSet) | optional | | + + + +### FieldDescriptorProto + +Describes a field within a message. + +| Field | Type | Label | Description | +| --------------- | ------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| name | [string](#string) | optional | | +| number | [int32](#int32) | optional | | +| label | [FieldDescriptorProto.Label](#google-protobuf-FieldDescriptorProto-Label) | optional | | +| type | [FieldDescriptorProto.Type](#google-protobuf-FieldDescriptorProto-Type) | optional | If type_name is set, this need not be set. If both this and type_name
are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. | +| type_name | [string](#string) | optional | For message and enum types, this is the name of the type. If the name
starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
rules are used to find the type (i.e. first the nested types within this
message are searched, then within the parent, on up to the root
namespace). | +| extendee | [string](#string) | optional | For extensions, this is the name of the type being extended. It is
resolved in the same manner as type_name. | +| default_value | [string](#string) | optional | For numeric types, contains the original text representation of the value.
For booleans, "true" or "false".
For strings, contains the default text contents (not escaped in any way).
For bytes, contains the C escaped value. All bytes >= 128 are escaped. | +| oneof_index | [int32](#int32) | optional | If set, gives the index of a oneof in the containing type's oneof_decl
list. This field is a member of that oneof. | +| json_name | [string](#string) | optional | JSON name of this field. The value is set by protocol compiler. If the
user has set a "json_name" option on this field, that option's value
will be used. Otherwise, it's deduced from the field's name by converting
it to camelCase. | +| options | [FieldOptions](#google-protobuf-FieldOptions) | optional | | +| proto3_optional | [bool](#bool) | optional | If true, this is a proto3 "optional". When a proto3 field is optional, it
tracks presence regardless of field type.

When proto3_optional is true, this field must be belong to a oneof to
signal to old proto3 clients that presence is tracked for this field. This
oneof is known as a "synthetic" oneof, and this field must be its sole
member (each proto3 optional field gets its own synthetic oneof). Synthetic
oneofs exist in the descriptor only, and do not generate any API. Synthetic
oneofs must be ordered after all "real" oneofs.

For message fields, proto3_optional doesn't create any semantic change,
since non-repeated message fields always track presence. However it still
indicates the semantic detail of whether the user wrote "optional" or not.
This can be useful for round-tripping the .proto file. For consistency we
give message fields a synthetic oneof also, even though it is not required
to track presence. This is especially important because the parser can't
tell if a field is a message or an enum, so it must always create a
synthetic oneof.

Proto2 optional fields do not set this flag, because they already indicate
optional with `LABEL_OPTIONAL`. | + + + +### FieldOptions + +| Field | Type | Label | Description | +| -------------------- | ------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ctype | [FieldOptions.CType](#google-protobuf-FieldOptions-CType) | optional | The ctype option instructs the C++ code generator to use a different
representation of the field than it normally would. See the specific
options below. This option is only implemented to support use of
[ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
type "bytes" in the open source release -- sorry, we'll try to include
other types in a future version! Default: STRING | +| packed | [bool](#bool) | optional | The packed option can be enabled for repeated primitive fields to enable
a more efficient representation on the wire. Rather than repeatedly
writing the tag and type for each element, the entire array is encoded as
a single length-delimited blob. In proto3, only explicit setting it to
false will avoid using packed encoding. This option is prohibited in
Editions, but the `repeated_field_encoding` feature can be used to control
the behavior. | +| jstype | [FieldOptions.JSType](#google-protobuf-FieldOptions-JSType) | optional | The jstype option determines the JavaScript type used for values of the
field. The option is permitted only for 64 bit integral and fixed types
(int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
is represented as JavaScript string, which avoids loss of precision that
can happen when a large value is converted to a floating point JavaScript.
Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
use the JavaScript "number" type. The behavior of the default option
JS_NORMAL is implementation dependent.

This option is an enum to permit additional types to be added, e.g.
goog.math.Integer. Default: JS_NORMAL | +| lazy | [bool](#bool) | optional | Should this field be parsed lazily? Lazy applies only to message-type
fields. It means that when the outer message is initially parsed, the
inner message's contents will not be parsed but instead stored in encoded
form. The inner message will actually be parsed when it is first accessed.

This is only a hint. Implementations are free to choose whether to use
eager or lazy parsing regardless of the value of this option. However,
setting this option true suggests that the protocol author believes that
using lazy parsing on this field is worth the additional bookkeeping
overhead typically needed to implement it.

This option does not affect the public interface of any generated code;
all method signatures remain the same. Furthermore, thread-safety of the
interface is not affected by this option; const methods remain safe to
call from multiple threads concurrently, while non-const methods continue
to require exclusive access.

Note that implementations may choose not to check required fields within
a lazy sub-message. That is, calling IsInitialized() on the outer message
may return true even if the inner message has missing required fields.
This is necessary because otherwise the inner message would have to be
parsed in order to perform the check, defeating the purpose of lazy
parsing. An implementation which chooses not to check required fields
must be consistent about it. That is, for any particular sub-message, the
implementation must either _always_ check its required fields, or _never_
check its required fields, regardless of whether or not the message has
been parsed.

As of May 2022, lazy verifies the contents of the byte stream during
parsing. An invalid byte stream will cause the overall parsing to fail. Default: false | +| unverified_lazy | [bool](#bool) | optional | unverified_lazy does no correctness checks on the byte stream. This should
only be used where lazy with verification is prohibitive for performance
reasons. Default: false | +| deprecated | [bool](#bool) | optional | Is this field deprecated?
Depending on the target platform, this can emit Deprecated annotations
for accessors, or it will be completely ignored; in the very least, this
is a formalization for deprecating fields. Default: false | +| weak | [bool](#bool) | optional | For Google-internal migration only. Do not use. Default: false | +| debug_redact | [bool](#bool) | optional | Indicate that the field value should not be printed out when using debug
formats, e.g. when the field contains sensitive credentials. Default: false | +| retention | [FieldOptions.OptionRetention](#google-protobuf-FieldOptions-OptionRetention) | optional | | +| targets | [FieldOptions.OptionTargetType](#google-protobuf-FieldOptions-OptionTargetType) | repeated | | +| edition_defaults | [FieldOptions.EditionDefault](#google-protobuf-FieldOptions-EditionDefault) | repeated | | +| features | [FeatureSet](#google-protobuf-FeatureSet) | optional | Any features defined in the specific edition. | +| uninterpreted_option | [UninterpretedOption](#google-protobuf-UninterpretedOption) | repeated | The parser stores options it doesn't recognize here. See above. | + + + +### FieldOptions.EditionDefault + +| Field | Type | Label | Description | +| ------- | ----------------------------------- | -------- | ---------------- | +| edition | [Edition](#google-protobuf-Edition) | optional | | +| value | [string](#string) | optional | Textproto value. | + + + +### FileDescriptorProto + +Describes a complete .proto file. + +| Field | Type | Label | Description | +| ----------------- | ----------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| name | [string](#string) | optional | file name, relative to root of source tree | +| package | [string](#string) | optional | e.g. "foo", "foo.bar", etc. | +| dependency | [string](#string) | repeated | Names of files imported by this file. | +| public_dependency | [int32](#int32) | repeated | Indexes of the public imported files in the dependency list above. | +| weak_dependency | [int32](#int32) | repeated | Indexes of the weak imported files in the dependency list.
For Google-internal migration only. Do not use. | +| message_type | [DescriptorProto](#google-protobuf-DescriptorProto) | repeated | All top-level definitions in this file. | +| enum_type | [EnumDescriptorProto](#google-protobuf-EnumDescriptorProto) | repeated | | +| service | [ServiceDescriptorProto](#google-protobuf-ServiceDescriptorProto) | repeated | | +| extension | [FieldDescriptorProto](#google-protobuf-FieldDescriptorProto) | repeated | | +| options | [FileOptions](#google-protobuf-FileOptions) | optional | | +| source_code_info | [SourceCodeInfo](#google-protobuf-SourceCodeInfo) | optional | This field contains optional information about the original source code.
You may safely remove this entire field without harming runtime
functionality of the descriptors -- the information is needed only by
development tools. | +| syntax | [string](#string) | optional | The syntax of the proto file.
The supported values are "proto2", "proto3", and "editions".

If `edition` is present, this value must be "editions". | +| edition | [Edition](#google-protobuf-Edition) | optional | The edition of the proto file. | + + + +### FileDescriptorSet + +The protocol compiler can output a FileDescriptorSet containing the .proto files +it parses. + +| Field | Type | Label | Description | +| ----- | ----------------------------------------------------------- | -------- | ----------- | +| file | [FileDescriptorProto](#google-protobuf-FileDescriptorProto) | repeated | | + + + +### FileOptions + +| Field | Type | Label | Description | +| ----------------------------- | --------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| java_package | [string](#string) | optional | Sets the Java package where classes generated from this .proto will be
placed. By default, the proto package is used, but this is often
inappropriate because proto packages do not normally start with backwards
domain names. | +| java_outer_classname | [string](#string) | optional | Controls the name of the wrapper Java class generated for the .proto file.
That class will always contain the .proto file's getDescriptor() method as
well as any top-level extensions defined in the .proto file.
If java_multiple_files is disabled, then all the other classes from the
.proto file will be nested inside the single wrapper outer class. | +| java_multiple_files | [bool](#bool) | optional | If enabled, then the Java code generator will generate a separate .java
file for each top-level message, enum, and service defined in the .proto
file. Thus, these types will _not_ be nested inside the wrapper class
named by java_outer_classname. However, the wrapper class will still be
generated to contain the file's getDescriptor() method as well as any
top-level extensions defined in the file. Default: false | +| java_generate_equals_and_hash | [bool](#bool) | optional | **Deprecated.** This option does nothing. | +| java_string_check_utf8 | [bool](#bool) | optional | If set true, then the Java2 code generator will generate code that
throws an exception whenever an attempt is made to assign a non-UTF-8
byte sequence to a string field.
Message reflection will do the same.
However, an extension field still accepts non-UTF-8 byte sequences.
This option has no effect on when used with the lite runtime. Default: false | +| optimize_for | [FileOptions.OptimizeMode](#google-protobuf-FileOptions-OptimizeMode) | optional | Default: SPEED | +| go_package | [string](#string) | optional | Sets the Go package where structs generated from this .proto will be
placed. If omitted, the Go package will be derived from the following:
- The basename of the package import path, if provided.
- Otherwise, the package statement in the .proto file, if present.
- Otherwise, the basename of the .proto file, without extension. | +| cc_generic_services | [bool](#bool) | optional | Should generic services be generated in each language? "Generic" services
are not specific to any particular RPC system. They are generated by the
main code generators in each language (without additional plugins).
Generic services were the only kind of service generation supported by
early versions of google.protobuf.

Generic services are now considered deprecated in favor of using plugins
that generate code specific to your particular RPC system. Therefore,
these default to false. Old code which depends on generic services should
explicitly set them to true. Default: false | +| java_generic_services | [bool](#bool) | optional | Default: false | +| py_generic_services | [bool](#bool) | optional | Default: false | +| php_generic_services | [bool](#bool) | optional | Default: false | +| deprecated | [bool](#bool) | optional | Is this file deprecated?
Depending on the target platform, this can emit Deprecated annotations
for everything in the file, or it will be completely ignored; in the very
least, this is a formalization for deprecating files. Default: false | +| cc_enable_arenas | [bool](#bool) | optional | Enables the use of arenas for the proto messages in this file. This applies
only to generated classes for C++. Default: true | +| objc_class_prefix | [string](#string) | optional | Sets the objective c class prefix which is prepended to all objective c
generated classes from this .proto. There is no default. | +| csharp_namespace | [string](#string) | optional | Namespace for generated classes; defaults to the package. | +| swift_prefix | [string](#string) | optional | By default Swift generators will take the proto package and CamelCase it
replacing '.' with underscore and use that to prefix the types/symbols
defined. When this options is provided, they will use this value instead
to prefix the types/symbols defined. | +| php_class_prefix | [string](#string) | optional | Sets the php class prefix which is prepended to all php generated classes
from this .proto. Default is empty. | +| php_namespace | [string](#string) | optional | Use this option to change the namespace of php generated classes. Default
is empty. When this option is empty, the package name will be used for
determining the namespace. | +| php_metadata_namespace | [string](#string) | optional | Use this option to change the namespace of php generated metadata classes.
Default is empty. When this option is empty, the proto file name will be
used for determining the namespace. | +| ruby_package | [string](#string) | optional | Use this option to change the package of ruby generated classes. Default
is empty. When this option is not set, the package name will be used for
determining the ruby package. | +| features | [FeatureSet](#google-protobuf-FeatureSet) | optional | Any features defined in the specific edition. | +| uninterpreted_option | [UninterpretedOption](#google-protobuf-UninterpretedOption) | repeated | The parser stores options it doesn't recognize here.
See the documentation for the "Options" section above. | + + + +### GeneratedCodeInfo + +Describes the relationship between generated code and its original source file. +A GeneratedCodeInfo message is associated with only one generated source file, +but may contain references to different source .proto files. + +| Field | Type | Label | Description | +| ---------- | ----------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------- | +| annotation | [GeneratedCodeInfo.Annotation](#google-protobuf-GeneratedCodeInfo-Annotation) | repeated | An Annotation connects some span of text in generated code to an element
of its generating .proto file. | + + + +### GeneratedCodeInfo.Annotation + +| Field | Type | Label | Description | +| ----------- | ----------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| path | [int32](#int32) | repeated | Identifies the element in the original source .proto file. This field
is formatted the same as SourceCodeInfo.Location.path. | +| source_file | [string](#string) | optional | Identifies the filesystem path to the original source .proto. | +| begin | [int32](#int32) | optional | Identifies the starting offset in bytes in the generated code
that relates to the identified object. | +| end | [int32](#int32) | optional | Identifies the ending offset in bytes in the generated code that
relates to the identified object. The end offset should be one past
the last relevant byte (so the length of the text = end - begin). | +| semantic | [GeneratedCodeInfo.Annotation.Semantic](#google-protobuf-GeneratedCodeInfo-Annotation-Semantic) | optional | | + + + +### MessageOptions + +| Field | Type | Label | Description | +| -------------------------------------- | ----------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| message_set_wire_format | [bool](#bool) | optional | Set true to use the old proto1 MessageSet wire format for extensions.
This is provided for backwards-compatibility with the MessageSet wire
format. You should not use this for any other reason: It's less
efficient, has fewer features, and is more complicated.

The message must be defined exactly as follows:
message Foo {
option message_set_wire_format = true;
extensions 4 to max;
}
Note that the message cannot have any defined fields; MessageSets only
have extensions.

All extensions of your type must be singular messages; e.g. they cannot
be int32s, enums, or repeated messages.

Because this is an option, the above two restrictions are not enforced by
the protocol compiler. Default: false | +| no_standard_descriptor_accessor | [bool](#bool) | optional | Disables the generation of the standard "descriptor()" accessor, which can
conflict with a field of the same name. This is meant to make migration
from proto1 easier; new code should avoid fields named "descriptor". Default: false | +| deprecated | [bool](#bool) | optional | Is this message deprecated?
Depending on the target platform, this can emit Deprecated annotations
for the message, or it will be completely ignored; in the very least,
this is a formalization for deprecating messages. Default: false | +| map_entry | [bool](#bool) | optional | NOTE: Do not set the option in .proto files. Always use the maps syntax
instead. The option should only be implicitly set by the proto compiler
parser.

Whether the message is an automatically generated map entry type for the
maps field.

For maps fields:
map map_field = 1;
The parsed descriptor looks like:
message MapFieldEntry {
option map_entry = true;
optional KeyType key = 1;
optional ValueType value = 2;
}
repeated MapFieldEntry map_field = 1;

Implementations may choose not to generate the map_entry=true message, but
use a native map in the target language to hold the keys and values.
The reflection APIs in such implementations still need to work as
if the field is a repeated message field. | +| deprecated_legacy_json_field_conflicts | [bool](#bool) | optional | **Deprecated.** Enable the legacy handling of JSON field name conflicts. This lowercases
and strips underscored from the fields before comparison in proto3 only.
The new behavior takes `json_name` into account and applies to proto2 as
well.

This should only be used as a temporary measure against broken builds due
to the change in behavior for JSON field name conflicts.

TODO This is legacy behavior we plan to remove once downstream
teams have had time to migrate. | +| features | [FeatureSet](#google-protobuf-FeatureSet) | optional | Any features defined in the specific edition. | +| uninterpreted_option | [UninterpretedOption](#google-protobuf-UninterpretedOption) | repeated | The parser stores options it doesn't recognize here. See above. | + + + +### MethodDescriptorProto + +Describes a method of a service. + +| Field | Type | Label | Description | +| ---------------- | ----------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| name | [string](#string) | optional | | +| input_type | [string](#string) | optional | Input and output type names. These are resolved in the same way as
FieldDescriptorProto.type_name, but must refer to a message type. | +| output_type | [string](#string) | optional | | +| options | [MethodOptions](#google-protobuf-MethodOptions) | optional | | +| client_streaming | [bool](#bool) | optional | Identifies if client streams multiple client messages Default: false | +| server_streaming | [bool](#bool) | optional | Identifies if server streams multiple server messages Default: false | + + + +### MethodOptions + +| Field | Type | Label | Description | +| -------------------- | --------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| deprecated | [bool](#bool) | optional | Is this method deprecated?
Depending on the target platform, this can emit Deprecated annotations
for the method, or it will be completely ignored; in the very least,
this is a formalization for deprecating methods. Default: false | +| idempotency_level | [MethodOptions.IdempotencyLevel](#google-protobuf-MethodOptions-IdempotencyLevel) | optional | Default: IDEMPOTENCY_UNKNOWN | +| features | [FeatureSet](#google-protobuf-FeatureSet) | optional | Any features defined in the specific edition. | +| uninterpreted_option | [UninterpretedOption](#google-protobuf-UninterpretedOption) | repeated | The parser stores options it doesn't recognize here. See above. | + + + +### OneofDescriptorProto + +Describes a oneof. + +| Field | Type | Label | Description | +| ------- | --------------------------------------------- | -------- | ----------- | +| name | [string](#string) | optional | | +| options | [OneofOptions](#google-protobuf-OneofOptions) | optional | | + + + +### OneofOptions + +| Field | Type | Label | Description | +| -------------------- | ----------------------------------------------------------- | -------- | --------------------------------------------------------------- | +| features | [FeatureSet](#google-protobuf-FeatureSet) | optional | Any features defined in the specific edition. | +| uninterpreted_option | [UninterpretedOption](#google-protobuf-UninterpretedOption) | repeated | The parser stores options it doesn't recognize here. See above. | + + + +### ServiceDescriptorProto + +Describes a service. + +| Field | Type | Label | Description | +| ------- | --------------------------------------------------------------- | -------- | ----------- | +| name | [string](#string) | optional | | +| method | [MethodDescriptorProto](#google-protobuf-MethodDescriptorProto) | repeated | | +| options | [ServiceOptions](#google-protobuf-ServiceOptions) | optional | | + + + +### ServiceOptions + +| Field | Type | Label | Description | +| -------------------- | ----------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| features | [FeatureSet](#google-protobuf-FeatureSet) | optional | Any features defined in the specific edition. | +| deprecated | [bool](#bool) | optional | Is this service deprecated?
Depending on the target platform, this can emit Deprecated annotations
for the service, or it will be completely ignored; in the very least,
this is a formalization for deprecating services. Default: false | +| uninterpreted_option | [UninterpretedOption](#google-protobuf-UninterpretedOption) | repeated | The parser stores options it doesn't recognize here. See above. | + + + +### SourceCodeInfo + +Encapsulates information about the original source file from which a +FileDescriptorProto was generated. + +| Field | Type | Label | Description | +| -------- | ------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| location | [SourceCodeInfo.Location](#google-protobuf-SourceCodeInfo-Location) | repeated | A Location identifies a piece of source code in a .proto file which
corresponds to a particular definition. This information is intended
to be useful to IDEs, code indexers, documentation generators, and similar
tools.

For example, say we have a file like:
message Foo {
optional string foo = 1;
}
Let's look at just the field definition:
optional string foo = 1;
^ ^^ ^^ ^ ^^^
a bc de f ghi
We have the following locations:
span path represents
[a,i) [ 4, 0, 2, 0 ] The whole field definition.
[a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
[c,d) [ 4, 0, 2, 0, 5 ] The type (string).
[e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
[g,h) [ 4, 0, 2, 0, 3 ] The number (1).

Notes:
- A location may refer to a repeated field itself (i.e. not to any
particular index within it). This is used whenever a set of elements are
logically enclosed in a single code segment. For example, an entire
extend block (possibly containing multiple extension definitions) will
have an outer location whose path refers to the "extensions" repeated
field without an index.
- Multiple locations may have the same path. This happens when a single
logical declaration is spread out across multiple places. The most
obvious example is the "extend" block again -- there may be multiple
extend blocks in the same scope, each of which will have the same path.
- A location's span is not always a subset of its parent's span. For
example, the "extendee" of an extension declaration appears at the
beginning of the "extend" block and is shared by all extensions within
the block.
- Just because a location's span is a subset of some other location's span
does not mean that it is a descendant. For example, a "group" defines
both a type and a field in a single declaration. Thus, the locations
corresponding to the type and field and their components will overlap.
- Code which tries to interpret locations should probably be designed to
ignore those that it doesn't understand, as more types of locations could
be recorded in the future. | + + + +### SourceCodeInfo.Location + +| Field | Type | Label | Description | +| ------------------------- | ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| path | [int32](#int32) | repeated | Identifies which part of the FileDescriptorProto was defined at this
location.

Each element is a field number or an index. They form a path from
the root FileDescriptorProto to the place where the definition occurs.
For example, this path:
[ 4, 3, 2, 7, 1 ]
refers to:
file.message_type(3) // 4, 3
.field(7) // 2, 7
.name() // 1
This is because FileDescriptorProto.message_type has field number 4:
repeated DescriptorProto message_type = 4;
and DescriptorProto.field has field number 2:
repeated FieldDescriptorProto field = 2;
and FieldDescriptorProto.name has field number 1:
optional string name = 1;

Thus, the above path gives the location of a field name. If we removed
the last element:
[ 4, 3, 2, 7 ]
this path refers to the whole field declaration (from the beginning
of the label to the terminating semicolon). | +| span | [int32](#int32) | repeated | Always has exactly three or four elements: start line, start column,
end line (optional, otherwise assumed same as start line), end column.
These are packed into a single field for efficiency. Note that line
and column numbers are zero-based -- typically you will want to add
1 to each before displaying to a user. | +| leading_comments | [string](#string) | optional | If this SourceCodeInfo represents a complete declaration, these are any
comments appearing before and after the declaration which appear to be
attached to the declaration.

A series of line comments appearing on consecutive lines, with no other
tokens appearing on those lines, will be treated as a single comment.

leading*detached_comments will keep paragraphs of comments that appear
before (but not connected to) the current element. Each paragraph,
separated by empty lines, will be one comment element in the repeated
field.

Only the comment content is provided; comment markers (e.g. //) are
stripped out. For block comments, leading whitespace and an asterisk
will be stripped from the beginning of each line other than the first.
Newlines are included in the output.

Examples:

optional int32 foo = 1; // Comment attached to foo.
// Comment attached to bar.
optional int32 bar = 2;

optional string baz = 3;
// Comment attached to baz.
// Another line attached to baz.

// Comment attached to moo.
//
// Another line attached to moo.
optional double moo = 4;

// Detached comment for corge. This is not leading or trailing comments
// to moo or corge because there are blank lines separating it from
// both.

// Detached comment for corge paragraph 2.

optional string corge = 5;
/* Block comment attached
_ to corge. Leading asterisks
_ will be removed. _/
/_ Block comment attached to
\_ grault. \*/
optional int32 grault = 6;

// ignored detached comments. | +| trailing_comments | [string](#string) | optional | | +| leading_detached_comments | [string](#string) | repeated | | + + + +### UninterpretedOption + +A message representing a option the parser does not recognize. This only appears +in options protos created by the compiler::Parser class. DescriptorPool resolves +these when building Descriptor objects. Therefore, options protos in descriptor +objects (e.g. returned by Descriptor::options(), or produced by +Descriptor::CopyTo()) will never have UninterpretedOptions in them. + +| Field | Type | Label | Description | +| ------------------ | ----------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| name | [UninterpretedOption.NamePart](#google-protobuf-UninterpretedOption-NamePart) | repeated | | +| identifier_value | [string](#string) | optional | The value of the uninterpreted option, in whatever type the tokenizer
identified it as during parsing. Exactly one of these should be set. | +| positive_int_value | [uint64](#uint64) | optional | | +| negative_int_value | [int64](#int64) | optional | | +| double_value | [double](#double) | optional | | +| string_value | [bytes](#bytes) | optional | | +| aggregate_value | [string](#string) | optional | | + + + +### UninterpretedOption.NamePart + +The name of the uninterpreted option. Each string represents a segment in a +dot-separated name. is_extension is true iff a segment represents an extension +(denoted with parentheses in options specs in .proto files). E.g.,{ ["foo", +false], ["bar.baz", true], ["moo", false] } represents "foo.(bar.baz).moo". + +| Field | Type | Label | Description | +| ------------ | ----------------- | -------- | ----------- | +| name_part | [string](#string) | required | | +| is_extension | [bool](#bool) | required | | + + + + + +### Edition + +The full set of known editions. + +| Name | Number | Description | +| ----------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| EDITION_UNKNOWN | 0 | A placeholder for an unknown edition value. | +| EDITION_PROTO2 | 998 | Legacy syntax "editions". These pre-date editions, but behave much like
distinct editions. These can't be used to specify the edition of proto
files, but feature definitions must supply proto2/proto3 defaults for
backwards compatibility. | +| EDITION_PROTO3 | 999 | | +| EDITION_2023 | 1000 | Editions that have been released. The specific values are arbitrary and
should not be depended on, but they will always be time-ordered for easy
comparison. | +| EDITION_1_TEST_ONLY | 1 | Placeholder editions for testing feature resolution. These should not be
used or relyed on outside of tests. | +| EDITION_2_TEST_ONLY | 2 | | +| EDITION_99997_TEST_ONLY | 99997 | | +| EDITION_99998_TEST_ONLY | 99998 | | +| EDITION_99999_TEST_ONLY | 99999 | | + + + +### ExtensionRangeOptions.VerificationState + +The verification state of the extension range. + +| Name | Number | Description | +| ----------- | ------ | ------------------------------------------------- | +| DECLARATION | 0 | All the extensions of the range must be declared. | +| UNVERIFIED | 1 | | + + + +### FeatureSet.EnumType + +| Name | Number | Description | +| ----------------- | ------ | ----------- | +| ENUM_TYPE_UNKNOWN | 0 | | +| OPEN | 1 | | +| CLOSED | 2 | | + + + +### FeatureSet.FieldPresence + +| Name | Number | Description | +| ---------------------- | ------ | ----------- | +| FIELD_PRESENCE_UNKNOWN | 0 | | +| EXPLICIT | 1 | | +| IMPLICIT | 2 | | +| LEGACY_REQUIRED | 3 | | + + + +### FeatureSet.JsonFormat + +| Name | Number | Description | +| ------------------- | ------ | ----------- | +| JSON_FORMAT_UNKNOWN | 0 | | +| ALLOW | 1 | | +| LEGACY_BEST_EFFORT | 2 | | + + + +### FeatureSet.MessageEncoding + +| Name | Number | Description | +| ------------------------ | ------ | ----------- | +| MESSAGE_ENCODING_UNKNOWN | 0 | | +| LENGTH_PREFIXED | 1 | | +| DELIMITED | 2 | | + + + +### FeatureSet.RepeatedFieldEncoding + +| Name | Number | Description | +| ------------------------------- | ------ | ----------- | +| REPEATED_FIELD_ENCODING_UNKNOWN | 0 | | +| PACKED | 1 | | +| EXPANDED | 2 | | + + + +### FeatureSet.Utf8Validation + +| Name | Number | Description | +| ----------------------- | ------ | ----------- | +| UTF8_VALIDATION_UNKNOWN | 0 | | +| NONE | 1 | | +| VERIFY | 2 | | + + + +### FieldDescriptorProto.Label + +| Name | Number | Description | +| -------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| LABEL_OPTIONAL | 1 | 0 is reserved for errors | +| LABEL_REPEATED | 3 | | +| LABEL_REQUIRED | 2 | The required label is only allowed in google.protobuf. In proto3 and Editions
it's explicitly prohibited. In Editions, the `field_presence` feature
can be used to get this behavior. | + + + +### FieldDescriptorProto.Type + +| Name | Number | Description | +| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| TYPE_DOUBLE | 1 | 0 is reserved for errors.
Order is weird for historical reasons. | +| TYPE_FLOAT | 2 | | +| TYPE_INT64 | 3 | Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
negative values are likely. | +| TYPE_UINT64 | 4 | | +| TYPE_INT32 | 5 | Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
negative values are likely. | +| TYPE_FIXED64 | 6 | | +| TYPE_FIXED32 | 7 | | +| TYPE_BOOL | 8 | | +| TYPE_STRING | 9 | | +| TYPE_GROUP | 10 | Tag-delimited aggregate.
Group type is deprecated and not supported after google.protobuf. However, Proto3
implementations should still be able to parse the group wire format and
treat group fields as unknown fields. In Editions, the group wire format
can be enabled via the `message_encoding` feature. | +| TYPE_MESSAGE | 11 | Length-delimited aggregate. | +| TYPE_BYTES | 12 | New in version 2. | +| TYPE_UINT32 | 13 | | +| TYPE_ENUM | 14 | | +| TYPE_SFIXED32 | 15 | | +| TYPE_SFIXED64 | 16 | | +| TYPE_SINT32 | 17 | Uses ZigZag encoding. | +| TYPE_SINT64 | 18 | Uses ZigZag encoding. | + + + +### FieldOptions.CType + +| Name | Number | Description | +| ------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| STRING | 0 | Default mode. | +| CORD | 1 | The option [ctype=CORD] may be applied to a non-repeated field of type
"bytes". It indicates that in C++, the data should be stored in a Cord
instead of a string. For very large strings, this may reduce memory
fragmentation. It may also allow better performance when parsing from a
Cord, or when parsing with aliasing enabled, as the parsed Cord may then
alias the original buffer. | +| STRING_PIECE | 2 | | + + + +### FieldOptions.JSType + +| Name | Number | Description | +| --------- | ------ | ----------------------- | +| JS_NORMAL | 0 | Use the default type. | +| JS_STRING | 1 | Use JavaScript strings. | +| JS_NUMBER | 2 | Use JavaScript numbers. | + + + +### FieldOptions.OptionRetention + +If set to RETENTION_SOURCE, the option will be omitted from the binary. Note: as +of January 2023, support for this is in progress and does not yet have an effect +(b/264593489). + +| Name | Number | Description | +| ----------------- | ------ | ----------- | +| RETENTION_UNKNOWN | 0 | | +| RETENTION_RUNTIME | 1 | | +| RETENTION_SOURCE | 2 | | + + + +### FieldOptions.OptionTargetType + +This indicates the types of entities that the field may apply to when used as an +option. If it is unset, then the field may be freely used as an option on any +kind of entity. Note: as of January 2023, support for this is in progress and +does not yet have an effect (b/264593489). + +| Name | Number | Description | +| --------------------------- | ------ | ----------- | +| TARGET_TYPE_UNKNOWN | 0 | | +| TARGET_TYPE_FILE | 1 | | +| TARGET_TYPE_EXTENSION_RANGE | 2 | | +| TARGET_TYPE_MESSAGE | 3 | | +| TARGET_TYPE_FIELD | 4 | | +| TARGET_TYPE_ONEOF | 5 | | +| TARGET_TYPE_ENUM | 6 | | +| TARGET_TYPE_ENUM_ENTRY | 7 | | +| TARGET_TYPE_SERVICE | 8 | | +| TARGET_TYPE_METHOD | 9 | | + + + +### FileOptions.OptimizeMode + +Generated classes can be optimized for speed or code size. + +| Name | Number | Description | +| ------------ | ------ | ----------------------------------------------------------- | +| SPEED | 1 | Generate complete code for parsing, serialization, | +| CODE_SIZE | 2 | etc.

Use ReflectionOps to implement these methods. | +| LITE_RUNTIME | 3 | Generate code using MessageLite and the lite runtime. | + + + +### GeneratedCodeInfo.Annotation.Semantic + +Represents the identified object's effect on the element in the original .proto +file. + +| Name | Number | Description | +| ----- | ------ | -------------------------------------------------- | +| NONE | 0 | There is no effect or the effect is indescribable. | +| SET | 1 | The element is set or otherwise mutated. | +| ALIAS | 2 | An alias to the element is returned. | + + + +### MethodOptions.IdempotencyLevel + +Is this method side-effect-free (or safe in HTTP parlance), or idempotent, or +neither? HTTP based RPC implementation may choose GET verb for safe methods, and +PUT verb for idempotent methods instead of the default POST. + +| Name | Number | Description | +| ------------------- | ------ | ------------------------------------- | +| IDEMPOTENCY_UNKNOWN | 0 | | +| NO_SIDE_EFFECTS | 1 | implies idempotent | +| IDEMPOTENT | 2 | idempotent, but may have side effects | + + + + + + + + + +

Top

+ +## google/api/annotations.proto + + + + + + + +### File-level Extensions + +| Extension | Type | Base | Number | Description | +| --------- | -------- | ------------------------------ | -------- | --------------- | +| http | HttpRule | .google.protobuf.MethodOptions | 72295728 | See `HttpRule`. | + + + + + + + +

Top

+ +## google/protobuf/struct.proto + + + +### ListValue + +`ListValue` is a wrapper around a repeated field of values. + +The JSON representation for `ListValue` is JSON array. + +| Field | Type | Label | Description | +| ------ | ------------------------------- | -------- | ------------------------------------------- | +| values | [Value](#google-protobuf-Value) | repeated | Repeated field of dynamically typed values. | + + + +### Struct + +`Struct` represents a structured data value, consisting of fields which map to +dynamically typed values. In some languages, `Struct` might be supported by a +native representation. For example, in scripting languages like JS a struct is +represented as an object. The details of that representation are described +together with the proto support for the language. + +The JSON representation for `Struct` is JSON object. + +| Field | Type | Label | Description | +| ------ | --------------------------------------------------------- | -------- | ------------------------------------------ | +| fields | [Struct.FieldsEntry](#google-protobuf-Struct-FieldsEntry) | repeated | Unordered map of dynamically typed values. | + + + +### Struct.FieldsEntry + +| Field | Type | Label | Description | +| ----- | ------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Value](#google-protobuf-Value) | | | + + + +### Value + +`Value` represents a dynamically typed value which can be either null, a number, +a string, a boolean, a recursive struct value, or a list of values. A producer +of value is expected to set one of these variants. Absence of any variant +indicates an error. + +The JSON representation for `Value` is JSON value. + +| Field | Type | Label | Description | +| ------------ | --------------------------------------- | ----- | ------------------------------ | +| null_value | [NullValue](#google-protobuf-NullValue) | | Represents a null value. | +| number_value | [double](#double) | | Represents a double value. | +| string_value | [string](#string) | | Represents a string value. | +| bool_value | [bool](#bool) | | Represents a boolean value. | +| struct_value | [Struct](#google-protobuf-Struct) | | Represents a structured value. | +| list_value | [ListValue](#google-protobuf-ListValue) | | Represents a repeated `Value`. | + + + + + +### NullValue + +`NullValue` is a singleton enumeration to represent the null value for the +`Value` type union. + +The JSON representation for `NullValue` is JSON `null`. + +| Name | Number | Description | +| ---------- | ------ | ----------- | +| NULL_VALUE | 0 | Null value. | + + + + + + + + + +

Top

+ +## protoc-gen-openapiv2/options/openapiv2.proto + + + +### Contact + +`Contact` is a representation of OpenAPI v2 specification's Contact object. + +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject + +Example: + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { +... contact: { name: "gRPC-Gateway project"; url: +"https://github.com/grpc-ecosystem/grpc-gateway"; email: "none@example.com"; }; +... }; ... }; + +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ---------------------------------------------------------------------------------------------------- | +| name | [string](#string) | | The identifying name of the contact person/organization. | +| url | [string](#string) | | The URL pointing to the contact information. MUST be in the format of a
URL. | +| email | [string](#string) | | The email address of the contact person/organization. MUST be in the format
of an email address. | + + + +### EnumSchema + +`EnumSchema` is subset of fields from the OpenAPI v2 specification's Schema +object. Only fields that are applicable to Enums are included See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + +Example: + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum) = { ... title: +"MyEnum"; description:"This is my nice enum"; example: "ZERO"; required: true; +... }; + +| Field | Type | Label | Description | +| ------------- | --------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| description | [string](#string) | | A short description of the schema. | +| default | [string](#string) | | | +| title | [string](#string) | | The title of the schema. | +| required | [bool](#bool) | | | +| read_only | [bool](#bool) | | | +| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation for this schema. | +| example | [string](#string) | | | +| ref | [string](#string) | | Ref is used to define an external reference to include in the message.
This could be a fully qualified proto message reference, and that type must
be imported into the protofile. If no message is identified, the Ref will
be used verbatim in the output.
For example:
`ref: ".google.protobuf.Timestamp"`. | +| extensions | [EnumSchema.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-EnumSchema-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | + + + +### EnumSchema.ExtensionsEntry + +| Field | Type | Label | Description | +| ----- | ----------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + + + +### ExternalDocumentation + +`ExternalDocumentation` is a representation of OpenAPI v2 specification's +ExternalDocumentation object. + +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject + +Example: + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { ... +external_docs: { description: "More about gRPC-Gateway"; url: +"https://github.com/grpc-ecosystem/grpc-gateway"; } ... }; + +| Field | Type | Label | Description | +| ----------- | ----------------- | ----- | --------------------------------------------------------------------------------------------------------- | +| description | [string](#string) | | A short description of the target documentation. GFM syntax can be used for
rich text representation. | +| url | [string](#string) | | The URL for the target documentation. Value MUST be in the format
of a URL. | + + + +### Header + +`Header` is a representation of OpenAPI v2 specification's Header object. + +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject + +| Field | Type | Label | Description | +| ----------- | ----------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| description | [string](#string) | | `Description` is a short description of the header. | +| type | [string](#string) | | The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. | +| format | [string](#string) | | `Format` The extending format for the previously mentioned type. | +| default | [string](#string) | | `Default` Declares the value of the header that the server will use if none is provided.
See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
Unlike JSON Schema this value MUST conform to the defined type for the header. | +| pattern | [string](#string) | | 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. | + + + +### HeaderParameter + +`HeaderParameter` a HTTP header parameter. See: +https://swagger.io/specification/v2/#parameter-object + +| Field | Type | Label | Description | +| ----------- | --------------------------------------------------------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| name | [string](#string) | | `Name` is the header name. | +| description | [string](#string) | | `Description` is a short description of the header. | +| type | [HeaderParameter.Type](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter-Type) | | `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
See: https://swagger.io/specification/v2/#parameterType. | +| format | [string](#string) | | `Format` The extending format for the previously mentioned type. | +| required | [bool](#bool) | | `Required` indicates if the header is optional | + + + +### Info + +`Info` is a representation of OpenAPI v2 specification's Info object. + +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject + +Example: + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { +title: "Echo API"; version: "1.0"; description: ""; contact: { name: +"gRPC-Gateway project"; url: "https://github.com/grpc-ecosystem/grpc-gateway"; +email: "none@example.com"; }; license: { name: "BSD 3-Clause License"; url: +"https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; }; }; ... }; + +| Field | Type | Label | Description | +| ---------------- | --------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| title | [string](#string) | | The title of the application. | +| description | [string](#string) | | A short description of the application. GFM syntax can be used for rich
text representation. | +| terms_of_service | [string](#string) | | The Terms of Service for the API. | +| contact | [Contact](#grpc-gateway-protoc_gen_openapiv2-options-Contact) | | The contact information for the exposed API. | +| license | [License](#grpc-gateway-protoc_gen_openapiv2-options-License) | | The license information for the exposed API. | +| version | [string](#string) | | Provides the version of the application API (not to be confused
with the specification version). | +| extensions | [Info.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Info-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | + + + +### Info.ExtensionsEntry + +| Field | Type | Label | Description | +| ----- | ----------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + + + +### JSONSchema + +`JSONSchema` represents properties from JSON Schema taken, and as used, in the +OpenAPI v2 spec. + +This includes changes made by OpenAPI v2. + +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + +See also: https://cswr.github.io/JsonSchema/spec/basic_types/, +https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json + +Example: + +message SimpleMessage { option +(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { json_schema: { +title: "SimpleMessage" description: "A simple message." required: ["id"] } }; + +// Id represents the message identifier. string id = 1; [ +(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { description: +"The unique identifier of the simple message." }]; } + +| Field | Type | Label | Description | +| ------------------- | --------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ref | [string](#string) | | Ref is used to define an external reference to include in the message.
This could be a fully qualified proto message reference, and that type must
be imported into the protofile. If no message is identified, the Ref will
be used verbatim in the output.
For example:
`ref: ".google.protobuf.Timestamp"`. | +| title | [string](#string) | | The title of the schema. | +| description | [string](#string) | | A short description of the schema. | +| default | [string](#string) | | | +| read_only | [bool](#bool) | | | +| example | [string](#string) | | A free-form property to include a JSON example of this field. This is copied
verbatim to the output swagger.json. Quotes must be escaped.
This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject | +| multiple_of | [double](#double) | | | +| maximum | [double](#double) | | Maximum represents an inclusive upper limit for a numeric instance. The
value of MUST be a number, | +| exclusive_maximum | [bool](#bool) | | | +| minimum | [double](#double) | | minimum represents an inclusive lower limit for a numeric instance. The
value of MUST be a number, | +| exclusive_minimum | [bool](#bool) | | | +| max_length | [uint64](#uint64) | | | +| min_length | [uint64](#uint64) | | | +| pattern | [string](#string) | | | +| max_items | [uint64](#uint64) | | | +| min_items | [uint64](#uint64) | | | +| unique_items | [bool](#bool) | | | +| max_properties | [uint64](#uint64) | | | +| min_properties | [uint64](#uint64) | | | +| required | [string](#string) | repeated | | +| array | [string](#string) | repeated | Items in 'array' must be unique. | +| type | [JSONSchema.JSONSchemaSimpleTypes](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-JSONSchemaSimpleTypes) | repeated | | +| format | [string](#string) | | `Format` | +| enum | [string](#string) | repeated | Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 | +| field_configuration | [JSONSchema.FieldConfiguration](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-FieldConfiguration) | | Additional field level properties used when generating the OpenAPI v2 file. | +| extensions | [JSONSchema.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | + + + +### JSONSchema.ExtensionsEntry + +| Field | Type | Label | Description | +| ----- | ----------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + + + +### JSONSchema.FieldConfiguration + +'FieldConfiguration' provides additional field level properties used when +generating the OpenAPI v2 file. These properties are not defined by OpenAPIv2, +but they are used to control the generation. + +| Field | Type | Label | Description | +| --------------- | ----------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| path_param_name | [string](#string) | | Alternative parameter name when used as path parameter. If set, this will
be used as the complete parameter name when this field is used as a path
parameter. Use this to avoid having auto generated path parameter names
for overlapping paths. | + + + +### License + +`License` is a representation of OpenAPI v2 specification's License object. + +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject + +Example: + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { +... license: { name: "BSD 3-Clause License"; url: +"https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; }; ... }; +... }; + +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ---------------------------------------------------------------------- | +| name | [string](#string) | | The license name used for the API. | +| url | [string](#string) | | A URL to the license used for the API. MUST be in the format of a URL. | + + + +### Operation + +`Operation` is a representation of OpenAPI v2 specification's Operation object. + +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject + +Example: + +service EchoService { rpc Echo(SimpleMessage) returns (SimpleMessage) { option +(google.api.http) = { get: "/v1/example/echo/{id}" }; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "Get a message."; + operation_id: "getMessage"; + tags: "echo"; + responses: { + key: "200" + value: { + description: "OK"; + } + } + }; + +} } + +| Field | Type | Label | Description | +| ------------- | ------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| tags | [string](#string) | repeated | A list of tags for API documentation control. Tags can be used for logical
grouping of operations by resources or any other qualifier. | +| summary | [string](#string) | | A short summary of what the operation does. For maximum readability in the
swagger-ui, this field SHOULD be less than 120 characters. | +| description | [string](#string) | | A verbose explanation of the operation behavior. GFM syntax can be used for
rich text representation. | +| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation for this operation. | +| operation_id | [string](#string) | | Unique string used to identify the operation. The id MUST be unique among
all operations described in the API. Tools and libraries MAY use the
operationId to uniquely identify an operation, therefore, it is recommended
to follow common programming naming conventions. | +| consumes | [string](#string) | repeated | A list of MIME types the operation can consume. This overrides the consumes
definition at the OpenAPI Object. An empty value MAY be used to clear the
global definition. Value MUST be as described under Mime Types. | +| produces | [string](#string) | repeated | A list of MIME types the operation can produce. This overrides the produces
definition at the OpenAPI Object. An empty value MAY be used to clear the
global definition. Value MUST be as described under Mime Types. | +| responses | [Operation.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ResponsesEntry) | repeated | The list of possible responses as they are returned from executing this
operation. | +| schemes | [Scheme](#grpc-gateway-protoc_gen_openapiv2-options-Scheme) | repeated | The transfer protocol for the operation. Values MUST be from the list:
"http", "https", "ws", "wss". The value overrides the OpenAPI Object
schemes definition. | +| deprecated | [bool](#bool) | | Declares this operation to be deprecated. Usage of the declared operation
should be refrained. Default value is false. | +| security | [SecurityRequirement](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement) | repeated | A declaration of which security schemes are applied for this operation. The
list of values describes alternative security schemes that can be used
(that is, there is a logical OR between the security requirements). This
definition overrides any declared top-level security. To remove a top-level
security declaration, an empty array can be used. | +| extensions | [Operation.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Operation-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | +| parameters | [Parameters](#grpc-gateway-protoc_gen_openapiv2-options-Parameters) | | Custom parameters such as HTTP request headers.
See: https://swagger.io/docs/specification/2-0/describing-parameters/
and https://swagger.io/specification/v2/#parameter-object. | + + + +### Operation.ExtensionsEntry + +| Field | Type | Label | Description | +| ----- | ----------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + + + +### Operation.ResponsesEntry + +| Field | Type | Label | Description | +| ----- | --------------------------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Response](#grpc-gateway-protoc_gen_openapiv2-options-Response) | | | + + + +### Parameters + +`Parameters` is a representation of OpenAPI v2 specification's parameters +object. Note: This technically breaks compatibility with the OpenAPI 2 +definition structure as we only allow header parameters to be set here since we +do not want users specifying custom non-header parameters beyond those inferred +from the Protobuf schema. See: +https://swagger.io/specification/v2/#parameter-object + +| Field | Type | Label | Description | +| ------- | ----------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| headers | [HeaderParameter](#grpc-gateway-protoc_gen_openapiv2-options-HeaderParameter) | repeated | `Headers` is one or more HTTP header parameter.
See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters | + + + +### Response + +`Response` is a representation of OpenAPI v2 specification's Response object. + +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject + +| Field | Type | Label | Description | +| ----------- | ----------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| description | [string](#string) | | `Description` is a short description of the response.
GFM syntax can be used for rich text representation. | +| schema | [Schema](#grpc-gateway-protoc_gen_openapiv2-options-Schema) | | `Schema` optionally defines the structure of the response.
If `Schema` is not provided, it means there is no content to the response. | +| headers | [Response.HeadersEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-HeadersEntry) | repeated | `Headers` A list of headers that are sent with the response.
`Header` name is expected to be a string in the canonical format of the MIME header key
See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey | +| examples | [Response.ExamplesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExamplesEntry) | repeated | `Examples` gives per-mimetype response examples.
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object | +| extensions | [Response.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Response-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | + + + +### Response.ExamplesEntry + +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + +### Response.ExtensionsEntry + +| Field | Type | Label | Description | +| ----- | ----------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + + + +### Response.HeadersEntry + +| Field | Type | Label | Description | +| ----- | ----------------------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Header](#grpc-gateway-protoc_gen_openapiv2-options-Header) | | | + + + +### Schema + +`Schema` is a representation of OpenAPI v2 specification's Schema object. + +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + +| Field | Type | Label | Description | +| ------------- | ----------------------------------------------------------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| json_schema | [JSONSchema](#grpc-gateway-protoc_gen_openapiv2-options-JSONSchema) | | | +| discriminator | [string](#string) | | Adds support for polymorphism. The discriminator is the schema property
name that is used to differentiate between other schema that inherit this
schema. The property name used MUST be defined at this schema and it MUST
be in the required property list. When used, the value MUST be the name of
this schema or any schema that inherits it. | +| read_only | [bool](#bool) | | Relevant only for Schema "properties" definitions. Declares the property as
"read only". This means that it MAY be sent as part of a response but MUST
NOT be sent as part of the request. Properties marked as readOnly being
true SHOULD NOT be in the required list of the defined schema. Default
value is false. | +| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation for this schema. | +| example | [string](#string) | | A free-form property to include an example of an instance for this schema in JSON.
This is copied verbatim to the output. | + + + +### Scopes + +`Scopes` is a representation of OpenAPI v2 specification's Scopes object. + +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject + +Lists the available scopes for an OAuth2 security scheme. + +| Field | Type | Label | Description | +| ----- | --------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------- | +| scope | [Scopes.ScopeEntry](#grpc-gateway-protoc_gen_openapiv2-options-Scopes-ScopeEntry) | repeated | Maps between a name of a scope to a short description of it (as the value
of the property). | + + + +### Scopes.ScopeEntry + +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + +### SecurityDefinitions + +`SecurityDefinitions` is a representation of OpenAPI v2 specification's Security +Definitions object. + +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject + +A declaration of the security schemes available to be used in the specification. +This does not enforce the security schemes on the operations and only serves to +provide the relevant details for each scheme. + +| Field | Type | Label | Description | +| -------- | ----------------------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------- | +| security | [SecurityDefinitions.SecurityEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions-SecurityEntry) | repeated | A single security scheme definition, mapping a "name" to the scheme it
defines. | + + + +### SecurityDefinitions.SecurityEntry + +| Field | Type | Label | Description | +| ----- | --------------------------------------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [SecurityScheme](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme) | | | + + + +### SecurityRequirement + +`SecurityRequirement` is a representation of OpenAPI v2 specification's Security +Requirement object. + +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject + +Lists the required security schemes to execute this operation. The object can +have multiple security schemes declared in it which are all required (that is, +there is a logical AND between the schemes). + +The name used for each property MUST correspond to a security scheme declared in +the Security Definitions. + +| Field | Type | Label | Description | +| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| security_requirement | [SecurityRequirement.SecurityRequirementEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementEntry) | repeated | Each name must correspond to a security scheme which is declared in
the Security Definitions. If the security scheme is of type "oauth2",
then the value is a list of scope names required for the execution.
For other security scheme types, the array MUST be empty. | + + + +### SecurityRequirement.SecurityRequirementEntry + +| Field | Type | Label | Description | +| ----- | --------------------------------------------------------------------------------------------------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [SecurityRequirement.SecurityRequirementValue](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement-SecurityRequirementValue) | | | + + + +### SecurityRequirement.SecurityRequirementValue + +If the security scheme is of type "oauth2", then the value is a list of scope +names required for the execution. For other security scheme types, the array +MUST be empty. + +| Field | Type | Label | Description | +| ----- | ----------------- | -------- | ----------- | +| scope | [string](#string) | repeated | | + + + +### SecurityScheme + +`SecurityScheme` is a representation of OpenAPI v2 specification's Security +Scheme object. + +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject + +Allows the definition of a security scheme that can be used by the operations. +Supported schemes are basic authentication, an API key (either as a header or as +a query parameter) and OAuth2's common flows (implicit, password, application +and access code). + +| Field | Type | Label | Description | +| ----------------- | ----------------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| type | [SecurityScheme.Type](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Type) | | The type of the security scheme. Valid values are "basic",
"apiKey" or "oauth2". | +| description | [string](#string) | | A short description for security scheme. | +| name | [string](#string) | | The name of the header or query parameter to be used.
Valid for apiKey. | +| in | [SecurityScheme.In](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-In) | | The location of the API key. Valid values are "query" or
"header".
Valid for apiKey. | +| flow | [SecurityScheme.Flow](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-Flow) | | The flow used by the OAuth2 security scheme. Valid values are
"implicit", "password", "application" or "accessCode".
Valid for oauth2. | +| authorization_url | [string](#string) | | The authorization URL to be used for this flow. This SHOULD be in
the form of a URL.
Valid for oauth2/implicit and oauth2/accessCode. | +| token_url | [string](#string) | | The token URL to be used for this flow. This SHOULD be in the
form of a URL.
Valid for oauth2/password, oauth2/application and oauth2/accessCode. | +| scopes | [Scopes](#grpc-gateway-protoc_gen_openapiv2-options-Scopes) | | The available scopes for the OAuth2 security scheme.
Valid for oauth2. | +| extensions | [SecurityScheme.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-SecurityScheme-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | + + + +### SecurityScheme.ExtensionsEntry + +| Field | Type | Label | Description | +| ----- | ----------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + + + +### Swagger + +`Swagger` is a representation of OpenAPI v2 specification's Swagger object. + +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject + +Example: + +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { +title: "Echo API"; version: "1.0"; description: ""; contact: { name: +"gRPC-Gateway project"; url: "https://github.com/grpc-ecosystem/grpc-gateway"; +email: "none@example.com"; }; license: { name: "BSD 3-Clause License"; url: +"https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; }; }; +schemes: HTTPS; consumes: "application/json"; produces: "application/json"; }; + +| Field | Type | Label | Description | +| -------------------- | --------------------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| swagger | [string](#string) | | Specifies the OpenAPI Specification version being used. It can be
used by the OpenAPI UI and other clients to interpret the API listing. The
value MUST be "2.0". | +| info | [Info](#grpc-gateway-protoc_gen_openapiv2-options-Info) | | Provides metadata about the API. The metadata can be used by the
clients if needed. | +| host | [string](#string) | | The host (name or ip) serving the API. This MUST be the host only and does
not include the scheme nor sub-paths. It MAY include a port. If the host is
not included, the host serving the documentation is to be used (including
the port). The host does not support path templating. | +| base_path | [string](#string) | | The base path on which the API is served, which is relative to the host. If
it is not included, the API is served directly under the host. The value
MUST start with a leading slash (/). The basePath does not support path
templating.
Note that using `base_path` does not change the endpoint paths that are
generated in the resulting OpenAPI file. If you wish to use `base_path`
with relatively generated OpenAPI paths, the `base_path` prefix must be
manually removed from your `google.api.http` paths and your code changed to
serve the API from the `base_path`. | +| schemes | [Scheme](#grpc-gateway-protoc_gen_openapiv2-options-Scheme) | repeated | The transfer protocol of the API. Values MUST be from the list: "http",
"https", "ws", "wss". If the schemes is not included, the default scheme to
be used is the one used to access the OpenAPI definition itself. | +| consumes | [string](#string) | repeated | A list of MIME types the APIs can consume. This is global to all APIs but
can be overridden on specific API calls. Value MUST be as described under
Mime Types. | +| produces | [string](#string) | repeated | A list of MIME types the APIs can produce. This is global to all APIs but
can be overridden on specific API calls. Value MUST be as described under
Mime Types. | +| responses | [Swagger.ResponsesEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ResponsesEntry) | repeated | An object to hold responses that can be used across operations. This
property does not define global responses for all operations. | +| security_definitions | [SecurityDefinitions](#grpc-gateway-protoc_gen_openapiv2-options-SecurityDefinitions) | | Security scheme definitions that can be used across the specification. | +| security | [SecurityRequirement](#grpc-gateway-protoc_gen_openapiv2-options-SecurityRequirement) | repeated | A declaration of which security schemes are applied for the API as a whole.
The list of values describes alternative security schemes that can be used
(that is, there is a logical OR between the security requirements).
Individual operations can override this definition. | +| tags | [Tag](#grpc-gateway-protoc_gen_openapiv2-options-Tag) | repeated | A list of tags for API documentation control. Tags can be used for logical
grouping of operations by resources or any other qualifier. | +| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation. | +| extensions | [Swagger.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Swagger-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | + + + +### Swagger.ExtensionsEntry + +| Field | Type | Label | Description | +| ----- | ----------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + + + +### Swagger.ResponsesEntry + +| Field | Type | Label | Description | +| ----- | --------------------------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [Response](#grpc-gateway-protoc_gen_openapiv2-options-Response) | | | + + + +### Tag + +`Tag` is a representation of OpenAPI v2 specification's Tag object. + +See: +https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject + +| Field | Type | Label | Description | +| ------------- | ----------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| name | [string](#string) | | The name of the tag. Use it to allow override of the name of a
global Tag object, then use that name to reference the tag throughout the
OpenAPI file. | +| description | [string](#string) | | A short description for the tag. GFM syntax can be used for rich text
representation. | +| external_docs | [ExternalDocumentation](#grpc-gateway-protoc_gen_openapiv2-options-ExternalDocumentation) | | Additional external documentation for this tag. | +| extensions | [Tag.ExtensionsEntry](#grpc-gateway-protoc_gen_openapiv2-options-Tag-ExtensionsEntry) | repeated | Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
See: https://swagger.io/docs/specification/2-0/swagger-extensions/ | + + + +### Tag.ExtensionsEntry + +| Field | Type | Label | Description | +| ----- | ----------------------------------------------- | ----- | ----------- | +| key | [string](#string) | | | +| value | [google.protobuf.Value](#google-protobuf-Value) | | | + + + + + +### HeaderParameter.Type + +`Type` is a supported HTTP header type. See +https://swagger.io/specification/v2/#parameterType. + +| Name | Number | Description | +| ------- | ------ | ----------- | +| UNKNOWN | 0 | | +| STRING | 1 | | +| NUMBER | 2 | | +| INTEGER | 3 | | +| BOOLEAN | 4 | | + + + +### JSONSchema.JSONSchemaSimpleTypes + +| Name | Number | Description | +| ------- | ------ | ----------- | +| UNKNOWN | 0 | | +| ARRAY | 1 | | +| BOOLEAN | 2 | | +| INTEGER | 3 | | +| NULL | 4 | | +| NUMBER | 5 | | +| OBJECT | 6 | | +| STRING | 7 | | + + + +### Scheme + +Scheme describes the schemes supported by the OpenAPI Swagger and Operation +objects. + +| Name | Number | Description | +| ------- | ------ | ----------- | +| UNKNOWN | 0 | | +| HTTP | 1 | | +| HTTPS | 2 | | +| WS | 3 | | +| WSS | 4 | | + + + +### SecurityScheme.Flow + +The flow used by the OAuth2 security scheme. Valid values are "implicit", +"password", "application" or "accessCode". + +| Name | Number | Description | +| ---------------- | ------ | ----------- | +| FLOW_INVALID | 0 | | +| FLOW_IMPLICIT | 1 | | +| FLOW_PASSWORD | 2 | | +| FLOW_APPLICATION | 3 | | +| FLOW_ACCESS_CODE | 4 | | + + + +### SecurityScheme.In + +The location of the API key. Valid values are "query" or "header". + +| Name | Number | Description | +| ---------- | ------ | ----------- | +| IN_INVALID | 0 | | +| IN_QUERY | 1 | | +| IN_HEADER | 2 | | + + + +### SecurityScheme.Type + +The type of the security scheme. Valid values are "basic", "apiKey" or "oauth2". + +| Name | Number | Description | +| ------------ | ------ | ----------- | +| TYPE_INVALID | 0 | | +| TYPE_BASIC | 1 | | +| TYPE_API_KEY | 2 | | +| TYPE_OAUTH2 | 3 | | + + + + + + + + + +

Top

+ +## protoc-gen-openapiv2/options/annotations.proto + + + + - - [GetVersionRequest](#ory-keto-relation_tuples-v1alpha2-GetVersionRequest) - - [GetVersionResponse](#ory-keto-relation_tuples-v1alpha2-GetVersionResponse) - - [VersionService](#ory-keto-relation_tuples-v1alpha2-VersionService) + -- [ory/keto/relation_tuples/v1alpha2/write_service.proto](#ory_keto_relation_tuples_v1alpha2_write_service-proto) +### File-level Extensions - - [CreateRelationTupleRequest](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest) - - [CreateRelationTupleRequest.Relationship](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleRequest-Relationship) - - [CreateRelationTupleResponse](#ory-keto-relation_tuples-v1alpha2-CreateRelationTupleResponse) - - [DeleteRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest) - - [DeleteRelationTuplesRequest.Query](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesRequest-Query) - - [DeleteRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-DeleteRelationTuplesResponse) - - [RelationTupleDelta](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta) - - [TransactRelationTuplesRequest](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesRequest) - - [TransactRelationTuplesResponse](#ory-keto-relation_tuples-v1alpha2-TransactRelationTuplesResponse) - - [RelationTupleDelta.Action](#ory-keto-relation_tuples-v1alpha2-RelationTupleDelta-Action) - - [WriteService](#ory-keto-relation_tuples-v1alpha2-WriteService) +| Extension | Type | Base | Number | Description | +| ------------------- | ---------- | ------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| openapiv2_enum | EnumSchema | .google.protobuf.EnumOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.

All IDs are the same, as assigned. It is okay that they are the same, as they extend
different descriptor messages. | +| openapiv2_field | JSONSchema | .google.protobuf.FieldOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.

All IDs are the same, as assigned. It is okay that they are the same, as they extend
different descriptor messages. | +| openapiv2_swagger | Swagger | .google.protobuf.FileOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.

All IDs are the same, as assigned. It is okay that they are the same, as they extend
different descriptor messages. | +| openapiv2_schema | Schema | .google.protobuf.MessageOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.

All IDs are the same, as assigned. It is okay that they are the same, as they extend
different descriptor messages. | +| openapiv2_operation | Operation | .google.protobuf.MethodOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.

All IDs are the same, as assigned. It is okay that they are the same, as they extend
different descriptor messages. | +| openapiv2_tag | Tag | .google.protobuf.ServiceOptions | 1042 | ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.

All IDs are the same, as assigned. It is okay that they are the same, as they extend
different descriptor messages. | -- [Scalar Value Types](#scalar-value-types) + + + @@ -140,6 +2125,122 @@ The service that checks the syntax of an OPL file. + + +

Top

+ +## google/api/field_behavior.proto + + + + + +### FieldBehavior + +An indicator of the behavior of a given field (for example, that a field is +required in requests, or given as output but ignored as input). This **does +not** change the behavior in protocol buffers itself; it only denotes the +behavior and may affect how API tooling handles the field. + +Note: This enum **may** receive new values in the future. + +| Name | Number | Description | +| -------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| FIELD_BEHAVIOR_UNSPECIFIED | 0 | Conventional default for enums. Do not use this. | +| OPTIONAL | 1 | Specifically denotes a field as optional.
While all fields in protocol buffers are optional, this may be specified
for emphasis if appropriate. | +| REQUIRED | 2 | Denotes a field as required.
This indicates that the field **must** be provided as part of the request,
and failure to do so will cause an error (usually `INVALID_ARGUMENT`). | +| OUTPUT_ONLY | 3 | Denotes a field as output only.
This indicates that the field is provided in responses, but including the
field in a request does nothing (the server _must_ ignore it and
_must not_ throw an error as a result of the field's presence). | +| INPUT_ONLY | 4 | Denotes a field as input only.
This indicates that the field is provided in requests, and the
corresponding field is not included in output. | +| IMMUTABLE | 5 | Denotes a field as immutable.
This indicates that the field may be set once in a request to create a
resource, but may not be changed thereafter. | +| UNORDERED_LIST | 6 | Denotes that a (repeated) field is an unordered list.
This indicates that the service may provide the elements of the list
in any arbitrary order, rather than the order the user originally
provided. Additionally, the list's order may or may not be stable. | +| NON_EMPTY_DEFAULT | 7 | Denotes that this field returns a non-empty default value if not set.
This indicates that if the user provides the empty value in a request,
a non-empty value will be returned. The user will not be aware of what
non-empty value to expect. | +| IDENTIFIER | 8 | Denotes that the field in a resource (a message annotated with
google.api.resource) is used in the resource name to uniquely identify the
resource. For AIP-compliant APIs, this should only be applied to the
`name` field on the resource.

This behavior should not be applied to references to other resources within
the message.

The identifier field of resources often have different field behavior
depending on the request it is embedded in (e.g. for Create methods name
is optional and unused, while for Update methods it is required). Instead
of method-specific annotations, only `IDENTIFIER` is required. | + + + + + +### File-level Extensions + +| Extension | Type | Base | Number | Description | +| -------------- | ------------- | ----------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| field_behavior | FieldBehavior | .google.protobuf.FieldOptions | 1052 | A designation of a specific field behavior (required, output only, etc.)
in protobuf messages.

Examples:

string name = 1 [(google.api.field_behavior) = REQUIRED];
State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Duration ttl = 1
[(google.api.field_behavior) = INPUT_ONLY];
google.protobuf.Timestamp expire_time = 1
[(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.field_behavior) = IMMUTABLE]; | + + + + + + + +

Top

+ +## google/api/visibility.proto + + + +### Visibility + +`Visibility` restricts service consumer's access to service elements, such as +whether an application can call a visibility-restricted method. The restriction +is expressed by applying visibility labels on service elements. The visibility +labels are elsewhere linked to service consumers. + +A service can define multiple visibility labels, but a service consumer should +be granted at most one visibility label. Multiple visibility labels for a single +service consumer are not supported. + +If an element and all its parents have no visibility label, its visibility is +unconditionally granted. + +Example: + + visibility: + rules: + - selector: google.calendar.Calendar.EnhancedSearch + restriction: PREVIEW + - selector: google.calendar.Calendar.Delegate + restriction: INTERNAL + +Here, all methods are publicly visible except for the restricted methods +EnhancedSearch and Delegate. + +| Field | Type | Label | Description | +| ----- | -------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| rules | [VisibilityRule](#google-api-VisibilityRule) | repeated | A list of visibility rules that apply to individual API elements.

**NOTE:** All service configuration rules follow "last one wins" order. | + + + +### VisibilityRule + +A visibility rule provides visibility configuration for an individual API +element. + +| Field | Type | Label | Description | +| ----------- | ----------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| selector | [string](#string) | | Selects methods, messages, fields, enums, etc. to which this rule applies.

Refer to [selector][google.api.DocumentationRule.selector] for syntax
details. | +| restriction | [string](#string) | | A comma-separated list of visibility labels that apply to the `selector`.
Any of the listed labels can be used to grant the visibility.

If a rule has multiple labels, removing one of the labels but not all of
them can break clients.

Example:

visibility:
rules:
- selector: google.calendar.Calendar.EnhancedSearch
restriction: INTERNAL, PREVIEW

Removing INTERNAL from this restriction will break clients that rely on
this method and only had access to it through INTERNAL. | + + + + + + + +### File-level Extensions + +| Extension | Type | Base | Number | Description | +| ------------------ | -------------- | --------------------------------- | -------- | --------------------- | +| enum_visibility | VisibilityRule | .google.protobuf.EnumOptions | 72295727 | See `VisibilityRule`. | +| value_visibility | VisibilityRule | .google.protobuf.EnumValueOptions | 72295727 | See `VisibilityRule`. | +| field_visibility | VisibilityRule | .google.protobuf.FieldOptions | 72295727 | See `VisibilityRule`. | +| message_visibility | VisibilityRule | .google.protobuf.MessageOptions | 72295727 | See `VisibilityRule`. | +| method_visibility | VisibilityRule | .google.protobuf.MethodOptions | 72295727 | See `VisibilityRule`. | +| api_visibility | VisibilityRule | .google.protobuf.ServiceOptions | 72295727 | See `VisibilityRule`. | + + + + +

Top

@@ -533,6 +2634,216 @@ The standard Ory JSON API error format. + + +

Top

+ +## google/protobuf/field_mask.proto + + + +### FieldMask + +`FieldMask` represents a set of symbolic field paths, for example: + + paths: "f.a" + paths: "f.b.d" + +Here `f` represents a field in some root message, `a` and `b` fields in the +message found in `f`, and `d` a field found in the message in `f.b`. + +Field masks are used to specify a subset of fields that should be returned by a +get operation or modified by an update operation. Field masks also have a custom +JSON encoding (see below). + +# Field Masks in Projections + +When used in the context of a projection, a response message or sub-message is +filtered by the API to only contain those fields as specified in the mask. For +example, if the mask in the previous example is applied to a response message as +follows: + + f { + a : 22 + b { + d : 1 + x : 2 + } + y : 13 + } + z: 8 + +The result will not contain specific values for fields x,y and z (their value +will be set to the default, and omitted in proto text output): + + f { + a : 22 + b { + d : 1 + } + } + +A repeated field is not allowed except at the last position of a paths string. + +If a FieldMask object is not present in a get operation, the operation applies +to all fields (as if a FieldMask of all fields had been specified). + +Note that a field mask does not necessarily apply to the top-level response +message. In case of a REST get operation, the field mask applies directly to the +response, but in case of a REST list operation, the mask instead applies to each +individual message in the returned resource list. In case of a REST custom +method, other definitions may be used. Where the mask applies will be clearly +documented together with its declaration in the API. In any case, the effect on +the returned resource/resources is required behavior for APIs. + +# Field Masks in Update Operations + +A field mask in update operations specifies which fields of the targeted +resource are going to be updated. The API is required to only change the values +of the fields as specified in the mask and leave the others untouched. If a +resource is passed in to describe the updated values, the API ignores the values +of all fields not covered by the mask. + +If a repeated field is specified for an update operation, new values will be +appended to the existing repeated field in the target resource. Note that a +repeated field is only allowed in the last position of a `paths` string. + +If a sub-message is specified in the last position of the field mask for an +update operation, then new value will be merged into the existing sub-message in +the target resource. + +For example, given the target message: + + f { + b { + d: 1 + x: 2 + } + c: [1] + } + +And an update message: + + f { + b { + d: 10 + } + c: [2] + } + +then if the field mask is: + +paths: ["f.b", "f.c"] + +then the result will be: + + f { + b { + d: 10 + x: 2 + } + c: [1, 2] + } + +An implementation may provide options to override this default behavior for +repeated and message fields. + +In order to reset a field's value to the default, the field must be in the mask +and set to the default value in the provided resource. Hence, in order to reset +all fields of a resource, provide a default instance of the resource and set all +fields in the mask, or do not provide a mask as described below. + +If a field mask is not present on update, the operation applies to all fields +(as if a field mask of all fields has been specified). Note that in the presence +of schema evolution, this may mean that fields the client does not know and has +therefore not filled into the request will be reset to their default. If this is +unwanted behavior, a specific service may require a client to always specify a +field mask, producing an error if not. + +As with get operations, the location of the resource which describes the updated +values in the request message depends on the operation kind. In any case, the +effect of the field mask is required to be honored by the API. + +## Considerations for HTTP REST + +The HTTP kind of an update operation which uses a field mask must be set to +PATCH instead of PUT in order to satisfy HTTP semantics (PUT must only be used +for full updates). + +# JSON Encoding of Field Masks + +In JSON, a field mask is encoded as a single string where paths are separated by +a comma. Fields name in each path are converted to/from lower-camel naming +conventions. + +As an example, consider the following message declarations: + + message Profile { + User user = 1; + Photo photo = 2; + } + message User { + string display_name = 1; + string address = 2; + } + +In proto a field mask for `Profile` may look as such: + + mask { + paths: "user.display_name" + paths: "photo" + } + +In JSON, the same mask is represented as below: + + { + mask: "user.displayName,photo" + } + +# Field Masks and Oneof Fields + +Field masks treat fields in oneofs just as regular fields. Consider the +following message: + + message SampleMessage { + oneof test_oneof { + string name = 4; + SubMessage sub_message = 9; + } + } + +The field mask can be: + + mask { + paths: "name" + } + +Or: + + mask { + paths: "sub_message" + } + +Note that oneof type names ("test_oneof" in this case) cannot be used in paths. + +## Field Mask Verification + +The implementation of any API method which has a FieldMask type field in the +request should verify the included field paths, and return an `INVALID_ARGUMENT` +error if any path is unmappable. + +| Field | Type | Label | Description | +| ----- | ----------------- | -------- | ---------------------------- | +| paths | [string](#string) | repeated | The set of field mask paths. | + + + + + + + + +

Top

@@ -661,6 +2972,808 @@ This service is part of the + + +

Top

+ +## google/protobuf/duration.proto + + + +### Duration + +A Duration represents a signed, fixed-length span of time represented as a count +of seconds and fractions of seconds at nanosecond resolution. It is independent +of any calendar and concepts like "day" or "month". It is related to Timestamp +in that the difference between two Timestamp values is a Duration and it can be +added or subtracted from a Timestamp. Range is approximately +-10,000 years. + +# Examples + +Example 1: Compute Duration from two Timestamps in pseudo code. + + Timestamp start = ...; + Timestamp end = ...; + Duration duration = ...; + + duration.seconds = end.seconds - start.seconds; + duration.nanos = end.nanos - start.nanos; + + if (duration.seconds < 0 && duration.nanos > 0) { + duration.seconds += 1; + duration.nanos -= 1000000000; + } else if (duration.seconds > 0 && duration.nanos < 0) { + duration.seconds -= 1; + duration.nanos += 1000000000; + } + +Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + + Timestamp start = ...; + Duration duration = ...; + Timestamp end = ...; + + end.seconds = start.seconds + duration.seconds; + end.nanos = start.nanos + duration.nanos; + + if (end.nanos < 0) { + end.seconds -= 1; + end.nanos += 1000000000; + } else if (end.nanos >= 1000000000) { + end.seconds += 1; + end.nanos -= 1000000000; + } + +Example 3: Compute Duration from datetime.timedelta in Python. + + td = datetime.timedelta(days=3, minutes=10) + duration = Duration() + duration.FromTimedelta(td) + +# JSON Mapping + +In JSON format, the Duration type is encoded as a string rather than an object, +where the string ends in the suffix "s" (indicating seconds) and is preceded by +the number of seconds, with nanoseconds expressed as fractional seconds. For +example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", +while 3 seconds and 1 nanosecond should be expressed in JSON format as +"3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON +format as "3.000001s". + +| Field | Type | Label | Description | +| ------- | --------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| seconds | [int64](#int64) | | Signed seconds of the span of time. Must be from -315,576,000,000
to +315,576,000,000 inclusive. Note: these bounds are computed from:
60 sec/min _ 60 min/hr _ 24 hr/day _ 365.25 days/year _ 10000 years | +| nanos | [int32](#int32) | | Signed fractions of a second at nanosecond resolution of the span
of time. Durations less than one second are represented with a 0
`seconds` field and a positive or negative `nanos` field. For durations
of one second or more, a non-zero value for the `nanos` field must be
of the same sign as the `seconds` field. Must be from -999,999,999
to +999,999,999 inclusive. | + + + + + + + + + + + +

Top

+ +## google/protobuf/timestamp.proto + + + +### Timestamp + +A Timestamp represents a point in time independent of any time zone or local +calendar, encoded as a count of seconds and fractions of seconds at nanosecond +resolution. The count is relative to an epoch at UTC midnight on January 1, +1970, in the proleptic Gregorian calendar which extends the Gregorian calendar +backwards to year one. + +All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap +second table is needed for interpretation, using a +[24-hour linear smear](https://developers.google.com/time/smear). + +The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By +restricting to that range, we ensure that we can convert to and from +[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + +# Examples + +Example 1: Compute Timestamp from POSIX `time()`. + + Timestamp timestamp; + timestamp.set_seconds(time(NULL)); + timestamp.set_nanos(0); + +Example 2: Compute Timestamp from POSIX `gettimeofday()`. + + struct timeval tv; + gettimeofday(&tv, NULL); + + Timestamp timestamp; + timestamp.set_seconds(tv.tv_sec); + timestamp.set_nanos(tv.tv_usec * 1000); + +Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + + FILETIME ft; + GetSystemTimeAsFileTime(&ft); + UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + + // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + Timestamp timestamp; + timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + +Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + + long millis = System.currentTimeMillis(); + + Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + .setNanos((int) ((millis % 1000) * 1000000)).build(); + +Example 5: Compute Timestamp from Java `Instant.now()`. + + Instant now = Instant.now(); + + Timestamp timestamp = + Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + .setNanos(now.getNano()).build(); + +Example 6: Compute Timestamp from current time in Python. + + timestamp = Timestamp() + timestamp.GetCurrentTime() + +# JSON Mapping + +In JSON format, the Timestamp type is encoded as a string in the +[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is +"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always +expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are +zero-padded to two digits each. The fractional seconds, which can go up to 9 +digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix +indicates the timezone ("UTC"); the timezone is required. A proto3 JSON +serializer should always use UTC (as indicated by "Z") when printing the +Timestamp type and a proto3 JSON parser should be able to accept both UTC and +other timezones (as indicated by an offset). + +For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on +January 15, 2017. + +In JavaScript, one can convert a Date object to this format using the standard +[toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) +method. In Python, a standard `datetime.datetime` object can be converted to +this format using +[`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the +time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the +Joda Time's +[`ISODateTimeFormat.dateTime()`]() +to obtain a formatter capable of generating timestamps in this format. + +| Field | Type | Label | Description | +| ------- | --------------- | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| seconds | [int64](#int64) | | Represents seconds of UTC time since Unix epoch
1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
9999-12-31T23:59:59Z inclusive. | +| nanos | [int32](#int32) | | Non-negative fractions of a second at nanosecond resolution. Negative
second values with fractions must still have non-negative nanos values
that count forward in time. Must be from 0 to 999,999,999
inclusive. | + + + + + + + + + + + +

Top

+ +## buf/validate/validate.proto + + + +### AnyRules + +AnyRules describe constraints applied exclusively to the `google.protobuf.Any` +well-known type. + +| Field | Type | Label | Description | +| ------ | ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| in | [string](#string) | repeated | `in` requires the field's `type_url` to be equal to one of the
specified values. If it doesn't match any of the specified values, an error
message is generated.

``proto
message MyAny {
// The `value` field must have a `type_url` equal to one of the specified values.
google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]];
}
`` | +| not_in | [string](#string) | repeated | requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated.

``proto
message MyAny {
// The field `value` must not have a `type_url` equal to any of the specified values.
google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]];
}
`` | + + + +### BoolRules + +BoolRules describes the constraints applied to `bool` values. These rules may +also be applied to the `google.protobuf.BoolValue` Well-Known-Type. + +| Field | Type | Label | Description | +| ------- | ------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [bool](#bool) | optional | `const` requires the field value to exactly match the specified boolean value.
If the field value doesn't match, an error message is generated.

`proto
message MyBool {
// value must equal true
bool value = 1 [(buf.validate.field).bool.const = true];
}
` | +| example | [bool](#bool) | repeated | `example` specifies values that the field may have. These values SHOULD
conform to other constraints. `example` values will not impact validation
but may be used as helpful guidance on how to populate the given field.

`proto
message MyBool {
bool value = 1 [
(buf.validate.field).bool.example = 1,
(buf.validate.field).bool.example = 2
];
}
` | + + + +### BytesRules + +BytesRules describe the constraints applied to `bytes` values. These rules may +also be applied to the `google.protobuf.BytesValue` Well-Known-Type. + +| Field | Type | Label | Description | +| -------- | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [bytes](#bytes) | optional | `const` requires the field value to exactly match the specified bytes
value. If the field value doesn't match, an error message is generated.

`proto
message MyBytes {
// value must be "\x01\x02\x03\x04"
bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"];
}
` | +| len | [uint64](#uint64) | optional | `len` requires the field value to have the specified length in bytes.
If the field value doesn't match, an error message is generated.

`proto
message MyBytes {
// value length must be 4 bytes.
optional bytes value = 1 [(buf.validate.field).bytes.len = 4];
}
` | +| min_len | [uint64](#uint64) | optional | `min_len` requires the field value to have at least the specified minimum
length in bytes.
If the field value doesn't meet the requirement, an error message is generated.

`proto
message MyBytes {
// value length must be at least 2 bytes.
optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2];
}
` | +| max_len | [uint64](#uint64) | optional | `max_len` requires the field value to have at most the specified maximum
length in bytes.
If the field value exceeds the requirement, an error message is generated.

`proto
message MyBytes {
// value must be at most 6 bytes.
optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6];
}
` | +| pattern | [string](#string) | optional | `pattern` requires the field value to match the specified regular
expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)).
The value of the field must be valid UTF-8 or validation will fail with a
runtime error.
If the field value doesn't match the pattern, an error message is generated.

`proto
message MyBytes {
// value must match regex pattern "^[a-zA-Z0-9]+$".
optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"];
}
` | +| prefix | [bytes](#bytes) | optional | `prefix` requires the field value to have the specified bytes at the
beginning of the string.
If the field value doesn't meet the requirement, an error message is generated.

`proto
message MyBytes {
// value does not have prefix \x01\x02
optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"];
}
` | +| suffix | [bytes](#bytes) | optional | `suffix` requires the field value to have the specified bytes at the end
of the string.
If the field value doesn't meet the requirement, an error message is generated.

`proto
message MyBytes {
// value does not have suffix \x03\x04
optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"];
}
` | +| contains | [bytes](#bytes) | optional | `contains` requires the field value to have the specified bytes anywhere in
the string.
If the field value doesn't meet the requirement, an error message is generated.

`protobuf
message MyBytes {
// value does not contain \x02\x03
optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"];
}
` | +| in | [bytes](#bytes) | repeated | `in` requires the field value to be equal to one of the specified
values. If the field value doesn't match any of the specified values, an
error message is generated.

`protobuf
message MyBytes {
// value must in ["\x01\x02", "\x02\x03", "\x03\x04"]
optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
}
` | +| not_in | [bytes](#bytes) | repeated | `not_in` requires the field value to be not equal to any of the specified
values.
If the field value matches any of the specified values, an error message is
generated.

`proto
message MyBytes {
// value must not in ["\x01\x02", "\x02\x03", "\x03\x04"]
optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}];
}
` | +| ip | [bool](#bool) | optional | `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format.
If the field value doesn't meet this constraint, an error message is generated.

`proto
message MyBytes {
// value must be a valid IP address
optional bytes value = 1 [(buf.validate.field).bytes.ip = true];
}
` | +| ipv4 | [bool](#bool) | optional | `ipv4` ensures that the field `value` is a valid IPv4 address in byte format.
If the field value doesn't meet this constraint, an error message is generated.

`proto
message MyBytes {
// value must be a valid IPv4 address
optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true];
}
` | +| ipv6 | [bool](#bool) | optional | `ipv6` ensures that the field `value` is a valid IPv6 address in byte format.
If the field value doesn't meet this constraint, an error message is generated.
`proto
message MyBytes {
// value must be a valid IPv6 address
optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true];
}
` | +| example | [bytes](#bytes) | repeated | `example` specifies values that the field may have. These values SHOULD
conform to other constraints. `example` values will not impact validation
but may be used as helpful guidance on how to populate the given field.

`proto
message MyBytes {
bytes value = 1 [
(buf.validate.field).bytes.example = "\x01\x02",
(buf.validate.field).bytes.example = "\x02\x03"
];
}
` | + + + +### Constraint + +`Constraint` represents a validation rule written in the Common Expression +Language (CEL) syntax. Each Constraint includes a unique identifier, an optional +error message, and the CEL expression to evaluate. For more information on CEL, +[see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + +```proto +message Foo { + option (buf.validate.message).cel = { + id: "foo.bar" + message: "bar must be greater than 0" + expression: "this.bar > 0" + }; + int32 bar = 1; +} +``` + +| Field | Type | Label | Description | +| ---------- | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| id | [string](#string) | optional | `id` is a string that serves as a machine-readable name for this Constraint.
It should be unique within its scope, which could be either a message or a field. | +| message | [string](#string) | optional | `message` is an optional field that provides a human-readable error message
for this Constraint when the CEL expression evaluates to false. If a
non-empty message is provided, any strings resulting from the CEL
expression evaluation are ignored. | +| expression | [string](#string) | optional | `expression` is the actual CEL expression that will be evaluated for
validation. This string must resolve to either a boolean or a string
value. If the expression evaluates to false or a non-empty string, the
validation is considered failed, and the message is rejected. | + + + +### DoubleRules + +DoubleRules describes the constraints applied to `double` values. These rules +may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type. + +| Field | Type | Label | Description | +| ------- | ----------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [double](#double) | optional | `const` requires the field value to exactly match the specified value. If
the field value doesn't match, an error message is generated.

`proto
message MyDouble {
// value must equal 42.0
double value = 1 [(buf.validate.field).double.const = 42.0];
}
` | +| lt | [double](#double) | optional | `lt` requires the field value to be less than the specified value (field <
value). If the field value is equal to or greater than the specified
value, an error message is generated.

`proto
message MyDouble {
// value must be less than 10.0
double value = 1 [(buf.validate.field).double.lt = 10.0];
}
` | +| lte | [double](#double) | optional | `lte` requires the field value to be less than or equal to the specified value
(field <= value). If the field value is greater than the specified value,
an error message is generated.

`proto
message MyDouble {
// value must be less than or equal to 10.0
double value = 1 [(buf.validate.field).double.lte = 10.0];
}
` | +| gt | [double](#double) | optional | `gt` requires the field value to be greater than the specified value
(exclusive). If the value of `gt` is larger than a specified `lt` or `lte`,
the range is reversed, and the field value must be outside the specified
range. If the field value doesn't meet the required conditions, an error
message is generated.

`proto
message MyDouble {
// value must be greater than 5.0 [double.gt]
double value = 1 [(buf.validate.field).double.gt = 5.0];

// value must be greater than 5 and less than 10.0 [double.gt_lt]
double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }];

// value must be greater than 10 or less than 5.0 [double.gt_lt_exclusive]
double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }];
}
` | +| gte | [double](#double) | optional | `gte` requires the field value to be greater than or equal to the specified
value (exclusive). If the value of `gte` is larger than a specified `lt` or
`lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MyDouble {
// value must be greater than or equal to 5.0 [double.gte]
double value = 1 [(buf.validate.field).double.gte = 5.0];

// value must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt]
double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }];

// value must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive]
double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }];
}
` | +| in | [double](#double) | repeated | `in` requires the field value to be equal to one of the specified values.
If the field value isn't one of the specified values, an error message is
generated.

`proto
message MyDouble {
// value must be in list [1.0, 2.0, 3.0]
repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] };
}
` | +| not_in | [double](#double) | repeated | `not_in` requires the field value to not be equal to any of the specified
values. If the field value is one of the specified values, an error
message is generated.

`proto
message MyDouble {
// value must not be in list [1.0, 2.0, 3.0]
repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] };
}
` | +| finite | [bool](#bool) | optional | `finite` requires the field value to be finite. If the field value is
infinite or NaN, an error message is generated. | +| example | [double](#double) | repeated | `example` specifies values that the field may have. These values SHOULD
conform to other constraints. `example` values will not impact validation
but may be used as helpful guidance on how to populate the given field.

`proto
message MyDouble {
double value = 1 [
(buf.validate.field).double.example = 1.0,
(buf.validate.field).double.example = "Infinity"
];
}
` | + + + +### DurationRules + +DurationRules describe the constraints applied exclusively to the +`google.protobuf.Duration` well-known type. + +| Field | Type | Label | Description | +| ------- | ----------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [google.protobuf.Duration](#google-protobuf-Duration) | optional | `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly.
If the field's value deviates from the specified value, an error message
will be generated.

`proto
message MyDuration {
// value must equal 5s
google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];
}
` | +| lt | [google.protobuf.Duration](#google-protobuf-Duration) | optional | `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type,
exclusive. If the field's value is greater than or equal to the specified
value, an error message will be generated.

`proto
message MyDuration {
// value must be less than 5s
google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];
}
` | +| lte | [google.protobuf.Duration](#google-protobuf-Duration) | optional | `lte` indicates that the field must be less than or equal to the specified
value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value,
an error message will be generated.

`proto
message MyDuration {
// value must be less than or equal to 10s
google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];
}
` | +| gt | [google.protobuf.Duration](#google-protobuf-Duration) | optional | `gt` requires the duration field value to be greater than the specified
value (exclusive). If the value of `gt` is larger than a specified `lt`
or `lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MyDuration {
// duration must be greater than 5s [duration.gt]
google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }];

// duration must be greater than 5s and less than 10s [duration.gt_lt]
google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }];

// duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive]
google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }];
}
` | +| gte | [google.protobuf.Duration](#google-protobuf-Duration) | optional | `gte` requires the duration field value to be greater than or equal to the
specified value (exclusive). If the value of `gte` is larger than a
specified `lt` or `lte`, the range is reversed, and the field value must
be outside the specified range. If the field value doesn't meet the
required conditions, an error message is generated.

`proto
message MyDuration {
// duration must be greater than or equal to 5s [duration.gte]
google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }];

// duration must be greater than or equal to 5s and less than 10s [duration.gte_lt]
google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }];

// duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive]
google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }];
}
` | +| in | [google.protobuf.Duration](#google-protobuf-Duration) | repeated | `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type.
If the field's value doesn't correspond to any of the specified values,
an error message will be generated.

`proto
message MyDuration {
// value must be in list [1s, 2s, 3s]
google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];
}
` | +| not_in | [google.protobuf.Duration](#google-protobuf-Duration) | repeated | `not_in` denotes that the field must not be equal to
any of the specified values of the `google.protobuf.Duration` type.
If the field's value matches any of these values, an error message will be
generated.

`proto
message MyDuration {
// value must not be in list [1s, 2s, 3s]
google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];
}
` | +| example | [google.protobuf.Duration](#google-protobuf-Duration) | repeated | `example` specifies values that the field may have. These values SHOULD
conform to other constraints. `example` values will not impact validation
but may be used as helpful guidance on how to populate the given field.

`proto
message MyDuration {
google.protobuf.Duration value = 1 [
(buf.validate.field).duration.example = { seconds: 1 },
(buf.validate.field).duration.example = { seconds: 2 },
];
}
` | + + + +### EnumRules + +EnumRules describe the constraints applied to `enum` values. + +| Field | Type | Label | Description | +| ------------ | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [int32](#int32) | optional | `const` requires the field value to exactly match the specified enum value.
If the field value doesn't match, an error message is generated.

``proto
enum MyEnum {
MY_ENUM_UNSPECIFIED = 0;
MY_ENUM_VALUE1 = 1;
MY_ENUM_VALUE2 = 2;
}

message MyMessage {
// The field `value` must be exactly MY_ENUM_VALUE1.
MyEnum value = 1 [(buf.validate.field).enum.const = 1];
}
`` | +| defined_only | [bool](#bool) | optional | `defined_only` requires the field value to be one of the defined values for
this enum, failing on any undefined value.

``proto
enum MyEnum {
MY_ENUM_UNSPECIFIED = 0;
MY_ENUM_VALUE1 = 1;
MY_ENUM_VALUE2 = 2;
}

message MyMessage {
// The field `value` must be a defined value of MyEnum.
MyEnum value = 1 [(buf.validate.field).enum.defined_only = true];
}
`` | +| in | [int32](#int32) | repeated | `in` requires the field value to be equal to one of the
specified enum values. If the field value doesn't match any of the
specified values, an error message is generated.

``proto
enum MyEnum {
MY_ENUM_UNSPECIFIED = 0;
MY_ENUM_VALUE1 = 1;
MY_ENUM_VALUE2 = 2;
}

message MyMessage {
// The field `value` must be equal to one of the specified values.
MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}];
}
`` | +| not_in | [int32](#int32) | repeated | `not_in` requires the field value to be not equal to any of the
specified enum values. If the field value matches one of the specified
values, an error message is generated.

``proto
enum MyEnum {
MY_ENUM_UNSPECIFIED = 0;
MY_ENUM_VALUE1 = 1;
MY_ENUM_VALUE2 = 2;
}

message MyMessage {
// The field `value` must not be equal to any of the specified values.
MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}];
}
`` | +| example | [int32](#int32) | repeated | `example` specifies values that the field may have. These values SHOULD
conform to other constraints. `example` values will not impact validation
but may be used as helpful guidance on how to populate the given field.

`proto
enum MyEnum {
MY_ENUM_UNSPECIFIED = 0;
MY_ENUM_VALUE1 = 1;
MY_ENUM_VALUE2 = 2;
}

message MyMessage {
(buf.validate.field).enum.example = 1,
(buf.validate.field).enum.example = 2
}
` | + + + +### FieldConstraints + +FieldConstraints encapsulates the rules for each type of field. Depending on the +field, the correct set should be used to ensure proper validations. + +| Field | Type | Label | Description | +| ------------ | ---------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| cel | [Constraint](#buf-validate-Constraint) | repeated | `cel` is a repeated field used to represent a textual expression
in the Common Expression Language (CEL) syntax. For more information on
CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).

``proto
message MyMessage {
// The field `value` must be greater than 42.
optional int32 value = 1 [(buf.validate.field).cel = {
id: "my_message.value",
message: "value must be greater than 42",
expression: "this > 42",
}];
}
`` | +| required | [bool](#bool) | optional | If `required` is true, the field must be populated. A populated field can be
described as "serialized in the wire format," which includes:

- the following "nullable" fields must be explicitly set to be considered populated:
- singular message fields (whose fields may be unpopulated/default values)
- member fields of a oneof (may be their default value)
- proto3 optional fields (may be their default value)
- proto2 scalar fields (both optional and required)
- proto3 scalar fields must be non-zero to be considered populated
- repeated and map fields must be non-empty to be considered populated

``proto
message MyMessage {
// The field `value` must be set to a non-null value.
optional MyOtherMessage value = 1 [(buf.validate.field).required = true];
}
`` | +| ignore | [Ignore](#buf-validate-Ignore) | optional | Skip validation on the field if its value matches the specified criteria.
See Ignore enum for details.

`proto
message UpdateRequest {
// The uri rule only applies if the field is populated and not an empty
// string.
optional string url = 1 [
(buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE,
(buf.validate.field).string.uri = true,
];
}
` | +| float | [FloatRules](#buf-validate-FloatRules) | optional | Scalar Field Types | +| double | [DoubleRules](#buf-validate-DoubleRules) | optional | | +| int32 | [Int32Rules](#buf-validate-Int32Rules) | optional | | +| int64 | [Int64Rules](#buf-validate-Int64Rules) | optional | | +| uint32 | [UInt32Rules](#buf-validate-UInt32Rules) | optional | | +| uint64 | [UInt64Rules](#buf-validate-UInt64Rules) | optional | | +| sint32 | [SInt32Rules](#buf-validate-SInt32Rules) | optional | | +| sint64 | [SInt64Rules](#buf-validate-SInt64Rules) | optional | | +| fixed32 | [Fixed32Rules](#buf-validate-Fixed32Rules) | optional | | +| fixed64 | [Fixed64Rules](#buf-validate-Fixed64Rules) | optional | | +| sfixed32 | [SFixed32Rules](#buf-validate-SFixed32Rules) | optional | | +| sfixed64 | [SFixed64Rules](#buf-validate-SFixed64Rules) | optional | | +| bool | [BoolRules](#buf-validate-BoolRules) | optional | | +| string | [StringRules](#buf-validate-StringRules) | optional | | +| bytes | [BytesRules](#buf-validate-BytesRules) | optional | | +| enum | [EnumRules](#buf-validate-EnumRules) | optional | Complex Field Types | +| repeated | [RepeatedRules](#buf-validate-RepeatedRules) | optional | | +| map | [MapRules](#buf-validate-MapRules) | optional | | +| any | [AnyRules](#buf-validate-AnyRules) | optional | Well-Known Field Types | +| duration | [DurationRules](#buf-validate-DurationRules) | optional | | +| timestamp | [TimestampRules](#buf-validate-TimestampRules) | optional | | +| skipped | [bool](#bool) | optional | **Deprecated.** DEPRECATED: use ignore=IGNORE_ALWAYS instead. TODO: remove this field pre-v1. | +| ignore_empty | [bool](#bool) | optional | **Deprecated.** DEPRECATED: use ignore=IGNORE_IF_UNPOPULATED instead. TODO: remove this field pre-v1. | + + + +### FieldPath + +`FieldPath` provides a path to a nested protobuf field. + +This message provides enough information to render a dotted field path even +without protobuf descriptors. It also provides enough information to resolve a +nested field through unknown wire data. + +| Field | Type | Label | Description | +| -------- | -------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------- | +| elements | [FieldPathElement](#buf-validate-FieldPathElement) | repeated | `elements` contains each element of the path, starting from the root and recursing downward. | + + + +### FieldPathElement + +`FieldPathElement` provides enough information to nest through a single protobuf +field. + +If the selected field is a map or repeated field, the `subscript` value selects +a specific element from it. A path that refers to a value nested under a map key +or repeated field index will have a `subscript` value. The `field_type` field +allows unambiguous resolution of a field even if descriptors are not available. + +| Field | Type | Label | Description | +| ------------ | --------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| field_number | [int32](#int32) | optional | `field_number` is the field number this path element refers to. | +| field_name | [string](#string) | optional | `field_name` contains the field name this path element refers to.
This can be used to display a human-readable path even if the field number is unknown. | +| field_type | [google.protobuf.FieldDescriptorProto.Type](#google-protobuf-FieldDescriptorProto-Type) | optional | `field_type` specifies the type of this field. When using reflection, this value is not needed.

This value is provided to make it possible to traverse unknown fields through wire data.
When traversing wire data, be mindful of both packed[1] and delimited[2] encoding schemes.

[1]: https://protobuf.dev/programming-guides/encoding/#packed
[2]: https://protobuf.dev/programming-guides/encoding/#groups

N.B.: Although groups are deprecated, the corresponding delimited encoding scheme is not, and
can be explicitly used in Protocol Buffers 2023 Edition. | +| key_type | [google.protobuf.FieldDescriptorProto.Type](#google-protobuf-FieldDescriptorProto-Type) | optional | `key_type` specifies the map key type of this field. This value is useful when traversing
unknown fields through wire data: specifically, it allows handling the differences between
different integer encodings. | +| value_type | [google.protobuf.FieldDescriptorProto.Type](#google-protobuf-FieldDescriptorProto-Type) | optional | `value_type` specifies map value type of this field. This is useful if you want to display a
value inside unknown fields through wire data. | +| index | [uint64](#uint64) | optional | `index` specifies a 0-based index into a repeated field. | +| bool_key | [bool](#bool) | optional | `bool_key` specifies a map key of type bool. | +| int_key | [int64](#int64) | optional | `int_key` specifies a map key of type int32, int64, sint32, sint64, sfixed32 or sfixed64. | +| uint_key | [uint64](#uint64) | optional | `uint_key` specifies a map key of type uint32, uint64, fixed32 or fixed64. | +| string_key | [string](#string) | optional | `string_key` specifies a map key of type string. | + + + +### Fixed32Rules + +Fixed32Rules describes the constraints applied to `fixed32` values. + +| Field | Type | Label | Description | +| ------- | ------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [fixed32](#fixed32) | optional | `const` requires the field value to exactly match the specified value.
If the field value doesn't match, an error message is generated.

`proto
message MyFixed32 {
// value must equal 42
fixed32 value = 1 [(buf.validate.field).fixed32.const = 42];
}
` | +| lt | [fixed32](#fixed32) | optional | `lt` requires the field value to be less than the specified value (field <
value). If the field value is equal to or greater than the specified value,
an error message is generated.

`proto
message MyFixed32 {
// value must be less than 10
fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10];
}
` | +| lte | [fixed32](#fixed32) | optional | `lte` requires the field value to be less than or equal to the specified
value (field <= value). If the field value is greater than the specified
value, an error message is generated.

`proto
message MyFixed32 {
// value must be less than or equal to 10
fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10];
}
` | +| gt | [fixed32](#fixed32) | optional | `gt` requires the field value to be greater than the specified value
(exclusive). If the value of `gt` is larger than a specified `lt` or
`lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MyFixed32 {
// value must be greater than 5 [fixed32.gt]
fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5];

// value must be greater than 5 and less than 10 [fixed32.gt_lt]
fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }];

// value must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive]
fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }];
}
` | +| gte | [fixed32](#fixed32) | optional | `gte` requires the field value to be greater than or equal to the specified
value (exclusive). If the value of `gte` is larger than a specified `lt`
or `lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MyFixed32 {
// value must be greater than or equal to 5 [fixed32.gte]
fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5];

// value must be greater than or equal to 5 and less than 10 [fixed32.gte_lt]
fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }];

// value must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive]
fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }];
}
` | +| in | [fixed32](#fixed32) | repeated | `in` requires the field value to be equal to one of the specified values.
If the field value isn't one of the specified values, an error message
is generated.

`proto
message MyFixed32 {
// value must be in list [1, 2, 3]
repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] };
}
` | +| not_in | [fixed32](#fixed32) | repeated | `not_in` requires the field value to not be equal to any of the specified
values. If the field value is one of the specified values, an error
message is generated.

`proto
message MyFixed32 {
// value must not be in list [1, 2, 3]
repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] };
}
` | +| example | [fixed32](#fixed32) | repeated | `example` specifies values that the field may have. These values SHOULD
conform to other constraints. `example` values will not impact validation
but may be used as helpful guidance on how to populate the given field.

`proto
message MyFixed32 {
fixed32 value = 1 [
(buf.validate.field).fixed32.example = 1,
(buf.validate.field).fixed32.example = 2
];
}
` | + + + +### Fixed64Rules + +Fixed64Rules describes the constraints applied to `fixed64` values. + +| Field | Type | Label | Description | +| ------- | ------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [fixed64](#fixed64) | optional | `const` requires the field value to exactly match the specified value. If
the field value doesn't match, an error message is generated.

`proto
message MyFixed64 {
// value must equal 42
fixed64 value = 1 [(buf.validate.field).fixed64.const = 42];
}
` | +| lt | [fixed64](#fixed64) | optional | `lt` requires the field value to be less than the specified value (field <
value). If the field value is equal to or greater than the specified value,
an error message is generated.

`proto
message MyFixed64 {
// value must be less than 10
fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10];
}
` | +| lte | [fixed64](#fixed64) | optional | `lte` requires the field value to be less than or equal to the specified
value (field <= value). If the field value is greater than the specified
value, an error message is generated.

`proto
message MyFixed64 {
// value must be less than or equal to 10
fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10];
}
` | +| gt | [fixed64](#fixed64) | optional | `gt` requires the field value to be greater than the specified value
(exclusive). If the value of `gt` is larger than a specified `lt` or
`lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MyFixed64 {
// value must be greater than 5 [fixed64.gt]
fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5];

// value must be greater than 5 and less than 10 [fixed64.gt_lt]
fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }];

// value must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive]
fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }];
}
` | +| gte | [fixed64](#fixed64) | optional | `gte` requires the field value to be greater than or equal to the specified
value (exclusive). If the value of `gte` is larger than a specified `lt`
or `lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MyFixed64 {
// value must be greater than or equal to 5 [fixed64.gte]
fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5];

// value must be greater than or equal to 5 and less than 10 [fixed64.gte_lt]
fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }];

// value must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive]
fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }];
}
` | +| in | [fixed64](#fixed64) | repeated | `in` requires the field value to be equal to one of the specified values.
If the field value isn't one of the specified values, an error message is
generated.

`proto
message MyFixed64 {
// value must be in list [1, 2, 3]
repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] };
}
` | +| not_in | [fixed64](#fixed64) | repeated | `not_in` requires the field value to not be equal to any of the specified
values. If the field value is one of the specified values, an error
message is generated.

`proto
message MyFixed64 {
// value must not be in list [1, 2, 3]
repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] };
}
` | +| example | [fixed64](#fixed64) | repeated | `example` specifies values that the field may have. These values SHOULD
conform to other constraints. `example` values will not impact validation
but may be used as helpful guidance on how to populate the given field.

`proto
message MyFixed64 {
fixed64 value = 1 [
(buf.validate.field).fixed64.example = 1,
(buf.validate.field).fixed64.example = 2
];
}
` | + + + +### FloatRules + +FloatRules describes the constraints applied to `float` values. These rules may +also be applied to the `google.protobuf.FloatValue` Well-Known-Type. + +| Field | Type | Label | Description | +| ------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [float](#float) | optional | `const` requires the field value to exactly match the specified value. If
the field value doesn't match, an error message is generated.

`proto
message MyFloat {
// value must equal 42.0
float value = 1 [(buf.validate.field).float.const = 42.0];
}
` | +| lt | [float](#float) | optional | `lt` requires the field value to be less than the specified value (field <
value). If the field value is equal to or greater than the specified value,
an error message is generated.

`proto
message MyFloat {
// value must be less than 10.0
float value = 1 [(buf.validate.field).float.lt = 10.0];
}
` | +| lte | [float](#float) | optional | `lte` requires the field value to be less than or equal to the specified
value (field <= value). If the field value is greater than the specified
value, an error message is generated.

`proto
message MyFloat {
// value must be less than or equal to 10.0
float value = 1 [(buf.validate.field).float.lte = 10.0];
}
` | +| gt | [float](#float) | optional | `gt` requires the field value to be greater than the specified value
(exclusive). If the value of `gt` is larger than a specified `lt` or
`lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MyFloat {
// value must be greater than 5.0 [float.gt]
float value = 1 [(buf.validate.field).float.gt = 5.0];

// value must be greater than 5 and less than 10.0 [float.gt_lt]
float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }];

// value must be greater than 10 or less than 5.0 [float.gt_lt_exclusive]
float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }];
}
` | +| gte | [float](#float) | optional | `gte` requires the field value to be greater than or equal to the specified
value (exclusive). If the value of `gte` is larger than a specified `lt`
or `lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MyFloat {
// value must be greater than or equal to 5.0 [float.gte]
float value = 1 [(buf.validate.field).float.gte = 5.0];

// value must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt]
float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }];

// value must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive]
float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }];
}
` | +| in | [float](#float) | repeated | `in` requires the field value to be equal to one of the specified values.
If the field value isn't one of the specified values, an error message
is generated.

`proto
message MyFloat {
// value must be in list [1.0, 2.0, 3.0]
repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] };
}
` | +| not_in | [float](#float) | repeated | `in` requires the field value to not be equal to any of the specified
values. If the field value is one of the specified values, an error
message is generated.

`proto
message MyFloat {
// value must not be in list [1.0, 2.0, 3.0]
repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] };
}
` | +| finite | [bool](#bool) | optional | `finite` requires the field value to be finite. If the field value is
infinite or NaN, an error message is generated. | +| example | [float](#float) | repeated | `example` specifies values that the field may have. These values SHOULD
conform to other constraints. `example` values will not impact validation
but may be used as helpful guidance on how to populate the given field.

`proto
message MyFloat {
float value = 1 [
(buf.validate.field).float.example = 1.0,
(buf.validate.field).float.example = "Infinity"
];
}
` | + + + +### Int32Rules + +Int32Rules describes the constraints applied to `int32` values. These rules may +also be applied to the `google.protobuf.Int32Value` Well-Known-Type. + +| Field | Type | Label | Description | +| ------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [int32](#int32) | optional | `const` requires the field value to exactly match the specified value. If
the field value doesn't match, an error message is generated.

`proto
message MyInt32 {
// value must equal 42
int32 value = 1 [(buf.validate.field).int32.const = 42];
}
` | +| lt | [int32](#int32) | optional | `lt` requires the field value to be less than the specified value (field
< value). If the field value is equal to or greater than the specified
value, an error message is generated.

`proto
message MyInt32 {
// value must be less than 10
int32 value = 1 [(buf.validate.field).int32.lt = 10];
}
` | +| lte | [int32](#int32) | optional | `lte` requires the field value to be less than or equal to the specified
value (field <= value). If the field value is greater than the specified
value, an error message is generated.

`proto
message MyInt32 {
// value must be less than or equal to 10
int32 value = 1 [(buf.validate.field).int32.lte = 10];
}
` | +| gt | [int32](#int32) | optional | `gt` requires the field value to be greater than the specified value
(exclusive). If the value of `gt` is larger than a specified `lt` or
`lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MyInt32 {
// value must be greater than 5 [int32.gt]
int32 value = 1 [(buf.validate.field).int32.gt = 5];

// value must be greater than 5 and less than 10 [int32.gt_lt]
int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }];

// value must be greater than 10 or less than 5 [int32.gt_lt_exclusive]
int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }];
}
` | +| gte | [int32](#int32) | optional | `gte` requires the field value to be greater than or equal to the specified value
(exclusive). If the value of `gte` is larger than a specified `lt` or
`lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MyInt32 {
// value must be greater than or equal to 5 [int32.gte]
int32 value = 1 [(buf.validate.field).int32.gte = 5];

// value must be greater than or equal to 5 and less than 10 [int32.gte_lt]
int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }];

// value must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive]
int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }];
}
` | +| in | [int32](#int32) | repeated | `in` requires the field value to be equal to one of the specified values.
If the field value isn't one of the specified values, an error message is
generated.

`proto
message MyInt32 {
// value must be in list [1, 2, 3]
repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] };
}
` | +| not_in | [int32](#int32) | repeated | `not_in` requires the field value to not be equal to any of the specified
values. If the field value is one of the specified values, an error message
is generated.

`proto
message MyInt32 {
// value must not be in list [1, 2, 3]
repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] };
}
` | +| example | [int32](#int32) | repeated | `example` specifies values that the field may have. These values SHOULD
conform to other constraints. `example` values will not impact validation
but may be used as helpful guidance on how to populate the given field.

`proto
message MyInt32 {
int32 value = 1 [
(buf.validate.field).int32.example = 1,
(buf.validate.field).int32.example = -10
];
}
` | + + + +### Int64Rules + +Int64Rules describes the constraints applied to `int64` values. These rules may +also be applied to the `google.protobuf.Int64Value` Well-Known-Type. + +| Field | Type | Label | Description | +| ------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [int64](#int64) | optional | `const` requires the field value to exactly match the specified value. If
the field value doesn't match, an error message is generated.

`proto
message MyInt64 {
// value must equal 42
int64 value = 1 [(buf.validate.field).int64.const = 42];
}
` | +| lt | [int64](#int64) | optional | `lt` requires the field value to be less than the specified value (field <
value). If the field value is equal to or greater than the specified value,
an error message is generated.

`proto
message MyInt64 {
// value must be less than 10
int64 value = 1 [(buf.validate.field).int64.lt = 10];
}
` | +| lte | [int64](#int64) | optional | `lte` requires the field value to be less than or equal to the specified
value (field <= value). If the field value is greater than the specified
value, an error message is generated.

`proto
message MyInt64 {
// value must be less than or equal to 10
int64 value = 1 [(buf.validate.field).int64.lte = 10];
}
` | +| gt | [int64](#int64) | optional | `gt` requires the field value to be greater than the specified value
(exclusive). If the value of `gt` is larger than a specified `lt` or
`lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MyInt64 {
// value must be greater than 5 [int64.gt]
int64 value = 1 [(buf.validate.field).int64.gt = 5];

// value must be greater than 5 and less than 10 [int64.gt_lt]
int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }];

// value must be greater than 10 or less than 5 [int64.gt_lt_exclusive]
int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }];
}
` | +| gte | [int64](#int64) | optional | `gte` requires the field value to be greater than or equal to the specified
value (exclusive). If the value of `gte` is larger than a specified `lt`
or `lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MyInt64 {
// value must be greater than or equal to 5 [int64.gte]
int64 value = 1 [(buf.validate.field).int64.gte = 5];

// value must be greater than or equal to 5 and less than 10 [int64.gte_lt]
int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }];

// value must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive]
int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }];
}
` | +| in | [int64](#int64) | repeated | `in` requires the field value to be equal to one of the specified values.
If the field value isn't one of the specified values, an error message is
generated.

`proto
message MyInt64 {
// value must be in list [1, 2, 3]
repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] };
}
` | +| not_in | [int64](#int64) | repeated | `not_in` requires the field value to not be equal to any of the specified
values. If the field value is one of the specified values, an error
message is generated.

`proto
message MyInt64 {
// value must not be in list [1, 2, 3]
repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] };
}
` | +| example | [int64](#int64) | repeated | `example` specifies values that the field may have. These values SHOULD
conform to other constraints. `example` values will not impact validation
but may be used as helpful guidance on how to populate the given field.

`proto
message MyInt64 {
int64 value = 1 [
(buf.validate.field).int64.example = 1,
(buf.validate.field).int64.example = -10
];
}
` | + + + +### MapRules + +MapRules describe the constraints applied to `map` values. + +| Field | Type | Label | Description | +| --------- | -------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| min_pairs | [uint64](#uint64) | optional | Specifies the minimum number of key-value pairs allowed. If the field has
fewer key-value pairs than specified, an error message is generated.

``proto
message MyMap {
// The field `value` must have at least 2 key-value pairs.
map value = 1 [(buf.validate.field).map.min_pairs = 2];
}
`` | +| max_pairs | [uint64](#uint64) | optional | Specifies the maximum number of key-value pairs allowed. If the field has
more key-value pairs than specified, an error message is generated.

``proto
message MyMap {
// The field `value` must have at most 3 key-value pairs.
map value = 1 [(buf.validate.field).map.max_pairs = 3];
}
`` | +| keys | [FieldConstraints](#buf-validate-FieldConstraints) | optional | Specifies the constraints to be applied to each key in the field.

``proto
message MyMap {
// The keys in the field `value` must follow the specified constraints.
map value = 1 [(buf.validate.field).map.keys = {
string: {
min_len: 3
max_len: 10
}
}];
}
`` | +| values | [FieldConstraints](#buf-validate-FieldConstraints) | optional | Specifies the constraints to be applied to the value of each key in the
field. Message values will still have their validations evaluated unless
skip is specified here.

``proto
message MyMap {
// The values in the field `value` must follow the specified constraints.
map value = 1 [(buf.validate.field).map.values = {
string: {
min_len: 5
max_len: 20
}
}];
}
`` | + + + +### MessageConstraints + +MessageConstraints represents validation rules that are applied to the entire +message. It includes disabling options and a list of Constraint messages +representing Common Expression Language (CEL) validation rules. + +| Field | Type | Label | Description | +| -------- | -------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| disabled | [bool](#bool) | optional | `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message.
This includes any fields within the message that would otherwise support validation.

`proto
message MyMessage {
// validation will be bypassed for this message
option (buf.validate.message).disabled = true;
}
` | +| cel | [Constraint](#buf-validate-Constraint) | repeated | `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message.
These constraints are written in Common Expression Language (CEL) syntax. For more information on
CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).


``proto
message MyMessage {
// The field `foo` must be greater than 42.
option (buf.validate.message).cel = {
id: "my_message.value",
message: "value must be greater than 42",
expression: "this.foo > 42",
};
optional int32 foo = 1;
}
`` | + + + +### OneofConstraints + +The `OneofConstraints` message type enables you to manage constraints for oneof +fields in your protobuf messages. + +| Field | Type | Label | Description | +| -------- | ------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| required | [bool](#bool) | optional | If `required` is true, exactly one field of the oneof must be present. A
validation error is returned if no fields in the oneof are present. The
field itself may still be a default value; further constraints
should be placed on the fields themselves to ensure they are valid values,
such as `min_len` or `gt`.

``proto
message MyMessage {
oneof value {
// Either `a` or `b` must be set. If `a` is set, it must also be
// non-empty; whereas if `b` is set, it can still be an empty string.
option (buf.validate.oneof).required = true;
string a = 1 [(buf.validate.field).string.min_len = 1];
string b = 2;
}
}
`` | + + + +### PredefinedConstraints + +PredefinedConstraints are custom constraints that can be re-used with multiple +fields. + +| Field | Type | Label | Description | +| ----- | -------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| cel | [Constraint](#buf-validate-Constraint) | repeated | `cel` is a repeated field used to represent a textual expression
in the Common Expression Language (CEL) syntax. For more information on
CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md).

``proto
message MyMessage {
// The field `value` must be greater than 42.
optional int32 value = 1 [(buf.validate.predefined).cel = {
id: "my_message.value",
message: "value must be greater than 42",
expression: "this > 42",
}];
}
`` | + + + +### RepeatedRules + +RepeatedRules describe the constraints applied to `repeated` values. + +| Field | Type | Label | Description | +| --------- | -------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| min_items | [uint64](#uint64) | optional | `min_items` requires that this field must contain at least the specified
minimum number of items.

Note that `min_items = 1` is equivalent to setting a field as `required`.

`proto
message MyRepeated {
// value must contain at least 2 items
repeated string value = 1 [(buf.validate.field).repeated.min_items = 2];
}
` | +| max_items | [uint64](#uint64) | optional | `max_items` denotes that this field must not exceed a
certain number of items as the upper limit. If the field contains more
items than specified, an error message will be generated, requiring the
field to maintain no more than the specified number of items.

`proto
message MyRepeated {
// value must contain no more than 3 item(s)
repeated string value = 1 [(buf.validate.field).repeated.max_items = 3];
}
` | +| unique | [bool](#bool) | optional | `unique` indicates that all elements in this field must
be unique. This constraint is strictly applicable to scalar and enum
types, with message types not being supported.

`proto
message MyRepeated {
// repeated value must contain unique items
repeated string value = 1 [(buf.validate.field).repeated.unique = true];
}
` | +| items | [FieldConstraints](#buf-validate-FieldConstraints) | optional | `items` details the constraints to be applied to each item
in the field. Even for repeated message fields, validation is executed
against each item unless skip is explicitly specified.

``proto
message MyRepeated {
// The items in the field `value` must follow the specified constraints.
repeated string value = 1 [(buf.validate.field).repeated.items = {
string: {
min_len: 3
max_len: 10
}
}];
}
`` | + + + +### SFixed32Rules + +SFixed32Rules describes the constraints applied to `fixed32` values. + +| Field | Type | Label | Description | +| ------- | --------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [sfixed32](#sfixed32) | optional | `const` requires the field value to exactly match the specified value. If
the field value doesn't match, an error message is generated.

`proto
message MySFixed32 {
// value must equal 42
sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42];
}
` | +| lt | [sfixed32](#sfixed32) | optional | `lt` requires the field value to be less than the specified value (field <
value). If the field value is equal to or greater than the specified value,
an error message is generated.

`proto
message MySFixed32 {
// value must be less than 10
sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10];
}
` | +| lte | [sfixed32](#sfixed32) | optional | `lte` requires the field value to be less than or equal to the specified
value (field <= value). If the field value is greater than the specified
value, an error message is generated.

`proto
message MySFixed32 {
// value must be less than or equal to 10
sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10];
}
` | +| gt | [sfixed32](#sfixed32) | optional | `gt` requires the field value to be greater than the specified value
(exclusive). If the value of `gt` is larger than a specified `lt` or
`lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MySFixed32 {
// value must be greater than 5 [sfixed32.gt]
sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5];

// value must be greater than 5 and less than 10 [sfixed32.gt_lt]
sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }];

// value must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive]
sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }];
}
` | +| gte | [sfixed32](#sfixed32) | optional | `gte` requires the field value to be greater than or equal to the specified
value (exclusive). If the value of `gte` is larger than a specified `lt`
or `lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MySFixed32 {
// value must be greater than or equal to 5 [sfixed32.gte]
sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5];

// value must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt]
sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }];

// value must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive]
sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }];
}
` | +| in | [sfixed32](#sfixed32) | repeated | `in` requires the field value to be equal to one of the specified values.
If the field value isn't one of the specified values, an error message is
generated.

`proto
message MySFixed32 {
// value must be in list [1, 2, 3]
repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] };
}
` | +| not_in | [sfixed32](#sfixed32) | repeated | `not_in` requires the field value to not be equal to any of the specified
values. If the field value is one of the specified values, an error
message is generated.

`proto
message MySFixed32 {
// value must not be in list [1, 2, 3]
repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] };
}
` | +| example | [sfixed32](#sfixed32) | repeated | `example` specifies values that the field may have. These values SHOULD
conform to other constraints. `example` values will not impact validation
but may be used as helpful guidance on how to populate the given field.

`proto
message MySFixed32 {
sfixed32 value = 1 [
(buf.validate.field).sfixed32.example = 1,
(buf.validate.field).sfixed32.example = 2
];
}
` | + + + +### SFixed64Rules + +SFixed64Rules describes the constraints applied to `fixed64` values. + +| Field | Type | Label | Description | +| ------- | --------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [sfixed64](#sfixed64) | optional | `const` requires the field value to exactly match the specified value. If
the field value doesn't match, an error message is generated.

`proto
message MySFixed64 {
// value must equal 42
sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42];
}
` | +| lt | [sfixed64](#sfixed64) | optional | `lt` requires the field value to be less than the specified value (field <
value). If the field value is equal to or greater than the specified value,
an error message is generated.

`proto
message MySFixed64 {
// value must be less than 10
sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10];
}
` | +| lte | [sfixed64](#sfixed64) | optional | `lte` requires the field value to be less than or equal to the specified
value (field <= value). If the field value is greater than the specified
value, an error message is generated.

`proto
message MySFixed64 {
// value must be less than or equal to 10
sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10];
}
` | +| gt | [sfixed64](#sfixed64) | optional | `gt` requires the field value to be greater than the specified value
(exclusive). If the value of `gt` is larger than a specified `lt` or
`lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MySFixed64 {
// value must be greater than 5 [sfixed64.gt]
sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5];

// value must be greater than 5 and less than 10 [sfixed64.gt_lt]
sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }];

// value must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive]
sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }];
}
` | +| gte | [sfixed64](#sfixed64) | optional | `gte` requires the field value to be greater than or equal to the specified
value (exclusive). If the value of `gte` is larger than a specified `lt`
or `lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MySFixed64 {
// value must be greater than or equal to 5 [sfixed64.gte]
sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5];

// value must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt]
sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }];

// value must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive]
sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }];
}
` | +| in | [sfixed64](#sfixed64) | repeated | `in` requires the field value to be equal to one of the specified values.
If the field value isn't one of the specified values, an error message is
generated.

`proto
message MySFixed64 {
// value must be in list [1, 2, 3]
repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] };
}
` | +| not_in | [sfixed64](#sfixed64) | repeated | `not_in` requires the field value to not be equal to any of the specified
values. If the field value is one of the specified values, an error
message is generated.

`proto
message MySFixed64 {
// value must not be in list [1, 2, 3]
repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] };
}
` | +| example | [sfixed64](#sfixed64) | repeated | `example` specifies values that the field may have. These values SHOULD
conform to other constraints. `example` values will not impact validation
but may be used as helpful guidance on how to populate the given field.

`proto
message MySFixed64 {
sfixed64 value = 1 [
(buf.validate.field).sfixed64.example = 1,
(buf.validate.field).sfixed64.example = 2
];
}
` | + + + +### SInt32Rules + +SInt32Rules describes the constraints applied to `sint32` values. + +| Field | Type | Label | Description | +| ------- | ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [sint32](#sint32) | optional | `const` requires the field value to exactly match the specified value. If
the field value doesn't match, an error message is generated.

`proto
message MySInt32 {
// value must equal 42
sint32 value = 1 [(buf.validate.field).sint32.const = 42];
}
` | +| lt | [sint32](#sint32) | optional | `lt` requires the field value to be less than the specified value (field
< value). If the field value is equal to or greater than the specified
value, an error message is generated.

`proto
message MySInt32 {
// value must be less than 10
sint32 value = 1 [(buf.validate.field).sint32.lt = 10];
}
` | +| lte | [sint32](#sint32) | optional | `lte` requires the field value to be less than or equal to the specified
value (field <= value). If the field value is greater than the specified
value, an error message is generated.

`proto
message MySInt32 {
// value must be less than or equal to 10
sint32 value = 1 [(buf.validate.field).sint32.lte = 10];
}
` | +| gt | [sint32](#sint32) | optional | `gt` requires the field value to be greater than the specified value
(exclusive). If the value of `gt` is larger than a specified `lt` or
`lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MySInt32 {
// value must be greater than 5 [sint32.gt]
sint32 value = 1 [(buf.validate.field).sint32.gt = 5];

// value must be greater than 5 and less than 10 [sint32.gt_lt]
sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }];

// value must be greater than 10 or less than 5 [sint32.gt_lt_exclusive]
sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }];
}
` | +| gte | [sint32](#sint32) | optional | `gte` requires the field value to be greater than or equal to the specified
value (exclusive). If the value of `gte` is larger than a specified `lt`
or `lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MySInt32 {
// value must be greater than or equal to 5 [sint32.gte]
sint32 value = 1 [(buf.validate.field).sint32.gte = 5];

// value must be greater than or equal to 5 and less than 10 [sint32.gte_lt]
sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }];

// value must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive]
sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }];
}
` | +| in | [sint32](#sint32) | repeated | `in` requires the field value to be equal to one of the specified values.
If the field value isn't one of the specified values, an error message is
generated.

`proto
message MySInt32 {
// value must be in list [1, 2, 3]
repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] };
}
` | +| not_in | [sint32](#sint32) | repeated | `not_in` requires the field value to not be equal to any of the specified
values. If the field value is one of the specified values, an error
message is generated.

`proto
message MySInt32 {
// value must not be in list [1, 2, 3]
repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] };
}
` | +| example | [sint32](#sint32) | repeated | `example` specifies values that the field may have. These values SHOULD
conform to other constraints. `example` values will not impact validation
but may be used as helpful guidance on how to populate the given field.

`proto
message MySInt32 {
sint32 value = 1 [
(buf.validate.field).sint32.example = 1,
(buf.validate.field).sint32.example = -10
];
}
` | + + + +### SInt64Rules + +SInt64Rules describes the constraints applied to `sint64` values. + +| Field | Type | Label | Description | +| ------- | ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [sint64](#sint64) | optional | `const` requires the field value to exactly match the specified value. If
the field value doesn't match, an error message is generated.

`proto
message MySInt64 {
// value must equal 42
sint64 value = 1 [(buf.validate.field).sint64.const = 42];
}
` | +| lt | [sint64](#sint64) | optional | `lt` requires the field value to be less than the specified value (field
< value). If the field value is equal to or greater than the specified
value, an error message is generated.

`proto
message MySInt64 {
// value must be less than 10
sint64 value = 1 [(buf.validate.field).sint64.lt = 10];
}
` | +| lte | [sint64](#sint64) | optional | `lte` requires the field value to be less than or equal to the specified
value (field <= value). If the field value is greater than the specified
value, an error message is generated.

`proto
message MySInt64 {
// value must be less than or equal to 10
sint64 value = 1 [(buf.validate.field).sint64.lte = 10];
}
` | +| gt | [sint64](#sint64) | optional | `gt` requires the field value to be greater than the specified value
(exclusive). If the value of `gt` is larger than a specified `lt` or
`lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MySInt64 {
// value must be greater than 5 [sint64.gt]
sint64 value = 1 [(buf.validate.field).sint64.gt = 5];

// value must be greater than 5 and less than 10 [sint64.gt_lt]
sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }];

// value must be greater than 10 or less than 5 [sint64.gt_lt_exclusive]
sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }];
}
` | +| gte | [sint64](#sint64) | optional | `gte` requires the field value to be greater than or equal to the specified
value (exclusive). If the value of `gte` is larger than a specified `lt`
or `lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MySInt64 {
// value must be greater than or equal to 5 [sint64.gte]
sint64 value = 1 [(buf.validate.field).sint64.gte = 5];

// value must be greater than or equal to 5 and less than 10 [sint64.gte_lt]
sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }];

// value must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive]
sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }];
}
` | +| in | [sint64](#sint64) | repeated | `in` requires the field value to be equal to one of the specified values.
If the field value isn't one of the specified values, an error message
is generated.

`proto
message MySInt64 {
// value must be in list [1, 2, 3]
repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] };
}
` | +| not_in | [sint64](#sint64) | repeated | `not_in` requires the field value to not be equal to any of the specified
values. If the field value is one of the specified values, an error
message is generated.

`proto
message MySInt64 {
// value must not be in list [1, 2, 3]
repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] };
}
` | +| example | [sint64](#sint64) | repeated | `example` specifies values that the field may have. These values SHOULD
conform to other constraints. `example` values will not impact validation
but may be used as helpful guidance on how to populate the given field.

`proto
message MySInt64 {
sint64 value = 1 [
(buf.validate.field).sint64.example = 1,
(buf.validate.field).sint64.example = -10
];
}
` | + + + +### StringRules + +StringRules describes the constraints applied to `string` values These rules may +also be applied to the `google.protobuf.StringValue` Well-Known-Type. + +| Field | Type | Label | Description | +| ------------------- | -------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | ------ | ----------- | ----- | ------------------------------- | -------- | ------------------------------------------- | ----- | ----------------------- | --- | --- | ----- | ---------------------------- | --- | ------------------------------------------------------------------------------------------ | ----- | ----------------------------- | --- | --------------------------------------------------------------------------------------------- | --- | +| const | [string](#string) | optional | `const` requires the field value to exactly match the specified value. If
the field value doesn't match, an error message is generated.

``proto
message MyString {
// value must equal `hello`
string value = 1 [(buf.validate.field).string.const = "hello"];
}
`` | +| len | [uint64](#uint64) | optional | `len` dictates that the field value must have the specified
number of characters (Unicode code points), which may differ from the number
of bytes in the string. If the field value does not meet the specified
length, an error message will be generated.

`proto
message MyString {
// value length must be 5 characters
string value = 1 [(buf.validate.field).string.len = 5];
}
` | +| min_len | [uint64](#uint64) | optional | `min_len` specifies that the field value must have at least the specified
number of characters (Unicode code points), which may differ from the number
of bytes in the string. If the field value contains fewer characters, an error
message will be generated.

`proto
message MyString {
// value length must be at least 3 characters
string value = 1 [(buf.validate.field).string.min_len = 3];
}
` | +| max_len | [uint64](#uint64) | optional | `max_len` specifies that the field value must have no more than the specified
number of characters (Unicode code points), which may differ from the
number of bytes in the string. If the field value contains more characters,
an error message will be generated.

`proto
message MyString {
// value length must be at most 10 characters
string value = 1 [(buf.validate.field).string.max_len = 10];
}
` | +| len_bytes | [uint64](#uint64) | optional | `len_bytes` dictates that the field value must have the specified number of
bytes. If the field value does not match the specified length in bytes,
an error message will be generated.

`proto
message MyString {
// value length must be 6 bytes
string value = 1 [(buf.validate.field).string.len_bytes = 6];
}
` | +| min_bytes | [uint64](#uint64) | optional | `min_bytes` specifies that the field value must have at least the specified
number of bytes. If the field value contains fewer bytes, an error message
will be generated.

`proto
message MyString {
// value length must be at least 4 bytes
string value = 1 [(buf.validate.field).string.min_bytes = 4];
}

` | +| max_bytes | [uint64](#uint64) | optional | `max_bytes` specifies that the field value must have no more than the
specified number of bytes. If the field value contains more bytes, an
error message will be generated.

`proto
message MyString {
// value length must be at most 8 bytes
string value = 1 [(buf.validate.field).string.max_bytes = 8];
}
` | +| pattern | [string](#string) | optional | `pattern` specifies that the field value must match the specified
regular expression (RE2 syntax), with the expression provided without any
delimiters. If the field value doesn't match the regular expression, an
error message will be generated.

``proto
message MyString {
// value does not match regex pattern `^[a-zA-Z]//$`
string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"];
}
`` | +| prefix | [string](#string) | optional | `prefix` specifies that the field value must have the
specified substring at the beginning of the string. If the field value
doesn't start with the specified prefix, an error message will be
generated.

``proto
message MyString {
// value does not have prefix `pre`
string value = 1 [(buf.validate.field).string.prefix = "pre"];
}
`` | +| suffix | [string](#string) | optional | `suffix` specifies that the field value must have the
specified substring at the end of the string. If the field value doesn't
end with the specified suffix, an error message will be generated.

``proto
message MyString {
// value does not have suffix `post`
string value = 1 [(buf.validate.field).string.suffix = "post"];
}
`` | +| contains | [string](#string) | optional | `contains` specifies that the field value must have the
specified substring anywhere in the string. If the field value doesn't
contain the specified substring, an error message will be generated.

``proto
message MyString {
// value does not contain substring `inside`.
string value = 1 [(buf.validate.field).string.contains = "inside"];
}
`` | +| not_contains | [string](#string) | optional | `not_contains` specifies that the field value must not have the
specified substring anywhere in the string. If the field value contains
the specified substring, an error message will be generated.

``proto
message MyString {
// value contains substring `inside`.
string value = 1 [(buf.validate.field).string.not_contains = "inside"];
}
`` | +| in | [string](#string) | repeated | `in` specifies that the field value must be equal to one of the specified
values. If the field value isn't one of the specified values, an error
message will be generated.

`proto
message MyString {
// value must be in list ["apple", "banana"]
repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"];
}
` | +| not_in | [string](#string) | repeated | `not_in` specifies that the field value cannot be equal to any
of the specified values. If the field value is one of the specified values,
an error message will be generated.
`proto
message MyString {
// value must not be in list ["orange", "grape"]
repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"];
}
` | +| email | [bool](#bool) | optional | `email` specifies that the field value must be a valid email address
(addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1).
If the field value isn't a valid email address, an error message will be generated.

`proto
message MyString {
// value must be a valid email address
string value = 1 [(buf.validate.field).string.email = true];
}
` | +| hostname | [bool](#bool) | optional | `hostname` specifies that the field value must be a valid
hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support
internationalized domain names (IDNs). If the field value isn't a
valid hostname, an error message will be generated.

`proto
message MyString {
// value must be a valid hostname
string value = 1 [(buf.validate.field).string.hostname = true];
}
` | +| ip | [bool](#bool) | optional | `ip` specifies that the field value must be a valid IP
(v4 or v6) address, without surrounding square brackets for IPv6 addresses.
If the field value isn't a valid IP address, an error message will be
generated.

`proto
message MyString {
// value must be a valid IP address
string value = 1 [(buf.validate.field).string.ip = true];
}
` | +| ipv4 | [bool](#bool) | optional | `ipv4` specifies that the field value must be a valid IPv4
address. If the field value isn't a valid IPv4 address, an error message
will be generated.

`proto
message MyString {
// value must be a valid IPv4 address
string value = 1 [(buf.validate.field).string.ipv4 = true];
}
` | +| ipv6 | [bool](#bool) | optional | `ipv6` specifies that the field value must be a valid
IPv6 address, without surrounding square brackets. If the field value is
not a valid IPv6 address, an error message will be generated.

`proto
message MyString {
// value must be a valid IPv6 address
string value = 1 [(buf.validate.field).string.ipv6 = true];
}
` | +| uri | [bool](#bool) | optional | `uri` specifies that the field value must be a valid,
absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid,
absolute URI, an error message will be generated.

`proto
message MyString {
// value must be a valid URI
string value = 1 [(buf.validate.field).string.uri = true];
}
` | +| uri_ref | [bool](#bool) | optional | `uri_ref` specifies that the field value must be a valid URI
as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the
field value isn't a valid URI, an error message will be generated.

`proto
message MyString {
// value must be a valid URI
string value = 1 [(buf.validate.field).string.uri_ref = true];
}
` | +| address | [bool](#bool) | optional | `address` specifies that the field value must be either a valid hostname
as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5)
(which doesn't support internationalized domain names or IDNs) or a valid
IP (v4 or v6). If the field value isn't a valid hostname or IP, an error
message will be generated.

`proto
message MyString {
// value must be a valid hostname, or ip address
string value = 1 [(buf.validate.field).string.address = true];
}
` | +| uuid | [bool](#bool) | optional | `uuid` specifies that the field value must be a valid UUID as defined by
[RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the
field value isn't a valid UUID, an error message will be generated.

`proto
message MyString {
// value must be a valid UUID
string value = 1 [(buf.validate.field).string.uuid = true];
}
` | +| tuuid | [bool](#bool) | optional | `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
omitted. If the field value isn't a valid UUID without dashes, an error message
will be generated.

`proto
message MyString {
// value must be a valid trimmed UUID
string value = 1 [(buf.validate.field).string.tuuid = true];
}
` | +| ip_with_prefixlen | [bool](#bool) | optional | `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6)
address with prefix length. If the field value isn't a valid IP with prefix
length, an error message will be generated.


`proto
message MyString {
// value must be a valid IP with prefix length
string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true];
}
` | +| ipv4_with_prefixlen | [bool](#bool) | optional | `ipv4_with_prefixlen` specifies that the field value must be a valid
IPv4 address with prefix.
If the field value isn't a valid IPv4 address with prefix length,
an error message will be generated.

`proto
message MyString {
// value must be a valid IPv4 address with prefix length
string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true];
}
` | +| ipv6_with_prefixlen | [bool](#bool) | optional | `ipv6_with_prefixlen` specifies that the field value must be a valid
IPv6 address with prefix length.
If the field value is not a valid IPv6 address with prefix length,
an error message will be generated.

`proto
message MyString {
// value must be a valid IPv6 address prefix length
string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true];
}
` | +| ip_prefix | [bool](#bool) | optional | `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix.
If the field value isn't a valid IP prefix, an error message will be
generated. The prefix must have all zeros for the masked bits of the prefix (e.g.,
`127.0.0.0/16`, not `127.0.0.1/16`).

`proto
message MyString {
// value must be a valid IP prefix
string value = 1 [(buf.validate.field).string.ip_prefix = true];
}
` | +| ipv4_prefix | [bool](#bool) | optional | `ipv4_prefix` specifies that the field value must be a valid IPv4
prefix. If the field value isn't a valid IPv4 prefix, an error message
will be generated. The prefix must have all zeros for the masked bits of
the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`).

`proto
message MyString {
// value must be a valid IPv4 prefix
string value = 1 [(buf.validate.field).string.ipv4_prefix = true];
}
` | +| ipv6_prefix | [bool](#bool) | optional | `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix.
If the field value is not a valid IPv6 prefix, an error message will be
generated. The prefix must have all zeros for the masked bits of the prefix
(e.g., `2001:db8::/48`, not `2001:db8::1/48`).

`proto
message MyString {
// value must be a valid IPv6 prefix
string value = 1 [(buf.validate.field).string.ipv6_prefix = true];
}
` | +| host_and_port | [bool](#bool) | optional | `host_and_port` specifies the field value must be a valid host and port
pair. The host must be a valid hostname or IP address while the port
must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited
with square brackets (e.g., `[::1]:1234`). | +| well_known_regex | [KnownRegex](#buf-validate-KnownRegex) | optional | `well_known_regex` specifies a common well-known pattern
defined as a regex. If the field value doesn't match the well-known
regex, an error message will be generated.

`proto
message MyString {
// value must be a valid HTTP header value
string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE];
}
`

#### KnownRegex

`well_known_regex` contains some well-known patterns.

| Name | Number | Description |
| ------------------------------- | -------- | ------------------------------------------- |
| KNOWN_REGEX_UNSPECIFIED | 0 | |
| KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2) |
| KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) | | +| strict | [bool](#bool) | optional | This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
enable strict header validation. By default, this is true, and HTTP header
validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser
validations that only disallow `\r\n\0` characters, which can be used to
bypass header matching rules.

``proto
message MyString {
// The field `value` must have be a valid HTTP headers, but not enforced with strict rules.
string value = 1 [(buf.validate.field).string.strict = false];
}
`` | +| example | [string](#string) | repeated | `example` specifies values that the field may have. These values SHOULD
conform to other constraints. `example` values will not impact validation
but may be used as helpful guidance on how to populate the given field.

`proto
message MyString {
string value = 1 [
(buf.validate.field).string.example = "hello",
(buf.validate.field).string.example = "world"
];
}
` | + + + +### TimestampRules + +TimestampRules describe the constraints applied exclusively to the +`google.protobuf.Timestamp` well-known type. + +| Field | Type | Label | Description | +| ------- | ------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated.

`proto
message MyTimestamp {
// value must equal 2023-05-03T10:00:00Z
google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}];
}
` | +| lt | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated.

`proto
message MyDuration {
// duration must be less than 'P3D' [duration.lt]
google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }];
}
` | +| lte | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated.

`proto
message MyTimestamp {
// timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte]
google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }];
}
` | +| lt_now | [bool](#bool) | optional | `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule.

`proto
message MyTimestamp {
// value must be less than now
google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true];
}
` | +| gt | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | `gt` requires the timestamp field value to be greater than the specified
value (exclusive). If the value of `gt` is larger than a specified `lt`
or `lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MyTimestamp {
// timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt]
google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }];

// timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt]
google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];

// timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive]
google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
}
` | +| gte | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | `gte` requires the timestamp field value to be greater than or equal to the
specified value (exclusive). If the value of `gte` is larger than a
specified `lt` or `lte`, the range is reversed, and the field value
must be outside the specified range. If the field value doesn't meet
the required conditions, an error message is generated.

`proto
message MyTimestamp {
// timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte]
google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }];

// timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt]
google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }];

// timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive]
google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }];
}
` | +| gt_now | [bool](#bool) | optional | `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule.

`proto
message MyTimestamp {
// value must be greater than now
google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true];
}
` | +| within | [google.protobuf.Duration](#google-protobuf-Duration) | optional | `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated.

`proto
message MyTimestamp {
// value must be within 1 hour of now
google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}];
}
` | +| example | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | repeated | | + + + +### UInt32Rules + +UInt32Rules describes the constraints applied to `uint32` values. These rules +may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type. + +| Field | Type | Label | Description | +| ------- | ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [uint32](#uint32) | optional | `const` requires the field value to exactly match the specified value. If
the field value doesn't match, an error message is generated.

`proto
message MyUInt32 {
// value must equal 42
uint32 value = 1 [(buf.validate.field).uint32.const = 42];
}
` | +| lt | [uint32](#uint32) | optional | `lt` requires the field value to be less than the specified value (field <
value). If the field value is equal to or greater than the specified value,
an error message is generated.

`proto
message MyUInt32 {
// value must be less than 10
uint32 value = 1 [(buf.validate.field).uint32.lt = 10];
}
` | +| lte | [uint32](#uint32) | optional | `lte` requires the field value to be less than or equal to the specified
value (field <= value). If the field value is greater than the specified
value, an error message is generated.

`proto
message MyUInt32 {
// value must be less than or equal to 10
uint32 value = 1 [(buf.validate.field).uint32.lte = 10];
}
` | +| gt | [uint32](#uint32) | optional | `gt` requires the field value to be greater than the specified value
(exclusive). If the value of `gt` is larger than a specified `lt` or
`lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MyUInt32 {
// value must be greater than 5 [uint32.gt]
uint32 value = 1 [(buf.validate.field).uint32.gt = 5];

// value must be greater than 5 and less than 10 [uint32.gt_lt]
uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }];

// value must be greater than 10 or less than 5 [uint32.gt_lt_exclusive]
uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }];
}
` | +| gte | [uint32](#uint32) | optional | `gte` requires the field value to be greater than or equal to the specified
value (exclusive). If the value of `gte` is larger than a specified `lt`
or `lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MyUInt32 {
// value must be greater than or equal to 5 [uint32.gte]
uint32 value = 1 [(buf.validate.field).uint32.gte = 5];

// value must be greater than or equal to 5 and less than 10 [uint32.gte_lt]
uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }];

// value must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive]
uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }];
}
` | +| in | [uint32](#uint32) | repeated | `in` requires the field value to be equal to one of the specified values.
If the field value isn't one of the specified values, an error message is
generated.

`proto
message MyUInt32 {
// value must be in list [1, 2, 3]
repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] };
}
` | +| not_in | [uint32](#uint32) | repeated | `not_in` requires the field value to not be equal to any of the specified
values. If the field value is one of the specified values, an error
message is generated.

`proto
message MyUInt32 {
// value must not be in list [1, 2, 3]
repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] };
}
` | +| example | [uint32](#uint32) | repeated | `example` specifies values that the field may have. These values SHOULD
conform to other constraints. `example` values will not impact validation
but may be used as helpful guidance on how to populate the given field.

`proto
message MyUInt32 {
uint32 value = 1 [
(buf.validate.field).uint32.example = 1,
(buf.validate.field).uint32.example = 10
];
}
` | + + + +### UInt64Rules + +UInt64Rules describes the constraints applied to `uint64` values. These rules +may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type. + +| Field | Type | Label | Description | +| ------- | ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| const | [uint64](#uint64) | optional | `const` requires the field value to exactly match the specified value. If
the field value doesn't match, an error message is generated.

`proto
message MyUInt64 {
// value must equal 42
uint64 value = 1 [(buf.validate.field).uint64.const = 42];
}
` | +| lt | [uint64](#uint64) | optional | `lt` requires the field value to be less than the specified value (field <
value). If the field value is equal to or greater than the specified value,
an error message is generated.

`proto
message MyUInt64 {
// value must be less than 10
uint64 value = 1 [(buf.validate.field).uint64.lt = 10];
}
` | +| lte | [uint64](#uint64) | optional | `lte` requires the field value to be less than or equal to the specified
value (field <= value). If the field value is greater than the specified
value, an error message is generated.

`proto
message MyUInt64 {
// value must be less than or equal to 10
uint64 value = 1 [(buf.validate.field).uint64.lte = 10];
}
` | +| gt | [uint64](#uint64) | optional | `gt` requires the field value to be greater than the specified value
(exclusive). If the value of `gt` is larger than a specified `lt` or
`lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MyUInt64 {
// value must be greater than 5 [uint64.gt]
uint64 value = 1 [(buf.validate.field).uint64.gt = 5];

// value must be greater than 5 and less than 10 [uint64.gt_lt]
uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }];

// value must be greater than 10 or less than 5 [uint64.gt_lt_exclusive]
uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }];
}
` | +| gte | [uint64](#uint64) | optional | `gte` requires the field value to be greater than or equal to the specified
value (exclusive). If the value of `gte` is larger than a specified `lt`
or `lte`, the range is reversed, and the field value must be outside the
specified range. If the field value doesn't meet the required conditions,
an error message is generated.

`proto
message MyUInt64 {
// value must be greater than or equal to 5 [uint64.gte]
uint64 value = 1 [(buf.validate.field).uint64.gte = 5];

// value must be greater than or equal to 5 and less than 10 [uint64.gte_lt]
uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }];

// value must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive]
uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }];
}
` | +| in | [uint64](#uint64) | repeated | `in` requires the field value to be equal to one of the specified values.
If the field value isn't one of the specified values, an error message is
generated.

`proto
message MyUInt64 {
// value must be in list [1, 2, 3]
repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] };
}
` | +| not_in | [uint64](#uint64) | repeated | `not_in` requires the field value to not be equal to any of the specified
values. If the field value is one of the specified values, an error
message is generated.

`proto
message MyUInt64 {
// value must not be in list [1, 2, 3]
repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] };
}
` | +| example | [uint64](#uint64) | repeated | `example` specifies values that the field may have. These values SHOULD
conform to other constraints. `example` values will not impact validation
but may be used as helpful guidance on how to populate the given field.

`proto
message MyUInt64 {
uint64 value = 1 [
(buf.validate.field).uint64.example = 1,
(buf.validate.field).uint64.example = -10
];
}
` | + + + +### Violation + +`Violation` represents a single instance where a validation rule, expressed as a +`Constraint`, was not met. It provides information about the field that caused +the violation, the specific constraint that wasn't fulfilled, and a +human-readable error message. + +```json +{ + "fieldPath": "bar", + "constraintId": "foo.bar", + "message": "bar must be greater than 0" +} +``` + +| Field | Type | Label | Description | +| ------------- | ------------------------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| field | [FieldPath](#buf-validate-FieldPath) | optional | `field` is a machine-readable path to the field that failed validation.
This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.

For example, consider the following message:

`proto
message Message {
bool a = 1 [(buf.validate.field).required = true];
}
`

It could produce the following violation:

`textproto
violation {
field { element { field_number: 1, field_name: "a", field_type: 8 } }
...
}
` | +| rule | [FieldPath](#buf-validate-FieldPath) | optional | `rule` is a machine-readable path that points to the specific constraint rule that failed validation.
This will be a nested field starting from the FieldConstraints of the field that failed validation.
For custom constraints, this will provide the path of the constraint, e.g. `cel[0]`.

For example, consider the following message:

`proto
message Message {
bool a = 1 [(buf.validate.field).required = true];
bool b = 2 [(buf.validate.field).cel = {
id: "custom_constraint",
expression: "!this ? 'b must be true': ''"
}]
}
`

It could produce the following violations:

`textproto
violation {
rule { element { field_number: 25, field_name: "required", field_type: 8 } }
...
}
violation {
rule { element { field_number: 23, field_name: "cel", field_type: 11, index: 0 } }
...
}
` | +| field_path | [string](#string) | optional | **Deprecated.** `field_path` is a human-readable identifier that points to the specific field that failed the validation.
This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation.

Deprecated: use the `field` instead. | +| constraint_id | [string](#string) | optional | `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled.
This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated. | +| message | [string](#string) | optional | `message` is a human-readable error message that describes the nature of the violation.
This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation. | +| for_key | [bool](#bool) | optional | `for_key` indicates whether the violation was caused by a map key, rather than a value. | + + + +### Violations + +`Violations` is a collection of `Violation` messages. This message type is +returned by protovalidate when a proto message fails to meet the requirements +set by the `Constraint` validation rules. Each individual violation is +represented by a `Violation` message. + +| Field | Type | Label | Description | +| ---------- | ------------------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------- | +| violations | [Violation](#buf-validate-Violation) | repeated | `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected. | + + + + + +### Ignore + +Specifies how FieldConstraints.ignore behaves. See the documentation for +FieldConstraints.required for definitions of "populated" and "nullable". + +| Name | Number | Description | +| ----------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| IGNORE_UNSPECIFIED | 0 | Validation is only skipped if it's an unpopulated nullable fields.

`proto
syntax="proto3";

message Request {
// The uri rule applies to any value, including the empty string.
string foo = 1 [
(buf.validate.field).string.uri = true
];

// The uri rule only applies if the field is set, including if it's
// set to the empty string.
optional string bar = 2 [
(buf.validate.field).string.uri = true
];

// The min_items rule always applies, even if the list is empty.
repeated string baz = 3 [
(buf.validate.field).repeated.min_items = 3
];

// The custom CEL rule applies only if the field is set, including if
// it's the "zero" value of that message.
SomeMessage quux = 4 [
(buf.validate.field).cel = {/* ... */}
];
}
` | +| IGNORE_IF_UNPOPULATED | 1 | Validation is skipped if the field is unpopulated. This rule is redundant
if the field is already nullable. This value is equivalent behavior to the
deprecated ignore_empty rule.

`proto
syntax="proto3

message Request {
// The uri rule applies only if the value is not the empty string.
string foo = 1 [
(buf.validate.field).string.uri = true,
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
];

// IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this
// case: the uri rule only applies if the field is set, including if
// it's set to the empty string.
optional string bar = 2 [
(buf.validate.field).string.uri = true,
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
];

// The min_items rule only applies if the list has at least one item.
repeated string baz = 3 [
(buf.validate.field).repeated.min_items = 3,
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
];

// IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this
// case: the custom CEL rule applies only if the field is set, including
// if it's the "zero" value of that message.
SomeMessage quux = 4 [
(buf.validate.field).cel = {/* ... */},
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
];
}
` | +| IGNORE_IF_DEFAULT_VALUE | 2 | Validation is skipped if the field is unpopulated or if it is a nullable
field populated with its default value. This is typically the zero or
empty value, but proto2 scalars support custom defaults. For messages, the
default is a non-null message with all its fields unpopulated.

`proto
syntax="proto3

message Request {
// IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in
// this case; the uri rule applies only if the value is not the empty
// string.
string foo = 1 [
(buf.validate.field).string.uri = true,
(buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
];

// The uri rule only applies if the field is set to a value other than
// the empty string.
optional string bar = 2 [
(buf.validate.field).string.uri = true,
(buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
];

// IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in
// this case; the min_items rule only applies if the list has at least
// one item.
repeated string baz = 3 [
(buf.validate.field).repeated.min_items = 3,
(buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
];

// The custom CEL rule only applies if the field is set to a value other
// than an empty message (i.e., fields are unpopulated).
SomeMessage quux = 4 [
(buf.validate.field).cel = {/* ... */},
(buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
];
}
`

This rule is affected by proto2 custom default values:

```proto
syntax="proto2";

message Request {
// The gt rule only applies if the field is set and it's value is not
the default (i.e., not -42). The rule even applies if the field is set
to zero since the default value differs.
optional int32 value = 1 [
default = -42,
(buf.validate.field).int32.gt = 0,
(buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
];
} | +| IGNORE_ALWAYS | 3 | The validation rules of this field will be skipped and not evaluated. This
is useful for situations that necessitate turning off the rules of a field
containing a message that may not make sense in the current context, or to
temporarily disable constraints during development.

`proto
message MyMessage {
// The field's rules will always be ignored, including any validation's
// on value's fields.
MyOtherMessage value = 1 [
(buf.validate.field).ignore = IGNORE_ALWAYS];
}
` | +| IGNORE_EMPTY | 1 | Deprecated: Use IGNORE_IF_UNPOPULATED instead. TODO: Remove this value pre-v1. | +| IGNORE_DEFAULT | 2 | Deprecated: Use IGNORE_IF_DEFAULT_VALUE. TODO: Remove this value pre-v1. | + + + +### KnownRegex + +WellKnownRegex contain some well-known patterns. + +| Name | Number | Description | +| ----------------------------- | ------ | ---------------------------------------------------------------------------------------------- | +| KNOWN_REGEX_UNSPECIFIED | 0 | | +| KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2). | +| KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4). | + + + + + +### File-level Extensions + +| Extension | Type | Base | Number | Description | +| ---------- | --------------------- | ------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | -------------------------------------------------------------------------------------------------------------------------------------- | +| field | FieldConstraints | .google.protobuf.FieldOptions | 1159 | Rules specify the validations to be performed on this field. By default,
no validation is performed against a field. | +| predefined | PredefinedConstraints | .google.protobuf.FieldOptions | 1160 | Specifies predefined rules. When extending a standard constraint message,
this adds additional CEL expressions that apply when the extension is used.

```proto
extend buf.validate.Int32Rules {
bool is_zero [(buf.validate.predefined).cel = {
id: "int32.is_zero",
message: "value must be zero",
expression: "!rule | | this == 0",
}];
}

message Foo {
int32 reserved = 1 [(buf.validate.field).int32.(is_zero) = true];
}
``` | +| message | MessageConstraints | .google.protobuf.MessageOptions | 1159 | Rules specify the validations to be performed on this message. By default,
no validation is performed against a message. | +| oneof | OneofConstraints | .google.protobuf.OneofOptions | 1159 | Rules specify the validations to be performed on this oneof. By default,
no validation is performed against a oneof. | + + + + +

Top

From 86404bf5c58157249934735c20561d5caf4d6886 Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Wed, 8 Jan 2025 09:52:29 +0100 Subject: [PATCH 40/42] add well-known types --- proto/buf/validate/validate.pb.go | 11046 ++++++++++ proto/buf/validate/validate_grpc_pb.js | 1 + proto/buf/validate/validate_pb.d.ts | 2187 ++ proto/buf/validate/validate_pb.js | 17050 ++++++++++++++++ proto/google/api/annotations.pb.go | 118 + proto/google/api/annotations_grpc_pb.js | 1 + proto/google/api/annotations_pb.d.ts | 11 + proto/google/api/annotations_pb.js | 54 + proto/google/api/field_behavior.pb.go | 265 + proto/google/api/field_behavior_grpc_pb.js | 1 + proto/google/api/field_behavior_pb.d.ts | 22 + proto/google/api/field_behavior_pb.js | 68 + proto/google/api/http.pb.go | 738 + proto/google/api/http_grpc_pb.js | 1 + proto/google/api/http_pb.d.ts | 135 + proto/google/api/http_pb.js | 1012 + proto/google/api/visibility.pb.go | 415 + proto/google/api/visibility_grpc_pb.js | 1 + proto/google/api/visibility_pb.d.ts | 65 + proto/google/api/visibility_pb.js | 546 + proto/google/protobuf/descriptor.pb.go | 5164 +++++ proto/google/protobuf/descriptor_grpc_pb.js | 1 + proto/google/protobuf/descriptor_pb.d.ts | 1650 ++ proto/google/protobuf/descriptor_pb.js | 12774 ++++++++++++ proto/google/protobuf/duration.pb.go | 367 + proto/google/protobuf/duration_grpc_pb.js | 1 + proto/google/protobuf/duration_pb.d.ts | 30 + proto/google/protobuf/duration_pb.js | 206 + proto/google/protobuf/field_mask.pb.go | 581 + proto/google/protobuf/field_mask_grpc_pb.js | 1 + proto/google/protobuf/field_mask_pb.d.ts | 29 + proto/google/protobuf/field_mask_pb.js | 202 + proto/google/protobuf/struct.pb.go | 801 + proto/google/protobuf/struct_grpc_pb.js | 1 + proto/google/protobuf/struct_pb.d.ts | 121 + proto/google/protobuf/struct_pb.js | 955 + proto/google/protobuf/timestamp.pb.go | 376 + proto/google/protobuf/timestamp_grpc_pb.js | 1 + proto/google/protobuf/timestamp_pb.d.ts | 30 + proto/google/protobuf/timestamp_pb.js | 242 + .../options/annotations.pb.go | 267 + .../options/annotations_grpc_pb.js | 1 + .../options/annotations_pb.d.ts | 21 + .../options/annotations_pb.js | 184 + .../options/openapiv2.pb.go | 3110 +++ .../options/openapiv2_grpc_pb.js | 1 + .../options/openapiv2_pb.d.ts | 849 + .../options/openapiv2_pb.js | 6673 ++++++ 48 files changed, 68376 insertions(+) create mode 100644 proto/buf/validate/validate.pb.go create mode 100644 proto/buf/validate/validate_grpc_pb.js create mode 100644 proto/buf/validate/validate_pb.d.ts create mode 100644 proto/buf/validate/validate_pb.js create mode 100644 proto/google/api/annotations.pb.go create mode 100644 proto/google/api/annotations_grpc_pb.js create mode 100644 proto/google/api/annotations_pb.d.ts create mode 100644 proto/google/api/annotations_pb.js create mode 100644 proto/google/api/field_behavior.pb.go create mode 100644 proto/google/api/field_behavior_grpc_pb.js create mode 100644 proto/google/api/field_behavior_pb.d.ts create mode 100644 proto/google/api/field_behavior_pb.js create mode 100644 proto/google/api/http.pb.go create mode 100644 proto/google/api/http_grpc_pb.js create mode 100644 proto/google/api/http_pb.d.ts create mode 100644 proto/google/api/http_pb.js create mode 100644 proto/google/api/visibility.pb.go create mode 100644 proto/google/api/visibility_grpc_pb.js create mode 100644 proto/google/api/visibility_pb.d.ts create mode 100644 proto/google/api/visibility_pb.js create mode 100644 proto/google/protobuf/descriptor.pb.go create mode 100644 proto/google/protobuf/descriptor_grpc_pb.js create mode 100644 proto/google/protobuf/descriptor_pb.d.ts create mode 100644 proto/google/protobuf/descriptor_pb.js create mode 100644 proto/google/protobuf/duration.pb.go create mode 100644 proto/google/protobuf/duration_grpc_pb.js create mode 100644 proto/google/protobuf/duration_pb.d.ts create mode 100644 proto/google/protobuf/duration_pb.js create mode 100644 proto/google/protobuf/field_mask.pb.go create mode 100644 proto/google/protobuf/field_mask_grpc_pb.js create mode 100644 proto/google/protobuf/field_mask_pb.d.ts create mode 100644 proto/google/protobuf/field_mask_pb.js create mode 100644 proto/google/protobuf/struct.pb.go create mode 100644 proto/google/protobuf/struct_grpc_pb.js create mode 100644 proto/google/protobuf/struct_pb.d.ts create mode 100644 proto/google/protobuf/struct_pb.js create mode 100644 proto/google/protobuf/timestamp.pb.go create mode 100644 proto/google/protobuf/timestamp_grpc_pb.js create mode 100644 proto/google/protobuf/timestamp_pb.d.ts create mode 100644 proto/google/protobuf/timestamp_pb.js create mode 100644 proto/protoc-gen-openapiv2/options/annotations.pb.go create mode 100644 proto/protoc-gen-openapiv2/options/annotations_grpc_pb.js create mode 100644 proto/protoc-gen-openapiv2/options/annotations_pb.d.ts create mode 100644 proto/protoc-gen-openapiv2/options/annotations_pb.js create mode 100644 proto/protoc-gen-openapiv2/options/openapiv2.pb.go create mode 100644 proto/protoc-gen-openapiv2/options/openapiv2_grpc_pb.js create mode 100644 proto/protoc-gen-openapiv2/options/openapiv2_pb.d.ts create mode 100644 proto/protoc-gen-openapiv2/options/openapiv2_pb.js diff --git a/proto/buf/validate/validate.pb.go b/proto/buf/validate/validate.pb.go new file mode 100644 index 000000000..1df2a5140 --- /dev/null +++ b/proto/buf/validate/validate.pb.go @@ -0,0 +1,11046 @@ +// Copyright 2023 Buf Technologies, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.1 +// protoc (unknown) +// source: buf/validate/validate.proto + +package validate + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Specifies how FieldConstraints.ignore behaves. See the documentation for +// FieldConstraints.required for definitions of "populated" and "nullable". +type Ignore int32 + +const ( + // Validation is only skipped if it's an unpopulated nullable fields. + // + // ```proto + // syntax="proto3"; + // + // message Request { + // // The uri rule applies to any value, including the empty string. + // string foo = 1 [ + // (buf.validate.field).string.uri = true + // ]; + // + // // The uri rule only applies if the field is set, including if it's + // // set to the empty string. + // optional string bar = 2 [ + // (buf.validate.field).string.uri = true + // ]; + // + // // The min_items rule always applies, even if the list is empty. + // repeated string baz = 3 [ + // (buf.validate.field).repeated.min_items = 3 + // ]; + // + // // The custom CEL rule applies only if the field is set, including if + // // it's the "zero" value of that message. + // SomeMessage quux = 4 [ + // (buf.validate.field).cel = {/* ... */} + // ]; + // } + // + // ``` + Ignore_IGNORE_UNSPECIFIED Ignore = 0 + // Validation is skipped if the field is unpopulated. This rule is redundant + // if the field is already nullable. This value is equivalent behavior to the + // deprecated ignore_empty rule. + // + // ```proto + // syntax="proto3 + // + // message Request { + // // The uri rule applies only if the value is not the empty string. + // string foo = 1 [ + // (buf.validate.field).string.uri = true, + // (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED + // ]; + // + // // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this + // // case: the uri rule only applies if the field is set, including if + // // it's set to the empty string. + // optional string bar = 2 [ + // (buf.validate.field).string.uri = true, + // (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED + // ]; + // + // // The min_items rule only applies if the list has at least one item. + // repeated string baz = 3 [ + // (buf.validate.field).repeated.min_items = 3, + // (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED + // ]; + // + // // IGNORE_IF_UNPOPULATED is equivalent to IGNORE_UNSPECIFIED in this + // // case: the custom CEL rule applies only if the field is set, including + // // if it's the "zero" value of that message. + // SomeMessage quux = 4 [ + // (buf.validate.field).cel = {/* ... */}, + // (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED + // ]; + // } + // + // ``` + Ignore_IGNORE_IF_UNPOPULATED Ignore = 1 + // Validation is skipped if the field is unpopulated or if it is a nullable + // field populated with its default value. This is typically the zero or + // empty value, but proto2 scalars support custom defaults. For messages, the + // default is a non-null message with all its fields unpopulated. + // + // ```proto + // syntax="proto3 + // + // message Request { + // // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in + // // this case; the uri rule applies only if the value is not the empty + // // string. + // string foo = 1 [ + // (buf.validate.field).string.uri = true, + // (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE + // ]; + // + // // The uri rule only applies if the field is set to a value other than + // // the empty string. + // optional string bar = 2 [ + // (buf.validate.field).string.uri = true, + // (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE + // ]; + // + // // IGNORE_IF_DEFAULT_VALUE is equivalent to IGNORE_IF_UNPOPULATED in + // // this case; the min_items rule only applies if the list has at least + // // one item. + // repeated string baz = 3 [ + // (buf.validate.field).repeated.min_items = 3, + // (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE + // ]; + // + // // The custom CEL rule only applies if the field is set to a value other + // // than an empty message (i.e., fields are unpopulated). + // SomeMessage quux = 4 [ + // (buf.validate.field).cel = {/* ... */}, + // (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE + // ]; + // } + // + // ``` + // + // This rule is affected by proto2 custom default values: + // + // ```proto + // syntax="proto2"; + // + // message Request { + // // The gt rule only applies if the field is set and it's value is not + // the default (i.e., not -42). The rule even applies if the field is set + // to zero since the default value differs. + // optional int32 value = 1 [ + // default = -42, + // (buf.validate.field).int32.gt = 0, + // (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE + // ]; + // } + Ignore_IGNORE_IF_DEFAULT_VALUE Ignore = 2 + // The validation rules of this field will be skipped and not evaluated. This + // is useful for situations that necessitate turning off the rules of a field + // containing a message that may not make sense in the current context, or to + // temporarily disable constraints during development. + // + // ```proto + // + // message MyMessage { + // // The field's rules will always be ignored, including any validation's + // // on value's fields. + // MyOtherMessage value = 1 [ + // (buf.validate.field).ignore = IGNORE_ALWAYS]; + // } + // + // ``` + Ignore_IGNORE_ALWAYS Ignore = 3 + // Deprecated: Use IGNORE_IF_UNPOPULATED instead. TODO: Remove this value pre-v1. + // + // Deprecated: Marked as deprecated in buf/validate/validate.proto. + Ignore_IGNORE_EMPTY Ignore = 1 + // Deprecated: Use IGNORE_IF_DEFAULT_VALUE. TODO: Remove this value pre-v1. + // + // Deprecated: Marked as deprecated in buf/validate/validate.proto. + Ignore_IGNORE_DEFAULT Ignore = 2 +) + +// Enum value maps for Ignore. +var ( + Ignore_name = map[int32]string{ + 0: "IGNORE_UNSPECIFIED", + 1: "IGNORE_IF_UNPOPULATED", + 2: "IGNORE_IF_DEFAULT_VALUE", + 3: "IGNORE_ALWAYS", + // Duplicate value: 1: "IGNORE_EMPTY", + // Duplicate value: 2: "IGNORE_DEFAULT", + } + Ignore_value = map[string]int32{ + "IGNORE_UNSPECIFIED": 0, + "IGNORE_IF_UNPOPULATED": 1, + "IGNORE_IF_DEFAULT_VALUE": 2, + "IGNORE_ALWAYS": 3, + "IGNORE_EMPTY": 1, + "IGNORE_DEFAULT": 2, + } +) + +func (x Ignore) Enum() *Ignore { + p := new(Ignore) + *p = x + return p +} + +func (x Ignore) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Ignore) Descriptor() protoreflect.EnumDescriptor { + return file_buf_validate_validate_proto_enumTypes[0].Descriptor() +} + +func (Ignore) Type() protoreflect.EnumType { + return &file_buf_validate_validate_proto_enumTypes[0] +} + +func (x Ignore) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *Ignore) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = Ignore(num) + return nil +} + +// Deprecated: Use Ignore.Descriptor instead. +func (Ignore) EnumDescriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{0} +} + +// WellKnownRegex contain some well-known patterns. +type KnownRegex int32 + +const ( + KnownRegex_KNOWN_REGEX_UNSPECIFIED KnownRegex = 0 + // HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2). + KnownRegex_KNOWN_REGEX_HTTP_HEADER_NAME KnownRegex = 1 + // HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4). + KnownRegex_KNOWN_REGEX_HTTP_HEADER_VALUE KnownRegex = 2 +) + +// Enum value maps for KnownRegex. +var ( + KnownRegex_name = map[int32]string{ + 0: "KNOWN_REGEX_UNSPECIFIED", + 1: "KNOWN_REGEX_HTTP_HEADER_NAME", + 2: "KNOWN_REGEX_HTTP_HEADER_VALUE", + } + KnownRegex_value = map[string]int32{ + "KNOWN_REGEX_UNSPECIFIED": 0, + "KNOWN_REGEX_HTTP_HEADER_NAME": 1, + "KNOWN_REGEX_HTTP_HEADER_VALUE": 2, + } +) + +func (x KnownRegex) Enum() *KnownRegex { + p := new(KnownRegex) + *p = x + return p +} + +func (x KnownRegex) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KnownRegex) Descriptor() protoreflect.EnumDescriptor { + return file_buf_validate_validate_proto_enumTypes[1].Descriptor() +} + +func (KnownRegex) Type() protoreflect.EnumType { + return &file_buf_validate_validate_proto_enumTypes[1] +} + +func (x KnownRegex) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *KnownRegex) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = KnownRegex(num) + return nil +} + +// Deprecated: Use KnownRegex.Descriptor instead. +func (KnownRegex) EnumDescriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{1} +} + +// `Constraint` represents a validation rule written in the Common Expression +// Language (CEL) syntax. Each Constraint includes a unique identifier, an +// optional error message, and the CEL expression to evaluate. For more +// information on CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). +// +// ```proto +// +// message Foo { +// option (buf.validate.message).cel = { +// id: "foo.bar" +// message: "bar must be greater than 0" +// expression: "this.bar > 0" +// }; +// int32 bar = 1; +// } +// +// ``` +type Constraint struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `id` is a string that serves as a machine-readable name for this Constraint. + // It should be unique within its scope, which could be either a message or a field. + Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + // `message` is an optional field that provides a human-readable error message + // for this Constraint when the CEL expression evaluates to false. If a + // non-empty message is provided, any strings resulting from the CEL + // expression evaluation are ignored. + Message *string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` + // `expression` is the actual CEL expression that will be evaluated for + // validation. This string must resolve to either a boolean or a string + // value. If the expression evaluates to false or a non-empty string, the + // validation is considered failed, and the message is rejected. + Expression *string `protobuf:"bytes,3,opt,name=expression" json:"expression,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Constraint) Reset() { + *x = Constraint{} + mi := &file_buf_validate_validate_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Constraint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Constraint) ProtoMessage() {} + +func (x *Constraint) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Constraint.ProtoReflect.Descriptor instead. +func (*Constraint) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{0} +} + +func (x *Constraint) GetId() string { + if x != nil && x.Id != nil { + return *x.Id + } + return "" +} + +func (x *Constraint) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message + } + return "" +} + +func (x *Constraint) GetExpression() string { + if x != nil && x.Expression != nil { + return *x.Expression + } + return "" +} + +// MessageConstraints represents validation rules that are applied to the entire message. +// It includes disabling options and a list of Constraint messages representing Common Expression Language (CEL) validation rules. +type MessageConstraints struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `disabled` is a boolean flag that, when set to true, nullifies any validation rules for this message. + // This includes any fields within the message that would otherwise support validation. + // + // ```proto + // + // message MyMessage { + // // validation will be bypassed for this message + // option (buf.validate.message).disabled = true; + // } + // + // ``` + Disabled *bool `protobuf:"varint,1,opt,name=disabled" json:"disabled,omitempty"` + // `cel` is a repeated field of type Constraint. Each Constraint specifies a validation rule to be applied to this message. + // These constraints are written in Common Expression Language (CEL) syntax. For more information on + // CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + // + // ```proto + // + // message MyMessage { + // // The field `foo` must be greater than 42. + // option (buf.validate.message).cel = { + // id: "my_message.value", + // message: "value must be greater than 42", + // expression: "this.foo > 42", + // }; + // optional int32 foo = 1; + // } + // + // ``` + Cel []*Constraint `protobuf:"bytes,3,rep,name=cel" json:"cel,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MessageConstraints) Reset() { + *x = MessageConstraints{} + mi := &file_buf_validate_validate_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MessageConstraints) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageConstraints) ProtoMessage() {} + +func (x *MessageConstraints) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MessageConstraints.ProtoReflect.Descriptor instead. +func (*MessageConstraints) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{1} +} + +func (x *MessageConstraints) GetDisabled() bool { + if x != nil && x.Disabled != nil { + return *x.Disabled + } + return false +} + +func (x *MessageConstraints) GetCel() []*Constraint { + if x != nil { + return x.Cel + } + return nil +} + +// The `OneofConstraints` message type enables you to manage constraints for +// oneof fields in your protobuf messages. +type OneofConstraints struct { + state protoimpl.MessageState `protogen:"open.v1"` + // If `required` is true, exactly one field of the oneof must be present. A + // validation error is returned if no fields in the oneof are present. The + // field itself may still be a default value; further constraints + // should be placed on the fields themselves to ensure they are valid values, + // such as `min_len` or `gt`. + // + // ```proto + // + // message MyMessage { + // oneof value { + // // Either `a` or `b` must be set. If `a` is set, it must also be + // // non-empty; whereas if `b` is set, it can still be an empty string. + // option (buf.validate.oneof).required = true; + // string a = 1 [(buf.validate.field).string.min_len = 1]; + // string b = 2; + // } + // } + // + // ``` + Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OneofConstraints) Reset() { + *x = OneofConstraints{} + mi := &file_buf_validate_validate_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OneofConstraints) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OneofConstraints) ProtoMessage() {} + +func (x *OneofConstraints) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OneofConstraints.ProtoReflect.Descriptor instead. +func (*OneofConstraints) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{2} +} + +func (x *OneofConstraints) GetRequired() bool { + if x != nil && x.Required != nil { + return *x.Required + } + return false +} + +// FieldConstraints encapsulates the rules for each type of field. Depending on +// the field, the correct set should be used to ensure proper validations. +type FieldConstraints struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `cel` is a repeated field used to represent a textual expression + // in the Common Expression Language (CEL) syntax. For more information on + // CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + // + // ```proto + // + // message MyMessage { + // // The field `value` must be greater than 42. + // optional int32 value = 1 [(buf.validate.field).cel = { + // id: "my_message.value", + // message: "value must be greater than 42", + // expression: "this > 42", + // }]; + // } + // + // ``` + Cel []*Constraint `protobuf:"bytes,23,rep,name=cel" json:"cel,omitempty"` + // If `required` is true, the field must be populated. A populated field can be + // described as "serialized in the wire format," which includes: + // + // - the following "nullable" fields must be explicitly set to be considered populated: + // - singular message fields (whose fields may be unpopulated/default values) + // - member fields of a oneof (may be their default value) + // - proto3 optional fields (may be their default value) + // - proto2 scalar fields (both optional and required) + // + // - proto3 scalar fields must be non-zero to be considered populated + // - repeated and map fields must be non-empty to be considered populated + // + // ```proto + // + // message MyMessage { + // // The field `value` must be set to a non-null value. + // optional MyOtherMessage value = 1 [(buf.validate.field).required = true]; + // } + // + // ``` + Required *bool `protobuf:"varint,25,opt,name=required" json:"required,omitempty"` + // Skip validation on the field if its value matches the specified criteria. + // See Ignore enum for details. + // + // ```proto + // + // message UpdateRequest { + // // The uri rule only applies if the field is populated and not an empty + // // string. + // optional string url = 1 [ + // (buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE, + // (buf.validate.field).string.uri = true, + // ]; + // } + // + // ``` + Ignore *Ignore `protobuf:"varint,27,opt,name=ignore,enum=buf.validate.Ignore" json:"ignore,omitempty"` + // Types that are valid to be assigned to Type: + // + // *FieldConstraints_Float + // *FieldConstraints_Double + // *FieldConstraints_Int32 + // *FieldConstraints_Int64 + // *FieldConstraints_Uint32 + // *FieldConstraints_Uint64 + // *FieldConstraints_Sint32 + // *FieldConstraints_Sint64 + // *FieldConstraints_Fixed32 + // *FieldConstraints_Fixed64 + // *FieldConstraints_Sfixed32 + // *FieldConstraints_Sfixed64 + // *FieldConstraints_Bool + // *FieldConstraints_String_ + // *FieldConstraints_Bytes + // *FieldConstraints_Enum + // *FieldConstraints_Repeated + // *FieldConstraints_Map + // *FieldConstraints_Any + // *FieldConstraints_Duration + // *FieldConstraints_Timestamp + Type isFieldConstraints_Type `protobuf_oneof:"type"` + // DEPRECATED: use ignore=IGNORE_ALWAYS instead. TODO: remove this field pre-v1. + // + // Deprecated: Marked as deprecated in buf/validate/validate.proto. + Skipped *bool `protobuf:"varint,24,opt,name=skipped" json:"skipped,omitempty"` + // DEPRECATED: use ignore=IGNORE_IF_UNPOPULATED instead. TODO: remove this field pre-v1. + // + // Deprecated: Marked as deprecated in buf/validate/validate.proto. + IgnoreEmpty *bool `protobuf:"varint,26,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FieldConstraints) Reset() { + *x = FieldConstraints{} + mi := &file_buf_validate_validate_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FieldConstraints) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldConstraints) ProtoMessage() {} + +func (x *FieldConstraints) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldConstraints.ProtoReflect.Descriptor instead. +func (*FieldConstraints) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{3} +} + +func (x *FieldConstraints) GetCel() []*Constraint { + if x != nil { + return x.Cel + } + return nil +} + +func (x *FieldConstraints) GetRequired() bool { + if x != nil && x.Required != nil { + return *x.Required + } + return false +} + +func (x *FieldConstraints) GetIgnore() Ignore { + if x != nil && x.Ignore != nil { + return *x.Ignore + } + return Ignore_IGNORE_UNSPECIFIED +} + +func (x *FieldConstraints) GetType() isFieldConstraints_Type { + if x != nil { + return x.Type + } + return nil +} + +func (x *FieldConstraints) GetFloat() *FloatRules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Float); ok { + return x.Float + } + } + return nil +} + +func (x *FieldConstraints) GetDouble() *DoubleRules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Double); ok { + return x.Double + } + } + return nil +} + +func (x *FieldConstraints) GetInt32() *Int32Rules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Int32); ok { + return x.Int32 + } + } + return nil +} + +func (x *FieldConstraints) GetInt64() *Int64Rules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Int64); ok { + return x.Int64 + } + } + return nil +} + +func (x *FieldConstraints) GetUint32() *UInt32Rules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Uint32); ok { + return x.Uint32 + } + } + return nil +} + +func (x *FieldConstraints) GetUint64() *UInt64Rules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Uint64); ok { + return x.Uint64 + } + } + return nil +} + +func (x *FieldConstraints) GetSint32() *SInt32Rules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Sint32); ok { + return x.Sint32 + } + } + return nil +} + +func (x *FieldConstraints) GetSint64() *SInt64Rules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Sint64); ok { + return x.Sint64 + } + } + return nil +} + +func (x *FieldConstraints) GetFixed32() *Fixed32Rules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Fixed32); ok { + return x.Fixed32 + } + } + return nil +} + +func (x *FieldConstraints) GetFixed64() *Fixed64Rules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Fixed64); ok { + return x.Fixed64 + } + } + return nil +} + +func (x *FieldConstraints) GetSfixed32() *SFixed32Rules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Sfixed32); ok { + return x.Sfixed32 + } + } + return nil +} + +func (x *FieldConstraints) GetSfixed64() *SFixed64Rules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Sfixed64); ok { + return x.Sfixed64 + } + } + return nil +} + +func (x *FieldConstraints) GetBool() *BoolRules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Bool); ok { + return x.Bool + } + } + return nil +} + +func (x *FieldConstraints) GetString_() *StringRules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_String_); ok { + return x.String_ + } + } + return nil +} + +func (x *FieldConstraints) GetBytes() *BytesRules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Bytes); ok { + return x.Bytes + } + } + return nil +} + +func (x *FieldConstraints) GetEnum() *EnumRules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Enum); ok { + return x.Enum + } + } + return nil +} + +func (x *FieldConstraints) GetRepeated() *RepeatedRules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Repeated); ok { + return x.Repeated + } + } + return nil +} + +func (x *FieldConstraints) GetMap() *MapRules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Map); ok { + return x.Map + } + } + return nil +} + +func (x *FieldConstraints) GetAny() *AnyRules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Any); ok { + return x.Any + } + } + return nil +} + +func (x *FieldConstraints) GetDuration() *DurationRules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Duration); ok { + return x.Duration + } + } + return nil +} + +func (x *FieldConstraints) GetTimestamp() *TimestampRules { + if x != nil { + if x, ok := x.Type.(*FieldConstraints_Timestamp); ok { + return x.Timestamp + } + } + return nil +} + +// Deprecated: Marked as deprecated in buf/validate/validate.proto. +func (x *FieldConstraints) GetSkipped() bool { + if x != nil && x.Skipped != nil { + return *x.Skipped + } + return false +} + +// Deprecated: Marked as deprecated in buf/validate/validate.proto. +func (x *FieldConstraints) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +type isFieldConstraints_Type interface { + isFieldConstraints_Type() +} + +type FieldConstraints_Float struct { + // Scalar Field Types + Float *FloatRules `protobuf:"bytes,1,opt,name=float,oneof"` +} + +type FieldConstraints_Double struct { + Double *DoubleRules `protobuf:"bytes,2,opt,name=double,oneof"` +} + +type FieldConstraints_Int32 struct { + Int32 *Int32Rules `protobuf:"bytes,3,opt,name=int32,oneof"` +} + +type FieldConstraints_Int64 struct { + Int64 *Int64Rules `protobuf:"bytes,4,opt,name=int64,oneof"` +} + +type FieldConstraints_Uint32 struct { + Uint32 *UInt32Rules `protobuf:"bytes,5,opt,name=uint32,oneof"` +} + +type FieldConstraints_Uint64 struct { + Uint64 *UInt64Rules `protobuf:"bytes,6,opt,name=uint64,oneof"` +} + +type FieldConstraints_Sint32 struct { + Sint32 *SInt32Rules `protobuf:"bytes,7,opt,name=sint32,oneof"` +} + +type FieldConstraints_Sint64 struct { + Sint64 *SInt64Rules `protobuf:"bytes,8,opt,name=sint64,oneof"` +} + +type FieldConstraints_Fixed32 struct { + Fixed32 *Fixed32Rules `protobuf:"bytes,9,opt,name=fixed32,oneof"` +} + +type FieldConstraints_Fixed64 struct { + Fixed64 *Fixed64Rules `protobuf:"bytes,10,opt,name=fixed64,oneof"` +} + +type FieldConstraints_Sfixed32 struct { + Sfixed32 *SFixed32Rules `protobuf:"bytes,11,opt,name=sfixed32,oneof"` +} + +type FieldConstraints_Sfixed64 struct { + Sfixed64 *SFixed64Rules `protobuf:"bytes,12,opt,name=sfixed64,oneof"` +} + +type FieldConstraints_Bool struct { + Bool *BoolRules `protobuf:"bytes,13,opt,name=bool,oneof"` +} + +type FieldConstraints_String_ struct { + String_ *StringRules `protobuf:"bytes,14,opt,name=string,oneof"` +} + +type FieldConstraints_Bytes struct { + Bytes *BytesRules `protobuf:"bytes,15,opt,name=bytes,oneof"` +} + +type FieldConstraints_Enum struct { + // Complex Field Types + Enum *EnumRules `protobuf:"bytes,16,opt,name=enum,oneof"` +} + +type FieldConstraints_Repeated struct { + Repeated *RepeatedRules `protobuf:"bytes,18,opt,name=repeated,oneof"` +} + +type FieldConstraints_Map struct { + Map *MapRules `protobuf:"bytes,19,opt,name=map,oneof"` +} + +type FieldConstraints_Any struct { + // Well-Known Field Types + Any *AnyRules `protobuf:"bytes,20,opt,name=any,oneof"` +} + +type FieldConstraints_Duration struct { + Duration *DurationRules `protobuf:"bytes,21,opt,name=duration,oneof"` +} + +type FieldConstraints_Timestamp struct { + Timestamp *TimestampRules `protobuf:"bytes,22,opt,name=timestamp,oneof"` +} + +func (*FieldConstraints_Float) isFieldConstraints_Type() {} + +func (*FieldConstraints_Double) isFieldConstraints_Type() {} + +func (*FieldConstraints_Int32) isFieldConstraints_Type() {} + +func (*FieldConstraints_Int64) isFieldConstraints_Type() {} + +func (*FieldConstraints_Uint32) isFieldConstraints_Type() {} + +func (*FieldConstraints_Uint64) isFieldConstraints_Type() {} + +func (*FieldConstraints_Sint32) isFieldConstraints_Type() {} + +func (*FieldConstraints_Sint64) isFieldConstraints_Type() {} + +func (*FieldConstraints_Fixed32) isFieldConstraints_Type() {} + +func (*FieldConstraints_Fixed64) isFieldConstraints_Type() {} + +func (*FieldConstraints_Sfixed32) isFieldConstraints_Type() {} + +func (*FieldConstraints_Sfixed64) isFieldConstraints_Type() {} + +func (*FieldConstraints_Bool) isFieldConstraints_Type() {} + +func (*FieldConstraints_String_) isFieldConstraints_Type() {} + +func (*FieldConstraints_Bytes) isFieldConstraints_Type() {} + +func (*FieldConstraints_Enum) isFieldConstraints_Type() {} + +func (*FieldConstraints_Repeated) isFieldConstraints_Type() {} + +func (*FieldConstraints_Map) isFieldConstraints_Type() {} + +func (*FieldConstraints_Any) isFieldConstraints_Type() {} + +func (*FieldConstraints_Duration) isFieldConstraints_Type() {} + +func (*FieldConstraints_Timestamp) isFieldConstraints_Type() {} + +// PredefinedConstraints are custom constraints that can be re-used with +// multiple fields. +type PredefinedConstraints struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `cel` is a repeated field used to represent a textual expression + // in the Common Expression Language (CEL) syntax. For more information on + // CEL, [see our documentation](https://github.com/bufbuild/protovalidate/blob/main/docs/cel.md). + // + // ```proto + // + // message MyMessage { + // // The field `value` must be greater than 42. + // optional int32 value = 1 [(buf.validate.predefined).cel = { + // id: "my_message.value", + // message: "value must be greater than 42", + // expression: "this > 42", + // }]; + // } + // + // ``` + Cel []*Constraint `protobuf:"bytes,1,rep,name=cel" json:"cel,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PredefinedConstraints) Reset() { + *x = PredefinedConstraints{} + mi := &file_buf_validate_validate_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PredefinedConstraints) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PredefinedConstraints) ProtoMessage() {} + +func (x *PredefinedConstraints) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PredefinedConstraints.ProtoReflect.Descriptor instead. +func (*PredefinedConstraints) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{4} +} + +func (x *PredefinedConstraints) GetCel() []*Constraint { + if x != nil { + return x.Cel + } + return nil +} + +// FloatRules describes the constraints applied to `float` values. These +// rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type. +type FloatRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyFloat { + // // value must equal 42.0 + // float value = 1 [(buf.validate.field).float.const = 42.0]; + // } + // + // ``` + Const *float32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *FloatRules_Lt + // *FloatRules_Lte + LessThan isFloatRules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *FloatRules_Gt + // *FloatRules_Gte + GreaterThan isFloatRules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message + // is generated. + // + // ```proto + // + // message MyFloat { + // // value must be in list [1.0, 2.0, 3.0] + // repeated float value = 1 (buf.validate.field).float = { in: [1.0, 2.0, 3.0] }; + // } + // + // ``` + In []float32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` + // `in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MyFloat { + // // value must not be in list [1.0, 2.0, 3.0] + // repeated float value = 1 (buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] }; + // } + // + // ``` + NotIn []float32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `finite` requires the field value to be finite. If the field value is + // infinite or NaN, an error message is generated. + Finite *bool `protobuf:"varint,8,opt,name=finite" json:"finite,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other constraints. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyFloat { + // float value = 1 [ + // (buf.validate.field).float.example = 1.0, + // (buf.validate.field).float.example = "Infinity" + // ]; + // } + // + // ``` + Example []float32 `protobuf:"fixed32,9,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FloatRules) Reset() { + *x = FloatRules{} + mi := &file_buf_validate_validate_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FloatRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FloatRules) ProtoMessage() {} + +func (x *FloatRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FloatRules.ProtoReflect.Descriptor instead. +func (*FloatRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{5} +} + +func (x *FloatRules) GetConst() float32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *FloatRules) GetLessThan() isFloatRules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *FloatRules) GetLt() float32 { + if x != nil { + if x, ok := x.LessThan.(*FloatRules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *FloatRules) GetLte() float32 { + if x != nil { + if x, ok := x.LessThan.(*FloatRules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *FloatRules) GetGreaterThan() isFloatRules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *FloatRules) GetGt() float32 { + if x != nil { + if x, ok := x.GreaterThan.(*FloatRules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *FloatRules) GetGte() float32 { + if x != nil { + if x, ok := x.GreaterThan.(*FloatRules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *FloatRules) GetIn() []float32 { + if x != nil { + return x.In + } + return nil +} + +func (x *FloatRules) GetNotIn() []float32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *FloatRules) GetFinite() bool { + if x != nil && x.Finite != nil { + return *x.Finite + } + return false +} + +func (x *FloatRules) GetExample() []float32 { + if x != nil { + return x.Example + } + return nil +} + +type isFloatRules_LessThan interface { + isFloatRules_LessThan() +} + +type FloatRules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MyFloat { + // // value must be less than 10.0 + // float value = 1 [(buf.validate.field).float.lt = 10.0]; + // } + // + // ``` + Lt float32 `protobuf:"fixed32,2,opt,name=lt,oneof"` +} + +type FloatRules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyFloat { + // // value must be less than or equal to 10.0 + // float value = 1 [(buf.validate.field).float.lte = 10.0]; + // } + // + // ``` + Lte float32 `protobuf:"fixed32,3,opt,name=lte,oneof"` +} + +func (*FloatRules_Lt) isFloatRules_LessThan() {} + +func (*FloatRules_Lte) isFloatRules_LessThan() {} + +type isFloatRules_GreaterThan interface { + isFloatRules_GreaterThan() +} + +type FloatRules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyFloat { + // // value must be greater than 5.0 [float.gt] + // float value = 1 [(buf.validate.field).float.gt = 5.0]; + // + // // value must be greater than 5 and less than 10.0 [float.gt_lt] + // float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }]; + // + // // value must be greater than 10 or less than 5.0 [float.gt_lt_exclusive] + // float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }]; + // } + // + // ``` + Gt float32 `protobuf:"fixed32,4,opt,name=gt,oneof"` +} + +type FloatRules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyFloat { + // // value must be greater than or equal to 5.0 [float.gte] + // float value = 1 [(buf.validate.field).float.gte = 5.0]; + // + // // value must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt] + // float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }]; + // + // // value must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive] + // float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }]; + // } + // + // ``` + Gte float32 `protobuf:"fixed32,5,opt,name=gte,oneof"` +} + +func (*FloatRules_Gt) isFloatRules_GreaterThan() {} + +func (*FloatRules_Gte) isFloatRules_GreaterThan() {} + +// DoubleRules describes the constraints applied to `double` values. These +// rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type. +type DoubleRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyDouble { + // // value must equal 42.0 + // double value = 1 [(buf.validate.field).double.const = 42.0]; + // } + // + // ``` + Const *float64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *DoubleRules_Lt + // *DoubleRules_Lte + LessThan isDoubleRules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *DoubleRules_Gt + // *DoubleRules_Gte + GreaterThan isDoubleRules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MyDouble { + // // value must be in list [1.0, 2.0, 3.0] + // repeated double value = 1 (buf.validate.field).double = { in: [1.0, 2.0, 3.0] }; + // } + // + // ``` + In []float64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MyDouble { + // // value must not be in list [1.0, 2.0, 3.0] + // repeated double value = 1 (buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] }; + // } + // + // ``` + NotIn []float64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `finite` requires the field value to be finite. If the field value is + // infinite or NaN, an error message is generated. + Finite *bool `protobuf:"varint,8,opt,name=finite" json:"finite,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other constraints. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyDouble { + // double value = 1 [ + // (buf.validate.field).double.example = 1.0, + // (buf.validate.field).double.example = "Infinity" + // ]; + // } + // + // ``` + Example []float64 `protobuf:"fixed64,9,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DoubleRules) Reset() { + *x = DoubleRules{} + mi := &file_buf_validate_validate_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DoubleRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DoubleRules) ProtoMessage() {} + +func (x *DoubleRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DoubleRules.ProtoReflect.Descriptor instead. +func (*DoubleRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{6} +} + +func (x *DoubleRules) GetConst() float64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *DoubleRules) GetLessThan() isDoubleRules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *DoubleRules) GetLt() float64 { + if x != nil { + if x, ok := x.LessThan.(*DoubleRules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *DoubleRules) GetLte() float64 { + if x != nil { + if x, ok := x.LessThan.(*DoubleRules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *DoubleRules) GetGreaterThan() isDoubleRules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *DoubleRules) GetGt() float64 { + if x != nil { + if x, ok := x.GreaterThan.(*DoubleRules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *DoubleRules) GetGte() float64 { + if x != nil { + if x, ok := x.GreaterThan.(*DoubleRules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *DoubleRules) GetIn() []float64 { + if x != nil { + return x.In + } + return nil +} + +func (x *DoubleRules) GetNotIn() []float64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *DoubleRules) GetFinite() bool { + if x != nil && x.Finite != nil { + return *x.Finite + } + return false +} + +func (x *DoubleRules) GetExample() []float64 { + if x != nil { + return x.Example + } + return nil +} + +type isDoubleRules_LessThan interface { + isDoubleRules_LessThan() +} + +type DoubleRules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyDouble { + // // value must be less than 10.0 + // double value = 1 [(buf.validate.field).double.lt = 10.0]; + // } + // + // ``` + Lt float64 `protobuf:"fixed64,2,opt,name=lt,oneof"` +} + +type DoubleRules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified value + // (field <= value). If the field value is greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MyDouble { + // // value must be less than or equal to 10.0 + // double value = 1 [(buf.validate.field).double.lte = 10.0]; + // } + // + // ``` + Lte float64 `protobuf:"fixed64,3,opt,name=lte,oneof"` +} + +func (*DoubleRules_Lt) isDoubleRules_LessThan() {} + +func (*DoubleRules_Lte) isDoubleRules_LessThan() {} + +type isDoubleRules_GreaterThan interface { + isDoubleRules_GreaterThan() +} + +type DoubleRules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`, + // the range is reversed, and the field value must be outside the specified + // range. If the field value doesn't meet the required conditions, an error + // message is generated. + // + // ```proto + // + // message MyDouble { + // // value must be greater than 5.0 [double.gt] + // double value = 1 [(buf.validate.field).double.gt = 5.0]; + // + // // value must be greater than 5 and less than 10.0 [double.gt_lt] + // double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }]; + // + // // value must be greater than 10 or less than 5.0 [double.gt_lt_exclusive] + // double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }]; + // } + // + // ``` + Gt float64 `protobuf:"fixed64,4,opt,name=gt,oneof"` +} + +type DoubleRules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyDouble { + // // value must be greater than or equal to 5.0 [double.gte] + // double value = 1 [(buf.validate.field).double.gte = 5.0]; + // + // // value must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt] + // double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }]; + // + // // value must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive] + // double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }]; + // } + // + // ``` + Gte float64 `protobuf:"fixed64,5,opt,name=gte,oneof"` +} + +func (*DoubleRules_Gt) isDoubleRules_GreaterThan() {} + +func (*DoubleRules_Gte) isDoubleRules_GreaterThan() {} + +// Int32Rules describes the constraints applied to `int32` values. These +// rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type. +type Int32Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyInt32 { + // // value must equal 42 + // int32 value = 1 [(buf.validate.field).int32.const = 42]; + // } + // + // ``` + Const *int32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *Int32Rules_Lt + // *Int32Rules_Lte + LessThan isInt32Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *Int32Rules_Gt + // *Int32Rules_Gte + GreaterThan isInt32Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MyInt32 { + // // value must be in list [1, 2, 3] + // repeated int32 value = 1 (buf.validate.field).int32 = { in: [1, 2, 3] }; + // } + // + // ``` + In []int32 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error message + // is generated. + // + // ```proto + // + // message MyInt32 { + // // value must not be in list [1, 2, 3] + // repeated int32 value = 1 (buf.validate.field).int32 = { not_in: [1, 2, 3] }; + // } + // + // ``` + NotIn []int32 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other constraints. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyInt32 { + // int32 value = 1 [ + // (buf.validate.field).int32.example = 1, + // (buf.validate.field).int32.example = -10 + // ]; + // } + // + // ``` + Example []int32 `protobuf:"varint,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Int32Rules) Reset() { + *x = Int32Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Int32Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int32Rules) ProtoMessage() {} + +func (x *Int32Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int32Rules.ProtoReflect.Descriptor instead. +func (*Int32Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{7} +} + +func (x *Int32Rules) GetConst() int32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *Int32Rules) GetLessThan() isInt32Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *Int32Rules) GetLt() int32 { + if x != nil { + if x, ok := x.LessThan.(*Int32Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *Int32Rules) GetLte() int32 { + if x != nil { + if x, ok := x.LessThan.(*Int32Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *Int32Rules) GetGreaterThan() isInt32Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *Int32Rules) GetGt() int32 { + if x != nil { + if x, ok := x.GreaterThan.(*Int32Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *Int32Rules) GetGte() int32 { + if x != nil { + if x, ok := x.GreaterThan.(*Int32Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *Int32Rules) GetIn() []int32 { + if x != nil { + return x.In + } + return nil +} + +func (x *Int32Rules) GetNotIn() []int32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *Int32Rules) GetExample() []int32 { + if x != nil { + return x.Example + } + return nil +} + +type isInt32Rules_LessThan interface { + isInt32Rules_LessThan() +} + +type Int32Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field + // < value). If the field value is equal to or greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyInt32 { + // // value must be less than 10 + // int32 value = 1 [(buf.validate.field).int32.lt = 10]; + // } + // + // ``` + Lt int32 `protobuf:"varint,2,opt,name=lt,oneof"` +} + +type Int32Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyInt32 { + // // value must be less than or equal to 10 + // int32 value = 1 [(buf.validate.field).int32.lte = 10]; + // } + // + // ``` + Lte int32 `protobuf:"varint,3,opt,name=lte,oneof"` +} + +func (*Int32Rules_Lt) isInt32Rules_LessThan() {} + +func (*Int32Rules_Lte) isInt32Rules_LessThan() {} + +type isInt32Rules_GreaterThan interface { + isInt32Rules_GreaterThan() +} + +type Int32Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyInt32 { + // // value must be greater than 5 [int32.gt] + // int32 value = 1 [(buf.validate.field).int32.gt = 5]; + // + // // value must be greater than 5 and less than 10 [int32.gt_lt] + // int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }]; + // + // // value must be greater than 10 or less than 5 [int32.gt_lt_exclusive] + // int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt int32 `protobuf:"varint,4,opt,name=gt,oneof"` +} + +type Int32Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified value + // (exclusive). If the value of `gte` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyInt32 { + // // value must be greater than or equal to 5 [int32.gte] + // int32 value = 1 [(buf.validate.field).int32.gte = 5]; + // + // // value must be greater than or equal to 5 and less than 10 [int32.gte_lt] + // int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }]; + // + // // value must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive] + // int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte int32 `protobuf:"varint,5,opt,name=gte,oneof"` +} + +func (*Int32Rules_Gt) isInt32Rules_GreaterThan() {} + +func (*Int32Rules_Gte) isInt32Rules_GreaterThan() {} + +// Int64Rules describes the constraints applied to `int64` values. These +// rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type. +type Int64Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyInt64 { + // // value must equal 42 + // int64 value = 1 [(buf.validate.field).int64.const = 42]; + // } + // + // ``` + Const *int64 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *Int64Rules_Lt + // *Int64Rules_Lte + LessThan isInt64Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *Int64Rules_Gt + // *Int64Rules_Gte + GreaterThan isInt64Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MyInt64 { + // // value must be in list [1, 2, 3] + // repeated int64 value = 1 (buf.validate.field).int64 = { in: [1, 2, 3] }; + // } + // + // ``` + In []int64 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MyInt64 { + // // value must not be in list [1, 2, 3] + // repeated int64 value = 1 (buf.validate.field).int64 = { not_in: [1, 2, 3] }; + // } + // + // ``` + NotIn []int64 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other constraints. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyInt64 { + // int64 value = 1 [ + // (buf.validate.field).int64.example = 1, + // (buf.validate.field).int64.example = -10 + // ]; + // } + // + // ``` + Example []int64 `protobuf:"varint,9,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Int64Rules) Reset() { + *x = Int64Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Int64Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int64Rules) ProtoMessage() {} + +func (x *Int64Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int64Rules.ProtoReflect.Descriptor instead. +func (*Int64Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{8} +} + +func (x *Int64Rules) GetConst() int64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *Int64Rules) GetLessThan() isInt64Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *Int64Rules) GetLt() int64 { + if x != nil { + if x, ok := x.LessThan.(*Int64Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *Int64Rules) GetLte() int64 { + if x != nil { + if x, ok := x.LessThan.(*Int64Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *Int64Rules) GetGreaterThan() isInt64Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *Int64Rules) GetGt() int64 { + if x != nil { + if x, ok := x.GreaterThan.(*Int64Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *Int64Rules) GetGte() int64 { + if x != nil { + if x, ok := x.GreaterThan.(*Int64Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *Int64Rules) GetIn() []int64 { + if x != nil { + return x.In + } + return nil +} + +func (x *Int64Rules) GetNotIn() []int64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *Int64Rules) GetExample() []int64 { + if x != nil { + return x.Example + } + return nil +} + +type isInt64Rules_LessThan interface { + isInt64Rules_LessThan() +} + +type Int64Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MyInt64 { + // // value must be less than 10 + // int64 value = 1 [(buf.validate.field).int64.lt = 10]; + // } + // + // ``` + Lt int64 `protobuf:"varint,2,opt,name=lt,oneof"` +} + +type Int64Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyInt64 { + // // value must be less than or equal to 10 + // int64 value = 1 [(buf.validate.field).int64.lte = 10]; + // } + // + // ``` + Lte int64 `protobuf:"varint,3,opt,name=lte,oneof"` +} + +func (*Int64Rules_Lt) isInt64Rules_LessThan() {} + +func (*Int64Rules_Lte) isInt64Rules_LessThan() {} + +type isInt64Rules_GreaterThan interface { + isInt64Rules_GreaterThan() +} + +type Int64Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyInt64 { + // // value must be greater than 5 [int64.gt] + // int64 value = 1 [(buf.validate.field).int64.gt = 5]; + // + // // value must be greater than 5 and less than 10 [int64.gt_lt] + // int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }]; + // + // // value must be greater than 10 or less than 5 [int64.gt_lt_exclusive] + // int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt int64 `protobuf:"varint,4,opt,name=gt,oneof"` +} + +type Int64Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyInt64 { + // // value must be greater than or equal to 5 [int64.gte] + // int64 value = 1 [(buf.validate.field).int64.gte = 5]; + // + // // value must be greater than or equal to 5 and less than 10 [int64.gte_lt] + // int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }]; + // + // // value must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive] + // int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte int64 `protobuf:"varint,5,opt,name=gte,oneof"` +} + +func (*Int64Rules_Gt) isInt64Rules_GreaterThan() {} + +func (*Int64Rules_Gte) isInt64Rules_GreaterThan() {} + +// UInt32Rules describes the constraints applied to `uint32` values. These +// rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type. +type UInt32Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyUInt32 { + // // value must equal 42 + // uint32 value = 1 [(buf.validate.field).uint32.const = 42]; + // } + // + // ``` + Const *uint32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *UInt32Rules_Lt + // *UInt32Rules_Lte + LessThan isUInt32Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *UInt32Rules_Gt + // *UInt32Rules_Gte + GreaterThan isUInt32Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MyUInt32 { + // // value must be in list [1, 2, 3] + // repeated uint32 value = 1 (buf.validate.field).uint32 = { in: [1, 2, 3] }; + // } + // + // ``` + In []uint32 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MyUInt32 { + // // value must not be in list [1, 2, 3] + // repeated uint32 value = 1 (buf.validate.field).uint32 = { not_in: [1, 2, 3] }; + // } + // + // ``` + NotIn []uint32 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other constraints. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyUInt32 { + // uint32 value = 1 [ + // (buf.validate.field).uint32.example = 1, + // (buf.validate.field).uint32.example = 10 + // ]; + // } + // + // ``` + Example []uint32 `protobuf:"varint,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UInt32Rules) Reset() { + *x = UInt32Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UInt32Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UInt32Rules) ProtoMessage() {} + +func (x *UInt32Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UInt32Rules.ProtoReflect.Descriptor instead. +func (*UInt32Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{9} +} + +func (x *UInt32Rules) GetConst() uint32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *UInt32Rules) GetLessThan() isUInt32Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *UInt32Rules) GetLt() uint32 { + if x != nil { + if x, ok := x.LessThan.(*UInt32Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *UInt32Rules) GetLte() uint32 { + if x != nil { + if x, ok := x.LessThan.(*UInt32Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *UInt32Rules) GetGreaterThan() isUInt32Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *UInt32Rules) GetGt() uint32 { + if x != nil { + if x, ok := x.GreaterThan.(*UInt32Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *UInt32Rules) GetGte() uint32 { + if x != nil { + if x, ok := x.GreaterThan.(*UInt32Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *UInt32Rules) GetIn() []uint32 { + if x != nil { + return x.In + } + return nil +} + +func (x *UInt32Rules) GetNotIn() []uint32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *UInt32Rules) GetExample() []uint32 { + if x != nil { + return x.Example + } + return nil +} + +type isUInt32Rules_LessThan interface { + isUInt32Rules_LessThan() +} + +type UInt32Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MyUInt32 { + // // value must be less than 10 + // uint32 value = 1 [(buf.validate.field).uint32.lt = 10]; + // } + // + // ``` + Lt uint32 `protobuf:"varint,2,opt,name=lt,oneof"` +} + +type UInt32Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyUInt32 { + // // value must be less than or equal to 10 + // uint32 value = 1 [(buf.validate.field).uint32.lte = 10]; + // } + // + // ``` + Lte uint32 `protobuf:"varint,3,opt,name=lte,oneof"` +} + +func (*UInt32Rules_Lt) isUInt32Rules_LessThan() {} + +func (*UInt32Rules_Lte) isUInt32Rules_LessThan() {} + +type isUInt32Rules_GreaterThan interface { + isUInt32Rules_GreaterThan() +} + +type UInt32Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyUInt32 { + // // value must be greater than 5 [uint32.gt] + // uint32 value = 1 [(buf.validate.field).uint32.gt = 5]; + // + // // value must be greater than 5 and less than 10 [uint32.gt_lt] + // uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }]; + // + // // value must be greater than 10 or less than 5 [uint32.gt_lt_exclusive] + // uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt uint32 `protobuf:"varint,4,opt,name=gt,oneof"` +} + +type UInt32Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyUInt32 { + // // value must be greater than or equal to 5 [uint32.gte] + // uint32 value = 1 [(buf.validate.field).uint32.gte = 5]; + // + // // value must be greater than or equal to 5 and less than 10 [uint32.gte_lt] + // uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }]; + // + // // value must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive] + // uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte uint32 `protobuf:"varint,5,opt,name=gte,oneof"` +} + +func (*UInt32Rules_Gt) isUInt32Rules_GreaterThan() {} + +func (*UInt32Rules_Gte) isUInt32Rules_GreaterThan() {} + +// UInt64Rules describes the constraints applied to `uint64` values. These +// rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type. +type UInt64Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyUInt64 { + // // value must equal 42 + // uint64 value = 1 [(buf.validate.field).uint64.const = 42]; + // } + // + // ``` + Const *uint64 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *UInt64Rules_Lt + // *UInt64Rules_Lte + LessThan isUInt64Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *UInt64Rules_Gt + // *UInt64Rules_Gte + GreaterThan isUInt64Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MyUInt64 { + // // value must be in list [1, 2, 3] + // repeated uint64 value = 1 (buf.validate.field).uint64 = { in: [1, 2, 3] }; + // } + // + // ``` + In []uint64 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MyUInt64 { + // // value must not be in list [1, 2, 3] + // repeated uint64 value = 1 (buf.validate.field).uint64 = { not_in: [1, 2, 3] }; + // } + // + // ``` + NotIn []uint64 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other constraints. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyUInt64 { + // uint64 value = 1 [ + // (buf.validate.field).uint64.example = 1, + // (buf.validate.field).uint64.example = -10 + // ]; + // } + // + // ``` + Example []uint64 `protobuf:"varint,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UInt64Rules) Reset() { + *x = UInt64Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UInt64Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UInt64Rules) ProtoMessage() {} + +func (x *UInt64Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UInt64Rules.ProtoReflect.Descriptor instead. +func (*UInt64Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{10} +} + +func (x *UInt64Rules) GetConst() uint64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *UInt64Rules) GetLessThan() isUInt64Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *UInt64Rules) GetLt() uint64 { + if x != nil { + if x, ok := x.LessThan.(*UInt64Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *UInt64Rules) GetLte() uint64 { + if x != nil { + if x, ok := x.LessThan.(*UInt64Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *UInt64Rules) GetGreaterThan() isUInt64Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *UInt64Rules) GetGt() uint64 { + if x != nil { + if x, ok := x.GreaterThan.(*UInt64Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *UInt64Rules) GetGte() uint64 { + if x != nil { + if x, ok := x.GreaterThan.(*UInt64Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *UInt64Rules) GetIn() []uint64 { + if x != nil { + return x.In + } + return nil +} + +func (x *UInt64Rules) GetNotIn() []uint64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *UInt64Rules) GetExample() []uint64 { + if x != nil { + return x.Example + } + return nil +} + +type isUInt64Rules_LessThan interface { + isUInt64Rules_LessThan() +} + +type UInt64Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MyUInt64 { + // // value must be less than 10 + // uint64 value = 1 [(buf.validate.field).uint64.lt = 10]; + // } + // + // ``` + Lt uint64 `protobuf:"varint,2,opt,name=lt,oneof"` +} + +type UInt64Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyUInt64 { + // // value must be less than or equal to 10 + // uint64 value = 1 [(buf.validate.field).uint64.lte = 10]; + // } + // + // ``` + Lte uint64 `protobuf:"varint,3,opt,name=lte,oneof"` +} + +func (*UInt64Rules_Lt) isUInt64Rules_LessThan() {} + +func (*UInt64Rules_Lte) isUInt64Rules_LessThan() {} + +type isUInt64Rules_GreaterThan interface { + isUInt64Rules_GreaterThan() +} + +type UInt64Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyUInt64 { + // // value must be greater than 5 [uint64.gt] + // uint64 value = 1 [(buf.validate.field).uint64.gt = 5]; + // + // // value must be greater than 5 and less than 10 [uint64.gt_lt] + // uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }]; + // + // // value must be greater than 10 or less than 5 [uint64.gt_lt_exclusive] + // uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt uint64 `protobuf:"varint,4,opt,name=gt,oneof"` +} + +type UInt64Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyUInt64 { + // // value must be greater than or equal to 5 [uint64.gte] + // uint64 value = 1 [(buf.validate.field).uint64.gte = 5]; + // + // // value must be greater than or equal to 5 and less than 10 [uint64.gte_lt] + // uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }]; + // + // // value must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive] + // uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte uint64 `protobuf:"varint,5,opt,name=gte,oneof"` +} + +func (*UInt64Rules_Gt) isUInt64Rules_GreaterThan() {} + +func (*UInt64Rules_Gte) isUInt64Rules_GreaterThan() {} + +// SInt32Rules describes the constraints applied to `sint32` values. +type SInt32Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MySInt32 { + // // value must equal 42 + // sint32 value = 1 [(buf.validate.field).sint32.const = 42]; + // } + // + // ``` + Const *int32 `protobuf:"zigzag32,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *SInt32Rules_Lt + // *SInt32Rules_Lte + LessThan isSInt32Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *SInt32Rules_Gt + // *SInt32Rules_Gte + GreaterThan isSInt32Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MySInt32 { + // // value must be in list [1, 2, 3] + // repeated sint32 value = 1 (buf.validate.field).sint32 = { in: [1, 2, 3] }; + // } + // + // ``` + In []int32 `protobuf:"zigzag32,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MySInt32 { + // // value must not be in list [1, 2, 3] + // repeated sint32 value = 1 (buf.validate.field).sint32 = { not_in: [1, 2, 3] }; + // } + // + // ``` + NotIn []int32 `protobuf:"zigzag32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other constraints. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MySInt32 { + // sint32 value = 1 [ + // (buf.validate.field).sint32.example = 1, + // (buf.validate.field).sint32.example = -10 + // ]; + // } + // + // ``` + Example []int32 `protobuf:"zigzag32,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SInt32Rules) Reset() { + *x = SInt32Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SInt32Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SInt32Rules) ProtoMessage() {} + +func (x *SInt32Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SInt32Rules.ProtoReflect.Descriptor instead. +func (*SInt32Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{11} +} + +func (x *SInt32Rules) GetConst() int32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *SInt32Rules) GetLessThan() isSInt32Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *SInt32Rules) GetLt() int32 { + if x != nil { + if x, ok := x.LessThan.(*SInt32Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *SInt32Rules) GetLte() int32 { + if x != nil { + if x, ok := x.LessThan.(*SInt32Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *SInt32Rules) GetGreaterThan() isSInt32Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *SInt32Rules) GetGt() int32 { + if x != nil { + if x, ok := x.GreaterThan.(*SInt32Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *SInt32Rules) GetGte() int32 { + if x != nil { + if x, ok := x.GreaterThan.(*SInt32Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *SInt32Rules) GetIn() []int32 { + if x != nil { + return x.In + } + return nil +} + +func (x *SInt32Rules) GetNotIn() []int32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *SInt32Rules) GetExample() []int32 { + if x != nil { + return x.Example + } + return nil +} + +type isSInt32Rules_LessThan interface { + isSInt32Rules_LessThan() +} + +type SInt32Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field + // < value). If the field value is equal to or greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MySInt32 { + // // value must be less than 10 + // sint32 value = 1 [(buf.validate.field).sint32.lt = 10]; + // } + // + // ``` + Lt int32 `protobuf:"zigzag32,2,opt,name=lt,oneof"` +} + +type SInt32Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MySInt32 { + // // value must be less than or equal to 10 + // sint32 value = 1 [(buf.validate.field).sint32.lte = 10]; + // } + // + // ``` + Lte int32 `protobuf:"zigzag32,3,opt,name=lte,oneof"` +} + +func (*SInt32Rules_Lt) isSInt32Rules_LessThan() {} + +func (*SInt32Rules_Lte) isSInt32Rules_LessThan() {} + +type isSInt32Rules_GreaterThan interface { + isSInt32Rules_GreaterThan() +} + +type SInt32Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MySInt32 { + // // value must be greater than 5 [sint32.gt] + // sint32 value = 1 [(buf.validate.field).sint32.gt = 5]; + // + // // value must be greater than 5 and less than 10 [sint32.gt_lt] + // sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }]; + // + // // value must be greater than 10 or less than 5 [sint32.gt_lt_exclusive] + // sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt int32 `protobuf:"zigzag32,4,opt,name=gt,oneof"` +} + +type SInt32Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MySInt32 { + // // value must be greater than or equal to 5 [sint32.gte] + // sint32 value = 1 [(buf.validate.field).sint32.gte = 5]; + // + // // value must be greater than or equal to 5 and less than 10 [sint32.gte_lt] + // sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }]; + // + // // value must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive] + // sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte int32 `protobuf:"zigzag32,5,opt,name=gte,oneof"` +} + +func (*SInt32Rules_Gt) isSInt32Rules_GreaterThan() {} + +func (*SInt32Rules_Gte) isSInt32Rules_GreaterThan() {} + +// SInt64Rules describes the constraints applied to `sint64` values. +type SInt64Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MySInt64 { + // // value must equal 42 + // sint64 value = 1 [(buf.validate.field).sint64.const = 42]; + // } + // + // ``` + Const *int64 `protobuf:"zigzag64,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *SInt64Rules_Lt + // *SInt64Rules_Lte + LessThan isSInt64Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *SInt64Rules_Gt + // *SInt64Rules_Gte + GreaterThan isSInt64Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message + // is generated. + // + // ```proto + // + // message MySInt64 { + // // value must be in list [1, 2, 3] + // repeated sint64 value = 1 (buf.validate.field).sint64 = { in: [1, 2, 3] }; + // } + // + // ``` + In []int64 `protobuf:"zigzag64,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MySInt64 { + // // value must not be in list [1, 2, 3] + // repeated sint64 value = 1 (buf.validate.field).sint64 = { not_in: [1, 2, 3] }; + // } + // + // ``` + NotIn []int64 `protobuf:"zigzag64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other constraints. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MySInt64 { + // sint64 value = 1 [ + // (buf.validate.field).sint64.example = 1, + // (buf.validate.field).sint64.example = -10 + // ]; + // } + // + // ``` + Example []int64 `protobuf:"zigzag64,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SInt64Rules) Reset() { + *x = SInt64Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SInt64Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SInt64Rules) ProtoMessage() {} + +func (x *SInt64Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SInt64Rules.ProtoReflect.Descriptor instead. +func (*SInt64Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{12} +} + +func (x *SInt64Rules) GetConst() int64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *SInt64Rules) GetLessThan() isSInt64Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *SInt64Rules) GetLt() int64 { + if x != nil { + if x, ok := x.LessThan.(*SInt64Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *SInt64Rules) GetLte() int64 { + if x != nil { + if x, ok := x.LessThan.(*SInt64Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *SInt64Rules) GetGreaterThan() isSInt64Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *SInt64Rules) GetGt() int64 { + if x != nil { + if x, ok := x.GreaterThan.(*SInt64Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *SInt64Rules) GetGte() int64 { + if x != nil { + if x, ok := x.GreaterThan.(*SInt64Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *SInt64Rules) GetIn() []int64 { + if x != nil { + return x.In + } + return nil +} + +func (x *SInt64Rules) GetNotIn() []int64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *SInt64Rules) GetExample() []int64 { + if x != nil { + return x.Example + } + return nil +} + +type isSInt64Rules_LessThan interface { + isSInt64Rules_LessThan() +} + +type SInt64Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field + // < value). If the field value is equal to or greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MySInt64 { + // // value must be less than 10 + // sint64 value = 1 [(buf.validate.field).sint64.lt = 10]; + // } + // + // ``` + Lt int64 `protobuf:"zigzag64,2,opt,name=lt,oneof"` +} + +type SInt64Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MySInt64 { + // // value must be less than or equal to 10 + // sint64 value = 1 [(buf.validate.field).sint64.lte = 10]; + // } + // + // ``` + Lte int64 `protobuf:"zigzag64,3,opt,name=lte,oneof"` +} + +func (*SInt64Rules_Lt) isSInt64Rules_LessThan() {} + +func (*SInt64Rules_Lte) isSInt64Rules_LessThan() {} + +type isSInt64Rules_GreaterThan interface { + isSInt64Rules_GreaterThan() +} + +type SInt64Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MySInt64 { + // // value must be greater than 5 [sint64.gt] + // sint64 value = 1 [(buf.validate.field).sint64.gt = 5]; + // + // // value must be greater than 5 and less than 10 [sint64.gt_lt] + // sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }]; + // + // // value must be greater than 10 or less than 5 [sint64.gt_lt_exclusive] + // sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt int64 `protobuf:"zigzag64,4,opt,name=gt,oneof"` +} + +type SInt64Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MySInt64 { + // // value must be greater than or equal to 5 [sint64.gte] + // sint64 value = 1 [(buf.validate.field).sint64.gte = 5]; + // + // // value must be greater than or equal to 5 and less than 10 [sint64.gte_lt] + // sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }]; + // + // // value must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive] + // sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte int64 `protobuf:"zigzag64,5,opt,name=gte,oneof"` +} + +func (*SInt64Rules_Gt) isSInt64Rules_GreaterThan() {} + +func (*SInt64Rules_Gte) isSInt64Rules_GreaterThan() {} + +// Fixed32Rules describes the constraints applied to `fixed32` values. +type Fixed32Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. + // If the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyFixed32 { + // // value must equal 42 + // fixed32 value = 1 [(buf.validate.field).fixed32.const = 42]; + // } + // + // ``` + Const *uint32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *Fixed32Rules_Lt + // *Fixed32Rules_Lte + LessThan isFixed32Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *Fixed32Rules_Gt + // *Fixed32Rules_Gte + GreaterThan isFixed32Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message + // is generated. + // + // ```proto + // + // message MyFixed32 { + // // value must be in list [1, 2, 3] + // repeated fixed32 value = 1 (buf.validate.field).fixed32 = { in: [1, 2, 3] }; + // } + // + // ``` + In []uint32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MyFixed32 { + // // value must not be in list [1, 2, 3] + // repeated fixed32 value = 1 (buf.validate.field).fixed32 = { not_in: [1, 2, 3] }; + // } + // + // ``` + NotIn []uint32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other constraints. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyFixed32 { + // fixed32 value = 1 [ + // (buf.validate.field).fixed32.example = 1, + // (buf.validate.field).fixed32.example = 2 + // ]; + // } + // + // ``` + Example []uint32 `protobuf:"fixed32,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Fixed32Rules) Reset() { + *x = Fixed32Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Fixed32Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Fixed32Rules) ProtoMessage() {} + +func (x *Fixed32Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Fixed32Rules.ProtoReflect.Descriptor instead. +func (*Fixed32Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{13} +} + +func (x *Fixed32Rules) GetConst() uint32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *Fixed32Rules) GetLessThan() isFixed32Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *Fixed32Rules) GetLt() uint32 { + if x != nil { + if x, ok := x.LessThan.(*Fixed32Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *Fixed32Rules) GetLte() uint32 { + if x != nil { + if x, ok := x.LessThan.(*Fixed32Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *Fixed32Rules) GetGreaterThan() isFixed32Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *Fixed32Rules) GetGt() uint32 { + if x != nil { + if x, ok := x.GreaterThan.(*Fixed32Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *Fixed32Rules) GetGte() uint32 { + if x != nil { + if x, ok := x.GreaterThan.(*Fixed32Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *Fixed32Rules) GetIn() []uint32 { + if x != nil { + return x.In + } + return nil +} + +func (x *Fixed32Rules) GetNotIn() []uint32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *Fixed32Rules) GetExample() []uint32 { + if x != nil { + return x.Example + } + return nil +} + +type isFixed32Rules_LessThan interface { + isFixed32Rules_LessThan() +} + +type Fixed32Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MyFixed32 { + // // value must be less than 10 + // fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10]; + // } + // + // ``` + Lt uint32 `protobuf:"fixed32,2,opt,name=lt,oneof"` +} + +type Fixed32Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyFixed32 { + // // value must be less than or equal to 10 + // fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10]; + // } + // + // ``` + Lte uint32 `protobuf:"fixed32,3,opt,name=lte,oneof"` +} + +func (*Fixed32Rules_Lt) isFixed32Rules_LessThan() {} + +func (*Fixed32Rules_Lte) isFixed32Rules_LessThan() {} + +type isFixed32Rules_GreaterThan interface { + isFixed32Rules_GreaterThan() +} + +type Fixed32Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyFixed32 { + // // value must be greater than 5 [fixed32.gt] + // fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5]; + // + // // value must be greater than 5 and less than 10 [fixed32.gt_lt] + // fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }]; + // + // // value must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive] + // fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt uint32 `protobuf:"fixed32,4,opt,name=gt,oneof"` +} + +type Fixed32Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyFixed32 { + // // value must be greater than or equal to 5 [fixed32.gte] + // fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5]; + // + // // value must be greater than or equal to 5 and less than 10 [fixed32.gte_lt] + // fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }]; + // + // // value must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive] + // fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte uint32 `protobuf:"fixed32,5,opt,name=gte,oneof"` +} + +func (*Fixed32Rules_Gt) isFixed32Rules_GreaterThan() {} + +func (*Fixed32Rules_Gte) isFixed32Rules_GreaterThan() {} + +// Fixed64Rules describes the constraints applied to `fixed64` values. +type Fixed64Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyFixed64 { + // // value must equal 42 + // fixed64 value = 1 [(buf.validate.field).fixed64.const = 42]; + // } + // + // ``` + Const *uint64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *Fixed64Rules_Lt + // *Fixed64Rules_Lte + LessThan isFixed64Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *Fixed64Rules_Gt + // *Fixed64Rules_Gte + GreaterThan isFixed64Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MyFixed64 { + // // value must be in list [1, 2, 3] + // repeated fixed64 value = 1 (buf.validate.field).fixed64 = { in: [1, 2, 3] }; + // } + // + // ``` + In []uint64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MyFixed64 { + // // value must not be in list [1, 2, 3] + // repeated fixed64 value = 1 (buf.validate.field).fixed64 = { not_in: [1, 2, 3] }; + // } + // + // ``` + NotIn []uint64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other constraints. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyFixed64 { + // fixed64 value = 1 [ + // (buf.validate.field).fixed64.example = 1, + // (buf.validate.field).fixed64.example = 2 + // ]; + // } + // + // ``` + Example []uint64 `protobuf:"fixed64,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Fixed64Rules) Reset() { + *x = Fixed64Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Fixed64Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Fixed64Rules) ProtoMessage() {} + +func (x *Fixed64Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Fixed64Rules.ProtoReflect.Descriptor instead. +func (*Fixed64Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{14} +} + +func (x *Fixed64Rules) GetConst() uint64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *Fixed64Rules) GetLessThan() isFixed64Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *Fixed64Rules) GetLt() uint64 { + if x != nil { + if x, ok := x.LessThan.(*Fixed64Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *Fixed64Rules) GetLte() uint64 { + if x != nil { + if x, ok := x.LessThan.(*Fixed64Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *Fixed64Rules) GetGreaterThan() isFixed64Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *Fixed64Rules) GetGt() uint64 { + if x != nil { + if x, ok := x.GreaterThan.(*Fixed64Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *Fixed64Rules) GetGte() uint64 { + if x != nil { + if x, ok := x.GreaterThan.(*Fixed64Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *Fixed64Rules) GetIn() []uint64 { + if x != nil { + return x.In + } + return nil +} + +func (x *Fixed64Rules) GetNotIn() []uint64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *Fixed64Rules) GetExample() []uint64 { + if x != nil { + return x.Example + } + return nil +} + +type isFixed64Rules_LessThan interface { + isFixed64Rules_LessThan() +} + +type Fixed64Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MyFixed64 { + // // value must be less than 10 + // fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10]; + // } + // + // ``` + Lt uint64 `protobuf:"fixed64,2,opt,name=lt,oneof"` +} + +type Fixed64Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyFixed64 { + // // value must be less than or equal to 10 + // fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10]; + // } + // + // ``` + Lte uint64 `protobuf:"fixed64,3,opt,name=lte,oneof"` +} + +func (*Fixed64Rules_Lt) isFixed64Rules_LessThan() {} + +func (*Fixed64Rules_Lte) isFixed64Rules_LessThan() {} + +type isFixed64Rules_GreaterThan interface { + isFixed64Rules_GreaterThan() +} + +type Fixed64Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyFixed64 { + // // value must be greater than 5 [fixed64.gt] + // fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5]; + // + // // value must be greater than 5 and less than 10 [fixed64.gt_lt] + // fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }]; + // + // // value must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive] + // fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt uint64 `protobuf:"fixed64,4,opt,name=gt,oneof"` +} + +type Fixed64Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyFixed64 { + // // value must be greater than or equal to 5 [fixed64.gte] + // fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5]; + // + // // value must be greater than or equal to 5 and less than 10 [fixed64.gte_lt] + // fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }]; + // + // // value must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive] + // fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte uint64 `protobuf:"fixed64,5,opt,name=gte,oneof"` +} + +func (*Fixed64Rules_Gt) isFixed64Rules_GreaterThan() {} + +func (*Fixed64Rules_Gte) isFixed64Rules_GreaterThan() {} + +// SFixed32Rules describes the constraints applied to `fixed32` values. +type SFixed32Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MySFixed32 { + // // value must equal 42 + // sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42]; + // } + // + // ``` + Const *int32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *SFixed32Rules_Lt + // *SFixed32Rules_Lte + LessThan isSFixed32Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *SFixed32Rules_Gt + // *SFixed32Rules_Gte + GreaterThan isSFixed32Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MySFixed32 { + // // value must be in list [1, 2, 3] + // repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { in: [1, 2, 3] }; + // } + // + // ``` + In []int32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MySFixed32 { + // // value must not be in list [1, 2, 3] + // repeated sfixed32 value = 1 (buf.validate.field).sfixed32 = { not_in: [1, 2, 3] }; + // } + // + // ``` + NotIn []int32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other constraints. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MySFixed32 { + // sfixed32 value = 1 [ + // (buf.validate.field).sfixed32.example = 1, + // (buf.validate.field).sfixed32.example = 2 + // ]; + // } + // + // ``` + Example []int32 `protobuf:"fixed32,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SFixed32Rules) Reset() { + *x = SFixed32Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SFixed32Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SFixed32Rules) ProtoMessage() {} + +func (x *SFixed32Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SFixed32Rules.ProtoReflect.Descriptor instead. +func (*SFixed32Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{15} +} + +func (x *SFixed32Rules) GetConst() int32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *SFixed32Rules) GetLessThan() isSFixed32Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *SFixed32Rules) GetLt() int32 { + if x != nil { + if x, ok := x.LessThan.(*SFixed32Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *SFixed32Rules) GetLte() int32 { + if x != nil { + if x, ok := x.LessThan.(*SFixed32Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *SFixed32Rules) GetGreaterThan() isSFixed32Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *SFixed32Rules) GetGt() int32 { + if x != nil { + if x, ok := x.GreaterThan.(*SFixed32Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *SFixed32Rules) GetGte() int32 { + if x != nil { + if x, ok := x.GreaterThan.(*SFixed32Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *SFixed32Rules) GetIn() []int32 { + if x != nil { + return x.In + } + return nil +} + +func (x *SFixed32Rules) GetNotIn() []int32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *SFixed32Rules) GetExample() []int32 { + if x != nil { + return x.Example + } + return nil +} + +type isSFixed32Rules_LessThan interface { + isSFixed32Rules_LessThan() +} + +type SFixed32Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MySFixed32 { + // // value must be less than 10 + // sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10]; + // } + // + // ``` + Lt int32 `protobuf:"fixed32,2,opt,name=lt,oneof"` +} + +type SFixed32Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MySFixed32 { + // // value must be less than or equal to 10 + // sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10]; + // } + // + // ``` + Lte int32 `protobuf:"fixed32,3,opt,name=lte,oneof"` +} + +func (*SFixed32Rules_Lt) isSFixed32Rules_LessThan() {} + +func (*SFixed32Rules_Lte) isSFixed32Rules_LessThan() {} + +type isSFixed32Rules_GreaterThan interface { + isSFixed32Rules_GreaterThan() +} + +type SFixed32Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MySFixed32 { + // // value must be greater than 5 [sfixed32.gt] + // sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5]; + // + // // value must be greater than 5 and less than 10 [sfixed32.gt_lt] + // sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }]; + // + // // value must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive] + // sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt int32 `protobuf:"fixed32,4,opt,name=gt,oneof"` +} + +type SFixed32Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MySFixed32 { + // // value must be greater than or equal to 5 [sfixed32.gte] + // sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5]; + // + // // value must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt] + // sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }]; + // + // // value must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive] + // sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte int32 `protobuf:"fixed32,5,opt,name=gte,oneof"` +} + +func (*SFixed32Rules_Gt) isSFixed32Rules_GreaterThan() {} + +func (*SFixed32Rules_Gte) isSFixed32Rules_GreaterThan() {} + +// SFixed64Rules describes the constraints applied to `fixed64` values. +type SFixed64Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MySFixed64 { + // // value must equal 42 + // sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42]; + // } + // + // ``` + Const *int64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *SFixed64Rules_Lt + // *SFixed64Rules_Lte + LessThan isSFixed64Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *SFixed64Rules_Gt + // *SFixed64Rules_Gte + GreaterThan isSFixed64Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MySFixed64 { + // // value must be in list [1, 2, 3] + // repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { in: [1, 2, 3] }; + // } + // + // ``` + In []int64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MySFixed64 { + // // value must not be in list [1, 2, 3] + // repeated sfixed64 value = 1 (buf.validate.field).sfixed64 = { not_in: [1, 2, 3] }; + // } + // + // ``` + NotIn []int64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other constraints. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MySFixed64 { + // sfixed64 value = 1 [ + // (buf.validate.field).sfixed64.example = 1, + // (buf.validate.field).sfixed64.example = 2 + // ]; + // } + // + // ``` + Example []int64 `protobuf:"fixed64,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SFixed64Rules) Reset() { + *x = SFixed64Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SFixed64Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SFixed64Rules) ProtoMessage() {} + +func (x *SFixed64Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SFixed64Rules.ProtoReflect.Descriptor instead. +func (*SFixed64Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{16} +} + +func (x *SFixed64Rules) GetConst() int64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *SFixed64Rules) GetLessThan() isSFixed64Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *SFixed64Rules) GetLt() int64 { + if x != nil { + if x, ok := x.LessThan.(*SFixed64Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *SFixed64Rules) GetLte() int64 { + if x != nil { + if x, ok := x.LessThan.(*SFixed64Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *SFixed64Rules) GetGreaterThan() isSFixed64Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *SFixed64Rules) GetGt() int64 { + if x != nil { + if x, ok := x.GreaterThan.(*SFixed64Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *SFixed64Rules) GetGte() int64 { + if x != nil { + if x, ok := x.GreaterThan.(*SFixed64Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *SFixed64Rules) GetIn() []int64 { + if x != nil { + return x.In + } + return nil +} + +func (x *SFixed64Rules) GetNotIn() []int64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *SFixed64Rules) GetExample() []int64 { + if x != nil { + return x.Example + } + return nil +} + +type isSFixed64Rules_LessThan interface { + isSFixed64Rules_LessThan() +} + +type SFixed64Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MySFixed64 { + // // value must be less than 10 + // sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10]; + // } + // + // ``` + Lt int64 `protobuf:"fixed64,2,opt,name=lt,oneof"` +} + +type SFixed64Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MySFixed64 { + // // value must be less than or equal to 10 + // sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10]; + // } + // + // ``` + Lte int64 `protobuf:"fixed64,3,opt,name=lte,oneof"` +} + +func (*SFixed64Rules_Lt) isSFixed64Rules_LessThan() {} + +func (*SFixed64Rules_Lte) isSFixed64Rules_LessThan() {} + +type isSFixed64Rules_GreaterThan interface { + isSFixed64Rules_GreaterThan() +} + +type SFixed64Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MySFixed64 { + // // value must be greater than 5 [sfixed64.gt] + // sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5]; + // + // // value must be greater than 5 and less than 10 [sfixed64.gt_lt] + // sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }]; + // + // // value must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive] + // sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt int64 `protobuf:"fixed64,4,opt,name=gt,oneof"` +} + +type SFixed64Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MySFixed64 { + // // value must be greater than or equal to 5 [sfixed64.gte] + // sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5]; + // + // // value must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt] + // sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }]; + // + // // value must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive] + // sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte int64 `protobuf:"fixed64,5,opt,name=gte,oneof"` +} + +func (*SFixed64Rules_Gt) isSFixed64Rules_GreaterThan() {} + +func (*SFixed64Rules_Gte) isSFixed64Rules_GreaterThan() {} + +// BoolRules describes the constraints applied to `bool` values. These rules +// may also be applied to the `google.protobuf.BoolValue` Well-Known-Type. +type BoolRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified boolean value. + // If the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyBool { + // // value must equal true + // bool value = 1 [(buf.validate.field).bool.const = true]; + // } + // + // ``` + Const *bool `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other constraints. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyBool { + // bool value = 1 [ + // (buf.validate.field).bool.example = 1, + // (buf.validate.field).bool.example = 2 + // ]; + // } + // + // ``` + Example []bool `protobuf:"varint,2,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BoolRules) Reset() { + *x = BoolRules{} + mi := &file_buf_validate_validate_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BoolRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoolRules) ProtoMessage() {} + +func (x *BoolRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoolRules.ProtoReflect.Descriptor instead. +func (*BoolRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{17} +} + +func (x *BoolRules) GetConst() bool { + if x != nil && x.Const != nil { + return *x.Const + } + return false +} + +func (x *BoolRules) GetExample() []bool { + if x != nil { + return x.Example + } + return nil +} + +// StringRules describes the constraints applied to `string` values These +// rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type. +type StringRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyString { + // // value must equal `hello` + // string value = 1 [(buf.validate.field).string.const = "hello"]; + // } + // + // ``` + Const *string `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"` + // `len` dictates that the field value must have the specified + // number of characters (Unicode code points), which may differ from the number + // of bytes in the string. If the field value does not meet the specified + // length, an error message will be generated. + // + // ```proto + // + // message MyString { + // // value length must be 5 characters + // string value = 1 [(buf.validate.field).string.len = 5]; + // } + // + // ``` + Len *uint64 `protobuf:"varint,19,opt,name=len" json:"len,omitempty"` + // `min_len` specifies that the field value must have at least the specified + // number of characters (Unicode code points), which may differ from the number + // of bytes in the string. If the field value contains fewer characters, an error + // message will be generated. + // + // ```proto + // + // message MyString { + // // value length must be at least 3 characters + // string value = 1 [(buf.validate.field).string.min_len = 3]; + // } + // + // ``` + MinLen *uint64 `protobuf:"varint,2,opt,name=min_len,json=minLen" json:"min_len,omitempty"` + // `max_len` specifies that the field value must have no more than the specified + // number of characters (Unicode code points), which may differ from the + // number of bytes in the string. If the field value contains more characters, + // an error message will be generated. + // + // ```proto + // + // message MyString { + // // value length must be at most 10 characters + // string value = 1 [(buf.validate.field).string.max_len = 10]; + // } + // + // ``` + MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"` + // `len_bytes` dictates that the field value must have the specified number of + // bytes. If the field value does not match the specified length in bytes, + // an error message will be generated. + // + // ```proto + // + // message MyString { + // // value length must be 6 bytes + // string value = 1 [(buf.validate.field).string.len_bytes = 6]; + // } + // + // ``` + LenBytes *uint64 `protobuf:"varint,20,opt,name=len_bytes,json=lenBytes" json:"len_bytes,omitempty"` + // `min_bytes` specifies that the field value must have at least the specified + // number of bytes. If the field value contains fewer bytes, an error message + // will be generated. + // + // ```proto + // + // message MyString { + // // value length must be at least 4 bytes + // string value = 1 [(buf.validate.field).string.min_bytes = 4]; + // } + // + // ``` + MinBytes *uint64 `protobuf:"varint,4,opt,name=min_bytes,json=minBytes" json:"min_bytes,omitempty"` + // `max_bytes` specifies that the field value must have no more than the + // specified number of bytes. If the field value contains more bytes, an + // error message will be generated. + // + // ```proto + // + // message MyString { + // // value length must be at most 8 bytes + // string value = 1 [(buf.validate.field).string.max_bytes = 8]; + // } + // + // ``` + MaxBytes *uint64 `protobuf:"varint,5,opt,name=max_bytes,json=maxBytes" json:"max_bytes,omitempty"` + // `pattern` specifies that the field value must match the specified + // regular expression (RE2 syntax), with the expression provided without any + // delimiters. If the field value doesn't match the regular expression, an + // error message will be generated. + // + // ```proto + // + // message MyString { + // // value does not match regex pattern `^[a-zA-Z]//$` + // string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"]; + // } + // + // ``` + Pattern *string `protobuf:"bytes,6,opt,name=pattern" json:"pattern,omitempty"` + // `prefix` specifies that the field value must have the + // specified substring at the beginning of the string. If the field value + // doesn't start with the specified prefix, an error message will be + // generated. + // + // ```proto + // + // message MyString { + // // value does not have prefix `pre` + // string value = 1 [(buf.validate.field).string.prefix = "pre"]; + // } + // + // ``` + Prefix *string `protobuf:"bytes,7,opt,name=prefix" json:"prefix,omitempty"` + // `suffix` specifies that the field value must have the + // specified substring at the end of the string. If the field value doesn't + // end with the specified suffix, an error message will be generated. + // + // ```proto + // + // message MyString { + // // value does not have suffix `post` + // string value = 1 [(buf.validate.field).string.suffix = "post"]; + // } + // + // ``` + Suffix *string `protobuf:"bytes,8,opt,name=suffix" json:"suffix,omitempty"` + // `contains` specifies that the field value must have the + // specified substring anywhere in the string. If the field value doesn't + // contain the specified substring, an error message will be generated. + // + // ```proto + // + // message MyString { + // // value does not contain substring `inside`. + // string value = 1 [(buf.validate.field).string.contains = "inside"]; + // } + // + // ``` + Contains *string `protobuf:"bytes,9,opt,name=contains" json:"contains,omitempty"` + // `not_contains` specifies that the field value must not have the + // specified substring anywhere in the string. If the field value contains + // the specified substring, an error message will be generated. + // + // ```proto + // + // message MyString { + // // value contains substring `inside`. + // string value = 1 [(buf.validate.field).string.not_contains = "inside"]; + // } + // + // ``` + NotContains *string `protobuf:"bytes,23,opt,name=not_contains,json=notContains" json:"not_contains,omitempty"` + // `in` specifies that the field value must be equal to one of the specified + // values. If the field value isn't one of the specified values, an error + // message will be generated. + // + // ```proto + // + // message MyString { + // // value must be in list ["apple", "banana"] + // repeated string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"]; + // } + // + // ``` + In []string `protobuf:"bytes,10,rep,name=in" json:"in,omitempty"` + // `not_in` specifies that the field value cannot be equal to any + // of the specified values. If the field value is one of the specified values, + // an error message will be generated. + // ```proto + // + // message MyString { + // // value must not be in list ["orange", "grape"] + // repeated string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"]; + // } + // + // ``` + NotIn []string `protobuf:"bytes,11,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `WellKnown` rules provide advanced constraints against common string + // patterns + // + // Types that are valid to be assigned to WellKnown: + // + // *StringRules_Email + // *StringRules_Hostname + // *StringRules_Ip + // *StringRules_Ipv4 + // *StringRules_Ipv6 + // *StringRules_Uri + // *StringRules_UriRef + // *StringRules_Address + // *StringRules_Uuid + // *StringRules_Tuuid + // *StringRules_IpWithPrefixlen + // *StringRules_Ipv4WithPrefixlen + // *StringRules_Ipv6WithPrefixlen + // *StringRules_IpPrefix + // *StringRules_Ipv4Prefix + // *StringRules_Ipv6Prefix + // *StringRules_HostAndPort + // *StringRules_WellKnownRegex + WellKnown isStringRules_WellKnown `protobuf_oneof:"well_known"` + // This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to + // enable strict header validation. By default, this is true, and HTTP header + // validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser + // validations that only disallow `\r\n\0` characters, which can be used to + // bypass header matching rules. + // + // ```proto + // + // message MyString { + // // The field `value` must have be a valid HTTP headers, but not enforced with strict rules. + // string value = 1 [(buf.validate.field).string.strict = false]; + // } + // + // ``` + Strict *bool `protobuf:"varint,25,opt,name=strict" json:"strict,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other constraints. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyString { + // string value = 1 [ + // (buf.validate.field).string.example = "hello", + // (buf.validate.field).string.example = "world" + // ]; + // } + // + // ``` + Example []string `protobuf:"bytes,34,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StringRules) Reset() { + *x = StringRules{} + mi := &file_buf_validate_validate_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StringRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringRules) ProtoMessage() {} + +func (x *StringRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringRules.ProtoReflect.Descriptor instead. +func (*StringRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{18} +} + +func (x *StringRules) GetConst() string { + if x != nil && x.Const != nil { + return *x.Const + } + return "" +} + +func (x *StringRules) GetLen() uint64 { + if x != nil && x.Len != nil { + return *x.Len + } + return 0 +} + +func (x *StringRules) GetMinLen() uint64 { + if x != nil && x.MinLen != nil { + return *x.MinLen + } + return 0 +} + +func (x *StringRules) GetMaxLen() uint64 { + if x != nil && x.MaxLen != nil { + return *x.MaxLen + } + return 0 +} + +func (x *StringRules) GetLenBytes() uint64 { + if x != nil && x.LenBytes != nil { + return *x.LenBytes + } + return 0 +} + +func (x *StringRules) GetMinBytes() uint64 { + if x != nil && x.MinBytes != nil { + return *x.MinBytes + } + return 0 +} + +func (x *StringRules) GetMaxBytes() uint64 { + if x != nil && x.MaxBytes != nil { + return *x.MaxBytes + } + return 0 +} + +func (x *StringRules) GetPattern() string { + if x != nil && x.Pattern != nil { + return *x.Pattern + } + return "" +} + +func (x *StringRules) GetPrefix() string { + if x != nil && x.Prefix != nil { + return *x.Prefix + } + return "" +} + +func (x *StringRules) GetSuffix() string { + if x != nil && x.Suffix != nil { + return *x.Suffix + } + return "" +} + +func (x *StringRules) GetContains() string { + if x != nil && x.Contains != nil { + return *x.Contains + } + return "" +} + +func (x *StringRules) GetNotContains() string { + if x != nil && x.NotContains != nil { + return *x.NotContains + } + return "" +} + +func (x *StringRules) GetIn() []string { + if x != nil { + return x.In + } + return nil +} + +func (x *StringRules) GetNotIn() []string { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *StringRules) GetWellKnown() isStringRules_WellKnown { + if x != nil { + return x.WellKnown + } + return nil +} + +func (x *StringRules) GetEmail() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Email); ok { + return x.Email + } + } + return false +} + +func (x *StringRules) GetHostname() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Hostname); ok { + return x.Hostname + } + } + return false +} + +func (x *StringRules) GetIp() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Ip); ok { + return x.Ip + } + } + return false +} + +func (x *StringRules) GetIpv4() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Ipv4); ok { + return x.Ipv4 + } + } + return false +} + +func (x *StringRules) GetIpv6() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Ipv6); ok { + return x.Ipv6 + } + } + return false +} + +func (x *StringRules) GetUri() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Uri); ok { + return x.Uri + } + } + return false +} + +func (x *StringRules) GetUriRef() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_UriRef); ok { + return x.UriRef + } + } + return false +} + +func (x *StringRules) GetAddress() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Address); ok { + return x.Address + } + } + return false +} + +func (x *StringRules) GetUuid() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Uuid); ok { + return x.Uuid + } + } + return false +} + +func (x *StringRules) GetTuuid() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Tuuid); ok { + return x.Tuuid + } + } + return false +} + +func (x *StringRules) GetIpWithPrefixlen() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_IpWithPrefixlen); ok { + return x.IpWithPrefixlen + } + } + return false +} + +func (x *StringRules) GetIpv4WithPrefixlen() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Ipv4WithPrefixlen); ok { + return x.Ipv4WithPrefixlen + } + } + return false +} + +func (x *StringRules) GetIpv6WithPrefixlen() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Ipv6WithPrefixlen); ok { + return x.Ipv6WithPrefixlen + } + } + return false +} + +func (x *StringRules) GetIpPrefix() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_IpPrefix); ok { + return x.IpPrefix + } + } + return false +} + +func (x *StringRules) GetIpv4Prefix() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Ipv4Prefix); ok { + return x.Ipv4Prefix + } + } + return false +} + +func (x *StringRules) GetIpv6Prefix() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Ipv6Prefix); ok { + return x.Ipv6Prefix + } + } + return false +} + +func (x *StringRules) GetHostAndPort() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_HostAndPort); ok { + return x.HostAndPort + } + } + return false +} + +func (x *StringRules) GetWellKnownRegex() KnownRegex { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_WellKnownRegex); ok { + return x.WellKnownRegex + } + } + return KnownRegex_KNOWN_REGEX_UNSPECIFIED +} + +func (x *StringRules) GetStrict() bool { + if x != nil && x.Strict != nil { + return *x.Strict + } + return false +} + +func (x *StringRules) GetExample() []string { + if x != nil { + return x.Example + } + return nil +} + +type isStringRules_WellKnown interface { + isStringRules_WellKnown() +} + +type StringRules_Email struct { + // `email` specifies that the field value must be a valid email address + // (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1). + // If the field value isn't a valid email address, an error message will be generated. + // + // ```proto + // + // message MyString { + // // value must be a valid email address + // string value = 1 [(buf.validate.field).string.email = true]; + // } + // + // ``` + Email bool `protobuf:"varint,12,opt,name=email,oneof"` +} + +type StringRules_Hostname struct { + // `hostname` specifies that the field value must be a valid + // hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support + // internationalized domain names (IDNs). If the field value isn't a + // valid hostname, an error message will be generated. + // + // ```proto + // + // message MyString { + // // value must be a valid hostname + // string value = 1 [(buf.validate.field).string.hostname = true]; + // } + // + // ``` + Hostname bool `protobuf:"varint,13,opt,name=hostname,oneof"` +} + +type StringRules_Ip struct { + // `ip` specifies that the field value must be a valid IP + // (v4 or v6) address, without surrounding square brackets for IPv6 addresses. + // If the field value isn't a valid IP address, an error message will be + // generated. + // + // ```proto + // + // message MyString { + // // value must be a valid IP address + // string value = 1 [(buf.validate.field).string.ip = true]; + // } + // + // ``` + Ip bool `protobuf:"varint,14,opt,name=ip,oneof"` +} + +type StringRules_Ipv4 struct { + // `ipv4` specifies that the field value must be a valid IPv4 + // address. If the field value isn't a valid IPv4 address, an error message + // will be generated. + // + // ```proto + // + // message MyString { + // // value must be a valid IPv4 address + // string value = 1 [(buf.validate.field).string.ipv4 = true]; + // } + // + // ``` + Ipv4 bool `protobuf:"varint,15,opt,name=ipv4,oneof"` +} + +type StringRules_Ipv6 struct { + // `ipv6` specifies that the field value must be a valid + // IPv6 address, without surrounding square brackets. If the field value is + // not a valid IPv6 address, an error message will be generated. + // + // ```proto + // + // message MyString { + // // value must be a valid IPv6 address + // string value = 1 [(buf.validate.field).string.ipv6 = true]; + // } + // + // ``` + Ipv6 bool `protobuf:"varint,16,opt,name=ipv6,oneof"` +} + +type StringRules_Uri struct { + // `uri` specifies that the field value must be a valid, + // absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid, + // absolute URI, an error message will be generated. + // + // ```proto + // + // message MyString { + // // value must be a valid URI + // string value = 1 [(buf.validate.field).string.uri = true]; + // } + // + // ``` + Uri bool `protobuf:"varint,17,opt,name=uri,oneof"` +} + +type StringRules_UriRef struct { + // `uri_ref` specifies that the field value must be a valid URI + // as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the + // field value isn't a valid URI, an error message will be generated. + // + // ```proto + // + // message MyString { + // // value must be a valid URI + // string value = 1 [(buf.validate.field).string.uri_ref = true]; + // } + // + // ``` + UriRef bool `protobuf:"varint,18,opt,name=uri_ref,json=uriRef,oneof"` +} + +type StringRules_Address struct { + // `address` specifies that the field value must be either a valid hostname + // as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5) + // (which doesn't support internationalized domain names or IDNs) or a valid + // IP (v4 or v6). If the field value isn't a valid hostname or IP, an error + // message will be generated. + // + // ```proto + // + // message MyString { + // // value must be a valid hostname, or ip address + // string value = 1 [(buf.validate.field).string.address = true]; + // } + // + // ``` + Address bool `protobuf:"varint,21,opt,name=address,oneof"` +} + +type StringRules_Uuid struct { + // `uuid` specifies that the field value must be a valid UUID as defined by + // [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the + // field value isn't a valid UUID, an error message will be generated. + // + // ```proto + // + // message MyString { + // // value must be a valid UUID + // string value = 1 [(buf.validate.field).string.uuid = true]; + // } + // + // ``` + Uuid bool `protobuf:"varint,22,opt,name=uuid,oneof"` +} + +type StringRules_Tuuid struct { + // `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as + // defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes + // omitted. If the field value isn't a valid UUID without dashes, an error message + // will be generated. + // + // ```proto + // + // message MyString { + // // value must be a valid trimmed UUID + // string value = 1 [(buf.validate.field).string.tuuid = true]; + // } + // + // ``` + Tuuid bool `protobuf:"varint,33,opt,name=tuuid,oneof"` +} + +type StringRules_IpWithPrefixlen struct { + // `ip_with_prefixlen` specifies that the field value must be a valid IP (v4 or v6) + // address with prefix length. If the field value isn't a valid IP with prefix + // length, an error message will be generated. + // + // ```proto + // + // message MyString { + // // value must be a valid IP with prefix length + // string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true]; + // } + // + // ``` + IpWithPrefixlen bool `protobuf:"varint,26,opt,name=ip_with_prefixlen,json=ipWithPrefixlen,oneof"` +} + +type StringRules_Ipv4WithPrefixlen struct { + // `ipv4_with_prefixlen` specifies that the field value must be a valid + // IPv4 address with prefix. + // If the field value isn't a valid IPv4 address with prefix length, + // an error message will be generated. + // + // ```proto + // + // message MyString { + // // value must be a valid IPv4 address with prefix length + // string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true]; + // } + // + // ``` + Ipv4WithPrefixlen bool `protobuf:"varint,27,opt,name=ipv4_with_prefixlen,json=ipv4WithPrefixlen,oneof"` +} + +type StringRules_Ipv6WithPrefixlen struct { + // `ipv6_with_prefixlen` specifies that the field value must be a valid + // IPv6 address with prefix length. + // If the field value is not a valid IPv6 address with prefix length, + // an error message will be generated. + // + // ```proto + // + // message MyString { + // // value must be a valid IPv6 address prefix length + // string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true]; + // } + // + // ``` + Ipv6WithPrefixlen bool `protobuf:"varint,28,opt,name=ipv6_with_prefixlen,json=ipv6WithPrefixlen,oneof"` +} + +type StringRules_IpPrefix struct { + // `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) prefix. + // If the field value isn't a valid IP prefix, an error message will be + // generated. The prefix must have all zeros for the masked bits of the prefix (e.g., + // `127.0.0.0/16`, not `127.0.0.1/16`). + // + // ```proto + // + // message MyString { + // // value must be a valid IP prefix + // string value = 1 [(buf.validate.field).string.ip_prefix = true]; + // } + // + // ``` + IpPrefix bool `protobuf:"varint,29,opt,name=ip_prefix,json=ipPrefix,oneof"` +} + +type StringRules_Ipv4Prefix struct { + // `ipv4_prefix` specifies that the field value must be a valid IPv4 + // prefix. If the field value isn't a valid IPv4 prefix, an error message + // will be generated. The prefix must have all zeros for the masked bits of + // the prefix (e.g., `127.0.0.0/16`, not `127.0.0.1/16`). + // + // ```proto + // + // message MyString { + // // value must be a valid IPv4 prefix + // string value = 1 [(buf.validate.field).string.ipv4_prefix = true]; + // } + // + // ``` + Ipv4Prefix bool `protobuf:"varint,30,opt,name=ipv4_prefix,json=ipv4Prefix,oneof"` +} + +type StringRules_Ipv6Prefix struct { + // `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix. + // If the field value is not a valid IPv6 prefix, an error message will be + // generated. The prefix must have all zeros for the masked bits of the prefix + // (e.g., `2001:db8::/48`, not `2001:db8::1/48`). + // + // ```proto + // + // message MyString { + // // value must be a valid IPv6 prefix + // string value = 1 [(buf.validate.field).string.ipv6_prefix = true]; + // } + // + // ``` + Ipv6Prefix bool `protobuf:"varint,31,opt,name=ipv6_prefix,json=ipv6Prefix,oneof"` +} + +type StringRules_HostAndPort struct { + // `host_and_port` specifies the field value must be a valid host and port + // pair. The host must be a valid hostname or IP address while the port + // must be in the range of 0-65535, inclusive. IPv6 addresses must be delimited + // with square brackets (e.g., `[::1]:1234`). + HostAndPort bool `protobuf:"varint,32,opt,name=host_and_port,json=hostAndPort,oneof"` +} + +type StringRules_WellKnownRegex struct { + // `well_known_regex` specifies a common well-known pattern + // defined as a regex. If the field value doesn't match the well-known + // regex, an error message will be generated. + // + // ```proto + // + // message MyString { + // // value must be a valid HTTP header value + // string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE]; + // } + // + // ``` + // + // #### KnownRegex + // + // `well_known_regex` contains some well-known patterns. + // + // | Name | Number | Description | + // |-------------------------------|--------|-------------------------------------------| + // | KNOWN_REGEX_UNSPECIFIED | 0 | | + // | KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2) | + // | KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) | + WellKnownRegex KnownRegex `protobuf:"varint,24,opt,name=well_known_regex,json=wellKnownRegex,enum=buf.validate.KnownRegex,oneof"` +} + +func (*StringRules_Email) isStringRules_WellKnown() {} + +func (*StringRules_Hostname) isStringRules_WellKnown() {} + +func (*StringRules_Ip) isStringRules_WellKnown() {} + +func (*StringRules_Ipv4) isStringRules_WellKnown() {} + +func (*StringRules_Ipv6) isStringRules_WellKnown() {} + +func (*StringRules_Uri) isStringRules_WellKnown() {} + +func (*StringRules_UriRef) isStringRules_WellKnown() {} + +func (*StringRules_Address) isStringRules_WellKnown() {} + +func (*StringRules_Uuid) isStringRules_WellKnown() {} + +func (*StringRules_Tuuid) isStringRules_WellKnown() {} + +func (*StringRules_IpWithPrefixlen) isStringRules_WellKnown() {} + +func (*StringRules_Ipv4WithPrefixlen) isStringRules_WellKnown() {} + +func (*StringRules_Ipv6WithPrefixlen) isStringRules_WellKnown() {} + +func (*StringRules_IpPrefix) isStringRules_WellKnown() {} + +func (*StringRules_Ipv4Prefix) isStringRules_WellKnown() {} + +func (*StringRules_Ipv6Prefix) isStringRules_WellKnown() {} + +func (*StringRules_HostAndPort) isStringRules_WellKnown() {} + +func (*StringRules_WellKnownRegex) isStringRules_WellKnown() {} + +// BytesRules describe the constraints applied to `bytes` values. These rules +// may also be applied to the `google.protobuf.BytesValue` Well-Known-Type. +type BytesRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified bytes + // value. If the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // value must be "\x01\x02\x03\x04" + // bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"]; + // } + // + // ``` + Const []byte `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"` + // `len` requires the field value to have the specified length in bytes. + // If the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // value length must be 4 bytes. + // optional bytes value = 1 [(buf.validate.field).bytes.len = 4]; + // } + // + // ``` + Len *uint64 `protobuf:"varint,13,opt,name=len" json:"len,omitempty"` + // `min_len` requires the field value to have at least the specified minimum + // length in bytes. + // If the field value doesn't meet the requirement, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // value length must be at least 2 bytes. + // optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2]; + // } + // + // ``` + MinLen *uint64 `protobuf:"varint,2,opt,name=min_len,json=minLen" json:"min_len,omitempty"` + // `max_len` requires the field value to have at most the specified maximum + // length in bytes. + // If the field value exceeds the requirement, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // value must be at most 6 bytes. + // optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6]; + // } + // + // ``` + MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"` + // `pattern` requires the field value to match the specified regular + // expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)). + // The value of the field must be valid UTF-8 or validation will fail with a + // runtime error. + // If the field value doesn't match the pattern, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // value must match regex pattern "^[a-zA-Z0-9]+$". + // optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"]; + // } + // + // ``` + Pattern *string `protobuf:"bytes,4,opt,name=pattern" json:"pattern,omitempty"` + // `prefix` requires the field value to have the specified bytes at the + // beginning of the string. + // If the field value doesn't meet the requirement, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // value does not have prefix \x01\x02 + // optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"]; + // } + // + // ``` + Prefix []byte `protobuf:"bytes,5,opt,name=prefix" json:"prefix,omitempty"` + // `suffix` requires the field value to have the specified bytes at the end + // of the string. + // If the field value doesn't meet the requirement, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // value does not have suffix \x03\x04 + // optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"]; + // } + // + // ``` + Suffix []byte `protobuf:"bytes,6,opt,name=suffix" json:"suffix,omitempty"` + // `contains` requires the field value to have the specified bytes anywhere in + // the string. + // If the field value doesn't meet the requirement, an error message is generated. + // + // ```protobuf + // + // message MyBytes { + // // value does not contain \x02\x03 + // optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"]; + // } + // + // ``` + Contains []byte `protobuf:"bytes,7,opt,name=contains" json:"contains,omitempty"` + // `in` requires the field value to be equal to one of the specified + // values. If the field value doesn't match any of the specified values, an + // error message is generated. + // + // ```protobuf + // + // message MyBytes { + // // value must in ["\x01\x02", "\x02\x03", "\x03\x04"] + // optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; + // } + // + // ``` + In [][]byte `protobuf:"bytes,8,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to be not equal to any of the specified + // values. + // If the field value matches any of the specified values, an error message is + // generated. + // + // ```proto + // + // message MyBytes { + // // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"] + // optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; + // } + // + // ``` + NotIn [][]byte `protobuf:"bytes,9,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // WellKnown rules provide advanced constraints against common byte + // patterns + // + // Types that are valid to be assigned to WellKnown: + // + // *BytesRules_Ip + // *BytesRules_Ipv4 + // *BytesRules_Ipv6 + WellKnown isBytesRules_WellKnown `protobuf_oneof:"well_known"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other constraints. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyBytes { + // bytes value = 1 [ + // (buf.validate.field).bytes.example = "\x01\x02", + // (buf.validate.field).bytes.example = "\x02\x03" + // ]; + // } + // + // ``` + Example [][]byte `protobuf:"bytes,14,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BytesRules) Reset() { + *x = BytesRules{} + mi := &file_buf_validate_validate_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BytesRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BytesRules) ProtoMessage() {} + +func (x *BytesRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BytesRules.ProtoReflect.Descriptor instead. +func (*BytesRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{19} +} + +func (x *BytesRules) GetConst() []byte { + if x != nil { + return x.Const + } + return nil +} + +func (x *BytesRules) GetLen() uint64 { + if x != nil && x.Len != nil { + return *x.Len + } + return 0 +} + +func (x *BytesRules) GetMinLen() uint64 { + if x != nil && x.MinLen != nil { + return *x.MinLen + } + return 0 +} + +func (x *BytesRules) GetMaxLen() uint64 { + if x != nil && x.MaxLen != nil { + return *x.MaxLen + } + return 0 +} + +func (x *BytesRules) GetPattern() string { + if x != nil && x.Pattern != nil { + return *x.Pattern + } + return "" +} + +func (x *BytesRules) GetPrefix() []byte { + if x != nil { + return x.Prefix + } + return nil +} + +func (x *BytesRules) GetSuffix() []byte { + if x != nil { + return x.Suffix + } + return nil +} + +func (x *BytesRules) GetContains() []byte { + if x != nil { + return x.Contains + } + return nil +} + +func (x *BytesRules) GetIn() [][]byte { + if x != nil { + return x.In + } + return nil +} + +func (x *BytesRules) GetNotIn() [][]byte { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *BytesRules) GetWellKnown() isBytesRules_WellKnown { + if x != nil { + return x.WellKnown + } + return nil +} + +func (x *BytesRules) GetIp() bool { + if x != nil { + if x, ok := x.WellKnown.(*BytesRules_Ip); ok { + return x.Ip + } + } + return false +} + +func (x *BytesRules) GetIpv4() bool { + if x != nil { + if x, ok := x.WellKnown.(*BytesRules_Ipv4); ok { + return x.Ipv4 + } + } + return false +} + +func (x *BytesRules) GetIpv6() bool { + if x != nil { + if x, ok := x.WellKnown.(*BytesRules_Ipv6); ok { + return x.Ipv6 + } + } + return false +} + +func (x *BytesRules) GetExample() [][]byte { + if x != nil { + return x.Example + } + return nil +} + +type isBytesRules_WellKnown interface { + isBytesRules_WellKnown() +} + +type BytesRules_Ip struct { + // `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format. + // If the field value doesn't meet this constraint, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // value must be a valid IP address + // optional bytes value = 1 [(buf.validate.field).bytes.ip = true]; + // } + // + // ``` + Ip bool `protobuf:"varint,10,opt,name=ip,oneof"` +} + +type BytesRules_Ipv4 struct { + // `ipv4` ensures that the field `value` is a valid IPv4 address in byte format. + // If the field value doesn't meet this constraint, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // value must be a valid IPv4 address + // optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true]; + // } + // + // ``` + Ipv4 bool `protobuf:"varint,11,opt,name=ipv4,oneof"` +} + +type BytesRules_Ipv6 struct { + // `ipv6` ensures that the field `value` is a valid IPv6 address in byte format. + // If the field value doesn't meet this constraint, an error message is generated. + // ```proto + // + // message MyBytes { + // // value must be a valid IPv6 address + // optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true]; + // } + // + // ``` + Ipv6 bool `protobuf:"varint,12,opt,name=ipv6,oneof"` +} + +func (*BytesRules_Ip) isBytesRules_WellKnown() {} + +func (*BytesRules_Ipv4) isBytesRules_WellKnown() {} + +func (*BytesRules_Ipv6) isBytesRules_WellKnown() {} + +// EnumRules describe the constraints applied to `enum` values. +type EnumRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified enum value. + // If the field value doesn't match, an error message is generated. + // + // ```proto + // + // enum MyEnum { + // MY_ENUM_UNSPECIFIED = 0; + // MY_ENUM_VALUE1 = 1; + // MY_ENUM_VALUE2 = 2; + // } + // + // message MyMessage { + // // The field `value` must be exactly MY_ENUM_VALUE1. + // MyEnum value = 1 [(buf.validate.field).enum.const = 1]; + // } + // + // ``` + Const *int32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` + // `defined_only` requires the field value to be one of the defined values for + // this enum, failing on any undefined value. + // + // ```proto + // + // enum MyEnum { + // MY_ENUM_UNSPECIFIED = 0; + // MY_ENUM_VALUE1 = 1; + // MY_ENUM_VALUE2 = 2; + // } + // + // message MyMessage { + // // The field `value` must be a defined value of MyEnum. + // MyEnum value = 1 [(buf.validate.field).enum.defined_only = true]; + // } + // + // ``` + DefinedOnly *bool `protobuf:"varint,2,opt,name=defined_only,json=definedOnly" json:"defined_only,omitempty"` + // `in` requires the field value to be equal to one of the + // specified enum values. If the field value doesn't match any of the + // specified values, an error message is generated. + // + // ```proto + // + // enum MyEnum { + // MY_ENUM_UNSPECIFIED = 0; + // MY_ENUM_VALUE1 = 1; + // MY_ENUM_VALUE2 = 2; + // } + // + // message MyMessage { + // // The field `value` must be equal to one of the specified values. + // MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}]; + // } + // + // ``` + In []int32 `protobuf:"varint,3,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to be not equal to any of the + // specified enum values. If the field value matches one of the specified + // values, an error message is generated. + // + // ```proto + // + // enum MyEnum { + // MY_ENUM_UNSPECIFIED = 0; + // MY_ENUM_VALUE1 = 1; + // MY_ENUM_VALUE2 = 2; + // } + // + // message MyMessage { + // // The field `value` must not be equal to any of the specified values. + // MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}]; + // } + // + // ``` + NotIn []int32 `protobuf:"varint,4,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other constraints. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // enum MyEnum { + // MY_ENUM_UNSPECIFIED = 0; + // MY_ENUM_VALUE1 = 1; + // MY_ENUM_VALUE2 = 2; + // } + // + // message MyMessage { + // (buf.validate.field).enum.example = 1, + // (buf.validate.field).enum.example = 2 + // } + // + // ``` + Example []int32 `protobuf:"varint,5,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnumRules) Reset() { + *x = EnumRules{} + mi := &file_buf_validate_validate_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnumRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnumRules) ProtoMessage() {} + +func (x *EnumRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnumRules.ProtoReflect.Descriptor instead. +func (*EnumRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{20} +} + +func (x *EnumRules) GetConst() int32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *EnumRules) GetDefinedOnly() bool { + if x != nil && x.DefinedOnly != nil { + return *x.DefinedOnly + } + return false +} + +func (x *EnumRules) GetIn() []int32 { + if x != nil { + return x.In + } + return nil +} + +func (x *EnumRules) GetNotIn() []int32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *EnumRules) GetExample() []int32 { + if x != nil { + return x.Example + } + return nil +} + +// RepeatedRules describe the constraints applied to `repeated` values. +type RepeatedRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `min_items` requires that this field must contain at least the specified + // minimum number of items. + // + // Note that `min_items = 1` is equivalent to setting a field as `required`. + // + // ```proto + // + // message MyRepeated { + // // value must contain at least 2 items + // repeated string value = 1 [(buf.validate.field).repeated.min_items = 2]; + // } + // + // ``` + MinItems *uint64 `protobuf:"varint,1,opt,name=min_items,json=minItems" json:"min_items,omitempty"` + // `max_items` denotes that this field must not exceed a + // certain number of items as the upper limit. If the field contains more + // items than specified, an error message will be generated, requiring the + // field to maintain no more than the specified number of items. + // + // ```proto + // + // message MyRepeated { + // // value must contain no more than 3 item(s) + // repeated string value = 1 [(buf.validate.field).repeated.max_items = 3]; + // } + // + // ``` + MaxItems *uint64 `protobuf:"varint,2,opt,name=max_items,json=maxItems" json:"max_items,omitempty"` + // `unique` indicates that all elements in this field must + // be unique. This constraint is strictly applicable to scalar and enum + // types, with message types not being supported. + // + // ```proto + // + // message MyRepeated { + // // repeated value must contain unique items + // repeated string value = 1 [(buf.validate.field).repeated.unique = true]; + // } + // + // ``` + Unique *bool `protobuf:"varint,3,opt,name=unique" json:"unique,omitempty"` + // `items` details the constraints to be applied to each item + // in the field. Even for repeated message fields, validation is executed + // against each item unless skip is explicitly specified. + // + // ```proto + // + // message MyRepeated { + // // The items in the field `value` must follow the specified constraints. + // repeated string value = 1 [(buf.validate.field).repeated.items = { + // string: { + // min_len: 3 + // max_len: 10 + // } + // }]; + // } + // + // ``` + Items *FieldConstraints `protobuf:"bytes,4,opt,name=items" json:"items,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RepeatedRules) Reset() { + *x = RepeatedRules{} + mi := &file_buf_validate_validate_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RepeatedRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepeatedRules) ProtoMessage() {} + +func (x *RepeatedRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RepeatedRules.ProtoReflect.Descriptor instead. +func (*RepeatedRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{21} +} + +func (x *RepeatedRules) GetMinItems() uint64 { + if x != nil && x.MinItems != nil { + return *x.MinItems + } + return 0 +} + +func (x *RepeatedRules) GetMaxItems() uint64 { + if x != nil && x.MaxItems != nil { + return *x.MaxItems + } + return 0 +} + +func (x *RepeatedRules) GetUnique() bool { + if x != nil && x.Unique != nil { + return *x.Unique + } + return false +} + +func (x *RepeatedRules) GetItems() *FieldConstraints { + if x != nil { + return x.Items + } + return nil +} + +// MapRules describe the constraints applied to `map` values. +type MapRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Specifies the minimum number of key-value pairs allowed. If the field has + // fewer key-value pairs than specified, an error message is generated. + // + // ```proto + // + // message MyMap { + // // The field `value` must have at least 2 key-value pairs. + // map value = 1 [(buf.validate.field).map.min_pairs = 2]; + // } + // + // ``` + MinPairs *uint64 `protobuf:"varint,1,opt,name=min_pairs,json=minPairs" json:"min_pairs,omitempty"` + // Specifies the maximum number of key-value pairs allowed. If the field has + // more key-value pairs than specified, an error message is generated. + // + // ```proto + // + // message MyMap { + // // The field `value` must have at most 3 key-value pairs. + // map value = 1 [(buf.validate.field).map.max_pairs = 3]; + // } + // + // ``` + MaxPairs *uint64 `protobuf:"varint,2,opt,name=max_pairs,json=maxPairs" json:"max_pairs,omitempty"` + // Specifies the constraints to be applied to each key in the field. + // + // ```proto + // + // message MyMap { + // // The keys in the field `value` must follow the specified constraints. + // map value = 1 [(buf.validate.field).map.keys = { + // string: { + // min_len: 3 + // max_len: 10 + // } + // }]; + // } + // + // ``` + Keys *FieldConstraints `protobuf:"bytes,4,opt,name=keys" json:"keys,omitempty"` + // Specifies the constraints to be applied to the value of each key in the + // field. Message values will still have their validations evaluated unless + // skip is specified here. + // + // ```proto + // + // message MyMap { + // // The values in the field `value` must follow the specified constraints. + // map value = 1 [(buf.validate.field).map.values = { + // string: { + // min_len: 5 + // max_len: 20 + // } + // }]; + // } + // + // ``` + Values *FieldConstraints `protobuf:"bytes,5,opt,name=values" json:"values,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MapRules) Reset() { + *x = MapRules{} + mi := &file_buf_validate_validate_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MapRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MapRules) ProtoMessage() {} + +func (x *MapRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MapRules.ProtoReflect.Descriptor instead. +func (*MapRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{22} +} + +func (x *MapRules) GetMinPairs() uint64 { + if x != nil && x.MinPairs != nil { + return *x.MinPairs + } + return 0 +} + +func (x *MapRules) GetMaxPairs() uint64 { + if x != nil && x.MaxPairs != nil { + return *x.MaxPairs + } + return 0 +} + +func (x *MapRules) GetKeys() *FieldConstraints { + if x != nil { + return x.Keys + } + return nil +} + +func (x *MapRules) GetValues() *FieldConstraints { + if x != nil { + return x.Values + } + return nil +} + +// AnyRules describe constraints applied exclusively to the `google.protobuf.Any` well-known type. +type AnyRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `in` requires the field's `type_url` to be equal to one of the + // specified values. If it doesn't match any of the specified values, an error + // message is generated. + // + // ```proto + // + // message MyAny { + // // The `value` field must have a `type_url` equal to one of the specified values. + // google.protobuf.Any value = 1 [(buf.validate.field).any.in = ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"]]; + // } + // + // ``` + In []string `protobuf:"bytes,2,rep,name=in" json:"in,omitempty"` + // requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. + // + // ```proto + // + // message MyAny { + // // The field `value` must not have a `type_url` equal to any of the specified values. + // google.protobuf.Any value = 1 [(buf.validate.field).any.not_in = ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"]]; + // } + // + // ``` + NotIn []string `protobuf:"bytes,3,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AnyRules) Reset() { + *x = AnyRules{} + mi := &file_buf_validate_validate_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AnyRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnyRules) ProtoMessage() {} + +func (x *AnyRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnyRules.ProtoReflect.Descriptor instead. +func (*AnyRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{23} +} + +func (x *AnyRules) GetIn() []string { + if x != nil { + return x.In + } + return nil +} + +func (x *AnyRules) GetNotIn() []string { + if x != nil { + return x.NotIn + } + return nil +} + +// DurationRules describe the constraints applied exclusively to the `google.protobuf.Duration` well-known type. +type DurationRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly. + // If the field's value deviates from the specified value, an error message + // will be generated. + // + // ```proto + // + // message MyDuration { + // // value must equal 5s + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"]; + // } + // + // ``` + Const *durationpb.Duration `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *DurationRules_Lt + // *DurationRules_Lte + LessThan isDurationRules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *DurationRules_Gt + // *DurationRules_Gte + GreaterThan isDurationRules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type. + // If the field's value doesn't correspond to any of the specified values, + // an error message will be generated. + // + // ```proto + // + // message MyDuration { + // // value must be in list [1s, 2s, 3s] + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]]; + // } + // + // ``` + In []*durationpb.Duration `protobuf:"bytes,7,rep,name=in" json:"in,omitempty"` + // `not_in` denotes that the field must not be equal to + // any of the specified values of the `google.protobuf.Duration` type. + // If the field's value matches any of these values, an error message will be + // generated. + // + // ```proto + // + // message MyDuration { + // // value must not be in list [1s, 2s, 3s] + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]]; + // } + // + // ``` + NotIn []*durationpb.Duration `protobuf:"bytes,8,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other constraints. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyDuration { + // google.protobuf.Duration value = 1 [ + // (buf.validate.field).duration.example = { seconds: 1 }, + // (buf.validate.field).duration.example = { seconds: 2 }, + // ]; + // } + // + // ``` + Example []*durationpb.Duration `protobuf:"bytes,9,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DurationRules) Reset() { + *x = DurationRules{} + mi := &file_buf_validate_validate_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DurationRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DurationRules) ProtoMessage() {} + +func (x *DurationRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DurationRules.ProtoReflect.Descriptor instead. +func (*DurationRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{24} +} + +func (x *DurationRules) GetConst() *durationpb.Duration { + if x != nil { + return x.Const + } + return nil +} + +func (x *DurationRules) GetLessThan() isDurationRules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *DurationRules) GetLt() *durationpb.Duration { + if x != nil { + if x, ok := x.LessThan.(*DurationRules_Lt); ok { + return x.Lt + } + } + return nil +} + +func (x *DurationRules) GetLte() *durationpb.Duration { + if x != nil { + if x, ok := x.LessThan.(*DurationRules_Lte); ok { + return x.Lte + } + } + return nil +} + +func (x *DurationRules) GetGreaterThan() isDurationRules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *DurationRules) GetGt() *durationpb.Duration { + if x != nil { + if x, ok := x.GreaterThan.(*DurationRules_Gt); ok { + return x.Gt + } + } + return nil +} + +func (x *DurationRules) GetGte() *durationpb.Duration { + if x != nil { + if x, ok := x.GreaterThan.(*DurationRules_Gte); ok { + return x.Gte + } + } + return nil +} + +func (x *DurationRules) GetIn() []*durationpb.Duration { + if x != nil { + return x.In + } + return nil +} + +func (x *DurationRules) GetNotIn() []*durationpb.Duration { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *DurationRules) GetExample() []*durationpb.Duration { + if x != nil { + return x.Example + } + return nil +} + +type isDurationRules_LessThan interface { + isDurationRules_LessThan() +} + +type DurationRules_Lt struct { + // `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type, + // exclusive. If the field's value is greater than or equal to the specified + // value, an error message will be generated. + // + // ```proto + // + // message MyDuration { + // // value must be less than 5s + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"]; + // } + // + // ``` + Lt *durationpb.Duration `protobuf:"bytes,3,opt,name=lt,oneof"` +} + +type DurationRules_Lte struct { + // `lte` indicates that the field must be less than or equal to the specified + // value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value, + // an error message will be generated. + // + // ```proto + // + // message MyDuration { + // // value must be less than or equal to 10s + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"]; + // } + // + // ``` + Lte *durationpb.Duration `protobuf:"bytes,4,opt,name=lte,oneof"` +} + +func (*DurationRules_Lt) isDurationRules_LessThan() {} + +func (*DurationRules_Lte) isDurationRules_LessThan() {} + +type isDurationRules_GreaterThan interface { + isDurationRules_GreaterThan() +} + +type DurationRules_Gt struct { + // `gt` requires the duration field value to be greater than the specified + // value (exclusive). If the value of `gt` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyDuration { + // // duration must be greater than 5s [duration.gt] + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }]; + // + // // duration must be greater than 5s and less than 10s [duration.gt_lt] + // google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }]; + // + // // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive] + // google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }]; + // } + // + // ``` + Gt *durationpb.Duration `protobuf:"bytes,5,opt,name=gt,oneof"` +} + +type DurationRules_Gte struct { + // `gte` requires the duration field value to be greater than or equal to the + // specified value (exclusive). If the value of `gte` is larger than a + // specified `lt` or `lte`, the range is reversed, and the field value must + // be outside the specified range. If the field value doesn't meet the + // required conditions, an error message is generated. + // + // ```proto + // + // message MyDuration { + // // duration must be greater than or equal to 5s [duration.gte] + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }]; + // + // // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt] + // google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }]; + // + // // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive] + // google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }]; + // } + // + // ``` + Gte *durationpb.Duration `protobuf:"bytes,6,opt,name=gte,oneof"` +} + +func (*DurationRules_Gt) isDurationRules_GreaterThan() {} + +func (*DurationRules_Gte) isDurationRules_GreaterThan() {} + +// TimestampRules describe the constraints applied exclusively to the `google.protobuf.Timestamp` well-known type. +type TimestampRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated. + // + // ```proto + // + // message MyTimestamp { + // // value must equal 2023-05-03T10:00:00Z + // google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}]; + // } + // + // ``` + Const *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *TimestampRules_Lt + // *TimestampRules_Lte + // *TimestampRules_LtNow + LessThan isTimestampRules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *TimestampRules_Gt + // *TimestampRules_Gte + // *TimestampRules_GtNow + GreaterThan isTimestampRules_GreaterThan `protobuf_oneof:"greater_than"` + // `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated. + // + // ```proto + // + // message MyTimestamp { + // // value must be within 1 hour of now + // google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}]; + // } + // + // ``` + Within *durationpb.Duration `protobuf:"bytes,9,opt,name=within" json:"within,omitempty"` + Example []*timestamppb.Timestamp `protobuf:"bytes,10,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TimestampRules) Reset() { + *x = TimestampRules{} + mi := &file_buf_validate_validate_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TimestampRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimestampRules) ProtoMessage() {} + +func (x *TimestampRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimestampRules.ProtoReflect.Descriptor instead. +func (*TimestampRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{25} +} + +func (x *TimestampRules) GetConst() *timestamppb.Timestamp { + if x != nil { + return x.Const + } + return nil +} + +func (x *TimestampRules) GetLessThan() isTimestampRules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *TimestampRules) GetLt() *timestamppb.Timestamp { + if x != nil { + if x, ok := x.LessThan.(*TimestampRules_Lt); ok { + return x.Lt + } + } + return nil +} + +func (x *TimestampRules) GetLte() *timestamppb.Timestamp { + if x != nil { + if x, ok := x.LessThan.(*TimestampRules_Lte); ok { + return x.Lte + } + } + return nil +} + +func (x *TimestampRules) GetLtNow() bool { + if x != nil { + if x, ok := x.LessThan.(*TimestampRules_LtNow); ok { + return x.LtNow + } + } + return false +} + +func (x *TimestampRules) GetGreaterThan() isTimestampRules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *TimestampRules) GetGt() *timestamppb.Timestamp { + if x != nil { + if x, ok := x.GreaterThan.(*TimestampRules_Gt); ok { + return x.Gt + } + } + return nil +} + +func (x *TimestampRules) GetGte() *timestamppb.Timestamp { + if x != nil { + if x, ok := x.GreaterThan.(*TimestampRules_Gte); ok { + return x.Gte + } + } + return nil +} + +func (x *TimestampRules) GetGtNow() bool { + if x != nil { + if x, ok := x.GreaterThan.(*TimestampRules_GtNow); ok { + return x.GtNow + } + } + return false +} + +func (x *TimestampRules) GetWithin() *durationpb.Duration { + if x != nil { + return x.Within + } + return nil +} + +func (x *TimestampRules) GetExample() []*timestamppb.Timestamp { + if x != nil { + return x.Example + } + return nil +} + +type isTimestampRules_LessThan interface { + isTimestampRules_LessThan() +} + +type TimestampRules_Lt struct { + // requires the duration field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated. + // + // ```proto + // + // message MyDuration { + // // duration must be less than 'P3D' [duration.lt] + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = { seconds: 259200 }]; + // } + // + // ``` + Lt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=lt,oneof"` +} + +type TimestampRules_Lte struct { + // requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated. + // + // ```proto + // + // message MyTimestamp { + // // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte] + // google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }]; + // } + // + // ``` + Lte *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=lte,oneof"` +} + +type TimestampRules_LtNow struct { + // `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule. + // + // ```proto + // + // message MyTimestamp { + // // value must be less than now + // google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true]; + // } + // + // ``` + LtNow bool `protobuf:"varint,7,opt,name=lt_now,json=ltNow,oneof"` +} + +func (*TimestampRules_Lt) isTimestampRules_LessThan() {} + +func (*TimestampRules_Lte) isTimestampRules_LessThan() {} + +func (*TimestampRules_LtNow) isTimestampRules_LessThan() {} + +type isTimestampRules_GreaterThan interface { + isTimestampRules_GreaterThan() +} + +type TimestampRules_Gt struct { + // `gt` requires the timestamp field value to be greater than the specified + // value (exclusive). If the value of `gt` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyTimestamp { + // // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt] + // google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }]; + // + // // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt] + // google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; + // + // // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive] + // google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; + // } + // + // ``` + Gt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=gt,oneof"` +} + +type TimestampRules_Gte struct { + // `gte` requires the timestamp field value to be greater than or equal to the + // specified value (exclusive). If the value of `gte` is larger than a + // specified `lt` or `lte`, the range is reversed, and the field value + // must be outside the specified range. If the field value doesn't meet + // the required conditions, an error message is generated. + // + // ```proto + // + // message MyTimestamp { + // // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte] + // google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }]; + // + // // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt] + // google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; + // + // // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive] + // google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; + // } + // + // ``` + Gte *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=gte,oneof"` +} + +type TimestampRules_GtNow struct { + // `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule. + // + // ```proto + // + // message MyTimestamp { + // // value must be greater than now + // google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true]; + // } + // + // ``` + GtNow bool `protobuf:"varint,8,opt,name=gt_now,json=gtNow,oneof"` +} + +func (*TimestampRules_Gt) isTimestampRules_GreaterThan() {} + +func (*TimestampRules_Gte) isTimestampRules_GreaterThan() {} + +func (*TimestampRules_GtNow) isTimestampRules_GreaterThan() {} + +// `Violations` is a collection of `Violation` messages. This message type is returned by +// protovalidate when a proto message fails to meet the requirements set by the `Constraint` validation rules. +// Each individual violation is represented by a `Violation` message. +type Violations struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected. + Violations []*Violation `protobuf:"bytes,1,rep,name=violations" json:"violations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Violations) Reset() { + *x = Violations{} + mi := &file_buf_validate_validate_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Violations) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Violations) ProtoMessage() {} + +func (x *Violations) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Violations.ProtoReflect.Descriptor instead. +func (*Violations) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{26} +} + +func (x *Violations) GetViolations() []*Violation { + if x != nil { + return x.Violations + } + return nil +} + +// `Violation` represents a single instance where a validation rule, expressed +// as a `Constraint`, was not met. It provides information about the field that +// caused the violation, the specific constraint that wasn't fulfilled, and a +// human-readable error message. +// +// ```json +// +// { +// "fieldPath": "bar", +// "constraintId": "foo.bar", +// "message": "bar must be greater than 0" +// } +// +// ``` +type Violation struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `field` is a machine-readable path to the field that failed validation. + // This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation. + // + // For example, consider the following message: + // + // ```proto + // + // message Message { + // bool a = 1 [(buf.validate.field).required = true]; + // } + // + // ``` + // + // It could produce the following violation: + // + // ```textproto + // + // violation { + // field { element { field_number: 1, field_name: "a", field_type: 8 } } + // ... + // } + // + // ``` + Field *FieldPath `protobuf:"bytes,5,opt,name=field" json:"field,omitempty"` + // `rule` is a machine-readable path that points to the specific constraint rule that failed validation. + // This will be a nested field starting from the FieldConstraints of the field that failed validation. + // For custom constraints, this will provide the path of the constraint, e.g. `cel[0]`. + // + // For example, consider the following message: + // + // ```proto + // + // message Message { + // bool a = 1 [(buf.validate.field).required = true]; + // bool b = 2 [(buf.validate.field).cel = { + // id: "custom_constraint", + // expression: "!this ? 'b must be true': ''" + // }] + // } + // + // ``` + // + // It could produce the following violations: + // + // ```textproto + // + // violation { + // rule { element { field_number: 25, field_name: "required", field_type: 8 } } + // ... + // } + // + // violation { + // rule { element { field_number: 23, field_name: "cel", field_type: 11, index: 0 } } + // ... + // } + // + // ``` + Rule *FieldPath `protobuf:"bytes,6,opt,name=rule" json:"rule,omitempty"` + // `field_path` is a human-readable identifier that points to the specific field that failed the validation. + // This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation. + // + // Deprecated: use the `field` instead. + // + // Deprecated: Marked as deprecated in buf/validate/validate.proto. + FieldPath *string `protobuf:"bytes,1,opt,name=field_path,json=fieldPath" json:"field_path,omitempty"` + // `constraint_id` is the unique identifier of the `Constraint` that was not fulfilled. + // This is the same `id` that was specified in the `Constraint` message, allowing easy tracing of which rule was violated. + ConstraintId *string `protobuf:"bytes,2,opt,name=constraint_id,json=constraintId" json:"constraint_id,omitempty"` + // `message` is a human-readable error message that describes the nature of the violation. + // This can be the default error message from the violated `Constraint`, or it can be a custom message that gives more context about the violation. + Message *string `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"` + // `for_key` indicates whether the violation was caused by a map key, rather than a value. + ForKey *bool `protobuf:"varint,4,opt,name=for_key,json=forKey" json:"for_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Violation) Reset() { + *x = Violation{} + mi := &file_buf_validate_validate_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Violation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Violation) ProtoMessage() {} + +func (x *Violation) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Violation.ProtoReflect.Descriptor instead. +func (*Violation) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{27} +} + +func (x *Violation) GetField() *FieldPath { + if x != nil { + return x.Field + } + return nil +} + +func (x *Violation) GetRule() *FieldPath { + if x != nil { + return x.Rule + } + return nil +} + +// Deprecated: Marked as deprecated in buf/validate/validate.proto. +func (x *Violation) GetFieldPath() string { + if x != nil && x.FieldPath != nil { + return *x.FieldPath + } + return "" +} + +func (x *Violation) GetConstraintId() string { + if x != nil && x.ConstraintId != nil { + return *x.ConstraintId + } + return "" +} + +func (x *Violation) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message + } + return "" +} + +func (x *Violation) GetForKey() bool { + if x != nil && x.ForKey != nil { + return *x.ForKey + } + return false +} + +// `FieldPath` provides a path to a nested protobuf field. +// +// This message provides enough information to render a dotted field path even without protobuf descriptors. +// It also provides enough information to resolve a nested field through unknown wire data. +type FieldPath struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `elements` contains each element of the path, starting from the root and recursing downward. + Elements []*FieldPathElement `protobuf:"bytes,1,rep,name=elements" json:"elements,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FieldPath) Reset() { + *x = FieldPath{} + mi := &file_buf_validate_validate_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FieldPath) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldPath) ProtoMessage() {} + +func (x *FieldPath) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldPath.ProtoReflect.Descriptor instead. +func (*FieldPath) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{28} +} + +func (x *FieldPath) GetElements() []*FieldPathElement { + if x != nil { + return x.Elements + } + return nil +} + +// `FieldPathElement` provides enough information to nest through a single protobuf field. +// +// If the selected field is a map or repeated field, the `subscript` value selects a specific element from it. +// A path that refers to a value nested under a map key or repeated field index will have a `subscript` value. +// The `field_type` field allows unambiguous resolution of a field even if descriptors are not available. +type FieldPathElement struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `field_number` is the field number this path element refers to. + FieldNumber *int32 `protobuf:"varint,1,opt,name=field_number,json=fieldNumber" json:"field_number,omitempty"` + // `field_name` contains the field name this path element refers to. + // This can be used to display a human-readable path even if the field number is unknown. + FieldName *string `protobuf:"bytes,2,opt,name=field_name,json=fieldName" json:"field_name,omitempty"` + // `field_type` specifies the type of this field. When using reflection, this value is not needed. + // + // This value is provided to make it possible to traverse unknown fields through wire data. + // When traversing wire data, be mindful of both packed[1] and delimited[2] encoding schemes. + // + // N.B.: Although groups are deprecated, the corresponding delimited encoding scheme is not, and + // can be explicitly used in Protocol Buffers 2023 Edition. + // + // [1]: https://protobuf.dev/programming-guides/encoding/#packed + // [2]: https://protobuf.dev/programming-guides/encoding/#groups + FieldType *descriptorpb.FieldDescriptorProto_Type `protobuf:"varint,3,opt,name=field_type,json=fieldType,enum=google.protobuf.FieldDescriptorProto_Type" json:"field_type,omitempty"` + // `key_type` specifies the map key type of this field. This value is useful when traversing + // unknown fields through wire data: specifically, it allows handling the differences between + // different integer encodings. + KeyType *descriptorpb.FieldDescriptorProto_Type `protobuf:"varint,4,opt,name=key_type,json=keyType,enum=google.protobuf.FieldDescriptorProto_Type" json:"key_type,omitempty"` + // `value_type` specifies map value type of this field. This is useful if you want to display a + // value inside unknown fields through wire data. + ValueType *descriptorpb.FieldDescriptorProto_Type `protobuf:"varint,5,opt,name=value_type,json=valueType,enum=google.protobuf.FieldDescriptorProto_Type" json:"value_type,omitempty"` + // `subscript` contains a repeated index or map key, if this path element nests into a repeated or map field. + // + // Types that are valid to be assigned to Subscript: + // + // *FieldPathElement_Index + // *FieldPathElement_BoolKey + // *FieldPathElement_IntKey + // *FieldPathElement_UintKey + // *FieldPathElement_StringKey + Subscript isFieldPathElement_Subscript `protobuf_oneof:"subscript"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FieldPathElement) Reset() { + *x = FieldPathElement{} + mi := &file_buf_validate_validate_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FieldPathElement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldPathElement) ProtoMessage() {} + +func (x *FieldPathElement) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldPathElement.ProtoReflect.Descriptor instead. +func (*FieldPathElement) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{29} +} + +func (x *FieldPathElement) GetFieldNumber() int32 { + if x != nil && x.FieldNumber != nil { + return *x.FieldNumber + } + return 0 +} + +func (x *FieldPathElement) GetFieldName() string { + if x != nil && x.FieldName != nil { + return *x.FieldName + } + return "" +} + +func (x *FieldPathElement) GetFieldType() descriptorpb.FieldDescriptorProto_Type { + if x != nil && x.FieldType != nil { + return *x.FieldType + } + return descriptorpb.FieldDescriptorProto_Type(1) +} + +func (x *FieldPathElement) GetKeyType() descriptorpb.FieldDescriptorProto_Type { + if x != nil && x.KeyType != nil { + return *x.KeyType + } + return descriptorpb.FieldDescriptorProto_Type(1) +} + +func (x *FieldPathElement) GetValueType() descriptorpb.FieldDescriptorProto_Type { + if x != nil && x.ValueType != nil { + return *x.ValueType + } + return descriptorpb.FieldDescriptorProto_Type(1) +} + +func (x *FieldPathElement) GetSubscript() isFieldPathElement_Subscript { + if x != nil { + return x.Subscript + } + return nil +} + +func (x *FieldPathElement) GetIndex() uint64 { + if x != nil { + if x, ok := x.Subscript.(*FieldPathElement_Index); ok { + return x.Index + } + } + return 0 +} + +func (x *FieldPathElement) GetBoolKey() bool { + if x != nil { + if x, ok := x.Subscript.(*FieldPathElement_BoolKey); ok { + return x.BoolKey + } + } + return false +} + +func (x *FieldPathElement) GetIntKey() int64 { + if x != nil { + if x, ok := x.Subscript.(*FieldPathElement_IntKey); ok { + return x.IntKey + } + } + return 0 +} + +func (x *FieldPathElement) GetUintKey() uint64 { + if x != nil { + if x, ok := x.Subscript.(*FieldPathElement_UintKey); ok { + return x.UintKey + } + } + return 0 +} + +func (x *FieldPathElement) GetStringKey() string { + if x != nil { + if x, ok := x.Subscript.(*FieldPathElement_StringKey); ok { + return x.StringKey + } + } + return "" +} + +type isFieldPathElement_Subscript interface { + isFieldPathElement_Subscript() +} + +type FieldPathElement_Index struct { + // `index` specifies a 0-based index into a repeated field. + Index uint64 `protobuf:"varint,6,opt,name=index,oneof"` +} + +type FieldPathElement_BoolKey struct { + // `bool_key` specifies a map key of type bool. + BoolKey bool `protobuf:"varint,7,opt,name=bool_key,json=boolKey,oneof"` +} + +type FieldPathElement_IntKey struct { + // `int_key` specifies a map key of type int32, int64, sint32, sint64, sfixed32 or sfixed64. + IntKey int64 `protobuf:"varint,8,opt,name=int_key,json=intKey,oneof"` +} + +type FieldPathElement_UintKey struct { + // `uint_key` specifies a map key of type uint32, uint64, fixed32 or fixed64. + UintKey uint64 `protobuf:"varint,9,opt,name=uint_key,json=uintKey,oneof"` +} + +type FieldPathElement_StringKey struct { + // `string_key` specifies a map key of type string. + StringKey string `protobuf:"bytes,10,opt,name=string_key,json=stringKey,oneof"` +} + +func (*FieldPathElement_Index) isFieldPathElement_Subscript() {} + +func (*FieldPathElement_BoolKey) isFieldPathElement_Subscript() {} + +func (*FieldPathElement_IntKey) isFieldPathElement_Subscript() {} + +func (*FieldPathElement_UintKey) isFieldPathElement_Subscript() {} + +func (*FieldPathElement_StringKey) isFieldPathElement_Subscript() {} + +var file_buf_validate_validate_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*MessageConstraints)(nil), + Field: 1159, + Name: "buf.validate.message", + Tag: "bytes,1159,opt,name=message", + Filename: "buf/validate/validate.proto", + }, + { + ExtendedType: (*descriptorpb.OneofOptions)(nil), + ExtensionType: (*OneofConstraints)(nil), + Field: 1159, + Name: "buf.validate.oneof", + Tag: "bytes,1159,opt,name=oneof", + Filename: "buf/validate/validate.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*FieldConstraints)(nil), + Field: 1159, + Name: "buf.validate.field", + Tag: "bytes,1159,opt,name=field", + Filename: "buf/validate/validate.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*PredefinedConstraints)(nil), + Field: 1160, + Name: "buf.validate.predefined", + Tag: "bytes,1160,opt,name=predefined", + Filename: "buf/validate/validate.proto", + }, +} + +// Extension fields to descriptorpb.MessageOptions. +var ( + // Rules specify the validations to be performed on this message. By default, + // no validation is performed against a message. + // + // optional buf.validate.MessageConstraints message = 1159; + E_Message = &file_buf_validate_validate_proto_extTypes[0] +) + +// Extension fields to descriptorpb.OneofOptions. +var ( + // Rules specify the validations to be performed on this oneof. By default, + // no validation is performed against a oneof. + // + // optional buf.validate.OneofConstraints oneof = 1159; + E_Oneof = &file_buf_validate_validate_proto_extTypes[1] +) + +// Extension fields to descriptorpb.FieldOptions. +var ( + // Rules specify the validations to be performed on this field. By default, + // no validation is performed against a field. + // + // optional buf.validate.FieldConstraints field = 1159; + E_Field = &file_buf_validate_validate_proto_extTypes[2] + // Specifies predefined rules. When extending a standard constraint message, + // this adds additional CEL expressions that apply when the extension is used. + // + // ```proto + // + // extend buf.validate.Int32Rules { + // bool is_zero [(buf.validate.predefined).cel = { + // id: "int32.is_zero", + // message: "value must be zero", + // expression: "!rule || this == 0", + // }]; + // } + // + // message Foo { + // int32 reserved = 1 [(buf.validate.field).int32.(is_zero) = true]; + // } + // + // ``` + // + // optional buf.validate.PredefinedConstraints predefined = 1160; + E_Predefined = &file_buf_validate_validate_proto_extTypes[3] +) + +var File_buf_validate_validate_proto protoreflect.FileDescriptor + +var file_buf_validate_validate_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x62, + 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x1a, 0x20, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x56, + 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 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, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5c, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x03, 0x63, 0x65, 0x6c, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, + 0x03, 0x63, 0x65, 0x6c, 0x22, 0x2e, 0x0a, 0x10, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x43, 0x6f, 0x6e, + 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x64, 0x22, 0xab, 0x0a, 0x0a, 0x10, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, + 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2a, 0x0a, 0x03, 0x63, 0x65, 0x6c, + 0x18, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, + 0x52, 0x03, 0x63, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x18, 0x1b, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x14, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x52, 0x06, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, + 0x30, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x6c, + 0x6f, 0x61, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, + 0x74, 0x12, 0x33, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, + 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, + 0x00, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x30, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, + 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, + 0x73, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x33, 0x0a, 0x06, 0x75, 0x69, + 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x75, 0x66, + 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, + 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, + 0x33, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x55, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x75, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x53, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, + 0x00, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x69, 0x6e, + 0x74, 0x36, 0x34, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x75, 0x66, 0x2e, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, + 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x36, + 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, + 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x07, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x36, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, + 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x39, + 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x53, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, + 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x39, 0x0a, 0x08, 0x73, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x75, + 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x46, 0x69, 0x78, 0x65, + 0x64, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x36, 0x34, 0x12, 0x2d, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x04, 0x62, + 0x6f, 0x6f, 0x6c, 0x12, 0x33, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, + 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x75, 0x6c, 0x65, + 0x73, 0x48, 0x00, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x04, 0x65, 0x6e, + 0x75, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, + 0x73, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x39, 0x0a, 0x08, 0x72, 0x65, 0x70, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x75, + 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x13, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x4d, 0x61, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, + 0x12, 0x2a, 0x0a, 0x03, 0x61, 0x6e, 0x79, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x6e, 0x79, + 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x12, 0x39, 0x0a, 0x08, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x75, 0x66, + 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, + 0x18, 0x18, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x73, 0x6b, 0x69, 0x70, + 0x70, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x69, + 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x22, 0x43, 0x0a, 0x15, 0x50, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, + 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x2a, 0x0a, 0x03, 0x63, + 0x65, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, + 0x6e, 0x74, 0x52, 0x03, 0x63, 0x65, 0x6c, 0x22, 0xea, 0x17, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x61, + 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x70, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x02, 0x42, 0x5a, 0xc2, 0x48, 0x57, 0x0a, 0x55, 0x0a, 0x0b, 0x66, 0x6c, + 0x6f, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x1a, 0x46, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x21, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x65, 0x71, 0x75, + 0x61, 0x6c, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0xa3, 0x01, 0x0a, 0x02, 0x6c, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x02, 0x42, 0x90, 0x01, 0xc2, 0x48, 0x8c, 0x01, 0x0a, 0x89, 0x01, 0x0a, + 0x08, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2e, 0x6c, 0x74, 0x1a, 0x7d, 0x21, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x02, 0x6c, 0x74, 0x12, 0xb4, + 0x01, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x42, 0x9f, 0x01, 0xc2, + 0x48, 0x9b, 0x01, 0x0a, 0x98, 0x01, 0x0a, 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2e, 0x6c, 0x74, + 0x65, 0x1a, 0x8a, 0x01, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, + 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, + 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0xf3, 0x07, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x02, 0x42, 0xe0, 0x07, 0xc2, 0x48, 0xdc, 0x07, 0x0a, 0x8d, 0x01, 0x0a, 0x08, 0x66, 0x6c, + 0x6f, 0x61, 0x74, 0x2e, 0x67, 0x74, 0x1a, 0x80, 0x01, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, + 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, + 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, + 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, + 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xc3, 0x01, 0x0a, 0x0b, 0x66, 0x6c, + 0x6f, 0x61, 0x74, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x1a, 0xb3, 0x01, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, + 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, + 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, + 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, + 0xcd, 0x01, 0x0a, 0x15, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x5f, + 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xb3, 0x01, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, + 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, + 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, + 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x29, 0x3f, 0x20, 0x27, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, + 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, + 0xd3, 0x01, 0x0a, 0x0c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x65, + 0x1a, 0xc2, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, + 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3e, + 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, + 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, + 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, + 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, + 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, + 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, + 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, + 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xdd, 0x01, 0x0a, 0x16, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2e, + 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, + 0x1a, 0xc2, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, + 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, + 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x28, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x29, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, + 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, + 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, + 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, + 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, + 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, 0x52, 0x02, 0x67, 0x74, 0x12, 0xbf, 0x08, 0x0a, 0x03, + 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x42, 0xaa, 0x08, 0xc2, 0x48, 0xa6, 0x08, + 0x0a, 0x9b, 0x01, 0x0a, 0x09, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2e, 0x67, 0x74, 0x65, 0x1a, 0x8d, + 0x01, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, + 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xd2, + 0x01, 0x0a, 0x0c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x1a, + 0xc1, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, + 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, + 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, + 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x0a, 0xdc, 0x01, 0x0a, 0x16, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2e, 0x67, 0x74, + 0x65, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xc1, + 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, + 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, + 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, + 0x29, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, + 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, + 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, + 0x27, 0x27, 0x0a, 0xe2, 0x01, 0x0a, 0x0d, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2e, 0x67, 0x74, 0x65, + 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xd0, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, + 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, + 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, + 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, + 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, + 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, + 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xec, 0x01, 0x0a, 0x17, 0x66, 0x6c, 0x6f, 0x61, + 0x74, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, + 0x69, 0x76, 0x65, 0x1a, 0xd0, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, + 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, + 0x7c, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, + 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, + 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, + 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, + 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x79, 0x0a, + 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x02, 0x42, 0x69, 0xc2, 0x48, 0x66, 0x0a, 0x64, + 0x0a, 0x08, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2e, 0x69, 0x6e, 0x1a, 0x58, 0x21, 0x28, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, + 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, + 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x64, 0x79, 0x6e, + 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x5d, 0x29, 0x20, + 0x3a, 0x20, 0x27, 0x27, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x7d, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, + 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x02, 0x42, 0x66, 0xc2, 0x48, 0x63, 0x0a, 0x61, 0x0a, + 0x0c, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x1a, 0x51, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, + 0x5f, 0x69, 0x6e, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, + 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, + 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, + 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x7d, 0x0a, 0x06, 0x66, 0x69, 0x6e, 0x69, 0x74, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x42, 0x65, 0xc2, 0x48, 0x62, 0x0a, 0x60, 0x0a, 0x0c, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x1a, 0x50, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x20, 0x3f, 0x20, 0x28, 0x74, 0x68, + 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, 0x6e, 0x66, 0x28, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x65, 0x27, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x06, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x02, 0x42, 0x1a, 0xc2, 0x48, 0x17, 0x0a, 0x15, 0x0a, 0x0d, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x1a, 0x04, 0x74, + 0x72, 0x75, 0x65, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2a, 0x09, 0x08, 0xe8, + 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x65, 0x73, 0x73, 0x5f, + 0x74, 0x68, 0x61, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x5f, + 0x74, 0x68, 0x61, 0x6e, 0x22, 0xfc, 0x17, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, + 0x75, 0x6c, 0x65, 0x73, 0x12, 0x71, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x01, 0x42, 0x5b, 0xc2, 0x48, 0x58, 0x0a, 0x56, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, + 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x1a, 0x46, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, + 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x3f, 0x20, + 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x65, 0x71, 0x75, 0x61, + 0x6c, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, + 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0xa4, 0x01, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x01, 0x42, 0x91, 0x01, 0xc2, 0x48, 0x8d, 0x01, 0x0a, 0x8a, 0x01, 0x0a, 0x09, + 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x2e, 0x6c, 0x74, 0x1a, 0x7d, 0x21, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x02, 0x6c, 0x74, 0x12, 0xb5, + 0x01, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x42, 0xa0, 0x01, 0xc2, + 0x48, 0x9c, 0x01, 0x0a, 0x99, 0x01, 0x0a, 0x0a, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x2e, 0x6c, + 0x74, 0x65, 0x1a, 0x8a, 0x01, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, + 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, + 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, + 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, + 0x00, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0xf8, 0x07, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x01, 0x42, 0xe5, 0x07, 0xc2, 0x48, 0xe1, 0x07, 0x0a, 0x8e, 0x01, 0x0a, 0x09, 0x64, + 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x2e, 0x67, 0x74, 0x1a, 0x80, 0x01, 0x21, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, + 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, + 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xc4, 0x01, 0x0a, 0x0c, + 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x1a, 0xb3, 0x01, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, + 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, + 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, + 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, + 0x27, 0x27, 0x0a, 0xce, 0x01, 0x0a, 0x16, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x2e, 0x67, 0x74, + 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xb3, 0x01, + 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, + 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x29, + 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, + 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, + 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, + 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x0a, 0xd4, 0x01, 0x0a, 0x0d, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x2e, 0x67, + 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xc2, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, + 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, + 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, + 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, + 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xde, 0x01, 0x0a, 0x17, 0x64, + 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xc2, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, + 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, + 0x20, 0x7c, 0x7c, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, + 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, + 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, + 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, 0x52, 0x02, 0x67, + 0x74, 0x12, 0xc4, 0x08, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x42, + 0xaf, 0x08, 0xc2, 0x48, 0xab, 0x08, 0x0a, 0x9c, 0x01, 0x0a, 0x0a, 0x64, 0x6f, 0x75, 0x62, 0x6c, + 0x65, 0x2e, 0x67, 0x74, 0x65, 0x1a, 0x8d, 0x01, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, + 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, + 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x5d, 0x29, + 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xd3, 0x01, 0x0a, 0x0d, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, + 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x1a, 0xc1, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, + 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, + 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, + 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, + 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xdd, 0x01, 0x0a, 0x17, + 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, + 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xc1, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, + 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, + 0x20, 0x7c, 0x7c, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x3d, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, + 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, + 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xe3, 0x01, 0x0a, 0x0e, + 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xd0, + 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, + 0x69, 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, + 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, + 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, + 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, + 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x0a, 0xed, 0x01, 0x0a, 0x18, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x2e, 0x67, 0x74, 0x65, + 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xd0, + 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, + 0x73, 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, + 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x29, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, + 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, + 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, + 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, + 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x48, 0x01, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x7a, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x01, 0x42, 0x6a, 0xc2, 0x48, 0x67, 0x0a, 0x65, 0x0a, 0x09, 0x64, 0x6f, 0x75, + 0x62, 0x6c, 0x65, 0x2e, 0x69, 0x6e, 0x1a, 0x58, 0x21, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, + 0x6e, 0x20, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, + 0x27, 0x5d, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, + 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, + 0x52, 0x02, 0x69, 0x6e, 0x12, 0x7e, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x01, 0x42, 0x67, 0xc2, 0x48, 0x64, 0x0a, 0x62, 0x0a, 0x0d, 0x64, 0x6f, 0x75, + 0x62, 0x6c, 0x65, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x1a, 0x51, 0x74, 0x68, 0x69, 0x73, + 0x20, 0x69, 0x6e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, + 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6e, + 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, + 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x6e, + 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x7e, 0x0a, 0x06, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x08, 0x42, 0x66, 0xc2, 0x48, 0x63, 0x0a, 0x61, 0x0a, 0x0d, 0x64, 0x6f, 0x75, + 0x62, 0x6c, 0x65, 0x2e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x1a, 0x50, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x20, 0x3f, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, + 0x2e, 0x69, 0x73, 0x4e, 0x61, 0x6e, 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, + 0x2e, 0x69, 0x73, 0x49, 0x6e, 0x66, 0x28, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, + 0x27, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x06, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, + 0x09, 0x20, 0x03, 0x28, 0x01, 0x42, 0x1b, 0xc2, 0x48, 0x18, 0x0a, 0x16, 0x0a, 0x0e, 0x64, 0x6f, + 0x75, 0x62, 0x6c, 0x65, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x1a, 0x04, 0x74, 0x72, + 0x75, 0x65, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2a, 0x09, 0x08, 0xe8, 0x07, + 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, + 0x68, 0x61, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x74, + 0x68, 0x61, 0x6e, 0x22, 0x94, 0x15, 0x0a, 0x0a, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, + 0x65, 0x73, 0x12, 0x70, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x42, 0x5a, 0xc2, 0x48, 0x57, 0x0a, 0x55, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x1a, 0x46, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x25, + 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x63, + 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x8e, 0x01, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x42, 0x7c, 0xc2, 0x48, 0x79, 0x0a, 0x77, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, + 0x6c, 0x74, 0x1a, 0x6b, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, + 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, + 0x00, 0x52, 0x02, 0x6c, 0x74, 0x12, 0xa1, 0x01, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x42, 0x8c, 0x01, 0xc2, 0x48, 0x88, 0x01, 0x0a, 0x85, 0x01, 0x0a, 0x09, 0x69, + 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x6c, 0x74, 0x65, 0x1a, 0x78, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, + 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, + 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, + 0x27, 0x27, 0x48, 0x00, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x9b, 0x07, 0x0a, 0x02, 0x67, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x42, 0x88, 0x07, 0xc2, 0x48, 0x84, 0x07, 0x0a, 0x7a, 0x0a, + 0x08, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x1a, 0x6e, 0x21, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, + 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, + 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, + 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xb3, 0x01, 0x0a, 0x0b, 0x69, 0x6e, + 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x1a, 0xa3, 0x01, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, + 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, + 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, + 0xbb, 0x01, 0x0a, 0x15, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x5f, + 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xa1, 0x01, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x3d, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, + 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xc3, 0x01, + 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xb2, + 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, + 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, + 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x0a, 0xcb, 0x01, 0x0a, 0x16, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, + 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xb0, + 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, + 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, + 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, + 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x48, 0x01, 0x52, 0x02, 0x67, 0x74, 0x12, 0xe8, 0x07, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x05, 0x42, 0xd3, 0x07, 0xc2, 0x48, 0xcf, 0x07, 0x0a, 0x88, 0x01, 0x0a, + 0x09, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, 0x1a, 0x7b, 0x21, 0x68, 0x61, 0x73, + 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, + 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, + 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, + 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xc2, 0x01, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x33, + 0x32, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x1a, 0xb1, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, + 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xca, 0x01, 0x0a, + 0x16, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, + 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xaf, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, + 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, + 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, + 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xd2, 0x01, 0x0a, 0x0d, 0x69, 0x6e, + 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xc0, 0x01, 0x68, 0x61, + 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, + 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, + 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, + 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, + 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, + 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xda, + 0x01, 0x0a, 0x17, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, + 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xbe, 0x01, 0x68, 0x61, 0x73, + 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, + 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, + 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, + 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, + 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, 0x52, 0x03, 0x67, + 0x74, 0x65, 0x12, 0x79, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x42, 0x69, + 0xc2, 0x48, 0x66, 0x0a, 0x64, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x69, 0x6e, 0x1a, + 0x58, 0x21, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x64, 0x79, 0x6e, 0x28, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x29, 0x20, 0x3f, 0x20, 0x27, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, + 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x28, 0x5b, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, + 0x27, 0x5d, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x7d, 0x0a, + 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x05, 0x42, 0x66, 0xc2, + 0x48, 0x63, 0x0a, 0x61, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, + 0x69, 0x6e, 0x1a, 0x51, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, + 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x5d, 0x29, + 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x34, 0x0a, 0x07, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x05, 0x42, 0x1a, 0xc2, + 0x48, 0x17, 0x0a, 0x15, 0x0a, 0x0d, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x1a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x42, 0x0b, 0x0a, + 0x09, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x67, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x22, 0x94, 0x15, 0x0a, 0x0a, 0x49, + 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x70, 0x0a, 0x05, 0x63, 0x6f, 0x6e, + 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x5a, 0xc2, 0x48, 0x57, 0x0a, 0x55, 0x0a, + 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x1a, 0x46, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x74, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5d, 0x29, 0x20, + 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x8e, 0x01, 0x0a, 0x02, + 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x7c, 0xc2, 0x48, 0x79, 0x0a, 0x77, 0x0a, + 0x08, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x6c, 0x74, 0x1a, 0x6b, 0x21, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, + 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, + 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x02, 0x6c, 0x74, 0x12, 0xa1, 0x01, 0x0a, + 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x8c, 0x01, 0xc2, 0x48, 0x88, + 0x01, 0x0a, 0x85, 0x01, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x6c, 0x74, 0x65, 0x1a, + 0x78, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, + 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, + 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, + 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x03, 0x6c, 0x74, 0x65, + 0x12, 0x9b, 0x07, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x88, 0x07, + 0xc2, 0x48, 0x84, 0x07, 0x0a, 0x7a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, + 0x1a, 0x6e, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, + 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, + 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, + 0x0a, 0xb3, 0x01, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, + 0x1a, 0xa3, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, + 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, + 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, + 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, + 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xbb, 0x01, 0x0a, 0x15, 0x69, 0x6e, 0x74, 0x36, 0x34, + 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, + 0x1a, 0xa1, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, + 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, + 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, + 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, + 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, + 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xc3, 0x01, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, + 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xb2, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, + 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, + 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, + 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xcb, 0x01, 0x0a, 0x16, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, + 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xb0, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, + 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, 0x52, 0x02, 0x67, 0x74, 0x12, 0xe8, + 0x07, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0xd3, 0x07, 0xc2, + 0x48, 0xcf, 0x07, 0x0a, 0x88, 0x01, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, + 0x65, 0x1a, 0x7b, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xc2, + 0x01, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x1a, + 0xb1, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, + 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, + 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x0a, 0xca, 0x01, 0x0a, 0x16, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, + 0x65, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xaf, + 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, + 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, + 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, + 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, + 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, + 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, + 0x0a, 0xd2, 0x01, 0x0a, 0x0d, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, + 0x74, 0x65, 0x1a, 0xc0, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, + 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, + 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, + 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, + 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, + 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, + 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xda, 0x01, 0x0a, 0x17, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, + 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, + 0x65, 0x1a, 0xbe, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, + 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, 0x68, 0x69, 0x73, + 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, + 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, + 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, + 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, + 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, + 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, + 0x27, 0x27, 0x48, 0x01, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x79, 0x0a, 0x02, 0x69, 0x6e, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x03, 0x42, 0x69, 0xc2, 0x48, 0x66, 0x0a, 0x64, 0x0a, 0x08, 0x69, 0x6e, + 0x74, 0x36, 0x34, 0x2e, 0x69, 0x6e, 0x1a, 0x58, 0x21, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, + 0x6e, 0x20, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, + 0x27, 0x5d, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, + 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, + 0x52, 0x02, 0x69, 0x6e, 0x12, 0x7d, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x03, 0x42, 0x66, 0xc2, 0x48, 0x63, 0x0a, 0x61, 0x0a, 0x0c, 0x69, 0x6e, 0x74, + 0x36, 0x34, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x1a, 0x51, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x69, 0x6e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x20, + 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6e, 0x6f, + 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, + 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x6e, 0x6f, + 0x74, 0x49, 0x6e, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x09, + 0x20, 0x03, 0x28, 0x03, 0x42, 0x1a, 0xc2, 0x48, 0x17, 0x0a, 0x15, 0x0a, 0x0d, 0x69, 0x6e, 0x74, + 0x36, 0x34, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x1a, 0x04, 0x74, 0x72, 0x75, 0x65, + 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, + 0x80, 0x80, 0x80, 0x02, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x68, 0x61, + 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, + 0x6e, 0x22, 0xa5, 0x15, 0x0a, 0x0b, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, + 0x73, 0x12, 0x71, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x42, 0x5b, 0xc2, 0x48, 0x58, 0x0a, 0x56, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x1a, 0x46, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x25, + 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x63, + 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x8f, 0x01, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x42, 0x7d, 0xc2, 0x48, 0x7a, 0x0a, 0x78, 0x0a, 0x09, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, + 0x2e, 0x6c, 0x74, 0x1a, 0x6b, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, + 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, + 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, + 0x48, 0x00, 0x52, 0x02, 0x6c, 0x74, 0x12, 0xa2, 0x01, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0d, 0x42, 0x8d, 0x01, 0xc2, 0x48, 0x89, 0x01, 0x0a, 0x86, 0x01, 0x0a, 0x0a, + 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x6c, 0x74, 0x65, 0x1a, 0x78, 0x21, 0x68, 0x61, 0x73, + 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, + 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, + 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, + 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, + 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0xa0, 0x07, 0x0a, 0x02, + 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x8d, 0x07, 0xc2, 0x48, 0x89, 0x07, 0x0a, + 0x7b, 0x0a, 0x09, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x1a, 0x6e, 0x21, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, + 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xb4, 0x01, 0x0a, + 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x1a, 0xa3, 0x01, + 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, + 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, + 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, + 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x0a, 0xbc, 0x01, 0x0a, 0x16, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, + 0x74, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xa1, + 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, + 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, + 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, + 0x27, 0x27, 0x0a, 0xc4, 0x01, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, + 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xb2, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, + 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, + 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, + 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xcc, 0x01, 0x0a, 0x17, 0x75, 0x69, + 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, + 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xb0, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, + 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, 0x52, 0x02, 0x67, 0x74, 0x12, 0xed, + 0x07, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x42, 0xd8, 0x07, 0xc2, + 0x48, 0xd4, 0x07, 0x0a, 0x89, 0x01, 0x0a, 0x0a, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, + 0x74, 0x65, 0x1a, 0x7b, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, + 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, + 0xc3, 0x01, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, + 0x74, 0x1a, 0xb1, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, + 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, + 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, + 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, + 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, + 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, + 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xcb, 0x01, 0x0a, 0x17, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, + 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, + 0x65, 0x1a, 0xaf, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, + 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, + 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, + 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x0a, 0xd3, 0x01, 0x0a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, + 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xc0, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, + 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xdb, 0x01, 0x0a, 0x18, 0x75, 0x69, + 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xbe, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, + 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, + 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, + 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, + 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, + 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x7a, + 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x6a, 0xc2, 0x48, 0x67, 0x0a, + 0x65, 0x0a, 0x09, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x69, 0x6e, 0x1a, 0x58, 0x21, 0x28, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, + 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x64, + 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x5d, + 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x7e, 0x0a, 0x06, 0x6e, 0x6f, + 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x67, 0xc2, 0x48, 0x64, 0x0a, + 0x62, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, + 0x1a, 0x51, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, + 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x35, 0x0a, 0x07, 0x65, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x1b, 0xc2, 0x48, 0x18, + 0x0a, 0x16, 0x0a, 0x0e, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x1a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x42, 0x0b, 0x0a, 0x09, + 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x67, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x22, 0xa5, 0x15, 0x0a, 0x0b, 0x55, 0x49, + 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x71, 0x0a, 0x05, 0x63, 0x6f, 0x6e, + 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x5b, 0xc2, 0x48, 0x58, 0x0a, 0x56, 0x0a, + 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x1a, 0x46, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, + 0x73, 0x74, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5d, 0x29, + 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x8f, 0x01, 0x0a, + 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x7d, 0xc2, 0x48, 0x7a, 0x0a, 0x78, + 0x0a, 0x09, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x6c, 0x74, 0x1a, 0x6b, 0x21, 0x68, 0x61, + 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, + 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x02, 0x6c, 0x74, 0x12, 0xa2, + 0x01, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x8d, 0x01, 0xc2, + 0x48, 0x89, 0x01, 0x0a, 0x86, 0x01, 0x0a, 0x0a, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x6c, + 0x74, 0x65, 0x1a, 0x78, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, + 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, + 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x03, + 0x6c, 0x74, 0x65, 0x12, 0xa0, 0x07, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, + 0x42, 0x8d, 0x07, 0xc2, 0x48, 0x89, 0x07, 0x0a, 0x7b, 0x0a, 0x09, 0x75, 0x69, 0x6e, 0x74, 0x36, + 0x34, 0x2e, 0x67, 0x74, 0x1a, 0x6e, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x5d, 0x29, 0x20, + 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xb4, 0x01, 0x0a, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, + 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x1a, 0xa3, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, + 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xbc, 0x01, 0x0a, 0x16, + 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xa1, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, + 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, + 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xc4, 0x01, 0x0a, 0x0d, 0x75, + 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xb2, 0x01, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, + 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, + 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, + 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, + 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x0a, 0xcc, 0x01, 0x0a, 0x17, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x5f, + 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xb0, 0x01, + 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, + 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, + 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, + 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, + 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, + 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, + 0x48, 0x01, 0x52, 0x02, 0x67, 0x74, 0x12, 0xed, 0x07, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x04, 0x42, 0xd8, 0x07, 0xc2, 0x48, 0xd4, 0x07, 0x0a, 0x89, 0x01, 0x0a, 0x0a, + 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x65, 0x1a, 0x7b, 0x21, 0x68, 0x61, 0x73, + 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, + 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, + 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, + 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xc3, 0x01, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, + 0x36, 0x34, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x1a, 0xb1, 0x01, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, + 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, + 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xcb, 0x01, + 0x0a, 0x17, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x5f, + 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xaf, 0x01, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, + 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, + 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, + 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xd3, 0x01, 0x0a, 0x0e, + 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xc0, + 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, + 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, + 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, + 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, + 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x0a, 0xdb, 0x01, 0x0a, 0x18, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x65, + 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xbe, + 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, + 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, + 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, + 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, + 0x01, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x7a, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x04, 0x42, 0x6a, 0xc2, 0x48, 0x67, 0x0a, 0x65, 0x0a, 0x09, 0x75, 0x69, 0x6e, 0x74, 0x36, + 0x34, 0x2e, 0x69, 0x6e, 0x1a, 0x58, 0x21, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, + 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, + 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x02, + 0x69, 0x6e, 0x12, 0x7e, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x04, 0x42, 0x67, 0xc2, 0x48, 0x64, 0x0a, 0x62, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x36, + 0x34, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x1a, 0x51, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, + 0x6e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x20, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6e, 0x6f, 0x74, + 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, + 0x74, 0x5f, 0x69, 0x6e, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x6e, 0x6f, 0x74, + 0x49, 0x6e, 0x12, 0x35, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x04, 0x42, 0x1b, 0xc2, 0x48, 0x18, 0x0a, 0x16, 0x0a, 0x0e, 0x75, 0x69, 0x6e, 0x74, + 0x36, 0x34, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x1a, 0x04, 0x74, 0x72, 0x75, 0x65, + 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, + 0x80, 0x80, 0x80, 0x02, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x68, 0x61, + 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, + 0x6e, 0x22, 0xa5, 0x15, 0x0a, 0x0b, 0x53, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, + 0x73, 0x12, 0x71, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x11, + 0x42, 0x5b, 0xc2, 0x48, 0x58, 0x0a, 0x56, 0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x1a, 0x46, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x25, + 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x63, + 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x8f, 0x01, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x11, 0x42, 0x7d, 0xc2, 0x48, 0x7a, 0x0a, 0x78, 0x0a, 0x09, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, + 0x2e, 0x6c, 0x74, 0x1a, 0x6b, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, + 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, + 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, + 0x48, 0x00, 0x52, 0x02, 0x6c, 0x74, 0x12, 0xa2, 0x01, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x11, 0x42, 0x8d, 0x01, 0xc2, 0x48, 0x89, 0x01, 0x0a, 0x86, 0x01, 0x0a, 0x0a, + 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x6c, 0x74, 0x65, 0x1a, 0x78, 0x21, 0x68, 0x61, 0x73, + 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, + 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, + 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, + 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, + 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0xa0, 0x07, 0x0a, 0x02, + 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x11, 0x42, 0x8d, 0x07, 0xc2, 0x48, 0x89, 0x07, 0x0a, + 0x7b, 0x0a, 0x09, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x1a, 0x6e, 0x21, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, + 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xb4, 0x01, 0x0a, + 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x1a, 0xa3, 0x01, + 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, + 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, + 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, + 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x0a, 0xbc, 0x01, 0x0a, 0x16, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, + 0x74, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xa1, + 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, + 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, + 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, + 0x27, 0x27, 0x0a, 0xc4, 0x01, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, + 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xb2, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, + 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, + 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, + 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xcc, 0x01, 0x0a, 0x17, 0x73, 0x69, + 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, + 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xb0, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, + 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, 0x52, 0x02, 0x67, 0x74, 0x12, 0xed, + 0x07, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x11, 0x42, 0xd8, 0x07, 0xc2, + 0x48, 0xd4, 0x07, 0x0a, 0x89, 0x01, 0x0a, 0x0a, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, + 0x74, 0x65, 0x1a, 0x7b, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, + 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, + 0xc3, 0x01, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, + 0x74, 0x1a, 0xb1, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, + 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, + 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, + 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, + 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, + 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, + 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xcb, 0x01, 0x0a, 0x17, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, + 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, + 0x65, 0x1a, 0xaf, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, + 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, + 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, + 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x0a, 0xd3, 0x01, 0x0a, 0x0e, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, + 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xc0, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, + 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xdb, 0x01, 0x0a, 0x18, 0x73, 0x69, + 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xbe, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, + 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, + 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, + 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, + 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, + 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x7a, + 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x11, 0x42, 0x6a, 0xc2, 0x48, 0x67, 0x0a, + 0x65, 0x0a, 0x09, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x69, 0x6e, 0x1a, 0x58, 0x21, 0x28, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, + 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x64, + 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x5d, + 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x7e, 0x0a, 0x06, 0x6e, 0x6f, + 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x11, 0x42, 0x67, 0xc2, 0x48, 0x64, 0x0a, + 0x62, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, + 0x1a, 0x51, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, + 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x35, 0x0a, 0x07, 0x65, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x11, 0x42, 0x1b, 0xc2, 0x48, 0x18, + 0x0a, 0x16, 0x0a, 0x0e, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x1a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x42, 0x0b, 0x0a, 0x09, + 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x67, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x22, 0xa5, 0x15, 0x0a, 0x0b, 0x53, 0x49, + 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x71, 0x0a, 0x05, 0x63, 0x6f, 0x6e, + 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x42, 0x5b, 0xc2, 0x48, 0x58, 0x0a, 0x56, 0x0a, + 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x1a, 0x46, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, + 0x73, 0x74, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5d, 0x29, + 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x8f, 0x01, 0x0a, + 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x42, 0x7d, 0xc2, 0x48, 0x7a, 0x0a, 0x78, + 0x0a, 0x09, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x6c, 0x74, 0x1a, 0x6b, 0x21, 0x68, 0x61, + 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, + 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x02, 0x6c, 0x74, 0x12, 0xa2, + 0x01, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x42, 0x8d, 0x01, 0xc2, + 0x48, 0x89, 0x01, 0x0a, 0x86, 0x01, 0x0a, 0x0a, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x6c, + 0x74, 0x65, 0x1a, 0x78, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, + 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, + 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x03, + 0x6c, 0x74, 0x65, 0x12, 0xa0, 0x07, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x12, + 0x42, 0x8d, 0x07, 0xc2, 0x48, 0x89, 0x07, 0x0a, 0x7b, 0x0a, 0x09, 0x73, 0x69, 0x6e, 0x74, 0x36, + 0x34, 0x2e, 0x67, 0x74, 0x1a, 0x6e, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x5d, 0x29, 0x20, + 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xb4, 0x01, 0x0a, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, + 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x1a, 0xa3, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, + 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xbc, 0x01, 0x0a, 0x16, + 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xa1, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, + 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, + 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xc4, 0x01, 0x0a, 0x0d, 0x73, + 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xb2, 0x01, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, + 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, + 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, + 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, + 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x0a, 0xcc, 0x01, 0x0a, 0x17, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x5f, + 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xb0, 0x01, + 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, + 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, + 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, + 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, + 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, + 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, + 0x48, 0x01, 0x52, 0x02, 0x67, 0x74, 0x12, 0xed, 0x07, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x12, 0x42, 0xd8, 0x07, 0xc2, 0x48, 0xd4, 0x07, 0x0a, 0x89, 0x01, 0x0a, 0x0a, + 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x65, 0x1a, 0x7b, 0x21, 0x68, 0x61, 0x73, + 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, + 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, + 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, + 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xc3, 0x01, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, + 0x36, 0x34, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x1a, 0xb1, 0x01, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, + 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, + 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xcb, 0x01, + 0x0a, 0x17, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x5f, + 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xaf, 0x01, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, + 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, + 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, + 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xd3, 0x01, 0x0a, 0x0e, + 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xc0, + 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, + 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, + 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, + 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, + 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x0a, 0xdb, 0x01, 0x0a, 0x18, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x65, + 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xbe, + 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, + 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, + 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, + 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, + 0x01, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x7a, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x12, 0x42, 0x6a, 0xc2, 0x48, 0x67, 0x0a, 0x65, 0x0a, 0x09, 0x73, 0x69, 0x6e, 0x74, 0x36, + 0x34, 0x2e, 0x69, 0x6e, 0x1a, 0x58, 0x21, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, + 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, + 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x02, + 0x69, 0x6e, 0x12, 0x7e, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x12, 0x42, 0x67, 0xc2, 0x48, 0x64, 0x0a, 0x62, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x36, + 0x34, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x1a, 0x51, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, + 0x6e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x20, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6e, 0x6f, 0x74, + 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, + 0x74, 0x5f, 0x69, 0x6e, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x6e, 0x6f, 0x74, + 0x49, 0x6e, 0x12, 0x35, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x12, 0x42, 0x1b, 0xc2, 0x48, 0x18, 0x0a, 0x16, 0x0a, 0x0e, 0x73, 0x69, 0x6e, 0x74, + 0x36, 0x34, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x1a, 0x04, 0x74, 0x72, 0x75, 0x65, + 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, + 0x80, 0x80, 0x80, 0x02, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x68, 0x61, + 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, + 0x6e, 0x22, 0xb6, 0x15, 0x0a, 0x0c, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, + 0x65, 0x73, 0x12, 0x72, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x07, 0x42, 0x5c, 0xc2, 0x48, 0x59, 0x0a, 0x57, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, + 0x32, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x1a, 0x46, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x3f, 0x20, 0x27, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, + 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, + 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x90, 0x01, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x07, 0x42, 0x7e, 0xc2, 0x48, 0x7b, 0x0a, 0x79, 0x0a, 0x0a, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x33, 0x32, 0x2e, 0x6c, 0x74, 0x1a, 0x6b, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x3f, 0x20, 0x27, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, + 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x02, 0x6c, 0x74, 0x12, 0xa3, 0x01, 0x0a, 0x03, 0x6c, 0x74, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x07, 0x42, 0x8e, 0x01, 0xc2, 0x48, 0x8a, 0x01, 0x0a, 0x87, + 0x01, 0x0a, 0x0b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x6c, 0x74, 0x65, 0x1a, 0x78, + 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, + 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, + 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, + 0xa5, 0x07, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x07, 0x42, 0x92, 0x07, 0xc2, + 0x48, 0x8e, 0x07, 0x0a, 0x7c, 0x0a, 0x0a, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x67, + 0x74, 0x1a, 0x6e, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x0a, 0xb5, 0x01, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x67, 0x74, + 0x5f, 0x6c, 0x74, 0x1a, 0xa3, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, + 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, + 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, + 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, + 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xbd, 0x01, 0x0a, 0x17, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, + 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xa1, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, + 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, + 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, + 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, + 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xc5, 0x01, 0x0a, 0x0e, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xb2, 0x01, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, + 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, + 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, + 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, + 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x0a, 0xcd, 0x01, 0x0a, 0x18, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x67, 0x74, + 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xb0, + 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, + 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, + 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, + 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x48, 0x01, 0x52, 0x02, 0x67, 0x74, 0x12, 0xf2, 0x07, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x07, 0x42, 0xdd, 0x07, 0xc2, 0x48, 0xd9, 0x07, 0x0a, 0x8a, 0x01, 0x0a, + 0x0b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, 0x1a, 0x7b, 0x21, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, + 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xc4, 0x01, 0x0a, 0x0e, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x1a, 0xb1, 0x01, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, + 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, + 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, + 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, + 0x0a, 0xcc, 0x01, 0x0a, 0x18, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, + 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xaf, 0x01, + 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, + 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, + 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, + 0xd4, 0x01, 0x0a, 0x0f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, 0x5f, + 0x6c, 0x74, 0x65, 0x1a, 0xc0, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, + 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, + 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, + 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, + 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xdc, 0x01, 0x0a, 0x19, 0x66, 0x69, 0x78, 0x65, 0x64, + 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, + 0x73, 0x69, 0x76, 0x65, 0x1a, 0xbe, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, + 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, + 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, + 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, + 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x7b, 0x0a, 0x02, + 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x07, 0x42, 0x6b, 0xc2, 0x48, 0x68, 0x0a, 0x66, 0x0a, + 0x0a, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x69, 0x6e, 0x1a, 0x58, 0x21, 0x28, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, + 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x64, 0x79, + 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x5d, 0x29, + 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x7f, 0x0a, 0x06, 0x6e, 0x6f, 0x74, + 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x07, 0x42, 0x68, 0xc2, 0x48, 0x65, 0x0a, 0x63, + 0x0a, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, + 0x1a, 0x51, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, + 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x36, 0x0a, 0x07, 0x65, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x07, 0x42, 0x1c, 0xc2, 0x48, 0x19, + 0x0a, 0x17, 0x0a, 0x0f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x1a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x42, 0x0b, 0x0a, + 0x09, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x67, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x22, 0xb6, 0x15, 0x0a, 0x0c, 0x46, + 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x72, 0x0a, 0x05, 0x63, + 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x06, 0x42, 0x5c, 0xc2, 0x48, 0x59, 0x0a, + 0x57, 0x0a, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x1a, 0x46, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, + 0x75, 0x73, 0x74, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, + 0x90, 0x01, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x06, 0x42, 0x7e, 0xc2, 0x48, + 0x7b, 0x0a, 0x79, 0x0a, 0x0a, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x6c, 0x74, 0x1a, + 0x6b, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, + 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, + 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, + 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x02, + 0x6c, 0x74, 0x12, 0xa3, 0x01, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x06, + 0x42, 0x8e, 0x01, 0xc2, 0x48, 0x8a, 0x01, 0x0a, 0x87, 0x01, 0x0a, 0x0b, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x36, 0x34, 0x2e, 0x6c, 0x74, 0x65, 0x1a, 0x78, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, + 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x3f, 0x20, + 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, + 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, + 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, + 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x48, 0x00, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0xa5, 0x07, 0x0a, 0x02, 0x67, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x06, 0x42, 0x92, 0x07, 0xc2, 0x48, 0x8e, 0x07, 0x0a, 0x7c, 0x0a, 0x0a, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x1a, 0x6e, 0x21, 0x68, 0x61, 0x73, + 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, + 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, + 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xb5, 0x01, 0x0a, 0x0d, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x1a, 0xa3, 0x01, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, + 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, + 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, + 0x27, 0x27, 0x0a, 0xbd, 0x01, 0x0a, 0x17, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x67, + 0x74, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xa1, + 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, + 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, + 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, + 0x27, 0x27, 0x0a, 0xc5, 0x01, 0x0a, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x67, + 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xb2, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, + 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, + 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, + 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xcd, 0x01, 0x0a, 0x18, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, + 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xb0, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, + 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, + 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, 0x52, 0x02, 0x67, 0x74, + 0x12, 0xf2, 0x07, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x06, 0x42, 0xdd, + 0x07, 0xc2, 0x48, 0xd9, 0x07, 0x0a, 0x8a, 0x01, 0x0a, 0x0b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, + 0x34, 0x2e, 0x67, 0x74, 0x65, 0x1a, 0x7b, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, + 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x3f, 0x20, 0x27, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, + 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, + 0x27, 0x27, 0x0a, 0xc4, 0x01, 0x0a, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x67, + 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x1a, 0xb1, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, + 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, + 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xcc, 0x01, 0x0a, 0x18, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xaf, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, + 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, + 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xd4, 0x01, 0x0a, 0x0f, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xc0, 0x01, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, + 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, + 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, + 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, + 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, + 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, + 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, + 0xdc, 0x01, 0x0a, 0x19, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x65, 0x5f, + 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xbe, 0x01, + 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, + 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, + 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, + 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, + 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, + 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, + 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, + 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x7b, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x06, 0x42, 0x6b, 0xc2, 0x48, 0x68, 0x0a, 0x66, 0x0a, 0x0a, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, + 0x34, 0x2e, 0x69, 0x6e, 0x1a, 0x58, 0x21, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, + 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, + 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x02, + 0x69, 0x6e, 0x12, 0x7f, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x06, 0x42, 0x68, 0xc2, 0x48, 0x65, 0x0a, 0x63, 0x0a, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, + 0x36, 0x34, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x1a, 0x51, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x69, 0x6e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x20, + 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6e, 0x6f, + 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, + 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x6e, 0x6f, + 0x74, 0x49, 0x6e, 0x12, 0x36, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x06, 0x42, 0x1c, 0xc2, 0x48, 0x19, 0x0a, 0x17, 0x0a, 0x0f, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x36, 0x34, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x1a, 0x04, 0x74, 0x72, + 0x75, 0x65, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2a, 0x09, 0x08, 0xe8, 0x07, + 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, + 0x68, 0x61, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x74, + 0x68, 0x61, 0x6e, 0x22, 0xc8, 0x15, 0x0a, 0x0d, 0x53, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, + 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x73, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0f, 0x42, 0x5d, 0xc2, 0x48, 0x5a, 0x0a, 0x58, 0x0a, 0x0e, 0x73, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x1a, 0x46, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x21, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x65, + 0x71, 0x75, 0x61, 0x6c, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, + 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x02, 0x6c, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0f, 0x42, 0x7f, 0xc2, 0x48, 0x7c, 0x0a, 0x7a, 0x0a, 0x0b, + 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x6c, 0x74, 0x1a, 0x6b, 0x21, 0x68, 0x61, + 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, + 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x02, 0x6c, 0x74, 0x12, 0xa4, + 0x01, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0f, 0x42, 0x8f, 0x01, 0xc2, + 0x48, 0x8b, 0x01, 0x0a, 0x88, 0x01, 0x0a, 0x0c, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, + 0x2e, 0x6c, 0x74, 0x65, 0x1a, 0x78, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, + 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0xaa, 0x07, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0f, 0x42, 0x97, 0x07, 0xc2, 0x48, 0x93, 0x07, 0x0a, 0x7d, 0x0a, 0x0b, 0x73, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x1a, 0x6e, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, + 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xb6, 0x01, 0x0a, 0x0e, 0x73, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x1a, 0xa3, 0x01, 0x68, 0x61, + 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, + 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, + 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x0a, 0xbe, 0x01, 0x0a, 0x18, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x67, + 0x74, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xa1, + 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, + 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, + 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, + 0x27, 0x27, 0x0a, 0xc6, 0x01, 0x0a, 0x0f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, + 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xb2, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, + 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, + 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, + 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xce, 0x01, 0x0a, 0x19, + 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x5f, + 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xb0, 0x01, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, + 0x20, 0x3c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, + 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, + 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, 0x52, 0x02, + 0x67, 0x74, 0x12, 0xf7, 0x07, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0f, + 0x42, 0xe2, 0x07, 0xc2, 0x48, 0xde, 0x07, 0x0a, 0x8b, 0x01, 0x0a, 0x0c, 0x73, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, 0x1a, 0x7b, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, + 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, + 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x5d, 0x29, + 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xc5, 0x01, 0x0a, 0x0f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, + 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x1a, 0xb1, 0x01, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, + 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, + 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xcd, 0x01, + 0x0a, 0x19, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, + 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xaf, 0x01, 0x68, 0x61, + 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, + 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, + 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, + 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xd5, 0x01, + 0x0a, 0x10, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, + 0x74, 0x65, 0x1a, 0xc0, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, + 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, + 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, + 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, + 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, + 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, + 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xdd, 0x01, 0x0a, 0x1a, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, + 0x33, 0x32, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, + 0x73, 0x69, 0x76, 0x65, 0x1a, 0xbe, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, + 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, + 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, + 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, + 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x7c, 0x0a, 0x02, + 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0f, 0x42, 0x6c, 0xc2, 0x48, 0x69, 0x0a, 0x67, 0x0a, + 0x0b, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x69, 0x6e, 0x1a, 0x58, 0x21, 0x28, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, + 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x64, + 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x5d, + 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x80, 0x01, 0x0a, 0x06, 0x6e, + 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0f, 0x42, 0x69, 0xc2, 0x48, 0x66, + 0x0a, 0x64, 0x0a, 0x0f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x6e, 0x6f, 0x74, + 0x5f, 0x69, 0x6e, 0x1a, 0x51, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, + 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x5d, + 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x37, 0x0a, + 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0f, 0x42, 0x1d, + 0xc2, 0x48, 0x1a, 0x0a, 0x18, 0x0a, 0x10, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x1a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x07, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, + 0x02, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x42, 0x0e, + 0x0a, 0x0c, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x22, 0xc8, + 0x15, 0x0a, 0x0d, 0x53, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x73, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x10, 0x42, + 0x5d, 0xc2, 0x48, 0x5a, 0x0a, 0x58, 0x0a, 0x0e, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x1a, 0x46, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x3f, 0x20, 0x27, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, + 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x10, 0x42, 0x7f, 0xc2, 0x48, 0x7c, 0x0a, 0x7a, 0x0a, 0x0b, 0x73, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x36, 0x34, 0x2e, 0x6c, 0x74, 0x1a, 0x6b, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x3f, 0x20, 0x27, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, + 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x02, 0x6c, 0x74, 0x12, 0xa4, 0x01, 0x0a, 0x03, 0x6c, 0x74, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x10, 0x42, 0x8f, 0x01, 0xc2, 0x48, 0x8b, 0x01, 0x0a, 0x88, + 0x01, 0x0a, 0x0c, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x6c, 0x74, 0x65, 0x1a, + 0x78, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, + 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, + 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, + 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x03, 0x6c, 0x74, 0x65, + 0x12, 0xaa, 0x07, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x10, 0x42, 0x97, 0x07, + 0xc2, 0x48, 0x93, 0x07, 0x0a, 0x7d, 0x0a, 0x0b, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, + 0x2e, 0x67, 0x74, 0x1a, 0x6e, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, + 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x0a, 0xb6, 0x01, 0x0a, 0x0e, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, + 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x1a, 0xa3, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, + 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, + 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xbe, 0x01, 0x0a, + 0x18, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x5f, + 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xa1, 0x01, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x3d, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, + 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xc6, 0x01, + 0x0a, 0x0f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, + 0x65, 0x1a, 0xb2, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, + 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, + 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, + 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, + 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, + 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, + 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, + 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xce, 0x01, 0x0a, 0x19, 0x73, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, + 0x73, 0x69, 0x76, 0x65, 0x1a, 0xb0, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, + 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, + 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, + 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, 0x52, 0x02, 0x67, 0x74, 0x12, 0xf7, 0x07, + 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x10, 0x42, 0xe2, 0x07, 0xc2, 0x48, + 0xde, 0x07, 0x0a, 0x8b, 0x01, 0x0a, 0x0c, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, + 0x67, 0x74, 0x65, 0x1a, 0x7b, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, + 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, + 0x0a, 0xc5, 0x01, 0x0a, 0x0f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x67, 0x74, + 0x65, 0x5f, 0x6c, 0x74, 0x1a, 0xb1, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, + 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, + 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, + 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xcd, 0x01, 0x0a, 0x19, 0x73, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, + 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xaf, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, + 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, + 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xd5, 0x01, 0x0a, 0x10, 0x73, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xc0, 0x01, + 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, + 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, + 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, + 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, + 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, + 0x0a, 0xdd, 0x01, 0x0a, 0x1a, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x67, 0x74, + 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, + 0xbe, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, + 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, + 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, + 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, + 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, + 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, + 0x48, 0x01, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x7c, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, + 0x03, 0x28, 0x10, 0x42, 0x6c, 0xc2, 0x48, 0x69, 0x0a, 0x67, 0x0a, 0x0b, 0x73, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x36, 0x34, 0x2e, 0x69, 0x6e, 0x1a, 0x58, 0x21, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x69, 0x6e, 0x20, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, + 0x6e, 0x27, 0x5d, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, + 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, + 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x80, 0x01, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x10, 0x42, 0x69, 0xc2, 0x48, 0x66, 0x0a, 0x64, 0x0a, 0x0f, 0x73, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x1a, 0x51, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, + 0x74, 0x5f, 0x69, 0x6e, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, + 0x73, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, + 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x37, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x10, 0x42, 0x1d, 0xc2, 0x48, 0x1a, 0x0a, 0x18, + 0x0a, 0x10, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x1a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x42, 0x0b, 0x0a, 0x09, + 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x67, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x22, 0xbc, 0x01, 0x0a, 0x09, 0x42, 0x6f, + 0x6f, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x6f, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x59, 0xc2, 0x48, 0x56, 0x0a, 0x54, 0x0a, 0x0a, 0x62, + 0x6f, 0x6f, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x1a, 0x46, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x21, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x65, 0x71, 0x75, + 0x61, 0x6c, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x08, 0x42, 0x19, 0xc2, 0x48, 0x16, 0x0a, 0x14, + 0x0a, 0x0c, 0x62, 0x6f, 0x6f, 0x6c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x1a, 0x04, + 0x74, 0x72, 0x75, 0x65, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2a, 0x09, 0x08, + 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xa1, 0x39, 0x0a, 0x0b, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x73, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x5d, 0xc2, 0x48, 0x5a, 0x0a, 0x58, 0x0a, 0x0c, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x1a, 0x48, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x74, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x60, 0x25, 0x73, 0x60, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5d, + 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x83, 0x01, + 0x0a, 0x03, 0x6c, 0x65, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x42, 0x71, 0xc2, 0x48, 0x6e, + 0x0a, 0x6c, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6c, 0x65, 0x6e, 0x1a, 0x5e, + 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, + 0x29, 0x20, 0x21, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x20, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x6d, + 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x25, 0x73, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, + 0x74, 0x65, 0x72, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x03, + 0x6c, 0x65, 0x6e, 0x12, 0xa1, 0x01, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x87, 0x01, 0xc2, 0x48, 0x83, 0x01, 0x0a, 0x80, 0x01, 0x0a, + 0x0e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x1a, + 0x6e, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, + 0x29, 0x29, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, + 0x65, 0x6e, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x74, 0x20, 0x6c, 0x65, + 0x61, 0x73, 0x74, 0x20, 0x25, 0x73, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, + 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, + 0x06, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x12, 0x9f, 0x01, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, + 0x6c, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x85, 0x01, 0xc2, 0x48, 0x81, 0x01, + 0x0a, 0x7f, 0x0a, 0x0e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x61, 0x78, 0x5f, 0x6c, + 0x65, 0x6e, 0x1a, 0x6d, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x69, + 0x7a, 0x65, 0x28, 0x29, 0x29, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6d, 0x61, + 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x74, + 0x20, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x25, 0x73, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, + 0x65, 0x72, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x12, 0xa5, 0x01, 0x0a, 0x09, 0x6c, 0x65, + 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x42, 0x87, 0x01, + 0xc2, 0x48, 0x83, 0x01, 0x0a, 0x80, 0x01, 0x0a, 0x10, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, + 0x6c, 0x65, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x1a, 0x6c, 0x75, 0x69, 0x6e, 0x74, 0x28, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x2e, 0x73, 0x69, 0x7a, 0x65, + 0x28, 0x29, 0x29, 0x20, 0x21, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x6e, + 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x25, + 0x73, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, + 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x08, 0x6c, 0x65, 0x6e, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0xad, 0x01, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x04, 0x42, 0x8f, 0x01, 0xc2, 0x48, 0x8b, 0x01, 0x0a, 0x88, 0x01, 0x0a, + 0x10, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x69, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x1a, 0x74, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x62, 0x79, 0x74, 0x65, 0x73, 0x28, 0x74, 0x68, + 0x69, 0x73, 0x29, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x29, 0x20, 0x3c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x20, 0x3f, 0x20, + 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x6d, 0x75, + 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, 0x25, + 0x73, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, + 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0xac, 0x01, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x04, 0x42, 0x8e, 0x01, 0xc2, 0x48, 0x8a, 0x01, 0x0a, 0x87, 0x01, 0x0a, + 0x10, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x1a, 0x73, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x62, 0x79, 0x74, 0x65, 0x73, 0x28, 0x74, 0x68, + 0x69, 0x73, 0x29, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x29, 0x20, 0x3e, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x20, 0x3f, 0x20, + 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x6d, 0x75, + 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x74, 0x20, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x25, 0x73, + 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5d, + 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x12, 0x96, 0x01, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x7c, 0xc2, 0x48, 0x79, 0x0a, 0x77, 0x0a, 0x0e, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x2e, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x1a, 0x65, 0x21, 0x74, 0x68, 0x69, 0x73, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x20, + 0x72, 0x65, 0x67, 0x65, 0x78, 0x20, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x20, 0x60, 0x25, + 0x73, 0x60, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, + 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x8c, 0x01, 0x0a, 0x06, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x74, 0xc2, 0x48, 0x71, 0x0a, + 0x6f, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x1a, 0x5e, 0x21, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x57, 0x69, + 0x74, 0x68, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x29, + 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, + 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x60, + 0x25, 0x73, 0x60, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, + 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x8a, 0x01, 0x0a, 0x06, 0x73, 0x75, 0x66, + 0x66, 0x69, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x72, 0xc2, 0x48, 0x6f, 0x0a, 0x6d, + 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x1a, + 0x5c, 0x21, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x65, 0x6e, 0x64, 0x73, 0x57, 0x69, 0x74, 0x68, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x29, 0x20, 0x3f, 0x20, + 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, + 0x68, 0x61, 0x76, 0x65, 0x20, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x20, 0x60, 0x25, 0x73, 0x60, + 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x06, 0x73, + 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x9a, 0x01, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x7e, 0xc2, 0x48, 0x7b, 0x0a, 0x79, 0x0a, + 0x0f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, + 0x1a, 0x66, 0x21, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, + 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x29, + 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, + 0x6f, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x73, 0x75, 0x62, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x20, 0x60, 0x25, 0x73, 0x60, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x73, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x73, 0x12, 0xa5, 0x01, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x42, 0x81, 0x01, 0xc2, 0x48, 0x7e, 0x0a, + 0x7c, 0x0a, 0x13, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x1a, 0x65, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x73, 0x75, 0x62, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x60, 0x25, 0x73, 0x60, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x0b, 0x6e, + 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x7a, 0x0a, 0x02, 0x69, 0x6e, + 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x42, 0x6a, 0xc2, 0x48, 0x67, 0x0a, 0x65, 0x0a, 0x09, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x6e, 0x1a, 0x58, 0x21, 0x28, 0x74, 0x68, 0x69, 0x73, + 0x20, 0x69, 0x6e, 0x20, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, + 0x69, 0x6e, 0x27, 0x5d, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, + 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, + 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x64, 0x79, 0x6e, 0x28, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x5d, 0x29, 0x20, 0x3a, 0x20, + 0x27, 0x27, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x7e, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, + 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x42, 0x67, 0xc2, 0x48, 0x64, 0x0a, 0x62, 0x0a, 0x0d, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x1a, 0x51, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, + 0x69, 0x6e, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, + 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, + 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0xe6, 0x01, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, 0xcd, 0x01, 0xc2, 0x48, 0xc9, 0x01, 0x0a, 0x61, 0x0a, + 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x23, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x1a, 0x2c, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, 0x7c, + 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x28, 0x29, + 0x0a, 0x64, 0x0a, 0x12, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x32, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, + 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, + 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x1a, 0x21, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, + 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, + 0xf1, 0x01, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x08, 0x42, 0xd2, 0x01, 0xc2, 0x48, 0xce, 0x01, 0x0a, 0x65, 0x0a, 0x0f, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x32, 0x21, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x7c, 0x7c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x29, + 0x0a, 0x65, 0x0a, 0x15, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x6e, + 0x61, 0x6d, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x2d, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, + 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, + 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x1d, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0xcb, 0x01, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, + 0x42, 0xb8, 0x01, 0xc2, 0x48, 0xb4, 0x01, 0x0a, 0x55, 0x0a, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x2e, 0x69, 0x70, 0x12, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x20, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x26, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, + 0x70, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, + 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, 0x70, 0x28, 0x29, 0x0a, 0x5b, + 0x0a, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x70, 0x5f, 0x65, 0x6d, 0x70, 0x74, + 0x79, 0x12, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, + 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, + 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x1a, 0x17, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x20, 0x7c, 0x7c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x02, 0x69, + 0x70, 0x12, 0xdc, 0x01, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, + 0x42, 0xc5, 0x01, 0xc2, 0x48, 0xc1, 0x01, 0x0a, 0x5c, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x2e, 0x69, 0x70, 0x76, 0x34, 0x12, 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, + 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, + 0x76, 0x34, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x29, 0x21, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x69, 0x70, 0x76, 0x34, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, + 0x49, 0x70, 0x28, 0x34, 0x29, 0x0a, 0x61, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, + 0x69, 0x70, 0x76, 0x34, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x31, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, + 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x20, 0x49, 0x50, 0x76, 0x34, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x19, 0x21, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x76, 0x34, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, + 0x12, 0xdc, 0x01, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x42, + 0xc5, 0x01, 0xc2, 0x48, 0xc1, 0x01, 0x0a, 0x5c, 0x0a, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x2e, 0x69, 0x70, 0x76, 0x36, 0x12, 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, + 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x76, + 0x36, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x29, 0x21, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x69, 0x70, 0x76, 0x36, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, + 0x3d, 0x20, 0x27, 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, + 0x70, 0x28, 0x36, 0x29, 0x0a, 0x61, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x69, + 0x70, 0x76, 0x36, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x31, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, + 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, + 0x49, 0x50, 0x76, 0x36, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x19, 0x21, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x76, 0x36, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x04, 0x69, 0x70, 0x76, 0x36, 0x12, + 0xc4, 0x01, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x42, 0xaf, 0x01, + 0xc2, 0x48, 0xab, 0x01, 0x0a, 0x51, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x75, + 0x72, 0x69, 0x12, 0x19, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, + 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x55, 0x52, 0x49, 0x1a, 0x28, 0x21, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x75, 0x72, 0x69, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, + 0x69, 0x73, 0x55, 0x72, 0x69, 0x28, 0x29, 0x0a, 0x56, 0x0a, 0x10, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x2e, 0x75, 0x72, 0x69, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x28, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, + 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x20, 0x55, 0x52, 0x49, 0x1a, 0x18, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x75, 0x72, + 0x69, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0x48, + 0x00, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x6e, 0x0a, 0x07, 0x75, 0x72, 0x69, 0x5f, 0x72, 0x65, + 0x66, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x42, 0x53, 0xc2, 0x48, 0x50, 0x0a, 0x4e, 0x0a, 0x0e, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x75, 0x72, 0x69, 0x5f, 0x72, 0x65, 0x66, 0x12, 0x19, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x55, 0x52, 0x49, 0x1a, 0x21, 0x21, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x75, 0x72, 0x69, 0x5f, 0x72, 0x65, 0x66, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x2e, 0x69, 0x73, 0x55, 0x72, 0x69, 0x52, 0x65, 0x66, 0x28, 0x29, 0x48, 0x00, 0x52, 0x06, + 0x75, 0x72, 0x69, 0x52, 0x65, 0x66, 0x12, 0x99, 0x02, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x42, 0xfc, 0x01, 0xc2, 0x48, 0xf8, 0x01, 0x0a, + 0x81, 0x01, 0x0a, 0x0e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x2d, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, + 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, + 0x6d, 0x65, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x69, 0x70, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x1a, 0x40, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, + 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, + 0x6d, 0x65, 0x28, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, + 0x70, 0x28, 0x29, 0x0a, 0x72, 0x0a, 0x14, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3c, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, + 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x69, + 0x70, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x1c, 0x21, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x9e, 0x02, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x87, 0x02, 0xc2, 0x48, 0x83, 0x02, 0x0a, 0xa5, 0x01, 0x0a, 0x0b, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x2e, 0x75, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, + 0x55, 0x55, 0x49, 0x44, 0x1a, 0x7a, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x75, 0x75, 0x69, + 0x64, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, + 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, + 0x27, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x38, 0x7d, + 0x2d, 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x34, 0x7d, 0x2d, + 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x34, 0x7d, 0x2d, 0x5b, + 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x34, 0x7d, 0x2d, 0x5b, 0x30, + 0x2d, 0x39, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x31, 0x32, 0x7d, 0x24, 0x27, 0x29, + 0x0a, 0x59, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x75, 0x75, 0x69, 0x64, 0x5f, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x29, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, + 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x55, 0x55, 0x49, 0x44, + 0x1a, 0x19, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x75, 0x75, 0x69, 0x64, 0x20, 0x7c, 0x7c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x04, 0x75, + 0x75, 0x69, 0x64, 0x12, 0xf7, 0x01, 0x0a, 0x05, 0x74, 0x75, 0x75, 0x69, 0x64, 0x18, 0x21, 0x20, + 0x01, 0x28, 0x08, 0x42, 0xde, 0x01, 0xc2, 0x48, 0xda, 0x01, 0x0a, 0x73, 0x0a, 0x0c, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x74, 0x75, 0x75, 0x69, 0x64, 0x12, 0x22, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x20, 0x74, 0x72, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x20, 0x55, 0x55, 0x49, 0x44, 0x1a, 0x3f, + 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x74, 0x75, 0x75, 0x69, 0x64, 0x20, 0x7c, 0x7c, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x5b, 0x30, 0x2d, + 0x39, 0x61, 0x2d, 0x66, 0x41, 0x2d, 0x46, 0x5d, 0x7b, 0x33, 0x32, 0x7d, 0x24, 0x27, 0x29, 0x0a, + 0x63, 0x0a, 0x12, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x74, 0x75, 0x75, 0x69, 0x64, 0x5f, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x31, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, + 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x74, 0x72, 0x69, 0x6d, + 0x6d, 0x65, 0x64, 0x20, 0x55, 0x55, 0x49, 0x44, 0x1a, 0x1a, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x74, 0x75, 0x75, 0x69, 0x64, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, + 0x3d, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x05, 0x74, 0x75, 0x75, 0x69, 0x64, 0x12, 0xa7, 0x02, + 0x0a, 0x11, 0x69, 0x70, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x6c, 0x65, 0x6e, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08, 0x42, 0xf8, 0x01, 0xc2, 0x48, 0xf4, 0x01, + 0x0a, 0x78, 0x0a, 0x18, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x70, 0x5f, 0x77, 0x69, + 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x6c, 0x65, 0x6e, 0x12, 0x1f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x1a, 0x3b, 0x21, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x6c, 0x65, 0x6e, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, + 0x49, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x28, 0x29, 0x0a, 0x78, 0x0a, 0x1e, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x70, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x6c, 0x65, 0x6e, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x2e, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, + 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x20, 0x49, 0x50, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x1a, 0x26, 0x21, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x6c, 0x65, 0x6e, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, + 0x3d, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x0f, 0x69, 0x70, 0x57, 0x69, 0x74, 0x68, 0x50, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x6c, 0x65, 0x6e, 0x12, 0xe2, 0x02, 0x0a, 0x13, 0x69, 0x70, 0x76, 0x34, + 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x6c, 0x65, 0x6e, 0x18, + 0x1b, 0x20, 0x01, 0x28, 0x08, 0x42, 0xaf, 0x02, 0xc2, 0x48, 0xab, 0x02, 0x0a, 0x93, 0x01, 0x0a, + 0x1a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x77, 0x69, 0x74, + 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x6c, 0x65, 0x6e, 0x12, 0x35, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x20, 0x49, 0x50, 0x76, 0x34, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, + 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x1a, 0x3e, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x76, 0x34, 0x5f, + 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x6c, 0x65, 0x6e, 0x20, 0x7c, + 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, 0x7c, 0x7c, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x28, + 0x34, 0x29, 0x0a, 0x92, 0x01, 0x0a, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x70, + 0x76, 0x34, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x6c, 0x65, + 0x6e, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, + 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, + 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, + 0x76, 0x34, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x1a, 0x28, 0x21, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x6c, 0x65, 0x6e, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x11, 0x69, 0x70, 0x76, 0x34, 0x57, + 0x69, 0x74, 0x68, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x6c, 0x65, 0x6e, 0x12, 0xe2, 0x02, 0x0a, + 0x13, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x6c, 0x65, 0x6e, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x08, 0x42, 0xaf, 0x02, 0xc2, 0x48, 0xab, + 0x02, 0x0a, 0x93, 0x01, 0x0a, 0x1a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x70, 0x76, + 0x36, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x6c, 0x65, 0x6e, + 0x12, 0x35, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x76, 0x36, 0x20, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x1a, 0x3e, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x69, 0x70, 0x76, 0x36, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x6c, 0x65, 0x6e, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, + 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, 0x70, 0x50, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x28, 0x36, 0x29, 0x0a, 0x92, 0x01, 0x0a, 0x20, 0x73, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x2e, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x6c, 0x65, 0x6e, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, + 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x20, 0x49, 0x50, 0x76, 0x36, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, + 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x6c, 0x65, 0x6e, 0x67, + 0x74, 0x68, 0x1a, 0x28, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x76, 0x36, 0x5f, + 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x6c, 0x65, 0x6e, 0x20, 0x7c, + 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x11, + 0x69, 0x70, 0x76, 0x36, 0x57, 0x69, 0x74, 0x68, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x6c, 0x65, + 0x6e, 0x12, 0xfc, 0x01, 0x0a, 0x09, 0x69, 0x70, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, + 0x1d, 0x20, 0x01, 0x28, 0x08, 0x42, 0xdc, 0x01, 0xc2, 0x48, 0xd8, 0x01, 0x0a, 0x6c, 0x0a, 0x10, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x70, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x12, 0x1f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x1a, 0x37, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x5f, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, + 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, 0x70, 0x50, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x28, 0x74, 0x72, 0x75, 0x65, 0x29, 0x0a, 0x68, 0x0a, 0x16, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x70, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0x12, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, + 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x20, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x1a, 0x1e, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x5f, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, + 0x3d, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x08, 0x69, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x12, 0x8f, 0x02, 0x0a, 0x0b, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x18, 0x1e, 0x20, 0x01, 0x28, 0x08, 0x42, 0xeb, 0x01, 0xc2, 0x48, 0xe7, 0x01, 0x0a, 0x75, 0x0a, + 0x12, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x12, 0x21, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x76, 0x34, 0x20, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x1a, 0x3c, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, + 0x70, 0x76, 0x34, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, + 0x2e, 0x69, 0x73, 0x49, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x28, 0x34, 0x2c, 0x20, 0x74, + 0x72, 0x75, 0x65, 0x29, 0x0a, 0x6e, 0x0a, 0x18, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x69, + 0x70, 0x76, 0x34, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x12, 0x30, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, + 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x76, 0x34, 0x20, 0x70, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x1a, 0x20, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x76, 0x34, 0x5f, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, + 0x3d, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x70, 0x76, 0x34, 0x50, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x12, 0x8f, 0x02, 0x0a, 0x0b, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x70, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x08, 0x42, 0xeb, 0x01, 0xc2, 0x48, 0xe7, 0x01, 0x0a, + 0x75, 0x0a, 0x12, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x70, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, + 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x76, + 0x36, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x1a, 0x3c, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x7c, 0x7c, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x2e, 0x69, 0x73, 0x49, 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x28, 0x36, 0x2c, + 0x20, 0x74, 0x72, 0x75, 0x65, 0x29, 0x0a, 0x6e, 0x0a, 0x18, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x2e, 0x69, 0x70, 0x76, 0x36, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0x12, 0x30, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, + 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x76, 0x36, 0x20, 0x70, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x1a, 0x20, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x76, + 0x36, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, + 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x70, 0x76, 0x36, 0x50, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x12, 0xc2, 0x02, 0x0a, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x61, 0x6e, + 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x20, 0x20, 0x01, 0x28, 0x08, 0x42, 0x9b, 0x02, 0xc2, + 0x48, 0x97, 0x02, 0x0a, 0x99, 0x01, 0x0a, 0x14, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x68, + 0x6f, 0x73, 0x74, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x41, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x28, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, + 0x6d, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x49, 0x50, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x29, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x70, 0x61, 0x69, 0x72, 0x1a, + 0x3e, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x61, 0x6e, 0x64, + 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, + 0x20, 0x27, 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x69, 0x73, 0x48, 0x6f, + 0x73, 0x74, 0x41, 0x6e, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x28, 0x74, 0x72, 0x75, 0x65, 0x29, 0x0a, + 0x79, 0x0a, 0x1a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x61, + 0x6e, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x37, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, + 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x6f, 0x72, + 0x74, 0x20, 0x70, 0x61, 0x69, 0x72, 0x1a, 0x22, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x68, + 0x6f, 0x73, 0x74, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x7c, 0x7c, 0x20, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x0b, 0x68, 0x6f, + 0x73, 0x74, 0x41, 0x6e, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x12, 0xb8, 0x05, 0x0a, 0x10, 0x77, 0x65, + 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x18, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x42, 0xf1, + 0x04, 0xc2, 0x48, 0xed, 0x04, 0x0a, 0xf0, 0x01, 0x0a, 0x23, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x2e, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x65, + 0x78, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x20, 0x48, 0x54, 0x54, 0x50, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0xa0, 0x01, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x77, 0x65, + 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x20, 0x21, + 0x3d, 0x20, 0x31, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3d, 0x3d, 0x20, 0x27, + 0x27, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x73, 0x28, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x72, + 0x69, 0x63, 0x74, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x74, + 0x72, 0x69, 0x63, 0x74, 0x20, 0x3f, 0x27, 0x5e, 0x3a, 0x3f, 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d, + 0x7a, 0x41, 0x2d, 0x5a, 0x21, 0x23, 0x24, 0x25, 0x26, 0x5c, 0x27, 0x2a, 0x2b, 0x2d, 0x2e, 0x5e, + 0x5f, 0x7c, 0x7e, 0x5c, 0x78, 0x36, 0x30, 0x5d, 0x2b, 0x24, 0x27, 0x20, 0x3a, 0x27, 0x5e, 0x5b, + 0x5e, 0x5c, 0x75, 0x30, 0x30, 0x30, 0x30, 0x5c, 0x75, 0x30, 0x30, 0x30, 0x41, 0x5c, 0x75, 0x30, + 0x30, 0x30, 0x44, 0x5d, 0x2b, 0x24, 0x27, 0x29, 0x0a, 0x8d, 0x01, 0x0a, 0x29, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x2e, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x72, + 0x65, 0x67, 0x65, 0x78, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x35, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, + 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, + 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x48, 0x54, 0x54, + 0x50, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x29, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, + 0x72, 0x65, 0x67, 0x65, 0x78, 0x20, 0x21, 0x3d, 0x20, 0x31, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x27, 0x27, 0x0a, 0xe7, 0x01, 0x0a, 0x24, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x2e, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x72, + 0x65, 0x67, 0x65, 0x78, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, + 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x48, 0x54, 0x54, 0x50, 0x20, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x95, 0x01, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x72, 0x65, + 0x67, 0x65, 0x78, 0x20, 0x21, 0x3d, 0x20, 0x32, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, + 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x29, 0x20, 0x7c, 0x7c, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x20, 0x3f, 0x27, 0x5e, 0x5b, + 0x5e, 0x5c, 0x75, 0x30, 0x30, 0x30, 0x30, 0x2d, 0x5c, 0x75, 0x30, 0x30, 0x30, 0x38, 0x5c, 0x75, + 0x30, 0x30, 0x30, 0x41, 0x2d, 0x5c, 0x75, 0x30, 0x30, 0x31, 0x46, 0x5c, 0x75, 0x30, 0x30, 0x37, + 0x46, 0x5d, 0x2a, 0x24, 0x27, 0x20, 0x3a, 0x27, 0x5e, 0x5b, 0x5e, 0x5c, 0x75, 0x30, 0x30, 0x30, + 0x30, 0x5c, 0x75, 0x30, 0x30, 0x30, 0x41, 0x5c, 0x75, 0x30, 0x30, 0x30, 0x44, 0x5d, 0x2a, 0x24, + 0x27, 0x29, 0x48, 0x00, 0x52, 0x0e, 0x77, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x52, + 0x65, 0x67, 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x18, 0x19, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x12, 0x35, 0x0a, 0x07, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x22, 0x20, 0x03, 0x28, 0x09, 0x42, 0x1b, 0xc2, + 0x48, 0x18, 0x0a, 0x16, 0x0a, 0x0e, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x1a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x42, 0x0c, + 0x0a, 0x0a, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x22, 0xa3, 0x11, 0x0a, + 0x0a, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x6d, 0x0a, 0x05, 0x63, + 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x57, 0xc2, 0x48, 0x54, 0x0a, + 0x52, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x1a, 0x43, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x74, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, + 0x74, 0x20, 0x62, 0x65, 0x20, 0x25, 0x78, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, + 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x7d, 0x0a, 0x03, 0x6c, 0x65, + 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x42, 0x6b, 0xc2, 0x48, 0x68, 0x0a, 0x66, 0x0a, 0x09, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x1a, 0x59, 0x75, 0x69, 0x6e, 0x74, 0x28, + 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x29, 0x20, 0x21, 0x3d, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, + 0x65, 0x20, 0x25, 0x73, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x6e, 0x5d, 0x29, 0x20, + 0x3a, 0x20, 0x27, 0x27, 0x52, 0x03, 0x6c, 0x65, 0x6e, 0x12, 0x98, 0x01, 0x0a, 0x07, 0x6d, 0x69, + 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x7f, 0xc2, 0x48, 0x7c, + 0x0a, 0x7a, 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, + 0x6e, 0x1a, 0x69, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x69, 0x7a, + 0x65, 0x28, 0x29, 0x29, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6d, 0x69, 0x6e, + 0x5f, 0x6c, 0x65, 0x6e, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x74, 0x20, + 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, 0x25, 0x73, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x27, 0x2e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6d, 0x69, + 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x06, 0x6d, 0x69, + 0x6e, 0x4c, 0x65, 0x6e, 0x12, 0x90, 0x01, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42, 0x77, 0xc2, 0x48, 0x74, 0x0a, 0x72, 0x0a, 0x0d, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x2e, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x1a, 0x61, 0x75, 0x69, + 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x29, 0x20, + 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x20, + 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, + 0x20, 0x61, 0x74, 0x20, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x25, 0x73, 0x20, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, + 0x06, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x12, 0x99, 0x01, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x7f, 0xc2, 0x48, 0x7c, 0x0a, 0x7a, + 0x0a, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x1a, + 0x69, 0x21, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x74, 0x68, 0x69, 0x73, 0x29, 0x2e, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, + 0x75, 0x73, 0x74, 0x20, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x20, 0x72, 0x65, 0x67, 0x65, 0x78, 0x20, + 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x20, 0x60, 0x25, 0x73, 0x60, 0x27, 0x2e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x12, 0x89, 0x01, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0c, 0x42, 0x71, 0xc2, 0x48, 0x6e, 0x0a, 0x6c, 0x0a, 0x0c, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x1a, 0x5c, 0x21, 0x74, 0x68, 0x69, 0x73, + 0x2e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x57, 0x69, 0x74, 0x68, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, + 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x25, 0x78, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, + 0x87, 0x01, 0x0a, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, + 0x42, 0x6f, 0xc2, 0x48, 0x6c, 0x0a, 0x6a, 0x0a, 0x0c, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x73, + 0x75, 0x66, 0x66, 0x69, 0x78, 0x1a, 0x5a, 0x21, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x65, 0x6e, 0x64, + 0x73, 0x57, 0x69, 0x74, 0x68, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x75, 0x66, 0x66, + 0x69, 0x78, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x64, 0x6f, 0x65, + 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x73, 0x75, 0x66, 0x66, 0x69, + 0x78, 0x20, 0x25, 0x78, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x8d, 0x01, 0x0a, 0x08, 0x63, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x71, 0xc2, 0x48, + 0x6e, 0x0a, 0x6c, 0x0a, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x73, 0x1a, 0x5a, 0x21, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x73, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x64, 0x6f, 0x65, + 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x25, 0x78, + 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, + 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x9b, 0x01, 0x0a, 0x02, 0x69, 0x6e, + 0x18, 0x08, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x8a, 0x01, 0xc2, 0x48, 0x86, 0x01, 0x0a, 0x83, 0x01, + 0x0a, 0x08, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x69, 0x6e, 0x1a, 0x77, 0x64, 0x79, 0x6e, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x2e, 0x73, 0x69, 0x7a, + 0x65, 0x28, 0x29, 0x20, 0x3e, 0x20, 0x30, 0x20, 0x26, 0x26, 0x20, 0x21, 0x28, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x69, 0x6e, 0x20, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, + 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, + 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x64, 0x79, 0x6e, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x7d, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, + 0x6e, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0c, 0x42, 0x66, 0xc2, 0x48, 0x63, 0x0a, 0x61, 0x0a, 0x0c, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x1a, 0x51, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, + 0x69, 0x6e, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, + 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, + 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0xef, 0x01, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x08, 0x42, 0xdc, 0x01, 0xc2, 0x48, 0xd8, 0x01, 0x0a, 0x74, 0x0a, 0x08, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x12, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, + 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, + 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x46, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x69, 0x70, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x69, 0x7a, 0x65, + 0x28, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, + 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x34, 0x20, 0x7c, 0x7c, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x31, 0x36, + 0x0a, 0x60, 0x0a, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x5f, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0x12, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, + 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x20, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x1a, 0x1d, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x20, 0x7c, + 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x20, 0x21, 0x3d, + 0x20, 0x30, 0x48, 0x00, 0x52, 0x02, 0x69, 0x70, 0x12, 0xea, 0x01, 0x0a, 0x04, 0x69, 0x70, 0x76, + 0x34, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0xd3, 0x01, 0xc2, 0x48, 0xcf, 0x01, 0x0a, 0x65, + 0x0a, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x76, 0x34, 0x12, 0x22, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, 0x76, 0x34, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x1a, 0x33, 0x21, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x76, 0x34, 0x20, 0x7c, 0x7c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x20, 0x3d, 0x3d, 0x20, + 0x30, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, + 0x20, 0x3d, 0x3d, 0x20, 0x34, 0x0a, 0x66, 0x0a, 0x10, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x69, + 0x70, 0x76, 0x34, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x31, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, + 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, + 0x49, 0x50, 0x76, 0x34, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x1f, 0x21, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x76, 0x34, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x20, 0x21, 0x3d, 0x20, 0x30, 0x48, 0x00, 0x52, + 0x04, 0x69, 0x70, 0x76, 0x34, 0x12, 0xeb, 0x01, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x08, 0x42, 0xd4, 0x01, 0xc2, 0x48, 0xd0, 0x01, 0x0a, 0x66, 0x0a, 0x0a, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x76, 0x36, 0x12, 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x20, 0x49, 0x50, 0x76, 0x36, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x34, 0x21, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x76, 0x36, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x20, 0x7c, + 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x20, 0x3d, 0x3d, + 0x20, 0x31, 0x36, 0x0a, 0x66, 0x0a, 0x10, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x69, 0x70, 0x76, + 0x36, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x31, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, + 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, + 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x49, 0x50, + 0x76, 0x36, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x1f, 0x21, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x69, 0x70, 0x76, 0x36, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x2e, + 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x20, 0x21, 0x3d, 0x20, 0x30, 0x48, 0x00, 0x52, 0x04, 0x69, + 0x70, 0x76, 0x36, 0x12, 0x34, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x0e, + 0x20, 0x03, 0x28, 0x0c, 0x42, 0x1a, 0xc2, 0x48, 0x17, 0x0a, 0x15, 0x0a, 0x0d, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x1a, 0x04, 0x74, 0x72, 0x75, 0x65, + 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, + 0x80, 0x80, 0x80, 0x02, 0x42, 0x0c, 0x0a, 0x0a, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x22, 0xd7, 0x03, 0x0a, 0x09, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x6f, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, + 0x59, 0xc2, 0x48, 0x56, 0x0a, 0x54, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x63, 0x6f, 0x6e, + 0x73, 0x74, 0x1a, 0x46, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x25, 0x73, 0x27, 0x2e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, + 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, + 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x78, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, + 0x42, 0x68, 0xc2, 0x48, 0x65, 0x0a, 0x63, 0x0a, 0x07, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x69, 0x6e, + 0x1a, 0x58, 0x21, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x64, 0x79, 0x6e, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x29, 0x20, 0x3f, 0x20, + 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, + 0x6e, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x28, 0x5b, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, + 0x6e, 0x27, 0x5d, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x7c, + 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x42, 0x65, + 0xc2, 0x48, 0x62, 0x0a, 0x60, 0x0a, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, + 0x69, 0x6e, 0x1a, 0x51, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, + 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x5d, 0x29, + 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x33, 0x0a, 0x07, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x42, 0x19, 0xc2, + 0x48, 0x16, 0x0a, 0x14, 0x0a, 0x0c, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x1a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xa4, 0x04, 0x0a, + 0x0d, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0xa8, + 0x01, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x42, 0x8a, 0x01, 0xc2, 0x48, 0x86, 0x01, 0x0a, 0x83, 0x01, 0x0a, 0x12, 0x72, 0x65, + 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x1a, 0x6d, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x69, 0x7a, 0x65, + 0x28, 0x29, 0x29, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x5f, + 0x69, 0x74, 0x65, 0x6d, 0x73, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, + 0x75, 0x73, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x61, 0x74, 0x20, 0x6c, + 0x65, 0x61, 0x73, 0x74, 0x20, 0x25, 0x64, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x28, 0x73, 0x29, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6d, + 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, + 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0xac, 0x01, 0x0a, 0x09, 0x6d, 0x61, + 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x8e, 0x01, + 0xc2, 0x48, 0x8a, 0x01, 0x0a, 0x87, 0x01, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x71, 0x75, 0x69, 0x6e, + 0x74, 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x29, 0x20, 0x3e, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x63, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x6e, 0x6f, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x74, + 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x28, 0x73, 0x29, 0x27, 0x2e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6d, 0x61, + 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x08, + 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x78, 0x0a, 0x06, 0x75, 0x6e, 0x69, 0x71, + 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x60, 0xc2, 0x48, 0x5d, 0x0a, 0x5b, 0x0a, + 0x0f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, + 0x12, 0x28, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x75, 0x6e, + 0x69, 0x71, 0x75, 0x65, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x1e, 0x21, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x2e, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x28, 0x29, 0x52, 0x06, 0x75, 0x6e, 0x69, 0x71, + 0x75, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, + 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, + 0x80, 0x80, 0x02, 0x22, 0xb8, 0x03, 0x0a, 0x08, 0x4d, 0x61, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x99, 0x01, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x7c, 0xc2, 0x48, 0x79, 0x0a, 0x77, 0x0a, 0x0d, 0x6d, 0x61, 0x70, + 0x2e, 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x1a, 0x66, 0x75, 0x69, 0x6e, 0x74, + 0x28, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x29, 0x20, 0x3c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x20, + 0x3f, 0x20, 0x27, 0x6d, 0x61, 0x70, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, + 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, 0x25, 0x64, 0x20, 0x65, 0x6e, 0x74, 0x72, 0x69, + 0x65, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x5d, 0x29, 0x20, 0x3a, 0x20, + 0x27, 0x27, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x98, 0x01, 0x0a, + 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x42, 0x7b, 0xc2, 0x48, 0x78, 0x0a, 0x76, 0x0a, 0x0d, 0x6d, 0x61, 0x70, 0x2e, 0x6d, 0x61, 0x78, + 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x1a, 0x65, 0x75, 0x69, 0x6e, 0x74, 0x28, 0x74, 0x68, 0x69, + 0x73, 0x2e, 0x73, 0x69, 0x7a, 0x65, 0x28, 0x29, 0x29, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x20, 0x3f, 0x20, 0x27, 0x6d, + 0x61, 0x70, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x74, 0x20, 0x6d, 0x6f, + 0x73, 0x74, 0x20, 0x25, 0x64, 0x20, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x27, 0x2e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6d, 0x61, 0x78, + 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x08, 0x6d, + 0x61, 0x78, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, + 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x36, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x75, + 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x31, + 0x0a, 0x08, 0x41, 0x6e, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, + 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, + 0x6e, 0x22, 0xa2, 0x17, 0x0a, 0x0d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x12, 0x8e, 0x01, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x5d, + 0xc2, 0x48, 0x5a, 0x0a, 0x58, 0x0a, 0x0e, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x1a, 0x46, 0x74, 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x25, + 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x63, + 0x6f, 0x6e, 0x73, 0x74, 0x12, 0xac, 0x01, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x7f, 0xc2, 0x48, + 0x7c, 0x0a, 0x7a, 0x0a, 0x0b, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6c, 0x74, + 0x1a, 0x6b, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, + 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, + 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, + 0x02, 0x6c, 0x74, 0x12, 0xbf, 0x01, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x8f, 0x01, 0xc2, + 0x48, 0x8b, 0x01, 0x0a, 0x88, 0x01, 0x0a, 0x0c, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x6c, 0x74, 0x65, 0x1a, 0x78, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, + 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0xc5, 0x07, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x97, 0x07, + 0xc2, 0x48, 0x93, 0x07, 0x0a, 0x7d, 0x0a, 0x0b, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x67, 0x74, 0x1a, 0x6e, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, + 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x0a, 0xb6, 0x01, 0x0a, 0x0e, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x1a, 0xa3, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, + 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, + 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xbe, 0x01, 0x0a, + 0x18, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x5f, + 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xa1, 0x01, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x3d, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, + 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xc6, 0x01, + 0x0a, 0x0f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, + 0x65, 0x1a, 0xb2, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, + 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, + 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, + 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, + 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, + 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, + 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, + 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, + 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xce, 0x01, 0x0a, 0x19, 0x64, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, + 0x73, 0x69, 0x76, 0x65, 0x1a, 0xb0, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, + 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, + 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, + 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, 0x52, 0x02, 0x67, 0x74, 0x12, 0x92, 0x08, + 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xe2, 0x07, 0xc2, 0x48, 0xde, 0x07, 0x0a, 0x8b, 0x01, + 0x0a, 0x0c, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x74, 0x65, 0x1a, 0x7b, + 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, + 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, + 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, + 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, + 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, + 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xc5, 0x01, 0x0a, 0x0f, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x1a, + 0xb1, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, + 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, + 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, + 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x0a, 0xcd, 0x01, 0x0a, 0x19, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, + 0x65, 0x1a, 0xaf, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, + 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, + 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, + 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x0a, 0xd5, 0x01, 0x0a, 0x10, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xc0, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, + 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, + 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, + 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, + 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xdd, 0x01, 0x0a, 0x1a, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, + 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xbe, 0x01, 0x68, 0x61, 0x73, + 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, + 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, + 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, + 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, + 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, 0x52, 0x03, 0x67, + 0x74, 0x65, 0x12, 0x97, 0x01, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0xc2, 0x48, 0x69, 0x0a, + 0x67, 0x0a, 0x0b, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x69, 0x6e, 0x1a, 0x58, + 0x21, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, 0x5d, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, + 0x6c, 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, + 0x5b, 0x64, 0x79, 0x6e, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x29, 0x5b, 0x27, 0x69, 0x6e, 0x27, + 0x5d, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x9b, 0x01, 0x0a, + 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0xc2, 0x48, 0x66, 0x0a, 0x64, 0x0a, + 0x0f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, + 0x1a, 0x51, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, + 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x6c, + 0x69, 0x73, 0x74, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x52, 0x0a, 0x07, 0x65, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x1d, 0xc2, 0x48, 0x1a, 0x0a, 0x18, 0x0a, 0x10, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x1a, + 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2a, 0x09, + 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x65, 0x73, + 0x73, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x22, 0xb0, 0x18, 0x0a, 0x0e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x90, 0x01, 0x0a, 0x05, 0x63, 0x6f, + 0x6e, 0x73, 0x74, 0x18, 0x02, 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, 0x42, 0x5e, 0xc2, 0x48, 0x5b, 0x0a, 0x59, 0x0a, 0x0f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x1a, 0x46, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x21, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, + 0x73, 0x74, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, + 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x5d, 0x29, + 0x20, 0x3a, 0x20, 0x27, 0x27, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0xaf, 0x01, 0x0a, + 0x02, 0x6c, 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, 0x42, 0x80, 0x01, 0xc2, 0x48, 0x7d, 0x0a, 0x7b, 0x0a, 0x0c, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x6c, 0x74, 0x1a, 0x6b, 0x21, 0x68, 0x61, + 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, + 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, + 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, + 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x02, 0x6c, 0x74, 0x12, 0xc1, + 0x01, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x04, 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, 0x42, 0x90, 0x01, 0xc2, 0x48, 0x8c, 0x01, 0x0a, + 0x89, 0x01, 0x0a, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x6c, 0x74, + 0x65, 0x1a, 0x78, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, + 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, + 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, 0x52, 0x03, 0x6c, + 0x74, 0x65, 0x12, 0x73, 0x0a, 0x06, 0x6c, 0x74, 0x5f, 0x6e, 0x6f, 0x77, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x08, 0x42, 0x5a, 0xc2, 0x48, 0x57, 0x0a, 0x55, 0x0a, 0x10, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x6c, 0x74, 0x5f, 0x6e, 0x6f, 0x77, 0x1a, 0x41, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5f, 0x6e, 0x6f, 0x77, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3e, 0x20, 0x6e, 0x6f, 0x77, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6e, 0x6f, 0x77, 0x27, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x00, + 0x52, 0x05, 0x6c, 0x74, 0x4e, 0x6f, 0x77, 0x12, 0xcb, 0x07, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x05, + 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, + 0x42, 0x9c, 0x07, 0xc2, 0x48, 0x98, 0x07, 0x0a, 0x7e, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x67, 0x74, 0x1a, 0x6e, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, 0x28, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x3f, 0x20, + 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xb7, 0x01, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x1a, 0xa3, 0x01, 0x68, 0x61, + 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, + 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, + 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, + 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, + 0x27, 0x0a, 0xbf, 0x01, 0x0a, 0x19, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, + 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, + 0xa1, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, + 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, + 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, + 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, + 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, + 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, + 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x0a, 0xc7, 0x01, 0x0a, 0x10, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x67, 0x74, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xb2, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, 0x20, 0x27, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, + 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, + 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xcf, 0x01, + 0x0a, 0x1a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x67, 0x74, 0x5f, 0x6c, + 0x74, 0x65, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xb0, 0x01, 0x68, + 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3c, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x29, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x20, + 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, + 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x2c, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, + 0x01, 0x52, 0x02, 0x67, 0x74, 0x12, 0x98, 0x08, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x06, 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, 0x42, + 0xe7, 0x07, 0xc2, 0x48, 0xe3, 0x07, 0x0a, 0x8c, 0x01, 0x0a, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x67, 0x74, 0x65, 0x1a, 0x7b, 0x21, 0x68, 0x61, 0x73, 0x28, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x21, 0x68, 0x61, 0x73, + 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x74, + 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, + 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x5d, 0x29, + 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xc6, 0x01, 0x0a, 0x10, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x1a, 0xb1, 0x01, 0x68, 0x61, 0x73, + 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x3d, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, + 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, + 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, + 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xce, + 0x01, 0x0a, 0x1a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x67, 0x74, 0x65, + 0x5f, 0x6c, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xaf, 0x01, + 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x29, 0x20, 0x26, 0x26, + 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x20, 0x3c, 0x3d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, + 0x69, 0x73, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, + 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, + 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, + 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, + 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, + 0xd6, 0x01, 0x0a, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x67, 0x74, + 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x1a, 0xc0, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, + 0x6c, 0x74, 0x65, 0x20, 0x3e, 0x3d, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, + 0x20, 0x26, 0x26, 0x20, 0x28, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3e, 0x20, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, + 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, + 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, 0x6f, + 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, + 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x0a, 0xde, 0x01, 0x0a, 0x1b, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x67, 0x74, 0x65, 0x5f, 0x6c, 0x74, 0x65, 0x5f, 0x65, + 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x1a, 0xbe, 0x01, 0x68, 0x61, 0x73, 0x28, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x29, 0x20, 0x26, 0x26, 0x20, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, 0x20, 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, + 0x74, 0x65, 0x20, 0x26, 0x26, 0x20, 0x28, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, 0x74, 0x65, + 0x20, 0x3c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, + 0x3c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x29, 0x3f, 0x20, 0x27, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, + 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x25, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x73, 0x73, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x71, 0x75, 0x61, 0x6c, 0x20, 0x74, + 0x6f, 0x20, 0x25, 0x73, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x2e, 0x67, 0x74, 0x65, 0x2c, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x6c, + 0x74, 0x65, 0x5d, 0x29, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, 0x01, 0x52, 0x03, 0x67, 0x74, 0x65, + 0x12, 0x76, 0x0a, 0x06, 0x67, 0x74, 0x5f, 0x6e, 0x6f, 0x77, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, + 0x42, 0x5d, 0xc2, 0x48, 0x5a, 0x0a, 0x58, 0x0a, 0x10, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x2e, 0x67, 0x74, 0x5f, 0x6e, 0x6f, 0x77, 0x1a, 0x44, 0x28, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x2e, 0x67, 0x74, 0x5f, 0x6e, 0x6f, 0x77, 0x20, 0x26, 0x26, 0x20, 0x74, 0x68, 0x69, 0x73, + 0x20, 0x3c, 0x20, 0x6e, 0x6f, 0x77, 0x29, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, + 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6e, 0x6f, 0x77, 0x27, 0x20, 0x3a, 0x20, 0x27, 0x27, 0x48, + 0x01, 0x52, 0x05, 0x67, 0x74, 0x4e, 0x6f, 0x77, 0x12, 0xc0, 0x01, 0x0a, 0x06, 0x77, 0x69, 0x74, + 0x68, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x8c, 0x01, 0xc2, 0x48, 0x88, 0x01, 0x0a, 0x85, 0x01, 0x0a, 0x10, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, + 0x1a, 0x71, 0x74, 0x68, 0x69, 0x73, 0x20, 0x3c, 0x20, 0x6e, 0x6f, 0x77, 0x2d, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x2e, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x7c, 0x7c, 0x20, 0x74, 0x68, 0x69, + 0x73, 0x20, 0x3e, 0x20, 0x6e, 0x6f, 0x77, 0x2b, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x77, 0x69, + 0x74, 0x68, 0x69, 0x6e, 0x20, 0x3f, 0x20, 0x27, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6d, 0x75, + 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x25, 0x73, 0x20, + 0x6f, 0x66, 0x20, 0x6e, 0x6f, 0x77, 0x27, 0x2e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x28, 0x5b, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x5d, 0x29, 0x20, 0x3a, + 0x20, 0x27, 0x27, 0x52, 0x06, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x12, 0x54, 0x0a, 0x07, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x03, 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, 0x42, 0x1e, 0xc2, 0x48, 0x1b, 0x0a, 0x19, 0x0a, + 0x11, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x1a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x42, 0x0b, 0x0a, 0x09, + 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x67, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x68, 0x61, 0x6e, 0x22, 0x45, 0x0a, 0x0a, 0x56, 0x69, 0x6f, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x75, + 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x56, 0x69, 0x6f, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0xe2, 0x01, 0x0a, 0x09, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, + 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x50, 0x61, 0x74, 0x68, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x2b, 0x0a, + 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x62, 0x75, + 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x50, 0x61, 0x74, 0x68, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0a, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, + 0x18, 0x01, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, 0x23, 0x0a, + 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, + 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x17, 0x0a, 0x07, + 0x66, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x66, + 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x22, 0x47, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x61, + 0x74, 0x68, 0x12, 0x3a, 0x0a, 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x61, 0x74, 0x68, 0x45, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xcc, + 0x03, 0x0a, 0x10, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x61, 0x74, 0x68, 0x45, 0x6c, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x45, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, + 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x04, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x08, 0x62, 0x6f, + 0x6f, 0x6c, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, + 0x62, 0x6f, 0x6f, 0x6c, 0x4b, 0x65, 0x79, 0x12, 0x19, 0x0a, 0x07, 0x69, 0x6e, 0x74, 0x5f, 0x6b, + 0x65, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x06, 0x69, 0x6e, 0x74, 0x4b, + 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x08, 0x75, 0x69, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x07, 0x75, 0x69, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x12, + 0x1f, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, + 0x42, 0x0b, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2a, 0x9d, 0x01, + 0x0a, 0x06, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x49, 0x47, 0x4e, 0x4f, + 0x52, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x19, 0x0a, 0x15, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x5f, 0x49, 0x46, 0x5f, 0x55, 0x4e, + 0x50, 0x4f, 0x50, 0x55, 0x4c, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x49, + 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x5f, 0x49, 0x46, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, + 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x47, 0x4e, 0x4f, + 0x52, 0x45, 0x5f, 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x0c, 0x49, + 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x5f, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x10, 0x01, 0x1a, 0x02, 0x08, + 0x01, 0x12, 0x16, 0x0a, 0x0e, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x5f, 0x44, 0x45, 0x46, 0x41, + 0x55, 0x4c, 0x54, 0x10, 0x02, 0x1a, 0x02, 0x08, 0x01, 0x1a, 0x02, 0x10, 0x01, 0x2a, 0x6e, 0x0a, + 0x0a, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x17, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x52, 0x45, 0x47, 0x45, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x5f, 0x52, 0x45, 0x47, 0x45, 0x58, 0x5f, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x48, 0x45, 0x41, + 0x44, 0x45, 0x52, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x5f, 0x52, 0x45, 0x47, 0x45, 0x58, 0x5f, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x48, + 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x02, 0x3a, 0x5c, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x87, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x74, 0x73, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x54, 0x0a, 0x05, 0x6f, + 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x87, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x75, 0x66, + 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x43, + 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, + 0x66, 0x3a, 0x54, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x87, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, + 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x63, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x65, + 0x66, 0x69, 0x6e, 0x65, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x88, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x62, 0x75, + 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x65, + 0x66, 0x69, 0x6e, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, + 0x52, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x42, 0x6e, 0x0a, 0x12, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x42, 0x0d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x47, 0x62, 0x75, 0x66, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2f, 0x67, 0x6f, 0x2f, + 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, +} + +var ( + file_buf_validate_validate_proto_rawDescOnce sync.Once + file_buf_validate_validate_proto_rawDescData = file_buf_validate_validate_proto_rawDesc +) + +func file_buf_validate_validate_proto_rawDescGZIP() []byte { + file_buf_validate_validate_proto_rawDescOnce.Do(func() { + file_buf_validate_validate_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_validate_validate_proto_rawDescData) + }) + return file_buf_validate_validate_proto_rawDescData +} + +var file_buf_validate_validate_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_buf_validate_validate_proto_msgTypes = make([]protoimpl.MessageInfo, 30) +var file_buf_validate_validate_proto_goTypes = []any{ + (Ignore)(0), // 0: buf.validate.Ignore + (KnownRegex)(0), // 1: buf.validate.KnownRegex + (*Constraint)(nil), // 2: buf.validate.Constraint + (*MessageConstraints)(nil), // 3: buf.validate.MessageConstraints + (*OneofConstraints)(nil), // 4: buf.validate.OneofConstraints + (*FieldConstraints)(nil), // 5: buf.validate.FieldConstraints + (*PredefinedConstraints)(nil), // 6: buf.validate.PredefinedConstraints + (*FloatRules)(nil), // 7: buf.validate.FloatRules + (*DoubleRules)(nil), // 8: buf.validate.DoubleRules + (*Int32Rules)(nil), // 9: buf.validate.Int32Rules + (*Int64Rules)(nil), // 10: buf.validate.Int64Rules + (*UInt32Rules)(nil), // 11: buf.validate.UInt32Rules + (*UInt64Rules)(nil), // 12: buf.validate.UInt64Rules + (*SInt32Rules)(nil), // 13: buf.validate.SInt32Rules + (*SInt64Rules)(nil), // 14: buf.validate.SInt64Rules + (*Fixed32Rules)(nil), // 15: buf.validate.Fixed32Rules + (*Fixed64Rules)(nil), // 16: buf.validate.Fixed64Rules + (*SFixed32Rules)(nil), // 17: buf.validate.SFixed32Rules + (*SFixed64Rules)(nil), // 18: buf.validate.SFixed64Rules + (*BoolRules)(nil), // 19: buf.validate.BoolRules + (*StringRules)(nil), // 20: buf.validate.StringRules + (*BytesRules)(nil), // 21: buf.validate.BytesRules + (*EnumRules)(nil), // 22: buf.validate.EnumRules + (*RepeatedRules)(nil), // 23: buf.validate.RepeatedRules + (*MapRules)(nil), // 24: buf.validate.MapRules + (*AnyRules)(nil), // 25: buf.validate.AnyRules + (*DurationRules)(nil), // 26: buf.validate.DurationRules + (*TimestampRules)(nil), // 27: buf.validate.TimestampRules + (*Violations)(nil), // 28: buf.validate.Violations + (*Violation)(nil), // 29: buf.validate.Violation + (*FieldPath)(nil), // 30: buf.validate.FieldPath + (*FieldPathElement)(nil), // 31: buf.validate.FieldPathElement + (*durationpb.Duration)(nil), // 32: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 33: google.protobuf.Timestamp + (descriptorpb.FieldDescriptorProto_Type)(0), // 34: google.protobuf.FieldDescriptorProto.Type + (*descriptorpb.MessageOptions)(nil), // 35: google.protobuf.MessageOptions + (*descriptorpb.OneofOptions)(nil), // 36: google.protobuf.OneofOptions + (*descriptorpb.FieldOptions)(nil), // 37: google.protobuf.FieldOptions +} +var file_buf_validate_validate_proto_depIdxs = []int32{ + 2, // 0: buf.validate.MessageConstraints.cel:type_name -> buf.validate.Constraint + 2, // 1: buf.validate.FieldConstraints.cel:type_name -> buf.validate.Constraint + 0, // 2: buf.validate.FieldConstraints.ignore:type_name -> buf.validate.Ignore + 7, // 3: buf.validate.FieldConstraints.float:type_name -> buf.validate.FloatRules + 8, // 4: buf.validate.FieldConstraints.double:type_name -> buf.validate.DoubleRules + 9, // 5: buf.validate.FieldConstraints.int32:type_name -> buf.validate.Int32Rules + 10, // 6: buf.validate.FieldConstraints.int64:type_name -> buf.validate.Int64Rules + 11, // 7: buf.validate.FieldConstraints.uint32:type_name -> buf.validate.UInt32Rules + 12, // 8: buf.validate.FieldConstraints.uint64:type_name -> buf.validate.UInt64Rules + 13, // 9: buf.validate.FieldConstraints.sint32:type_name -> buf.validate.SInt32Rules + 14, // 10: buf.validate.FieldConstraints.sint64:type_name -> buf.validate.SInt64Rules + 15, // 11: buf.validate.FieldConstraints.fixed32:type_name -> buf.validate.Fixed32Rules + 16, // 12: buf.validate.FieldConstraints.fixed64:type_name -> buf.validate.Fixed64Rules + 17, // 13: buf.validate.FieldConstraints.sfixed32:type_name -> buf.validate.SFixed32Rules + 18, // 14: buf.validate.FieldConstraints.sfixed64:type_name -> buf.validate.SFixed64Rules + 19, // 15: buf.validate.FieldConstraints.bool:type_name -> buf.validate.BoolRules + 20, // 16: buf.validate.FieldConstraints.string:type_name -> buf.validate.StringRules + 21, // 17: buf.validate.FieldConstraints.bytes:type_name -> buf.validate.BytesRules + 22, // 18: buf.validate.FieldConstraints.enum:type_name -> buf.validate.EnumRules + 23, // 19: buf.validate.FieldConstraints.repeated:type_name -> buf.validate.RepeatedRules + 24, // 20: buf.validate.FieldConstraints.map:type_name -> buf.validate.MapRules + 25, // 21: buf.validate.FieldConstraints.any:type_name -> buf.validate.AnyRules + 26, // 22: buf.validate.FieldConstraints.duration:type_name -> buf.validate.DurationRules + 27, // 23: buf.validate.FieldConstraints.timestamp:type_name -> buf.validate.TimestampRules + 2, // 24: buf.validate.PredefinedConstraints.cel:type_name -> buf.validate.Constraint + 1, // 25: buf.validate.StringRules.well_known_regex:type_name -> buf.validate.KnownRegex + 5, // 26: buf.validate.RepeatedRules.items:type_name -> buf.validate.FieldConstraints + 5, // 27: buf.validate.MapRules.keys:type_name -> buf.validate.FieldConstraints + 5, // 28: buf.validate.MapRules.values:type_name -> buf.validate.FieldConstraints + 32, // 29: buf.validate.DurationRules.const:type_name -> google.protobuf.Duration + 32, // 30: buf.validate.DurationRules.lt:type_name -> google.protobuf.Duration + 32, // 31: buf.validate.DurationRules.lte:type_name -> google.protobuf.Duration + 32, // 32: buf.validate.DurationRules.gt:type_name -> google.protobuf.Duration + 32, // 33: buf.validate.DurationRules.gte:type_name -> google.protobuf.Duration + 32, // 34: buf.validate.DurationRules.in:type_name -> google.protobuf.Duration + 32, // 35: buf.validate.DurationRules.not_in:type_name -> google.protobuf.Duration + 32, // 36: buf.validate.DurationRules.example:type_name -> google.protobuf.Duration + 33, // 37: buf.validate.TimestampRules.const:type_name -> google.protobuf.Timestamp + 33, // 38: buf.validate.TimestampRules.lt:type_name -> google.protobuf.Timestamp + 33, // 39: buf.validate.TimestampRules.lte:type_name -> google.protobuf.Timestamp + 33, // 40: buf.validate.TimestampRules.gt:type_name -> google.protobuf.Timestamp + 33, // 41: buf.validate.TimestampRules.gte:type_name -> google.protobuf.Timestamp + 32, // 42: buf.validate.TimestampRules.within:type_name -> google.protobuf.Duration + 33, // 43: buf.validate.TimestampRules.example:type_name -> google.protobuf.Timestamp + 29, // 44: buf.validate.Violations.violations:type_name -> buf.validate.Violation + 30, // 45: buf.validate.Violation.field:type_name -> buf.validate.FieldPath + 30, // 46: buf.validate.Violation.rule:type_name -> buf.validate.FieldPath + 31, // 47: buf.validate.FieldPath.elements:type_name -> buf.validate.FieldPathElement + 34, // 48: buf.validate.FieldPathElement.field_type:type_name -> google.protobuf.FieldDescriptorProto.Type + 34, // 49: buf.validate.FieldPathElement.key_type:type_name -> google.protobuf.FieldDescriptorProto.Type + 34, // 50: buf.validate.FieldPathElement.value_type:type_name -> google.protobuf.FieldDescriptorProto.Type + 35, // 51: buf.validate.message:extendee -> google.protobuf.MessageOptions + 36, // 52: buf.validate.oneof:extendee -> google.protobuf.OneofOptions + 37, // 53: buf.validate.field:extendee -> google.protobuf.FieldOptions + 37, // 54: buf.validate.predefined:extendee -> google.protobuf.FieldOptions + 3, // 55: buf.validate.message:type_name -> buf.validate.MessageConstraints + 4, // 56: buf.validate.oneof:type_name -> buf.validate.OneofConstraints + 5, // 57: buf.validate.field:type_name -> buf.validate.FieldConstraints + 6, // 58: buf.validate.predefined:type_name -> buf.validate.PredefinedConstraints + 59, // [59:59] is the sub-list for method output_type + 59, // [59:59] is the sub-list for method input_type + 55, // [55:59] is the sub-list for extension type_name + 51, // [51:55] is the sub-list for extension extendee + 0, // [0:51] is the sub-list for field type_name +} + +func init() { file_buf_validate_validate_proto_init() } +func file_buf_validate_validate_proto_init() { + if File_buf_validate_validate_proto != nil { + return + } + file_buf_validate_validate_proto_msgTypes[3].OneofWrappers = []any{ + (*FieldConstraints_Float)(nil), + (*FieldConstraints_Double)(nil), + (*FieldConstraints_Int32)(nil), + (*FieldConstraints_Int64)(nil), + (*FieldConstraints_Uint32)(nil), + (*FieldConstraints_Uint64)(nil), + (*FieldConstraints_Sint32)(nil), + (*FieldConstraints_Sint64)(nil), + (*FieldConstraints_Fixed32)(nil), + (*FieldConstraints_Fixed64)(nil), + (*FieldConstraints_Sfixed32)(nil), + (*FieldConstraints_Sfixed64)(nil), + (*FieldConstraints_Bool)(nil), + (*FieldConstraints_String_)(nil), + (*FieldConstraints_Bytes)(nil), + (*FieldConstraints_Enum)(nil), + (*FieldConstraints_Repeated)(nil), + (*FieldConstraints_Map)(nil), + (*FieldConstraints_Any)(nil), + (*FieldConstraints_Duration)(nil), + (*FieldConstraints_Timestamp)(nil), + } + file_buf_validate_validate_proto_msgTypes[5].OneofWrappers = []any{ + (*FloatRules_Lt)(nil), + (*FloatRules_Lte)(nil), + (*FloatRules_Gt)(nil), + (*FloatRules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[6].OneofWrappers = []any{ + (*DoubleRules_Lt)(nil), + (*DoubleRules_Lte)(nil), + (*DoubleRules_Gt)(nil), + (*DoubleRules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[7].OneofWrappers = []any{ + (*Int32Rules_Lt)(nil), + (*Int32Rules_Lte)(nil), + (*Int32Rules_Gt)(nil), + (*Int32Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[8].OneofWrappers = []any{ + (*Int64Rules_Lt)(nil), + (*Int64Rules_Lte)(nil), + (*Int64Rules_Gt)(nil), + (*Int64Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[9].OneofWrappers = []any{ + (*UInt32Rules_Lt)(nil), + (*UInt32Rules_Lte)(nil), + (*UInt32Rules_Gt)(nil), + (*UInt32Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[10].OneofWrappers = []any{ + (*UInt64Rules_Lt)(nil), + (*UInt64Rules_Lte)(nil), + (*UInt64Rules_Gt)(nil), + (*UInt64Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[11].OneofWrappers = []any{ + (*SInt32Rules_Lt)(nil), + (*SInt32Rules_Lte)(nil), + (*SInt32Rules_Gt)(nil), + (*SInt32Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[12].OneofWrappers = []any{ + (*SInt64Rules_Lt)(nil), + (*SInt64Rules_Lte)(nil), + (*SInt64Rules_Gt)(nil), + (*SInt64Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[13].OneofWrappers = []any{ + (*Fixed32Rules_Lt)(nil), + (*Fixed32Rules_Lte)(nil), + (*Fixed32Rules_Gt)(nil), + (*Fixed32Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[14].OneofWrappers = []any{ + (*Fixed64Rules_Lt)(nil), + (*Fixed64Rules_Lte)(nil), + (*Fixed64Rules_Gt)(nil), + (*Fixed64Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[15].OneofWrappers = []any{ + (*SFixed32Rules_Lt)(nil), + (*SFixed32Rules_Lte)(nil), + (*SFixed32Rules_Gt)(nil), + (*SFixed32Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[16].OneofWrappers = []any{ + (*SFixed64Rules_Lt)(nil), + (*SFixed64Rules_Lte)(nil), + (*SFixed64Rules_Gt)(nil), + (*SFixed64Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[18].OneofWrappers = []any{ + (*StringRules_Email)(nil), + (*StringRules_Hostname)(nil), + (*StringRules_Ip)(nil), + (*StringRules_Ipv4)(nil), + (*StringRules_Ipv6)(nil), + (*StringRules_Uri)(nil), + (*StringRules_UriRef)(nil), + (*StringRules_Address)(nil), + (*StringRules_Uuid)(nil), + (*StringRules_Tuuid)(nil), + (*StringRules_IpWithPrefixlen)(nil), + (*StringRules_Ipv4WithPrefixlen)(nil), + (*StringRules_Ipv6WithPrefixlen)(nil), + (*StringRules_IpPrefix)(nil), + (*StringRules_Ipv4Prefix)(nil), + (*StringRules_Ipv6Prefix)(nil), + (*StringRules_HostAndPort)(nil), + (*StringRules_WellKnownRegex)(nil), + } + file_buf_validate_validate_proto_msgTypes[19].OneofWrappers = []any{ + (*BytesRules_Ip)(nil), + (*BytesRules_Ipv4)(nil), + (*BytesRules_Ipv6)(nil), + } + file_buf_validate_validate_proto_msgTypes[24].OneofWrappers = []any{ + (*DurationRules_Lt)(nil), + (*DurationRules_Lte)(nil), + (*DurationRules_Gt)(nil), + (*DurationRules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[25].OneofWrappers = []any{ + (*TimestampRules_Lt)(nil), + (*TimestampRules_Lte)(nil), + (*TimestampRules_LtNow)(nil), + (*TimestampRules_Gt)(nil), + (*TimestampRules_Gte)(nil), + (*TimestampRules_GtNow)(nil), + } + file_buf_validate_validate_proto_msgTypes[29].OneofWrappers = []any{ + (*FieldPathElement_Index)(nil), + (*FieldPathElement_BoolKey)(nil), + (*FieldPathElement_IntKey)(nil), + (*FieldPathElement_UintKey)(nil), + (*FieldPathElement_StringKey)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_buf_validate_validate_proto_rawDesc, + NumEnums: 2, + NumMessages: 30, + NumExtensions: 4, + NumServices: 0, + }, + GoTypes: file_buf_validate_validate_proto_goTypes, + DependencyIndexes: file_buf_validate_validate_proto_depIdxs, + EnumInfos: file_buf_validate_validate_proto_enumTypes, + MessageInfos: file_buf_validate_validate_proto_msgTypes, + ExtensionInfos: file_buf_validate_validate_proto_extTypes, + }.Build() + File_buf_validate_validate_proto = out.File + file_buf_validate_validate_proto_rawDesc = nil + file_buf_validate_validate_proto_goTypes = nil + file_buf_validate_validate_proto_depIdxs = nil +} diff --git a/proto/buf/validate/validate_grpc_pb.js b/proto/buf/validate/validate_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/buf/validate/validate_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/buf/validate/validate_pb.d.ts b/proto/buf/validate/validate_pb.d.ts new file mode 100644 index 000000000..fa278f0c3 --- /dev/null +++ b/proto/buf/validate/validate_pb.d.ts @@ -0,0 +1,2187 @@ +// package: buf.validate +// file: buf/validate/validate.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; +import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb"; +import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; + +export class Constraint extends jspb.Message { + + hasId(): boolean; + clearId(): void; + getId(): string | undefined; + setId(value: string): Constraint; + + hasMessage(): boolean; + clearMessage(): void; + getMessage(): string | undefined; + setMessage(value: string): Constraint; + + hasExpression(): boolean; + clearExpression(): void; + getExpression(): string | undefined; + setExpression(value: string): Constraint; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Constraint.AsObject; + static toObject(includeInstance: boolean, msg: Constraint): Constraint.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Constraint, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Constraint; + static deserializeBinaryFromReader(message: Constraint, reader: jspb.BinaryReader): Constraint; +} + +export namespace Constraint { + export type AsObject = { + id?: string, + message?: string, + expression?: string, + } +} + +export class MessageConstraints extends jspb.Message { + + hasDisabled(): boolean; + clearDisabled(): void; + getDisabled(): boolean | undefined; + setDisabled(value: boolean): MessageConstraints; + clearCelList(): void; + getCelList(): Array; + setCelList(value: Array): MessageConstraints; + addCel(value?: Constraint, index?: number): Constraint; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MessageConstraints.AsObject; + static toObject(includeInstance: boolean, msg: MessageConstraints): MessageConstraints.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MessageConstraints, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MessageConstraints; + static deserializeBinaryFromReader(message: MessageConstraints, reader: jspb.BinaryReader): MessageConstraints; +} + +export namespace MessageConstraints { + export type AsObject = { + disabled?: boolean, + celList: Array, + } +} + +export class OneofConstraints extends jspb.Message { + + hasRequired(): boolean; + clearRequired(): void; + getRequired(): boolean | undefined; + setRequired(value: boolean): OneofConstraints; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OneofConstraints.AsObject; + static toObject(includeInstance: boolean, msg: OneofConstraints): OneofConstraints.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OneofConstraints, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OneofConstraints; + static deserializeBinaryFromReader(message: OneofConstraints, reader: jspb.BinaryReader): OneofConstraints; +} + +export namespace OneofConstraints { + export type AsObject = { + required?: boolean, + } +} + +export class FieldConstraints extends jspb.Message { + clearCelList(): void; + getCelList(): Array; + setCelList(value: Array): FieldConstraints; + addCel(value?: Constraint, index?: number): Constraint; + + hasRequired(): boolean; + clearRequired(): void; + getRequired(): boolean | undefined; + setRequired(value: boolean): FieldConstraints; + + hasIgnore(): boolean; + clearIgnore(): void; + getIgnore(): Ignore | undefined; + setIgnore(value: Ignore): FieldConstraints; + + hasFloat(): boolean; + clearFloat(): void; + getFloat(): FloatRules | undefined; + setFloat(value?: FloatRules): FieldConstraints; + + hasDouble(): boolean; + clearDouble(): void; + getDouble(): DoubleRules | undefined; + setDouble(value?: DoubleRules): FieldConstraints; + + hasInt32(): boolean; + clearInt32(): void; + getInt32(): Int32Rules | undefined; + setInt32(value?: Int32Rules): FieldConstraints; + + hasInt64(): boolean; + clearInt64(): void; + getInt64(): Int64Rules | undefined; + setInt64(value?: Int64Rules): FieldConstraints; + + hasUint32(): boolean; + clearUint32(): void; + getUint32(): UInt32Rules | undefined; + setUint32(value?: UInt32Rules): FieldConstraints; + + hasUint64(): boolean; + clearUint64(): void; + getUint64(): UInt64Rules | undefined; + setUint64(value?: UInt64Rules): FieldConstraints; + + hasSint32(): boolean; + clearSint32(): void; + getSint32(): SInt32Rules | undefined; + setSint32(value?: SInt32Rules): FieldConstraints; + + hasSint64(): boolean; + clearSint64(): void; + getSint64(): SInt64Rules | undefined; + setSint64(value?: SInt64Rules): FieldConstraints; + + hasFixed32(): boolean; + clearFixed32(): void; + getFixed32(): Fixed32Rules | undefined; + setFixed32(value?: Fixed32Rules): FieldConstraints; + + hasFixed64(): boolean; + clearFixed64(): void; + getFixed64(): Fixed64Rules | undefined; + setFixed64(value?: Fixed64Rules): FieldConstraints; + + hasSfixed32(): boolean; + clearSfixed32(): void; + getSfixed32(): SFixed32Rules | undefined; + setSfixed32(value?: SFixed32Rules): FieldConstraints; + + hasSfixed64(): boolean; + clearSfixed64(): void; + getSfixed64(): SFixed64Rules | undefined; + setSfixed64(value?: SFixed64Rules): FieldConstraints; + + hasBool(): boolean; + clearBool(): void; + getBool(): BoolRules | undefined; + setBool(value?: BoolRules): FieldConstraints; + + hasString(): boolean; + clearString(): void; + getString(): StringRules | undefined; + setString(value?: StringRules): FieldConstraints; + + hasBytes(): boolean; + clearBytes(): void; + getBytes(): BytesRules | undefined; + setBytes(value?: BytesRules): FieldConstraints; + + hasEnum(): boolean; + clearEnum(): void; + getEnum(): EnumRules | undefined; + setEnum(value?: EnumRules): FieldConstraints; + + hasRepeated(): boolean; + clearRepeated(): void; + getRepeated(): RepeatedRules | undefined; + setRepeated(value?: RepeatedRules): FieldConstraints; + + hasMap(): boolean; + clearMap(): void; + getMap(): MapRules | undefined; + setMap(value?: MapRules): FieldConstraints; + + hasAny(): boolean; + clearAny(): void; + getAny(): AnyRules | undefined; + setAny(value?: AnyRules): FieldConstraints; + + hasDuration(): boolean; + clearDuration(): void; + getDuration(): DurationRules | undefined; + setDuration(value?: DurationRules): FieldConstraints; + + hasTimestamp(): boolean; + clearTimestamp(): void; + getTimestamp(): TimestampRules | undefined; + setTimestamp(value?: TimestampRules): FieldConstraints; + + hasSkipped(): boolean; + clearSkipped(): void; + getSkipped(): boolean | undefined; + setSkipped(value: boolean): FieldConstraints; + + hasIgnoreEmpty(): boolean; + clearIgnoreEmpty(): void; + getIgnoreEmpty(): boolean | undefined; + setIgnoreEmpty(value: boolean): FieldConstraints; + + getTypeCase(): FieldConstraints.TypeCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldConstraints.AsObject; + static toObject(includeInstance: boolean, msg: FieldConstraints): FieldConstraints.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldConstraints, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldConstraints; + static deserializeBinaryFromReader(message: FieldConstraints, reader: jspb.BinaryReader): FieldConstraints; +} + +export namespace FieldConstraints { + export type AsObject = { + celList: Array, + required?: boolean, + ignore?: Ignore, + pb_float?: FloatRules.AsObject, + pb_double?: DoubleRules.AsObject, + int32?: Int32Rules.AsObject, + int64?: Int64Rules.AsObject, + uint32?: UInt32Rules.AsObject, + uint64?: UInt64Rules.AsObject, + sint32?: SInt32Rules.AsObject, + sint64?: SInt64Rules.AsObject, + fixed32?: Fixed32Rules.AsObject, + fixed64?: Fixed64Rules.AsObject, + sfixed32?: SFixed32Rules.AsObject, + sfixed64?: SFixed64Rules.AsObject, + bool?: BoolRules.AsObject, + string?: StringRules.AsObject, + bytes?: BytesRules.AsObject, + pb_enum?: EnumRules.AsObject, + repeated?: RepeatedRules.AsObject, + map?: MapRules.AsObject, + any?: AnyRules.AsObject, + duration?: DurationRules.AsObject, + timestamp?: TimestampRules.AsObject, + skipped?: boolean, + ignoreEmpty?: boolean, + } + + export enum TypeCase { + TYPE_NOT_SET = 0, + FLOAT = 1, + DOUBLE = 2, + INT32 = 3, + INT64 = 4, + UINT32 = 5, + UINT64 = 6, + SINT32 = 7, + SINT64 = 8, + FIXED32 = 9, + FIXED64 = 10, + SFIXED32 = 11, + SFIXED64 = 12, + BOOL = 13, + STRING = 14, + BYTES = 15, + ENUM = 16, + REPEATED = 18, + MAP = 19, + ANY = 20, + DURATION = 21, + TIMESTAMP = 22, + } + +} + +export class PredefinedConstraints extends jspb.Message { + clearCelList(): void; + getCelList(): Array; + setCelList(value: Array): PredefinedConstraints; + addCel(value?: Constraint, index?: number): Constraint; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PredefinedConstraints.AsObject; + static toObject(includeInstance: boolean, msg: PredefinedConstraints): PredefinedConstraints.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PredefinedConstraints, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PredefinedConstraints; + static deserializeBinaryFromReader(message: PredefinedConstraints, reader: jspb.BinaryReader): PredefinedConstraints; +} + +export namespace PredefinedConstraints { + export type AsObject = { + celList: Array, + } +} + +export class FloatRules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): FloatRules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): FloatRules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): FloatRules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): FloatRules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): FloatRules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): FloatRules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): FloatRules; + addNotIn(value: number, index?: number): number; + + hasFinite(): boolean; + clearFinite(): void; + getFinite(): boolean | undefined; + setFinite(value: boolean): FloatRules; + clearExampleList(): void; + getExampleList(): Array; + setExampleList(value: Array): FloatRules; + addExample(value: number, index?: number): number; + + getLessThanCase(): FloatRules.LessThanCase; + getGreaterThanCase(): FloatRules.GreaterThanCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FloatRules.AsObject; + static toObject(includeInstance: boolean, msg: FloatRules): FloatRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FloatRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FloatRules; + static deserializeBinaryFromReader(message: FloatRules, reader: jspb.BinaryReader): FloatRules; +} + +export namespace FloatRules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + finite?: boolean, + exampleList: Array, + } + + export enum LessThanCase { + LESS_THAN_NOT_SET = 0, + LT = 2, + LTE = 3, + } + + export enum GreaterThanCase { + GREATER_THAN_NOT_SET = 0, + GT = 4, + GTE = 5, + } + +} + +export class DoubleRules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): DoubleRules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): DoubleRules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): DoubleRules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): DoubleRules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): DoubleRules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): DoubleRules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): DoubleRules; + addNotIn(value: number, index?: number): number; + + hasFinite(): boolean; + clearFinite(): void; + getFinite(): boolean | undefined; + setFinite(value: boolean): DoubleRules; + clearExampleList(): void; + getExampleList(): Array; + setExampleList(value: Array): DoubleRules; + addExample(value: number, index?: number): number; + + getLessThanCase(): DoubleRules.LessThanCase; + getGreaterThanCase(): DoubleRules.GreaterThanCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DoubleRules.AsObject; + static toObject(includeInstance: boolean, msg: DoubleRules): DoubleRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DoubleRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DoubleRules; + static deserializeBinaryFromReader(message: DoubleRules, reader: jspb.BinaryReader): DoubleRules; +} + +export namespace DoubleRules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + finite?: boolean, + exampleList: Array, + } + + export enum LessThanCase { + LESS_THAN_NOT_SET = 0, + LT = 2, + LTE = 3, + } + + export enum GreaterThanCase { + GREATER_THAN_NOT_SET = 0, + GT = 4, + GTE = 5, + } + +} + +export class Int32Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): Int32Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): Int32Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): Int32Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): Int32Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): Int32Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): Int32Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): Int32Rules; + addNotIn(value: number, index?: number): number; + clearExampleList(): void; + getExampleList(): Array; + setExampleList(value: Array): Int32Rules; + addExample(value: number, index?: number): number; + + getLessThanCase(): Int32Rules.LessThanCase; + getGreaterThanCase(): Int32Rules.GreaterThanCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Int32Rules.AsObject; + static toObject(includeInstance: boolean, msg: Int32Rules): Int32Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Int32Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Int32Rules; + static deserializeBinaryFromReader(message: Int32Rules, reader: jspb.BinaryReader): Int32Rules; +} + +export namespace Int32Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + exampleList: Array, + } + + export enum LessThanCase { + LESS_THAN_NOT_SET = 0, + LT = 2, + LTE = 3, + } + + export enum GreaterThanCase { + GREATER_THAN_NOT_SET = 0, + GT = 4, + GTE = 5, + } + +} + +export class Int64Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): Int64Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): Int64Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): Int64Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): Int64Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): Int64Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): Int64Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): Int64Rules; + addNotIn(value: number, index?: number): number; + clearExampleList(): void; + getExampleList(): Array; + setExampleList(value: Array): Int64Rules; + addExample(value: number, index?: number): number; + + getLessThanCase(): Int64Rules.LessThanCase; + getGreaterThanCase(): Int64Rules.GreaterThanCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Int64Rules.AsObject; + static toObject(includeInstance: boolean, msg: Int64Rules): Int64Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Int64Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Int64Rules; + static deserializeBinaryFromReader(message: Int64Rules, reader: jspb.BinaryReader): Int64Rules; +} + +export namespace Int64Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + exampleList: Array, + } + + export enum LessThanCase { + LESS_THAN_NOT_SET = 0, + LT = 2, + LTE = 3, + } + + export enum GreaterThanCase { + GREATER_THAN_NOT_SET = 0, + GT = 4, + GTE = 5, + } + +} + +export class UInt32Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): UInt32Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): UInt32Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): UInt32Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): UInt32Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): UInt32Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): UInt32Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): UInt32Rules; + addNotIn(value: number, index?: number): number; + clearExampleList(): void; + getExampleList(): Array; + setExampleList(value: Array): UInt32Rules; + addExample(value: number, index?: number): number; + + getLessThanCase(): UInt32Rules.LessThanCase; + getGreaterThanCase(): UInt32Rules.GreaterThanCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UInt32Rules.AsObject; + static toObject(includeInstance: boolean, msg: UInt32Rules): UInt32Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UInt32Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UInt32Rules; + static deserializeBinaryFromReader(message: UInt32Rules, reader: jspb.BinaryReader): UInt32Rules; +} + +export namespace UInt32Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + exampleList: Array, + } + + export enum LessThanCase { + LESS_THAN_NOT_SET = 0, + LT = 2, + LTE = 3, + } + + export enum GreaterThanCase { + GREATER_THAN_NOT_SET = 0, + GT = 4, + GTE = 5, + } + +} + +export class UInt64Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): UInt64Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): UInt64Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): UInt64Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): UInt64Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): UInt64Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): UInt64Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): UInt64Rules; + addNotIn(value: number, index?: number): number; + clearExampleList(): void; + getExampleList(): Array; + setExampleList(value: Array): UInt64Rules; + addExample(value: number, index?: number): number; + + getLessThanCase(): UInt64Rules.LessThanCase; + getGreaterThanCase(): UInt64Rules.GreaterThanCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UInt64Rules.AsObject; + static toObject(includeInstance: boolean, msg: UInt64Rules): UInt64Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UInt64Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UInt64Rules; + static deserializeBinaryFromReader(message: UInt64Rules, reader: jspb.BinaryReader): UInt64Rules; +} + +export namespace UInt64Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + exampleList: Array, + } + + export enum LessThanCase { + LESS_THAN_NOT_SET = 0, + LT = 2, + LTE = 3, + } + + export enum GreaterThanCase { + GREATER_THAN_NOT_SET = 0, + GT = 4, + GTE = 5, + } + +} + +export class SInt32Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): SInt32Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): SInt32Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): SInt32Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): SInt32Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): SInt32Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): SInt32Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): SInt32Rules; + addNotIn(value: number, index?: number): number; + clearExampleList(): void; + getExampleList(): Array; + setExampleList(value: Array): SInt32Rules; + addExample(value: number, index?: number): number; + + getLessThanCase(): SInt32Rules.LessThanCase; + getGreaterThanCase(): SInt32Rules.GreaterThanCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SInt32Rules.AsObject; + static toObject(includeInstance: boolean, msg: SInt32Rules): SInt32Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SInt32Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SInt32Rules; + static deserializeBinaryFromReader(message: SInt32Rules, reader: jspb.BinaryReader): SInt32Rules; +} + +export namespace SInt32Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + exampleList: Array, + } + + export enum LessThanCase { + LESS_THAN_NOT_SET = 0, + LT = 2, + LTE = 3, + } + + export enum GreaterThanCase { + GREATER_THAN_NOT_SET = 0, + GT = 4, + GTE = 5, + } + +} + +export class SInt64Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): SInt64Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): SInt64Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): SInt64Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): SInt64Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): SInt64Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): SInt64Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): SInt64Rules; + addNotIn(value: number, index?: number): number; + clearExampleList(): void; + getExampleList(): Array; + setExampleList(value: Array): SInt64Rules; + addExample(value: number, index?: number): number; + + getLessThanCase(): SInt64Rules.LessThanCase; + getGreaterThanCase(): SInt64Rules.GreaterThanCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SInt64Rules.AsObject; + static toObject(includeInstance: boolean, msg: SInt64Rules): SInt64Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SInt64Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SInt64Rules; + static deserializeBinaryFromReader(message: SInt64Rules, reader: jspb.BinaryReader): SInt64Rules; +} + +export namespace SInt64Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + exampleList: Array, + } + + export enum LessThanCase { + LESS_THAN_NOT_SET = 0, + LT = 2, + LTE = 3, + } + + export enum GreaterThanCase { + GREATER_THAN_NOT_SET = 0, + GT = 4, + GTE = 5, + } + +} + +export class Fixed32Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): Fixed32Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): Fixed32Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): Fixed32Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): Fixed32Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): Fixed32Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): Fixed32Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): Fixed32Rules; + addNotIn(value: number, index?: number): number; + clearExampleList(): void; + getExampleList(): Array; + setExampleList(value: Array): Fixed32Rules; + addExample(value: number, index?: number): number; + + getLessThanCase(): Fixed32Rules.LessThanCase; + getGreaterThanCase(): Fixed32Rules.GreaterThanCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Fixed32Rules.AsObject; + static toObject(includeInstance: boolean, msg: Fixed32Rules): Fixed32Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Fixed32Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Fixed32Rules; + static deserializeBinaryFromReader(message: Fixed32Rules, reader: jspb.BinaryReader): Fixed32Rules; +} + +export namespace Fixed32Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + exampleList: Array, + } + + export enum LessThanCase { + LESS_THAN_NOT_SET = 0, + LT = 2, + LTE = 3, + } + + export enum GreaterThanCase { + GREATER_THAN_NOT_SET = 0, + GT = 4, + GTE = 5, + } + +} + +export class Fixed64Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): Fixed64Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): Fixed64Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): Fixed64Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): Fixed64Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): Fixed64Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): Fixed64Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): Fixed64Rules; + addNotIn(value: number, index?: number): number; + clearExampleList(): void; + getExampleList(): Array; + setExampleList(value: Array): Fixed64Rules; + addExample(value: number, index?: number): number; + + getLessThanCase(): Fixed64Rules.LessThanCase; + getGreaterThanCase(): Fixed64Rules.GreaterThanCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Fixed64Rules.AsObject; + static toObject(includeInstance: boolean, msg: Fixed64Rules): Fixed64Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Fixed64Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Fixed64Rules; + static deserializeBinaryFromReader(message: Fixed64Rules, reader: jspb.BinaryReader): Fixed64Rules; +} + +export namespace Fixed64Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + exampleList: Array, + } + + export enum LessThanCase { + LESS_THAN_NOT_SET = 0, + LT = 2, + LTE = 3, + } + + export enum GreaterThanCase { + GREATER_THAN_NOT_SET = 0, + GT = 4, + GTE = 5, + } + +} + +export class SFixed32Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): SFixed32Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): SFixed32Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): SFixed32Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): SFixed32Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): SFixed32Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): SFixed32Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): SFixed32Rules; + addNotIn(value: number, index?: number): number; + clearExampleList(): void; + getExampleList(): Array; + setExampleList(value: Array): SFixed32Rules; + addExample(value: number, index?: number): number; + + getLessThanCase(): SFixed32Rules.LessThanCase; + getGreaterThanCase(): SFixed32Rules.GreaterThanCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SFixed32Rules.AsObject; + static toObject(includeInstance: boolean, msg: SFixed32Rules): SFixed32Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SFixed32Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SFixed32Rules; + static deserializeBinaryFromReader(message: SFixed32Rules, reader: jspb.BinaryReader): SFixed32Rules; +} + +export namespace SFixed32Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + exampleList: Array, + } + + export enum LessThanCase { + LESS_THAN_NOT_SET = 0, + LT = 2, + LTE = 3, + } + + export enum GreaterThanCase { + GREATER_THAN_NOT_SET = 0, + GT = 4, + GTE = 5, + } + +} + +export class SFixed64Rules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): SFixed64Rules; + + hasLt(): boolean; + clearLt(): void; + getLt(): number | undefined; + setLt(value: number): SFixed64Rules; + + hasLte(): boolean; + clearLte(): void; + getLte(): number | undefined; + setLte(value: number): SFixed64Rules; + + hasGt(): boolean; + clearGt(): void; + getGt(): number | undefined; + setGt(value: number): SFixed64Rules; + + hasGte(): boolean; + clearGte(): void; + getGte(): number | undefined; + setGte(value: number): SFixed64Rules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): SFixed64Rules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): SFixed64Rules; + addNotIn(value: number, index?: number): number; + clearExampleList(): void; + getExampleList(): Array; + setExampleList(value: Array): SFixed64Rules; + addExample(value: number, index?: number): number; + + getLessThanCase(): SFixed64Rules.LessThanCase; + getGreaterThanCase(): SFixed64Rules.GreaterThanCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SFixed64Rules.AsObject; + static toObject(includeInstance: boolean, msg: SFixed64Rules): SFixed64Rules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SFixed64Rules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SFixed64Rules; + static deserializeBinaryFromReader(message: SFixed64Rules, reader: jspb.BinaryReader): SFixed64Rules; +} + +export namespace SFixed64Rules { + export type AsObject = { + pb_const?: number, + lt?: number, + lte?: number, + gt?: number, + gte?: number, + pb_inList: Array, + notInList: Array, + exampleList: Array, + } + + export enum LessThanCase { + LESS_THAN_NOT_SET = 0, + LT = 2, + LTE = 3, + } + + export enum GreaterThanCase { + GREATER_THAN_NOT_SET = 0, + GT = 4, + GTE = 5, + } + +} + +export class BoolRules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): boolean | undefined; + setConst(value: boolean): BoolRules; + clearExampleList(): void; + getExampleList(): Array; + setExampleList(value: Array): BoolRules; + addExample(value: boolean, index?: number): boolean; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BoolRules.AsObject; + static toObject(includeInstance: boolean, msg: BoolRules): BoolRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BoolRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BoolRules; + static deserializeBinaryFromReader(message: BoolRules, reader: jspb.BinaryReader): BoolRules; +} + +export namespace BoolRules { + export type AsObject = { + pb_const?: boolean, + exampleList: Array, + } +} + +export class StringRules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): string | undefined; + setConst(value: string): StringRules; + + hasLen(): boolean; + clearLen(): void; + getLen(): number | undefined; + setLen(value: number): StringRules; + + hasMinLen(): boolean; + clearMinLen(): void; + getMinLen(): number | undefined; + setMinLen(value: number): StringRules; + + hasMaxLen(): boolean; + clearMaxLen(): void; + getMaxLen(): number | undefined; + setMaxLen(value: number): StringRules; + + hasLenBytes(): boolean; + clearLenBytes(): void; + getLenBytes(): number | undefined; + setLenBytes(value: number): StringRules; + + hasMinBytes(): boolean; + clearMinBytes(): void; + getMinBytes(): number | undefined; + setMinBytes(value: number): StringRules; + + hasMaxBytes(): boolean; + clearMaxBytes(): void; + getMaxBytes(): number | undefined; + setMaxBytes(value: number): StringRules; + + hasPattern(): boolean; + clearPattern(): void; + getPattern(): string | undefined; + setPattern(value: string): StringRules; + + hasPrefix(): boolean; + clearPrefix(): void; + getPrefix(): string | undefined; + setPrefix(value: string): StringRules; + + hasSuffix(): boolean; + clearSuffix(): void; + getSuffix(): string | undefined; + setSuffix(value: string): StringRules; + + hasContains(): boolean; + clearContains(): void; + getContains(): string | undefined; + setContains(value: string): StringRules; + + hasNotContains(): boolean; + clearNotContains(): void; + getNotContains(): string | undefined; + setNotContains(value: string): StringRules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): StringRules; + addIn(value: string, index?: number): string; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): StringRules; + addNotIn(value: string, index?: number): string; + + hasEmail(): boolean; + clearEmail(): void; + getEmail(): boolean | undefined; + setEmail(value: boolean): StringRules; + + hasHostname(): boolean; + clearHostname(): void; + getHostname(): boolean | undefined; + setHostname(value: boolean): StringRules; + + hasIp(): boolean; + clearIp(): void; + getIp(): boolean | undefined; + setIp(value: boolean): StringRules; + + hasIpv4(): boolean; + clearIpv4(): void; + getIpv4(): boolean | undefined; + setIpv4(value: boolean): StringRules; + + hasIpv6(): boolean; + clearIpv6(): void; + getIpv6(): boolean | undefined; + setIpv6(value: boolean): StringRules; + + hasUri(): boolean; + clearUri(): void; + getUri(): boolean | undefined; + setUri(value: boolean): StringRules; + + hasUriRef(): boolean; + clearUriRef(): void; + getUriRef(): boolean | undefined; + setUriRef(value: boolean): StringRules; + + hasAddress(): boolean; + clearAddress(): void; + getAddress(): boolean | undefined; + setAddress(value: boolean): StringRules; + + hasUuid(): boolean; + clearUuid(): void; + getUuid(): boolean | undefined; + setUuid(value: boolean): StringRules; + + hasTuuid(): boolean; + clearTuuid(): void; + getTuuid(): boolean | undefined; + setTuuid(value: boolean): StringRules; + + hasIpWithPrefixlen(): boolean; + clearIpWithPrefixlen(): void; + getIpWithPrefixlen(): boolean | undefined; + setIpWithPrefixlen(value: boolean): StringRules; + + hasIpv4WithPrefixlen(): boolean; + clearIpv4WithPrefixlen(): void; + getIpv4WithPrefixlen(): boolean | undefined; + setIpv4WithPrefixlen(value: boolean): StringRules; + + hasIpv6WithPrefixlen(): boolean; + clearIpv6WithPrefixlen(): void; + getIpv6WithPrefixlen(): boolean | undefined; + setIpv6WithPrefixlen(value: boolean): StringRules; + + hasIpPrefix(): boolean; + clearIpPrefix(): void; + getIpPrefix(): boolean | undefined; + setIpPrefix(value: boolean): StringRules; + + hasIpv4Prefix(): boolean; + clearIpv4Prefix(): void; + getIpv4Prefix(): boolean | undefined; + setIpv4Prefix(value: boolean): StringRules; + + hasIpv6Prefix(): boolean; + clearIpv6Prefix(): void; + getIpv6Prefix(): boolean | undefined; + setIpv6Prefix(value: boolean): StringRules; + + hasHostAndPort(): boolean; + clearHostAndPort(): void; + getHostAndPort(): boolean | undefined; + setHostAndPort(value: boolean): StringRules; + + hasWellKnownRegex(): boolean; + clearWellKnownRegex(): void; + getWellKnownRegex(): KnownRegex | undefined; + setWellKnownRegex(value: KnownRegex): StringRules; + + hasStrict(): boolean; + clearStrict(): void; + getStrict(): boolean | undefined; + setStrict(value: boolean): StringRules; + clearExampleList(): void; + getExampleList(): Array; + setExampleList(value: Array): StringRules; + addExample(value: string, index?: number): string; + + getWellKnownCase(): StringRules.WellKnownCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StringRules.AsObject; + static toObject(includeInstance: boolean, msg: StringRules): StringRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StringRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StringRules; + static deserializeBinaryFromReader(message: StringRules, reader: jspb.BinaryReader): StringRules; +} + +export namespace StringRules { + export type AsObject = { + pb_const?: string, + len?: number, + minLen?: number, + maxLen?: number, + lenBytes?: number, + minBytes?: number, + maxBytes?: number, + pattern?: string, + prefix?: string, + suffix?: string, + contains?: string, + notContains?: string, + pb_inList: Array, + notInList: Array, + email?: boolean, + hostname?: boolean, + ip?: boolean, + ipv4?: boolean, + ipv6?: boolean, + uri?: boolean, + uriRef?: boolean, + address?: boolean, + uuid?: boolean, + tuuid?: boolean, + ipWithPrefixlen?: boolean, + ipv4WithPrefixlen?: boolean, + ipv6WithPrefixlen?: boolean, + ipPrefix?: boolean, + ipv4Prefix?: boolean, + ipv6Prefix?: boolean, + hostAndPort?: boolean, + wellKnownRegex?: KnownRegex, + strict?: boolean, + exampleList: Array, + } + + export enum WellKnownCase { + WELL_KNOWN_NOT_SET = 0, + EMAIL = 12, + HOSTNAME = 13, + IP = 14, + IPV4 = 15, + IPV6 = 16, + URI = 17, + URI_REF = 18, + ADDRESS = 21, + UUID = 22, + TUUID = 33, + IP_WITH_PREFIXLEN = 26, + IPV4_WITH_PREFIXLEN = 27, + IPV6_WITH_PREFIXLEN = 28, + IP_PREFIX = 29, + IPV4_PREFIX = 30, + IPV6_PREFIX = 31, + HOST_AND_PORT = 32, + WELL_KNOWN_REGEX = 24, + } + +} + +export class BytesRules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): Uint8Array | string; + getConst_asU8(): Uint8Array; + getConst_asB64(): string; + setConst(value: Uint8Array | string): BytesRules; + + hasLen(): boolean; + clearLen(): void; + getLen(): number | undefined; + setLen(value: number): BytesRules; + + hasMinLen(): boolean; + clearMinLen(): void; + getMinLen(): number | undefined; + setMinLen(value: number): BytesRules; + + hasMaxLen(): boolean; + clearMaxLen(): void; + getMaxLen(): number | undefined; + setMaxLen(value: number): BytesRules; + + hasPattern(): boolean; + clearPattern(): void; + getPattern(): string | undefined; + setPattern(value: string): BytesRules; + + hasPrefix(): boolean; + clearPrefix(): void; + getPrefix(): Uint8Array | string; + getPrefix_asU8(): Uint8Array; + getPrefix_asB64(): string; + setPrefix(value: Uint8Array | string): BytesRules; + + hasSuffix(): boolean; + clearSuffix(): void; + getSuffix(): Uint8Array | string; + getSuffix_asU8(): Uint8Array; + getSuffix_asB64(): string; + setSuffix(value: Uint8Array | string): BytesRules; + + hasContains(): boolean; + clearContains(): void; + getContains(): Uint8Array | string; + getContains_asU8(): Uint8Array; + getContains_asB64(): string; + setContains(value: Uint8Array | string): BytesRules; + clearInList(): void; + getInList(): Array; + getInList_asU8(): Array; + getInList_asB64(): Array; + setInList(value: Array): BytesRules; + addIn(value: Uint8Array | string, index?: number): Uint8Array | string; + clearNotInList(): void; + getNotInList(): Array; + getNotInList_asU8(): Array; + getNotInList_asB64(): Array; + setNotInList(value: Array): BytesRules; + addNotIn(value: Uint8Array | string, index?: number): Uint8Array | string; + + hasIp(): boolean; + clearIp(): void; + getIp(): boolean | undefined; + setIp(value: boolean): BytesRules; + + hasIpv4(): boolean; + clearIpv4(): void; + getIpv4(): boolean | undefined; + setIpv4(value: boolean): BytesRules; + + hasIpv6(): boolean; + clearIpv6(): void; + getIpv6(): boolean | undefined; + setIpv6(value: boolean): BytesRules; + clearExampleList(): void; + getExampleList(): Array; + getExampleList_asU8(): Array; + getExampleList_asB64(): Array; + setExampleList(value: Array): BytesRules; + addExample(value: Uint8Array | string, index?: number): Uint8Array | string; + + getWellKnownCase(): BytesRules.WellKnownCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BytesRules.AsObject; + static toObject(includeInstance: boolean, msg: BytesRules): BytesRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BytesRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BytesRules; + static deserializeBinaryFromReader(message: BytesRules, reader: jspb.BinaryReader): BytesRules; +} + +export namespace BytesRules { + export type AsObject = { + pb_const: Uint8Array | string, + len?: number, + minLen?: number, + maxLen?: number, + pattern?: string, + prefix: Uint8Array | string, + suffix: Uint8Array | string, + contains: Uint8Array | string, + pb_inList: Array, + notInList: Array, + ip?: boolean, + ipv4?: boolean, + ipv6?: boolean, + exampleList: Array, + } + + export enum WellKnownCase { + WELL_KNOWN_NOT_SET = 0, + IP = 10, + IPV4 = 11, + IPV6 = 12, + } + +} + +export class EnumRules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): number | undefined; + setConst(value: number): EnumRules; + + hasDefinedOnly(): boolean; + clearDefinedOnly(): void; + getDefinedOnly(): boolean | undefined; + setDefinedOnly(value: boolean): EnumRules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): EnumRules; + addIn(value: number, index?: number): number; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): EnumRules; + addNotIn(value: number, index?: number): number; + clearExampleList(): void; + getExampleList(): Array; + setExampleList(value: Array): EnumRules; + addExample(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumRules.AsObject; + static toObject(includeInstance: boolean, msg: EnumRules): EnumRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumRules; + static deserializeBinaryFromReader(message: EnumRules, reader: jspb.BinaryReader): EnumRules; +} + +export namespace EnumRules { + export type AsObject = { + pb_const?: number, + definedOnly?: boolean, + pb_inList: Array, + notInList: Array, + exampleList: Array, + } +} + +export class RepeatedRules extends jspb.Message { + + hasMinItems(): boolean; + clearMinItems(): void; + getMinItems(): number | undefined; + setMinItems(value: number): RepeatedRules; + + hasMaxItems(): boolean; + clearMaxItems(): void; + getMaxItems(): number | undefined; + setMaxItems(value: number): RepeatedRules; + + hasUnique(): boolean; + clearUnique(): void; + getUnique(): boolean | undefined; + setUnique(value: boolean): RepeatedRules; + + hasItems(): boolean; + clearItems(): void; + getItems(): FieldConstraints | undefined; + setItems(value?: FieldConstraints): RepeatedRules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RepeatedRules.AsObject; + static toObject(includeInstance: boolean, msg: RepeatedRules): RepeatedRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RepeatedRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RepeatedRules; + static deserializeBinaryFromReader(message: RepeatedRules, reader: jspb.BinaryReader): RepeatedRules; +} + +export namespace RepeatedRules { + export type AsObject = { + minItems?: number, + maxItems?: number, + unique?: boolean, + items?: FieldConstraints.AsObject, + } +} + +export class MapRules extends jspb.Message { + + hasMinPairs(): boolean; + clearMinPairs(): void; + getMinPairs(): number | undefined; + setMinPairs(value: number): MapRules; + + hasMaxPairs(): boolean; + clearMaxPairs(): void; + getMaxPairs(): number | undefined; + setMaxPairs(value: number): MapRules; + + hasKeys(): boolean; + clearKeys(): void; + getKeys(): FieldConstraints | undefined; + setKeys(value?: FieldConstraints): MapRules; + + hasValues(): boolean; + clearValues(): void; + getValues(): FieldConstraints | undefined; + setValues(value?: FieldConstraints): MapRules; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MapRules.AsObject; + static toObject(includeInstance: boolean, msg: MapRules): MapRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MapRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MapRules; + static deserializeBinaryFromReader(message: MapRules, reader: jspb.BinaryReader): MapRules; +} + +export namespace MapRules { + export type AsObject = { + minPairs?: number, + maxPairs?: number, + keys?: FieldConstraints.AsObject, + values?: FieldConstraints.AsObject, + } +} + +export class AnyRules extends jspb.Message { + clearInList(): void; + getInList(): Array; + setInList(value: Array): AnyRules; + addIn(value: string, index?: number): string; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): AnyRules; + addNotIn(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AnyRules.AsObject; + static toObject(includeInstance: boolean, msg: AnyRules): AnyRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AnyRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AnyRules; + static deserializeBinaryFromReader(message: AnyRules, reader: jspb.BinaryReader): AnyRules; +} + +export namespace AnyRules { + export type AsObject = { + pb_inList: Array, + notInList: Array, + } +} + +export class DurationRules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): google_protobuf_duration_pb.Duration | undefined; + setConst(value?: google_protobuf_duration_pb.Duration): DurationRules; + + hasLt(): boolean; + clearLt(): void; + getLt(): google_protobuf_duration_pb.Duration | undefined; + setLt(value?: google_protobuf_duration_pb.Duration): DurationRules; + + hasLte(): boolean; + clearLte(): void; + getLte(): google_protobuf_duration_pb.Duration | undefined; + setLte(value?: google_protobuf_duration_pb.Duration): DurationRules; + + hasGt(): boolean; + clearGt(): void; + getGt(): google_protobuf_duration_pb.Duration | undefined; + setGt(value?: google_protobuf_duration_pb.Duration): DurationRules; + + hasGte(): boolean; + clearGte(): void; + getGte(): google_protobuf_duration_pb.Duration | undefined; + setGte(value?: google_protobuf_duration_pb.Duration): DurationRules; + clearInList(): void; + getInList(): Array; + setInList(value: Array): DurationRules; + addIn(value?: google_protobuf_duration_pb.Duration, index?: number): google_protobuf_duration_pb.Duration; + clearNotInList(): void; + getNotInList(): Array; + setNotInList(value: Array): DurationRules; + addNotIn(value?: google_protobuf_duration_pb.Duration, index?: number): google_protobuf_duration_pb.Duration; + clearExampleList(): void; + getExampleList(): Array; + setExampleList(value: Array): DurationRules; + addExample(value?: google_protobuf_duration_pb.Duration, index?: number): google_protobuf_duration_pb.Duration; + + getLessThanCase(): DurationRules.LessThanCase; + getGreaterThanCase(): DurationRules.GreaterThanCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DurationRules.AsObject; + static toObject(includeInstance: boolean, msg: DurationRules): DurationRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DurationRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DurationRules; + static deserializeBinaryFromReader(message: DurationRules, reader: jspb.BinaryReader): DurationRules; +} + +export namespace DurationRules { + export type AsObject = { + pb_const?: google_protobuf_duration_pb.Duration.AsObject, + lt?: google_protobuf_duration_pb.Duration.AsObject, + lte?: google_protobuf_duration_pb.Duration.AsObject, + gt?: google_protobuf_duration_pb.Duration.AsObject, + gte?: google_protobuf_duration_pb.Duration.AsObject, + pb_inList: Array, + notInList: Array, + exampleList: Array, + } + + export enum LessThanCase { + LESS_THAN_NOT_SET = 0, + LT = 3, + LTE = 4, + } + + export enum GreaterThanCase { + GREATER_THAN_NOT_SET = 0, + GT = 5, + GTE = 6, + } + +} + +export class TimestampRules extends jspb.Message { + + hasConst(): boolean; + clearConst(): void; + getConst(): google_protobuf_timestamp_pb.Timestamp | undefined; + setConst(value?: google_protobuf_timestamp_pb.Timestamp): TimestampRules; + + hasLt(): boolean; + clearLt(): void; + getLt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLt(value?: google_protobuf_timestamp_pb.Timestamp): TimestampRules; + + hasLte(): boolean; + clearLte(): void; + getLte(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLte(value?: google_protobuf_timestamp_pb.Timestamp): TimestampRules; + + hasLtNow(): boolean; + clearLtNow(): void; + getLtNow(): boolean | undefined; + setLtNow(value: boolean): TimestampRules; + + hasGt(): boolean; + clearGt(): void; + getGt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setGt(value?: google_protobuf_timestamp_pb.Timestamp): TimestampRules; + + hasGte(): boolean; + clearGte(): void; + getGte(): google_protobuf_timestamp_pb.Timestamp | undefined; + setGte(value?: google_protobuf_timestamp_pb.Timestamp): TimestampRules; + + hasGtNow(): boolean; + clearGtNow(): void; + getGtNow(): boolean | undefined; + setGtNow(value: boolean): TimestampRules; + + hasWithin(): boolean; + clearWithin(): void; + getWithin(): google_protobuf_duration_pb.Duration | undefined; + setWithin(value?: google_protobuf_duration_pb.Duration): TimestampRules; + clearExampleList(): void; + getExampleList(): Array; + setExampleList(value: Array): TimestampRules; + addExample(value?: google_protobuf_timestamp_pb.Timestamp, index?: number): google_protobuf_timestamp_pb.Timestamp; + + getLessThanCase(): TimestampRules.LessThanCase; + getGreaterThanCase(): TimestampRules.GreaterThanCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TimestampRules.AsObject; + static toObject(includeInstance: boolean, msg: TimestampRules): TimestampRules.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TimestampRules, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TimestampRules; + static deserializeBinaryFromReader(message: TimestampRules, reader: jspb.BinaryReader): TimestampRules; +} + +export namespace TimestampRules { + export type AsObject = { + pb_const?: google_protobuf_timestamp_pb.Timestamp.AsObject, + lt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + lte?: google_protobuf_timestamp_pb.Timestamp.AsObject, + ltNow?: boolean, + gt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + gte?: google_protobuf_timestamp_pb.Timestamp.AsObject, + gtNow?: boolean, + within?: google_protobuf_duration_pb.Duration.AsObject, + exampleList: Array, + } + + export enum LessThanCase { + LESS_THAN_NOT_SET = 0, + LT = 3, + LTE = 4, + LT_NOW = 7, + } + + export enum GreaterThanCase { + GREATER_THAN_NOT_SET = 0, + GT = 5, + GTE = 6, + GT_NOW = 8, + } + +} + +export class Violations extends jspb.Message { + clearViolationsList(): void; + getViolationsList(): Array; + setViolationsList(value: Array): Violations; + addViolations(value?: Violation, index?: number): Violation; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Violations.AsObject; + static toObject(includeInstance: boolean, msg: Violations): Violations.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Violations, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Violations; + static deserializeBinaryFromReader(message: Violations, reader: jspb.BinaryReader): Violations; +} + +export namespace Violations { + export type AsObject = { + violationsList: Array, + } +} + +export class Violation extends jspb.Message { + + hasField(): boolean; + clearField(): void; + getField(): FieldPath | undefined; + setField(value?: FieldPath): Violation; + + hasRule(): boolean; + clearRule(): void; + getRule(): FieldPath | undefined; + setRule(value?: FieldPath): Violation; + + hasFieldPath(): boolean; + clearFieldPath(): void; + getFieldPath(): string | undefined; + setFieldPath(value: string): Violation; + + hasConstraintId(): boolean; + clearConstraintId(): void; + getConstraintId(): string | undefined; + setConstraintId(value: string): Violation; + + hasMessage(): boolean; + clearMessage(): void; + getMessage(): string | undefined; + setMessage(value: string): Violation; + + hasForKey(): boolean; + clearForKey(): void; + getForKey(): boolean | undefined; + setForKey(value: boolean): Violation; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Violation.AsObject; + static toObject(includeInstance: boolean, msg: Violation): Violation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Violation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Violation; + static deserializeBinaryFromReader(message: Violation, reader: jspb.BinaryReader): Violation; +} + +export namespace Violation { + export type AsObject = { + field?: FieldPath.AsObject, + rule?: FieldPath.AsObject, + fieldPath?: string, + constraintId?: string, + message?: string, + forKey?: boolean, + } +} + +export class FieldPath extends jspb.Message { + clearElementsList(): void; + getElementsList(): Array; + setElementsList(value: Array): FieldPath; + addElements(value?: FieldPathElement, index?: number): FieldPathElement; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldPath.AsObject; + static toObject(includeInstance: boolean, msg: FieldPath): FieldPath.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldPath, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldPath; + static deserializeBinaryFromReader(message: FieldPath, reader: jspb.BinaryReader): FieldPath; +} + +export namespace FieldPath { + export type AsObject = { + elementsList: Array, + } +} + +export class FieldPathElement extends jspb.Message { + + hasFieldNumber(): boolean; + clearFieldNumber(): void; + getFieldNumber(): number | undefined; + setFieldNumber(value: number): FieldPathElement; + + hasFieldName(): boolean; + clearFieldName(): void; + getFieldName(): string | undefined; + setFieldName(value: string): FieldPathElement; + + hasFieldType(): boolean; + clearFieldType(): void; + getFieldType(): google_protobuf_descriptor_pb.FieldDescriptorProto.Type | undefined; + setFieldType(value: google_protobuf_descriptor_pb.FieldDescriptorProto.Type): FieldPathElement; + + hasKeyType(): boolean; + clearKeyType(): void; + getKeyType(): google_protobuf_descriptor_pb.FieldDescriptorProto.Type | undefined; + setKeyType(value: google_protobuf_descriptor_pb.FieldDescriptorProto.Type): FieldPathElement; + + hasValueType(): boolean; + clearValueType(): void; + getValueType(): google_protobuf_descriptor_pb.FieldDescriptorProto.Type | undefined; + setValueType(value: google_protobuf_descriptor_pb.FieldDescriptorProto.Type): FieldPathElement; + + hasIndex(): boolean; + clearIndex(): void; + getIndex(): number | undefined; + setIndex(value: number): FieldPathElement; + + hasBoolKey(): boolean; + clearBoolKey(): void; + getBoolKey(): boolean | undefined; + setBoolKey(value: boolean): FieldPathElement; + + hasIntKey(): boolean; + clearIntKey(): void; + getIntKey(): number | undefined; + setIntKey(value: number): FieldPathElement; + + hasUintKey(): boolean; + clearUintKey(): void; + getUintKey(): number | undefined; + setUintKey(value: number): FieldPathElement; + + hasStringKey(): boolean; + clearStringKey(): void; + getStringKey(): string | undefined; + setStringKey(value: string): FieldPathElement; + + getSubscriptCase(): FieldPathElement.SubscriptCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldPathElement.AsObject; + static toObject(includeInstance: boolean, msg: FieldPathElement): FieldPathElement.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldPathElement, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldPathElement; + static deserializeBinaryFromReader(message: FieldPathElement, reader: jspb.BinaryReader): FieldPathElement; +} + +export namespace FieldPathElement { + export type AsObject = { + fieldNumber?: number, + fieldName?: string, + fieldType?: google_protobuf_descriptor_pb.FieldDescriptorProto.Type, + keyType?: google_protobuf_descriptor_pb.FieldDescriptorProto.Type, + valueType?: google_protobuf_descriptor_pb.FieldDescriptorProto.Type, + index?: number, + boolKey?: boolean, + intKey?: number, + uintKey?: number, + stringKey?: string, + } + + export enum SubscriptCase { + SUBSCRIPT_NOT_SET = 0, + INDEX = 6, + BOOL_KEY = 7, + INT_KEY = 8, + UINT_KEY = 9, + STRING_KEY = 10, + } + +} + +export const message: jspb.ExtensionFieldInfo; + +export const oneof: jspb.ExtensionFieldInfo; + +export const field: jspb.ExtensionFieldInfo; + +export const predefined: jspb.ExtensionFieldInfo; + +export enum Ignore { + IGNORE_UNSPECIFIED = 0, + IGNORE_IF_UNPOPULATED = 1, + IGNORE_IF_DEFAULT_VALUE = 2, + IGNORE_ALWAYS = 3, + IGNORE_EMPTY = 1, + IGNORE_DEFAULT = 2, +} + +export enum KnownRegex { + KNOWN_REGEX_UNSPECIFIED = 0, + KNOWN_REGEX_HTTP_HEADER_NAME = 1, + KNOWN_REGEX_HTTP_HEADER_VALUE = 2, +} diff --git a/proto/buf/validate/validate_pb.js b/proto/buf/validate/validate_pb.js new file mode 100644 index 000000000..afeb4bb9f --- /dev/null +++ b/proto/buf/validate/validate_pb.js @@ -0,0 +1,17050 @@ +// source: buf/validate/validate.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); +goog.object.extend(proto, google_protobuf_duration_pb); +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.buf.validate.AnyRules', null, global); +goog.exportSymbol('proto.buf.validate.BoolRules', null, global); +goog.exportSymbol('proto.buf.validate.BytesRules', null, global); +goog.exportSymbol('proto.buf.validate.BytesRules.WellKnownCase', null, global); +goog.exportSymbol('proto.buf.validate.Constraint', null, global); +goog.exportSymbol('proto.buf.validate.DoubleRules', null, global); +goog.exportSymbol('proto.buf.validate.DoubleRules.GreaterThanCase', null, global); +goog.exportSymbol('proto.buf.validate.DoubleRules.LessThanCase', null, global); +goog.exportSymbol('proto.buf.validate.DurationRules', null, global); +goog.exportSymbol('proto.buf.validate.DurationRules.GreaterThanCase', null, global); +goog.exportSymbol('proto.buf.validate.DurationRules.LessThanCase', null, global); +goog.exportSymbol('proto.buf.validate.EnumRules', null, global); +goog.exportSymbol('proto.buf.validate.FieldConstraints', null, global); +goog.exportSymbol('proto.buf.validate.FieldConstraints.TypeCase', null, global); +goog.exportSymbol('proto.buf.validate.FieldPath', null, global); +goog.exportSymbol('proto.buf.validate.FieldPathElement', null, global); +goog.exportSymbol('proto.buf.validate.FieldPathElement.SubscriptCase', null, global); +goog.exportSymbol('proto.buf.validate.Fixed32Rules', null, global); +goog.exportSymbol('proto.buf.validate.Fixed32Rules.GreaterThanCase', null, global); +goog.exportSymbol('proto.buf.validate.Fixed32Rules.LessThanCase', null, global); +goog.exportSymbol('proto.buf.validate.Fixed64Rules', null, global); +goog.exportSymbol('proto.buf.validate.Fixed64Rules.GreaterThanCase', null, global); +goog.exportSymbol('proto.buf.validate.Fixed64Rules.LessThanCase', null, global); +goog.exportSymbol('proto.buf.validate.FloatRules', null, global); +goog.exportSymbol('proto.buf.validate.FloatRules.GreaterThanCase', null, global); +goog.exportSymbol('proto.buf.validate.FloatRules.LessThanCase', null, global); +goog.exportSymbol('proto.buf.validate.Ignore', null, global); +goog.exportSymbol('proto.buf.validate.Int32Rules', null, global); +goog.exportSymbol('proto.buf.validate.Int32Rules.GreaterThanCase', null, global); +goog.exportSymbol('proto.buf.validate.Int32Rules.LessThanCase', null, global); +goog.exportSymbol('proto.buf.validate.Int64Rules', null, global); +goog.exportSymbol('proto.buf.validate.Int64Rules.GreaterThanCase', null, global); +goog.exportSymbol('proto.buf.validate.Int64Rules.LessThanCase', null, global); +goog.exportSymbol('proto.buf.validate.KnownRegex', null, global); +goog.exportSymbol('proto.buf.validate.MapRules', null, global); +goog.exportSymbol('proto.buf.validate.MessageConstraints', null, global); +goog.exportSymbol('proto.buf.validate.OneofConstraints', null, global); +goog.exportSymbol('proto.buf.validate.PredefinedConstraints', null, global); +goog.exportSymbol('proto.buf.validate.RepeatedRules', null, global); +goog.exportSymbol('proto.buf.validate.SFixed32Rules', null, global); +goog.exportSymbol('proto.buf.validate.SFixed32Rules.GreaterThanCase', null, global); +goog.exportSymbol('proto.buf.validate.SFixed32Rules.LessThanCase', null, global); +goog.exportSymbol('proto.buf.validate.SFixed64Rules', null, global); +goog.exportSymbol('proto.buf.validate.SFixed64Rules.GreaterThanCase', null, global); +goog.exportSymbol('proto.buf.validate.SFixed64Rules.LessThanCase', null, global); +goog.exportSymbol('proto.buf.validate.SInt32Rules', null, global); +goog.exportSymbol('proto.buf.validate.SInt32Rules.GreaterThanCase', null, global); +goog.exportSymbol('proto.buf.validate.SInt32Rules.LessThanCase', null, global); +goog.exportSymbol('proto.buf.validate.SInt64Rules', null, global); +goog.exportSymbol('proto.buf.validate.SInt64Rules.GreaterThanCase', null, global); +goog.exportSymbol('proto.buf.validate.SInt64Rules.LessThanCase', null, global); +goog.exportSymbol('proto.buf.validate.StringRules', null, global); +goog.exportSymbol('proto.buf.validate.StringRules.WellKnownCase', null, global); +goog.exportSymbol('proto.buf.validate.TimestampRules', null, global); +goog.exportSymbol('proto.buf.validate.TimestampRules.GreaterThanCase', null, global); +goog.exportSymbol('proto.buf.validate.TimestampRules.LessThanCase', null, global); +goog.exportSymbol('proto.buf.validate.UInt32Rules', null, global); +goog.exportSymbol('proto.buf.validate.UInt32Rules.GreaterThanCase', null, global); +goog.exportSymbol('proto.buf.validate.UInt32Rules.LessThanCase', null, global); +goog.exportSymbol('proto.buf.validate.UInt64Rules', null, global); +goog.exportSymbol('proto.buf.validate.UInt64Rules.GreaterThanCase', null, global); +goog.exportSymbol('proto.buf.validate.UInt64Rules.LessThanCase', null, global); +goog.exportSymbol('proto.buf.validate.Violation', null, global); +goog.exportSymbol('proto.buf.validate.Violations', null, global); +goog.exportSymbol('proto.buf.validate.field', null, global); +goog.exportSymbol('proto.buf.validate.message', null, global); +goog.exportSymbol('proto.buf.validate.oneof', null, global); +goog.exportSymbol('proto.buf.validate.predefined', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.Constraint = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.buf.validate.Constraint, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.Constraint.displayName = 'proto.buf.validate.Constraint'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.MessageConstraints = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.MessageConstraints.repeatedFields_, null); +}; +goog.inherits(proto.buf.validate.MessageConstraints, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.MessageConstraints.displayName = 'proto.buf.validate.MessageConstraints'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.OneofConstraints = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.buf.validate.OneofConstraints, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.OneofConstraints.displayName = 'proto.buf.validate.OneofConstraints'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.FieldConstraints = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.FieldConstraints.repeatedFields_, proto.buf.validate.FieldConstraints.oneofGroups_); +}; +goog.inherits(proto.buf.validate.FieldConstraints, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.FieldConstraints.displayName = 'proto.buf.validate.FieldConstraints'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.PredefinedConstraints = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.PredefinedConstraints.repeatedFields_, null); +}; +goog.inherits(proto.buf.validate.PredefinedConstraints, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.PredefinedConstraints.displayName = 'proto.buf.validate.PredefinedConstraints'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.FloatRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 10, proto.buf.validate.FloatRules.repeatedFields_, proto.buf.validate.FloatRules.oneofGroups_); +}; +goog.inherits(proto.buf.validate.FloatRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.FloatRules.displayName = 'proto.buf.validate.FloatRules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.FloatRules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.FloatRules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.DoubleRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 10, proto.buf.validate.DoubleRules.repeatedFields_, proto.buf.validate.DoubleRules.oneofGroups_); +}; +goog.inherits(proto.buf.validate.DoubleRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.DoubleRules.displayName = 'proto.buf.validate.DoubleRules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.DoubleRules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.DoubleRules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.Int32Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 9, proto.buf.validate.Int32Rules.repeatedFields_, proto.buf.validate.Int32Rules.oneofGroups_); +}; +goog.inherits(proto.buf.validate.Int32Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.Int32Rules.displayName = 'proto.buf.validate.Int32Rules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.Int32Rules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.Int32Rules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.Int64Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 10, proto.buf.validate.Int64Rules.repeatedFields_, proto.buf.validate.Int64Rules.oneofGroups_); +}; +goog.inherits(proto.buf.validate.Int64Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.Int64Rules.displayName = 'proto.buf.validate.Int64Rules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.Int64Rules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.Int64Rules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.UInt32Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 9, proto.buf.validate.UInt32Rules.repeatedFields_, proto.buf.validate.UInt32Rules.oneofGroups_); +}; +goog.inherits(proto.buf.validate.UInt32Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.UInt32Rules.displayName = 'proto.buf.validate.UInt32Rules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.UInt32Rules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.UInt32Rules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.UInt64Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 9, proto.buf.validate.UInt64Rules.repeatedFields_, proto.buf.validate.UInt64Rules.oneofGroups_); +}; +goog.inherits(proto.buf.validate.UInt64Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.UInt64Rules.displayName = 'proto.buf.validate.UInt64Rules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.UInt64Rules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.UInt64Rules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.SInt32Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 9, proto.buf.validate.SInt32Rules.repeatedFields_, proto.buf.validate.SInt32Rules.oneofGroups_); +}; +goog.inherits(proto.buf.validate.SInt32Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.SInt32Rules.displayName = 'proto.buf.validate.SInt32Rules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.SInt32Rules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.SInt32Rules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.SInt64Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 9, proto.buf.validate.SInt64Rules.repeatedFields_, proto.buf.validate.SInt64Rules.oneofGroups_); +}; +goog.inherits(proto.buf.validate.SInt64Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.SInt64Rules.displayName = 'proto.buf.validate.SInt64Rules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.SInt64Rules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.SInt64Rules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.Fixed32Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 9, proto.buf.validate.Fixed32Rules.repeatedFields_, proto.buf.validate.Fixed32Rules.oneofGroups_); +}; +goog.inherits(proto.buf.validate.Fixed32Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.Fixed32Rules.displayName = 'proto.buf.validate.Fixed32Rules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.Fixed32Rules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.Fixed32Rules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.Fixed64Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 9, proto.buf.validate.Fixed64Rules.repeatedFields_, proto.buf.validate.Fixed64Rules.oneofGroups_); +}; +goog.inherits(proto.buf.validate.Fixed64Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.Fixed64Rules.displayName = 'proto.buf.validate.Fixed64Rules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.Fixed64Rules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.Fixed64Rules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.SFixed32Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 9, proto.buf.validate.SFixed32Rules.repeatedFields_, proto.buf.validate.SFixed32Rules.oneofGroups_); +}; +goog.inherits(proto.buf.validate.SFixed32Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.SFixed32Rules.displayName = 'proto.buf.validate.SFixed32Rules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.SFixed32Rules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.SFixed32Rules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.SFixed64Rules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 9, proto.buf.validate.SFixed64Rules.repeatedFields_, proto.buf.validate.SFixed64Rules.oneofGroups_); +}; +goog.inherits(proto.buf.validate.SFixed64Rules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.SFixed64Rules.displayName = 'proto.buf.validate.SFixed64Rules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.SFixed64Rules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.SFixed64Rules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.BoolRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 3, proto.buf.validate.BoolRules.repeatedFields_, null); +}; +goog.inherits(proto.buf.validate.BoolRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.BoolRules.displayName = 'proto.buf.validate.BoolRules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.BoolRules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.BoolRules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.StringRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 35, proto.buf.validate.StringRules.repeatedFields_, proto.buf.validate.StringRules.oneofGroups_); +}; +goog.inherits(proto.buf.validate.StringRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.StringRules.displayName = 'proto.buf.validate.StringRules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.StringRules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.StringRules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.BytesRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 15, proto.buf.validate.BytesRules.repeatedFields_, proto.buf.validate.BytesRules.oneofGroups_); +}; +goog.inherits(proto.buf.validate.BytesRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.BytesRules.displayName = 'proto.buf.validate.BytesRules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.BytesRules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.BytesRules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.EnumRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 6, proto.buf.validate.EnumRules.repeatedFields_, null); +}; +goog.inherits(proto.buf.validate.EnumRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.EnumRules.displayName = 'proto.buf.validate.EnumRules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.EnumRules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.EnumRules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.RepeatedRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 5, null, null); +}; +goog.inherits(proto.buf.validate.RepeatedRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.RepeatedRules.displayName = 'proto.buf.validate.RepeatedRules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.RepeatedRules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.RepeatedRules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.MapRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 6, null, null); +}; +goog.inherits(proto.buf.validate.MapRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.MapRules.displayName = 'proto.buf.validate.MapRules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.MapRules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.MapRules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.AnyRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.AnyRules.repeatedFields_, null); +}; +goog.inherits(proto.buf.validate.AnyRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.AnyRules.displayName = 'proto.buf.validate.AnyRules'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.DurationRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 10, proto.buf.validate.DurationRules.repeatedFields_, proto.buf.validate.DurationRules.oneofGroups_); +}; +goog.inherits(proto.buf.validate.DurationRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.DurationRules.displayName = 'proto.buf.validate.DurationRules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.DurationRules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.DurationRules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.TimestampRules = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 11, proto.buf.validate.TimestampRules.repeatedFields_, proto.buf.validate.TimestampRules.oneofGroups_); +}; +goog.inherits(proto.buf.validate.TimestampRules, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.TimestampRules.displayName = 'proto.buf.validate.TimestampRules'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.TimestampRules.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.buf.validate.TimestampRules.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.Violations = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.Violations.repeatedFields_, null); +}; +goog.inherits(proto.buf.validate.Violations, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.Violations.displayName = 'proto.buf.validate.Violations'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.Violation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.buf.validate.Violation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.Violation.displayName = 'proto.buf.validate.Violation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.FieldPath = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.buf.validate.FieldPath.repeatedFields_, null); +}; +goog.inherits(proto.buf.validate.FieldPath, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.FieldPath.displayName = 'proto.buf.validate.FieldPath'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.buf.validate.FieldPathElement = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.buf.validate.FieldPathElement.oneofGroups_); +}; +goog.inherits(proto.buf.validate.FieldPathElement, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.buf.validate.FieldPathElement.displayName = 'proto.buf.validate.FieldPathElement'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.Constraint.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.Constraint.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.Constraint} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.Constraint.toObject = function(includeInstance, msg) { + var f, obj = { +id: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +message: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +expression: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.Constraint} + */ +proto.buf.validate.Constraint.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.Constraint; + return proto.buf.validate.Constraint.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.Constraint} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.Constraint} + */ +proto.buf.validate.Constraint.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setExpression(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.Constraint.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.Constraint.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.Constraint} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.Constraint.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.buf.validate.Constraint.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.buf.validate.Constraint} returns this + */ +proto.buf.validate.Constraint.prototype.setId = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Constraint} returns this + */ +proto.buf.validate.Constraint.prototype.clearId = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Constraint.prototype.hasId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.buf.validate.Constraint.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.buf.validate.Constraint} returns this + */ +proto.buf.validate.Constraint.prototype.setMessage = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Constraint} returns this + */ +proto.buf.validate.Constraint.prototype.clearMessage = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Constraint.prototype.hasMessage = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string expression = 3; + * @return {string} + */ +proto.buf.validate.Constraint.prototype.getExpression = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.buf.validate.Constraint} returns this + */ +proto.buf.validate.Constraint.prototype.setExpression = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Constraint} returns this + */ +proto.buf.validate.Constraint.prototype.clearExpression = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Constraint.prototype.hasExpression = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.MessageConstraints.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.MessageConstraints.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.MessageConstraints.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.MessageConstraints} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.MessageConstraints.toObject = function(includeInstance, msg) { + var f, obj = { +disabled: (f = jspb.Message.getBooleanField(msg, 1)) == null ? undefined : f, +celList: jspb.Message.toObjectList(msg.getCelList(), + proto.buf.validate.Constraint.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.MessageConstraints} + */ +proto.buf.validate.MessageConstraints.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.MessageConstraints; + return proto.buf.validate.MessageConstraints.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.MessageConstraints} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.MessageConstraints} + */ +proto.buf.validate.MessageConstraints.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDisabled(value); + break; + case 3: + var value = new proto.buf.validate.Constraint; + reader.readMessage(value,proto.buf.validate.Constraint.deserializeBinaryFromReader); + msg.addCel(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.MessageConstraints.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.MessageConstraints.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.MessageConstraints} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.MessageConstraints.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( + 1, + f + ); + } + f = message.getCelList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.buf.validate.Constraint.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bool disabled = 1; + * @return {boolean} + */ +proto.buf.validate.MessageConstraints.prototype.getDisabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.MessageConstraints} returns this + */ +proto.buf.validate.MessageConstraints.prototype.setDisabled = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.MessageConstraints} returns this + */ +proto.buf.validate.MessageConstraints.prototype.clearDisabled = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.MessageConstraints.prototype.hasDisabled = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated Constraint cel = 3; + * @return {!Array} + */ +proto.buf.validate.MessageConstraints.prototype.getCelList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.buf.validate.Constraint, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.MessageConstraints} returns this +*/ +proto.buf.validate.MessageConstraints.prototype.setCelList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.buf.validate.Constraint=} opt_value + * @param {number=} opt_index + * @return {!proto.buf.validate.Constraint} + */ +proto.buf.validate.MessageConstraints.prototype.addCel = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.buf.validate.Constraint, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.MessageConstraints} returns this + */ +proto.buf.validate.MessageConstraints.prototype.clearCelList = function() { + return this.setCelList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.OneofConstraints.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.OneofConstraints.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.OneofConstraints} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.OneofConstraints.toObject = function(includeInstance, msg) { + var f, obj = { +required: (f = jspb.Message.getBooleanField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.OneofConstraints} + */ +proto.buf.validate.OneofConstraints.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.OneofConstraints; + return proto.buf.validate.OneofConstraints.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.OneofConstraints} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.OneofConstraints} + */ +proto.buf.validate.OneofConstraints.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRequired(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.OneofConstraints.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.OneofConstraints.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.OneofConstraints} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.OneofConstraints.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool required = 1; + * @return {boolean} + */ +proto.buf.validate.OneofConstraints.prototype.getRequired = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.OneofConstraints} returns this + */ +proto.buf.validate.OneofConstraints.prototype.setRequired = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.OneofConstraints} returns this + */ +proto.buf.validate.OneofConstraints.prototype.clearRequired = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.OneofConstraints.prototype.hasRequired = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.FieldConstraints.repeatedFields_ = [23]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.FieldConstraints.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20,21,22]]; + +/** + * @enum {number} + */ +proto.buf.validate.FieldConstraints.TypeCase = { + TYPE_NOT_SET: 0, + FLOAT: 1, + DOUBLE: 2, + INT32: 3, + INT64: 4, + UINT32: 5, + UINT64: 6, + SINT32: 7, + SINT64: 8, + FIXED32: 9, + FIXED64: 10, + SFIXED32: 11, + SFIXED64: 12, + BOOL: 13, + STRING: 14, + BYTES: 15, + ENUM: 16, + REPEATED: 18, + MAP: 19, + ANY: 20, + DURATION: 21, + TIMESTAMP: 22 +}; + +/** + * @return {proto.buf.validate.FieldConstraints.TypeCase} + */ +proto.buf.validate.FieldConstraints.prototype.getTypeCase = function() { + return /** @type {proto.buf.validate.FieldConstraints.TypeCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.FieldConstraints.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.FieldConstraints.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.FieldConstraints.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.FieldConstraints} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.FieldConstraints.toObject = function(includeInstance, msg) { + var f, obj = { +celList: jspb.Message.toObjectList(msg.getCelList(), + proto.buf.validate.Constraint.toObject, includeInstance), +required: (f = jspb.Message.getBooleanField(msg, 25)) == null ? undefined : f, +ignore: (f = jspb.Message.getField(msg, 27)) == null ? undefined : f, +pb_float: (f = msg.getFloat()) && proto.buf.validate.FloatRules.toObject(includeInstance, f), +pb_double: (f = msg.getDouble()) && proto.buf.validate.DoubleRules.toObject(includeInstance, f), +int32: (f = msg.getInt32()) && proto.buf.validate.Int32Rules.toObject(includeInstance, f), +int64: (f = msg.getInt64()) && proto.buf.validate.Int64Rules.toObject(includeInstance, f), +uint32: (f = msg.getUint32()) && proto.buf.validate.UInt32Rules.toObject(includeInstance, f), +uint64: (f = msg.getUint64()) && proto.buf.validate.UInt64Rules.toObject(includeInstance, f), +sint32: (f = msg.getSint32()) && proto.buf.validate.SInt32Rules.toObject(includeInstance, f), +sint64: (f = msg.getSint64()) && proto.buf.validate.SInt64Rules.toObject(includeInstance, f), +fixed32: (f = msg.getFixed32()) && proto.buf.validate.Fixed32Rules.toObject(includeInstance, f), +fixed64: (f = msg.getFixed64()) && proto.buf.validate.Fixed64Rules.toObject(includeInstance, f), +sfixed32: (f = msg.getSfixed32()) && proto.buf.validate.SFixed32Rules.toObject(includeInstance, f), +sfixed64: (f = msg.getSfixed64()) && proto.buf.validate.SFixed64Rules.toObject(includeInstance, f), +bool: (f = msg.getBool()) && proto.buf.validate.BoolRules.toObject(includeInstance, f), +string: (f = msg.getString()) && proto.buf.validate.StringRules.toObject(includeInstance, f), +bytes: (f = msg.getBytes()) && proto.buf.validate.BytesRules.toObject(includeInstance, f), +pb_enum: (f = msg.getEnum()) && proto.buf.validate.EnumRules.toObject(includeInstance, f), +repeated: (f = msg.getRepeated()) && proto.buf.validate.RepeatedRules.toObject(includeInstance, f), +map: (f = msg.getMap()) && proto.buf.validate.MapRules.toObject(includeInstance, f), +any: (f = msg.getAny()) && proto.buf.validate.AnyRules.toObject(includeInstance, f), +duration: (f = msg.getDuration()) && proto.buf.validate.DurationRules.toObject(includeInstance, f), +timestamp: (f = msg.getTimestamp()) && proto.buf.validate.TimestampRules.toObject(includeInstance, f), +skipped: (f = jspb.Message.getBooleanField(msg, 24)) == null ? undefined : f, +ignoreEmpty: (f = jspb.Message.getBooleanField(msg, 26)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.FieldConstraints} + */ +proto.buf.validate.FieldConstraints.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.FieldConstraints; + return proto.buf.validate.FieldConstraints.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.FieldConstraints} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.FieldConstraints} + */ +proto.buf.validate.FieldConstraints.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 23: + var value = new proto.buf.validate.Constraint; + reader.readMessage(value,proto.buf.validate.Constraint.deserializeBinaryFromReader); + msg.addCel(value); + break; + case 25: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRequired(value); + break; + case 27: + var value = /** @type {!proto.buf.validate.Ignore} */ (reader.readEnum()); + msg.setIgnore(value); + break; + case 1: + var value = new proto.buf.validate.FloatRules; + reader.readMessage(value,proto.buf.validate.FloatRules.deserializeBinaryFromReader); + msg.setFloat(value); + break; + case 2: + var value = new proto.buf.validate.DoubleRules; + reader.readMessage(value,proto.buf.validate.DoubleRules.deserializeBinaryFromReader); + msg.setDouble(value); + break; + case 3: + var value = new proto.buf.validate.Int32Rules; + reader.readMessage(value,proto.buf.validate.Int32Rules.deserializeBinaryFromReader); + msg.setInt32(value); + break; + case 4: + var value = new proto.buf.validate.Int64Rules; + reader.readMessage(value,proto.buf.validate.Int64Rules.deserializeBinaryFromReader); + msg.setInt64(value); + break; + case 5: + var value = new proto.buf.validate.UInt32Rules; + reader.readMessage(value,proto.buf.validate.UInt32Rules.deserializeBinaryFromReader); + msg.setUint32(value); + break; + case 6: + var value = new proto.buf.validate.UInt64Rules; + reader.readMessage(value,proto.buf.validate.UInt64Rules.deserializeBinaryFromReader); + msg.setUint64(value); + break; + case 7: + var value = new proto.buf.validate.SInt32Rules; + reader.readMessage(value,proto.buf.validate.SInt32Rules.deserializeBinaryFromReader); + msg.setSint32(value); + break; + case 8: + var value = new proto.buf.validate.SInt64Rules; + reader.readMessage(value,proto.buf.validate.SInt64Rules.deserializeBinaryFromReader); + msg.setSint64(value); + break; + case 9: + var value = new proto.buf.validate.Fixed32Rules; + reader.readMessage(value,proto.buf.validate.Fixed32Rules.deserializeBinaryFromReader); + msg.setFixed32(value); + break; + case 10: + var value = new proto.buf.validate.Fixed64Rules; + reader.readMessage(value,proto.buf.validate.Fixed64Rules.deserializeBinaryFromReader); + msg.setFixed64(value); + break; + case 11: + var value = new proto.buf.validate.SFixed32Rules; + reader.readMessage(value,proto.buf.validate.SFixed32Rules.deserializeBinaryFromReader); + msg.setSfixed32(value); + break; + case 12: + var value = new proto.buf.validate.SFixed64Rules; + reader.readMessage(value,proto.buf.validate.SFixed64Rules.deserializeBinaryFromReader); + msg.setSfixed64(value); + break; + case 13: + var value = new proto.buf.validate.BoolRules; + reader.readMessage(value,proto.buf.validate.BoolRules.deserializeBinaryFromReader); + msg.setBool(value); + break; + case 14: + var value = new proto.buf.validate.StringRules; + reader.readMessage(value,proto.buf.validate.StringRules.deserializeBinaryFromReader); + msg.setString(value); + break; + case 15: + var value = new proto.buf.validate.BytesRules; + reader.readMessage(value,proto.buf.validate.BytesRules.deserializeBinaryFromReader); + msg.setBytes(value); + break; + case 16: + var value = new proto.buf.validate.EnumRules; + reader.readMessage(value,proto.buf.validate.EnumRules.deserializeBinaryFromReader); + msg.setEnum(value); + break; + case 18: + var value = new proto.buf.validate.RepeatedRules; + reader.readMessage(value,proto.buf.validate.RepeatedRules.deserializeBinaryFromReader); + msg.setRepeated(value); + break; + case 19: + var value = new proto.buf.validate.MapRules; + reader.readMessage(value,proto.buf.validate.MapRules.deserializeBinaryFromReader); + msg.setMap(value); + break; + case 20: + var value = new proto.buf.validate.AnyRules; + reader.readMessage(value,proto.buf.validate.AnyRules.deserializeBinaryFromReader); + msg.setAny(value); + break; + case 21: + var value = new proto.buf.validate.DurationRules; + reader.readMessage(value,proto.buf.validate.DurationRules.deserializeBinaryFromReader); + msg.setDuration(value); + break; + case 22: + var value = new proto.buf.validate.TimestampRules; + reader.readMessage(value,proto.buf.validate.TimestampRules.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 24: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSkipped(value); + break; + case 26: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIgnoreEmpty(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.FieldConstraints.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.FieldConstraints.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.FieldConstraints} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.FieldConstraints.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCelList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 23, + f, + proto.buf.validate.Constraint.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 25)); + if (f != null) { + writer.writeBool( + 25, + f + ); + } + f = /** @type {!proto.buf.validate.Ignore} */ (jspb.Message.getField(message, 27)); + if (f != null) { + writer.writeEnum( + 27, + f + ); + } + f = message.getFloat(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.buf.validate.FloatRules.serializeBinaryToWriter + ); + } + f = message.getDouble(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.buf.validate.DoubleRules.serializeBinaryToWriter + ); + } + f = message.getInt32(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.buf.validate.Int32Rules.serializeBinaryToWriter + ); + } + f = message.getInt64(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.buf.validate.Int64Rules.serializeBinaryToWriter + ); + } + f = message.getUint32(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.buf.validate.UInt32Rules.serializeBinaryToWriter + ); + } + f = message.getUint64(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.buf.validate.UInt64Rules.serializeBinaryToWriter + ); + } + f = message.getSint32(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.buf.validate.SInt32Rules.serializeBinaryToWriter + ); + } + f = message.getSint64(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.buf.validate.SInt64Rules.serializeBinaryToWriter + ); + } + f = message.getFixed32(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.buf.validate.Fixed32Rules.serializeBinaryToWriter + ); + } + f = message.getFixed64(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.buf.validate.Fixed64Rules.serializeBinaryToWriter + ); + } + f = message.getSfixed32(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.buf.validate.SFixed32Rules.serializeBinaryToWriter + ); + } + f = message.getSfixed64(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.buf.validate.SFixed64Rules.serializeBinaryToWriter + ); + } + f = message.getBool(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.buf.validate.BoolRules.serializeBinaryToWriter + ); + } + f = message.getString(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.buf.validate.StringRules.serializeBinaryToWriter + ); + } + f = message.getBytes(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.buf.validate.BytesRules.serializeBinaryToWriter + ); + } + f = message.getEnum(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.buf.validate.EnumRules.serializeBinaryToWriter + ); + } + f = message.getRepeated(); + if (f != null) { + writer.writeMessage( + 18, + f, + proto.buf.validate.RepeatedRules.serializeBinaryToWriter + ); + } + f = message.getMap(); + if (f != null) { + writer.writeMessage( + 19, + f, + proto.buf.validate.MapRules.serializeBinaryToWriter + ); + } + f = message.getAny(); + if (f != null) { + writer.writeMessage( + 20, + f, + proto.buf.validate.AnyRules.serializeBinaryToWriter + ); + } + f = message.getDuration(); + if (f != null) { + writer.writeMessage( + 21, + f, + proto.buf.validate.DurationRules.serializeBinaryToWriter + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 22, + f, + proto.buf.validate.TimestampRules.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 24)); + if (f != null) { + writer.writeBool( + 24, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 26)); + if (f != null) { + writer.writeBool( + 26, + f + ); + } +}; + + +/** + * repeated Constraint cel = 23; + * @return {!Array} + */ +proto.buf.validate.FieldConstraints.prototype.getCelList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.buf.validate.Constraint, 23)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setCelList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 23, value); +}; + + +/** + * @param {!proto.buf.validate.Constraint=} opt_value + * @param {number=} opt_index + * @return {!proto.buf.validate.Constraint} + */ +proto.buf.validate.FieldConstraints.prototype.addCel = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 23, opt_value, proto.buf.validate.Constraint, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearCelList = function() { + return this.setCelList([]); +}; + + +/** + * optional bool required = 25; + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.getRequired = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 25, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.setRequired = function(value) { + return jspb.Message.setField(this, 25, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearRequired = function() { + return jspb.Message.setField(this, 25, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasRequired = function() { + return jspb.Message.getField(this, 25) != null; +}; + + +/** + * optional Ignore ignore = 27; + * @return {!proto.buf.validate.Ignore} + */ +proto.buf.validate.FieldConstraints.prototype.getIgnore = function() { + return /** @type {!proto.buf.validate.Ignore} */ (jspb.Message.getFieldWithDefault(this, 27, 0)); +}; + + +/** + * @param {!proto.buf.validate.Ignore} value + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.setIgnore = function(value) { + return jspb.Message.setField(this, 27, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearIgnore = function() { + return jspb.Message.setField(this, 27, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasIgnore = function() { + return jspb.Message.getField(this, 27) != null; +}; + + +/** + * optional FloatRules float = 1; + * @return {?proto.buf.validate.FloatRules} + */ +proto.buf.validate.FieldConstraints.prototype.getFloat = function() { + return /** @type{?proto.buf.validate.FloatRules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.FloatRules, 1)); +}; + + +/** + * @param {?proto.buf.validate.FloatRules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setFloat = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearFloat = function() { + return this.setFloat(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasFloat = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional DoubleRules double = 2; + * @return {?proto.buf.validate.DoubleRules} + */ +proto.buf.validate.FieldConstraints.prototype.getDouble = function() { + return /** @type{?proto.buf.validate.DoubleRules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.DoubleRules, 2)); +}; + + +/** + * @param {?proto.buf.validate.DoubleRules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setDouble = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearDouble = function() { + return this.setDouble(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasDouble = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Int32Rules int32 = 3; + * @return {?proto.buf.validate.Int32Rules} + */ +proto.buf.validate.FieldConstraints.prototype.getInt32 = function() { + return /** @type{?proto.buf.validate.Int32Rules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.Int32Rules, 3)); +}; + + +/** + * @param {?proto.buf.validate.Int32Rules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setInt32 = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearInt32 = function() { + return this.setInt32(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasInt32 = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Int64Rules int64 = 4; + * @return {?proto.buf.validate.Int64Rules} + */ +proto.buf.validate.FieldConstraints.prototype.getInt64 = function() { + return /** @type{?proto.buf.validate.Int64Rules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.Int64Rules, 4)); +}; + + +/** + * @param {?proto.buf.validate.Int64Rules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setInt64 = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearInt64 = function() { + return this.setInt64(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasInt64 = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional UInt32Rules uint32 = 5; + * @return {?proto.buf.validate.UInt32Rules} + */ +proto.buf.validate.FieldConstraints.prototype.getUint32 = function() { + return /** @type{?proto.buf.validate.UInt32Rules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.UInt32Rules, 5)); +}; + + +/** + * @param {?proto.buf.validate.UInt32Rules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setUint32 = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearUint32 = function() { + return this.setUint32(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasUint32 = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional UInt64Rules uint64 = 6; + * @return {?proto.buf.validate.UInt64Rules} + */ +proto.buf.validate.FieldConstraints.prototype.getUint64 = function() { + return /** @type{?proto.buf.validate.UInt64Rules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.UInt64Rules, 6)); +}; + + +/** + * @param {?proto.buf.validate.UInt64Rules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setUint64 = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearUint64 = function() { + return this.setUint64(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasUint64 = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional SInt32Rules sint32 = 7; + * @return {?proto.buf.validate.SInt32Rules} + */ +proto.buf.validate.FieldConstraints.prototype.getSint32 = function() { + return /** @type{?proto.buf.validate.SInt32Rules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.SInt32Rules, 7)); +}; + + +/** + * @param {?proto.buf.validate.SInt32Rules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setSint32 = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearSint32 = function() { + return this.setSint32(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasSint32 = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional SInt64Rules sint64 = 8; + * @return {?proto.buf.validate.SInt64Rules} + */ +proto.buf.validate.FieldConstraints.prototype.getSint64 = function() { + return /** @type{?proto.buf.validate.SInt64Rules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.SInt64Rules, 8)); +}; + + +/** + * @param {?proto.buf.validate.SInt64Rules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setSint64 = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearSint64 = function() { + return this.setSint64(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasSint64 = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional Fixed32Rules fixed32 = 9; + * @return {?proto.buf.validate.Fixed32Rules} + */ +proto.buf.validate.FieldConstraints.prototype.getFixed32 = function() { + return /** @type{?proto.buf.validate.Fixed32Rules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.Fixed32Rules, 9)); +}; + + +/** + * @param {?proto.buf.validate.Fixed32Rules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setFixed32 = function(value) { + return jspb.Message.setOneofWrapperField(this, 9, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearFixed32 = function() { + return this.setFixed32(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasFixed32 = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional Fixed64Rules fixed64 = 10; + * @return {?proto.buf.validate.Fixed64Rules} + */ +proto.buf.validate.FieldConstraints.prototype.getFixed64 = function() { + return /** @type{?proto.buf.validate.Fixed64Rules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.Fixed64Rules, 10)); +}; + + +/** + * @param {?proto.buf.validate.Fixed64Rules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setFixed64 = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearFixed64 = function() { + return this.setFixed64(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasFixed64 = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional SFixed32Rules sfixed32 = 11; + * @return {?proto.buf.validate.SFixed32Rules} + */ +proto.buf.validate.FieldConstraints.prototype.getSfixed32 = function() { + return /** @type{?proto.buf.validate.SFixed32Rules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.SFixed32Rules, 11)); +}; + + +/** + * @param {?proto.buf.validate.SFixed32Rules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setSfixed32 = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearSfixed32 = function() { + return this.setSfixed32(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasSfixed32 = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional SFixed64Rules sfixed64 = 12; + * @return {?proto.buf.validate.SFixed64Rules} + */ +proto.buf.validate.FieldConstraints.prototype.getSfixed64 = function() { + return /** @type{?proto.buf.validate.SFixed64Rules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.SFixed64Rules, 12)); +}; + + +/** + * @param {?proto.buf.validate.SFixed64Rules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setSfixed64 = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearSfixed64 = function() { + return this.setSfixed64(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasSfixed64 = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional BoolRules bool = 13; + * @return {?proto.buf.validate.BoolRules} + */ +proto.buf.validate.FieldConstraints.prototype.getBool = function() { + return /** @type{?proto.buf.validate.BoolRules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.BoolRules, 13)); +}; + + +/** + * @param {?proto.buf.validate.BoolRules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setBool = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearBool = function() { + return this.setBool(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasBool = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional StringRules string = 14; + * @return {?proto.buf.validate.StringRules} + */ +proto.buf.validate.FieldConstraints.prototype.getString = function() { + return /** @type{?proto.buf.validate.StringRules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.StringRules, 14)); +}; + + +/** + * @param {?proto.buf.validate.StringRules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setString = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearString = function() { + return this.setString(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasString = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional BytesRules bytes = 15; + * @return {?proto.buf.validate.BytesRules} + */ +proto.buf.validate.FieldConstraints.prototype.getBytes = function() { + return /** @type{?proto.buf.validate.BytesRules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.BytesRules, 15)); +}; + + +/** + * @param {?proto.buf.validate.BytesRules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setBytes = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearBytes = function() { + return this.setBytes(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasBytes = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional EnumRules enum = 16; + * @return {?proto.buf.validate.EnumRules} + */ +proto.buf.validate.FieldConstraints.prototype.getEnum = function() { + return /** @type{?proto.buf.validate.EnumRules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.EnumRules, 16)); +}; + + +/** + * @param {?proto.buf.validate.EnumRules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setEnum = function(value) { + return jspb.Message.setOneofWrapperField(this, 16, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearEnum = function() { + return this.setEnum(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasEnum = function() { + return jspb.Message.getField(this, 16) != null; +}; + + +/** + * optional RepeatedRules repeated = 18; + * @return {?proto.buf.validate.RepeatedRules} + */ +proto.buf.validate.FieldConstraints.prototype.getRepeated = function() { + return /** @type{?proto.buf.validate.RepeatedRules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.RepeatedRules, 18)); +}; + + +/** + * @param {?proto.buf.validate.RepeatedRules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setRepeated = function(value) { + return jspb.Message.setOneofWrapperField(this, 18, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearRepeated = function() { + return this.setRepeated(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasRepeated = function() { + return jspb.Message.getField(this, 18) != null; +}; + + +/** + * optional MapRules map = 19; + * @return {?proto.buf.validate.MapRules} + */ +proto.buf.validate.FieldConstraints.prototype.getMap = function() { + return /** @type{?proto.buf.validate.MapRules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.MapRules, 19)); +}; + + +/** + * @param {?proto.buf.validate.MapRules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setMap = function(value) { + return jspb.Message.setOneofWrapperField(this, 19, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearMap = function() { + return this.setMap(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasMap = function() { + return jspb.Message.getField(this, 19) != null; +}; + + +/** + * optional AnyRules any = 20; + * @return {?proto.buf.validate.AnyRules} + */ +proto.buf.validate.FieldConstraints.prototype.getAny = function() { + return /** @type{?proto.buf.validate.AnyRules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.AnyRules, 20)); +}; + + +/** + * @param {?proto.buf.validate.AnyRules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setAny = function(value) { + return jspb.Message.setOneofWrapperField(this, 20, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearAny = function() { + return this.setAny(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasAny = function() { + return jspb.Message.getField(this, 20) != null; +}; + + +/** + * optional DurationRules duration = 21; + * @return {?proto.buf.validate.DurationRules} + */ +proto.buf.validate.FieldConstraints.prototype.getDuration = function() { + return /** @type{?proto.buf.validate.DurationRules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.DurationRules, 21)); +}; + + +/** + * @param {?proto.buf.validate.DurationRules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setDuration = function(value) { + return jspb.Message.setOneofWrapperField(this, 21, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearDuration = function() { + return this.setDuration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasDuration = function() { + return jspb.Message.getField(this, 21) != null; +}; + + +/** + * optional TimestampRules timestamp = 22; + * @return {?proto.buf.validate.TimestampRules} + */ +proto.buf.validate.FieldConstraints.prototype.getTimestamp = function() { + return /** @type{?proto.buf.validate.TimestampRules} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.TimestampRules, 22)); +}; + + +/** + * @param {?proto.buf.validate.TimestampRules|undefined} value + * @return {!proto.buf.validate.FieldConstraints} returns this +*/ +proto.buf.validate.FieldConstraints.prototype.setTimestamp = function(value) { + return jspb.Message.setOneofWrapperField(this, 22, proto.buf.validate.FieldConstraints.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 22) != null; +}; + + +/** + * optional bool skipped = 24; + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.getSkipped = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 24, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.setSkipped = function(value) { + return jspb.Message.setField(this, 24, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearSkipped = function() { + return jspb.Message.setField(this, 24, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasSkipped = function() { + return jspb.Message.getField(this, 24) != null; +}; + + +/** + * optional bool ignore_empty = 26; + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.getIgnoreEmpty = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 26, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.setIgnoreEmpty = function(value) { + return jspb.Message.setField(this, 26, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FieldConstraints} returns this + */ +proto.buf.validate.FieldConstraints.prototype.clearIgnoreEmpty = function() { + return jspb.Message.setField(this, 26, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldConstraints.prototype.hasIgnoreEmpty = function() { + return jspb.Message.getField(this, 26) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.PredefinedConstraints.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.PredefinedConstraints.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.PredefinedConstraints.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.PredefinedConstraints} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.PredefinedConstraints.toObject = function(includeInstance, msg) { + var f, obj = { +celList: jspb.Message.toObjectList(msg.getCelList(), + proto.buf.validate.Constraint.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.PredefinedConstraints} + */ +proto.buf.validate.PredefinedConstraints.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.PredefinedConstraints; + return proto.buf.validate.PredefinedConstraints.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.PredefinedConstraints} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.PredefinedConstraints} + */ +proto.buf.validate.PredefinedConstraints.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.buf.validate.Constraint; + reader.readMessage(value,proto.buf.validate.Constraint.deserializeBinaryFromReader); + msg.addCel(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.PredefinedConstraints.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.PredefinedConstraints.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.PredefinedConstraints} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.PredefinedConstraints.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCelList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.buf.validate.Constraint.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Constraint cel = 1; + * @return {!Array} + */ +proto.buf.validate.PredefinedConstraints.prototype.getCelList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.buf.validate.Constraint, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.PredefinedConstraints} returns this +*/ +proto.buf.validate.PredefinedConstraints.prototype.setCelList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.buf.validate.Constraint=} opt_value + * @param {number=} opt_index + * @return {!proto.buf.validate.Constraint} + */ +proto.buf.validate.PredefinedConstraints.prototype.addCel = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.buf.validate.Constraint, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.PredefinedConstraints} returns this + */ +proto.buf.validate.PredefinedConstraints.prototype.clearCelList = function() { + return this.setCelList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.FloatRules.repeatedFields_ = [6,7,9]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.FloatRules.oneofGroups_ = [[2,3],[4,5]]; + +/** + * @enum {number} + */ +proto.buf.validate.FloatRules.LessThanCase = { + LESS_THAN_NOT_SET: 0, + LT: 2, + LTE: 3 +}; + +/** + * @return {proto.buf.validate.FloatRules.LessThanCase} + */ +proto.buf.validate.FloatRules.prototype.getLessThanCase = function() { + return /** @type {proto.buf.validate.FloatRules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.FloatRules.oneofGroups_[0])); +}; + +/** + * @enum {number} + */ +proto.buf.validate.FloatRules.GreaterThanCase = { + GREATER_THAN_NOT_SET: 0, + GT: 4, + GTE: 5 +}; + +/** + * @return {proto.buf.validate.FloatRules.GreaterThanCase} + */ +proto.buf.validate.FloatRules.prototype.getGreaterThanCase = function() { + return /** @type {proto.buf.validate.FloatRules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.FloatRules.oneofGroups_[1])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.FloatRules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.FloatRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.FloatRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.FloatRules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: (f = jspb.Message.getOptionalFloatingPointField(msg, 1)) == null ? undefined : f, +lt: (f = jspb.Message.getOptionalFloatingPointField(msg, 2)) == null ? undefined : f, +lte: (f = jspb.Message.getOptionalFloatingPointField(msg, 3)) == null ? undefined : f, +gt: (f = jspb.Message.getOptionalFloatingPointField(msg, 4)) == null ? undefined : f, +gte: (f = jspb.Message.getOptionalFloatingPointField(msg, 5)) == null ? undefined : f, +inList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 6)) == null ? undefined : f, +notInList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 7)) == null ? undefined : f, +finite: (f = jspb.Message.getBooleanField(msg, 8)) == null ? undefined : f, +exampleList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 9)) == null ? undefined : f + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.FloatRules.extensions, proto.buf.validate.FloatRules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.FloatRules} + */ +proto.buf.validate.FloatRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.FloatRules; + return proto.buf.validate.FloatRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.FloatRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.FloatRules} + */ +proto.buf.validate.FloatRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readFloat()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readFloat()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readFloat()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readFloat()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readFloat()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFloat() : [reader.readFloat()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFloat() : [reader.readFloat()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFinite(value); + break; + case 9: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFloat() : [reader.readFloat()]); + for (var i = 0; i < values.length; i++) { + msg.addExample(values[i]); + } + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.FloatRules.extensionsBinary, + proto.buf.validate.FloatRules.prototype.getExtension, + proto.buf.validate.FloatRules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.FloatRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.FloatRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.FloatRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.FloatRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeFloat( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeFloat( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeFloat( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeFloat( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeFloat( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedFloat( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedFloat( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } + f = message.getExampleList(); + if (f.length > 0) { + writer.writeRepeatedFloat( + 9, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.FloatRules.extensionsBinary, proto.buf.validate.FloatRules.prototype.getExtension); +}; + + +/** + * optional float const = 1; + * @return {number} + */ +proto.buf.validate.FloatRules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FloatRules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional float lt = 2; + * @return {number} + */ +proto.buf.validate.FloatRules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.setLt = function(value) { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.FloatRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.clearLt = function() { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.FloatRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FloatRules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional float lte = 3; + * @return {number} + */ +proto.buf.validate.FloatRules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.setLte = function(value) { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.FloatRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.clearLte = function() { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.FloatRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FloatRules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional float gt = 4; + * @return {number} + */ +proto.buf.validate.FloatRules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.setGt = function(value) { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.FloatRules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.clearGt = function() { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.FloatRules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FloatRules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional float gte = 5; + * @return {number} + */ +proto.buf.validate.FloatRules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.setGte = function(value) { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.FloatRules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.clearGte = function() { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.FloatRules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FloatRules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated float in = 6; + * @return {!Array} + */ +proto.buf.validate.FloatRules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated float not_in = 7; + * @return {!Array} + */ +proto.buf.validate.FloatRules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool finite = 8; + * @return {boolean} + */ +proto.buf.validate.FloatRules.prototype.getFinite = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.setFinite = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.clearFinite = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FloatRules.prototype.hasFinite = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * repeated float example = 9; + * @return {!Array} + */ +proto.buf.validate.FloatRules.prototype.getExampleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.setExampleList = function(value) { + return jspb.Message.setField(this, 9, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.addExample = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 9, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.FloatRules} returns this + */ +proto.buf.validate.FloatRules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.DoubleRules.repeatedFields_ = [6,7,9]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.DoubleRules.oneofGroups_ = [[2,3],[4,5]]; + +/** + * @enum {number} + */ +proto.buf.validate.DoubleRules.LessThanCase = { + LESS_THAN_NOT_SET: 0, + LT: 2, + LTE: 3 +}; + +/** + * @return {proto.buf.validate.DoubleRules.LessThanCase} + */ +proto.buf.validate.DoubleRules.prototype.getLessThanCase = function() { + return /** @type {proto.buf.validate.DoubleRules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.DoubleRules.oneofGroups_[0])); +}; + +/** + * @enum {number} + */ +proto.buf.validate.DoubleRules.GreaterThanCase = { + GREATER_THAN_NOT_SET: 0, + GT: 4, + GTE: 5 +}; + +/** + * @return {proto.buf.validate.DoubleRules.GreaterThanCase} + */ +proto.buf.validate.DoubleRules.prototype.getGreaterThanCase = function() { + return /** @type {proto.buf.validate.DoubleRules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.DoubleRules.oneofGroups_[1])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.DoubleRules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.DoubleRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.DoubleRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.DoubleRules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: (f = jspb.Message.getOptionalFloatingPointField(msg, 1)) == null ? undefined : f, +lt: (f = jspb.Message.getOptionalFloatingPointField(msg, 2)) == null ? undefined : f, +lte: (f = jspb.Message.getOptionalFloatingPointField(msg, 3)) == null ? undefined : f, +gt: (f = jspb.Message.getOptionalFloatingPointField(msg, 4)) == null ? undefined : f, +gte: (f = jspb.Message.getOptionalFloatingPointField(msg, 5)) == null ? undefined : f, +inList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 6)) == null ? undefined : f, +notInList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 7)) == null ? undefined : f, +finite: (f = jspb.Message.getBooleanField(msg, 8)) == null ? undefined : f, +exampleList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 9)) == null ? undefined : f + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.DoubleRules.extensions, proto.buf.validate.DoubleRules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.DoubleRules} + */ +proto.buf.validate.DoubleRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.DoubleRules; + return proto.buf.validate.DoubleRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.DoubleRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.DoubleRules} + */ +proto.buf.validate.DoubleRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readDouble()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readDouble()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readDouble()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readDouble()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFinite(value); + break; + case 9: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]); + for (var i = 0; i < values.length; i++) { + msg.addExample(values[i]); + } + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.DoubleRules.extensionsBinary, + proto.buf.validate.DoubleRules.prototype.getExtension, + proto.buf.validate.DoubleRules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.DoubleRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.DoubleRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.DoubleRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.DoubleRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeDouble( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeDouble( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeDouble( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeDouble( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeDouble( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedDouble( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedDouble( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } + f = message.getExampleList(); + if (f.length > 0) { + writer.writeRepeatedDouble( + 9, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.DoubleRules.extensionsBinary, proto.buf.validate.DoubleRules.prototype.getExtension); +}; + + +/** + * optional double const = 1; + * @return {number} + */ +proto.buf.validate.DoubleRules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.DoubleRules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional double lt = 2; + * @return {number} + */ +proto.buf.validate.DoubleRules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.setLt = function(value) { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.DoubleRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.clearLt = function() { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.DoubleRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.DoubleRules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional double lte = 3; + * @return {number} + */ +proto.buf.validate.DoubleRules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.setLte = function(value) { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.DoubleRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.clearLte = function() { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.DoubleRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.DoubleRules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional double gt = 4; + * @return {number} + */ +proto.buf.validate.DoubleRules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.setGt = function(value) { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.DoubleRules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.clearGt = function() { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.DoubleRules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.DoubleRules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional double gte = 5; + * @return {number} + */ +proto.buf.validate.DoubleRules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.setGte = function(value) { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.DoubleRules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.clearGte = function() { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.DoubleRules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.DoubleRules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated double in = 6; + * @return {!Array} + */ +proto.buf.validate.DoubleRules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated double not_in = 7; + * @return {!Array} + */ +proto.buf.validate.DoubleRules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool finite = 8; + * @return {boolean} + */ +proto.buf.validate.DoubleRules.prototype.getFinite = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.setFinite = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.clearFinite = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.DoubleRules.prototype.hasFinite = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * repeated double example = 9; + * @return {!Array} + */ +proto.buf.validate.DoubleRules.prototype.getExampleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.setExampleList = function(value) { + return jspb.Message.setField(this, 9, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.addExample = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 9, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.DoubleRules} returns this + */ +proto.buf.validate.DoubleRules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.Int32Rules.repeatedFields_ = [6,7,8]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.Int32Rules.oneofGroups_ = [[2,3],[4,5]]; + +/** + * @enum {number} + */ +proto.buf.validate.Int32Rules.LessThanCase = { + LESS_THAN_NOT_SET: 0, + LT: 2, + LTE: 3 +}; + +/** + * @return {proto.buf.validate.Int32Rules.LessThanCase} + */ +proto.buf.validate.Int32Rules.prototype.getLessThanCase = function() { + return /** @type {proto.buf.validate.Int32Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.Int32Rules.oneofGroups_[0])); +}; + +/** + * @enum {number} + */ +proto.buf.validate.Int32Rules.GreaterThanCase = { + GREATER_THAN_NOT_SET: 0, + GT: 4, + GTE: 5 +}; + +/** + * @return {proto.buf.validate.Int32Rules.GreaterThanCase} + */ +proto.buf.validate.Int32Rules.prototype.getGreaterThanCase = function() { + return /** @type {proto.buf.validate.Int32Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.Int32Rules.oneofGroups_[1])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.Int32Rules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.Int32Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.Int32Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.Int32Rules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, +notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, +exampleList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.Int32Rules.extensions, proto.buf.validate.Int32Rules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.Int32Rules} + */ +proto.buf.validate.Int32Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.Int32Rules; + return proto.buf.validate.Int32Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.Int32Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.Int32Rules} + */ +proto.buf.validate.Int32Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addExample(values[i]); + } + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.Int32Rules.extensionsBinary, + proto.buf.validate.Int32Rules.prototype.getExtension, + proto.buf.validate.Int32Rules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.Int32Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.Int32Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.Int32Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.Int32Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt32( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeInt32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeInt32( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeInt32( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedInt32( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedInt32( + 7, + f + ); + } + f = message.getExampleList(); + if (f.length > 0) { + writer.writeRepeatedInt32( + 8, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.Int32Rules.extensionsBinary, proto.buf.validate.Int32Rules.prototype.getExtension); +}; + + +/** + * optional int32 const = 1; + * @return {number} + */ +proto.buf.validate.Int32Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Int32Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 lt = 2; + * @return {number} + */ +proto.buf.validate.Int32Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.setLt = function(value) { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.Int32Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.clearLt = function() { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.Int32Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Int32Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int32 lte = 3; + * @return {number} + */ +proto.buf.validate.Int32Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.setLte = function(value) { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.Int32Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.clearLte = function() { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.Int32Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Int32Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional int32 gt = 4; + * @return {number} + */ +proto.buf.validate.Int32Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.setGt = function(value) { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.Int32Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.clearGt = function() { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.Int32Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Int32Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional int32 gte = 5; + * @return {number} + */ +proto.buf.validate.Int32Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.setGte = function(value) { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.Int32Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.clearGte = function() { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.Int32Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Int32Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated int32 in = 6; + * @return {!Array} + */ +proto.buf.validate.Int32Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated int32 not_in = 7; + * @return {!Array} + */ +proto.buf.validate.Int32Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * repeated int32 example = 8; + * @return {!Array} + */ +proto.buf.validate.Int32Rules.prototype.getExampleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.setExampleList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.addExample = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.Int32Rules} returns this + */ +proto.buf.validate.Int32Rules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.Int64Rules.repeatedFields_ = [6,7,9]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.Int64Rules.oneofGroups_ = [[2,3],[4,5]]; + +/** + * @enum {number} + */ +proto.buf.validate.Int64Rules.LessThanCase = { + LESS_THAN_NOT_SET: 0, + LT: 2, + LTE: 3 +}; + +/** + * @return {proto.buf.validate.Int64Rules.LessThanCase} + */ +proto.buf.validate.Int64Rules.prototype.getLessThanCase = function() { + return /** @type {proto.buf.validate.Int64Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.Int64Rules.oneofGroups_[0])); +}; + +/** + * @enum {number} + */ +proto.buf.validate.Int64Rules.GreaterThanCase = { + GREATER_THAN_NOT_SET: 0, + GT: 4, + GTE: 5 +}; + +/** + * @return {proto.buf.validate.Int64Rules.GreaterThanCase} + */ +proto.buf.validate.Int64Rules.prototype.getGreaterThanCase = function() { + return /** @type {proto.buf.validate.Int64Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.Int64Rules.oneofGroups_[1])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.Int64Rules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.Int64Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.Int64Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.Int64Rules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, +notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, +exampleList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined : f + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.Int64Rules.extensions, proto.buf.validate.Int64Rules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.Int64Rules} + */ +proto.buf.validate.Int64Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.Int64Rules; + return proto.buf.validate.Int64Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.Int64Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.Int64Rules} + */ +proto.buf.validate.Int64Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 9: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()]); + for (var i = 0; i < values.length; i++) { + msg.addExample(values[i]); + } + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.Int64Rules.extensionsBinary, + proto.buf.validate.Int64Rules.prototype.getExtension, + proto.buf.validate.Int64Rules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.Int64Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.Int64Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.Int64Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.Int64Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeInt64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeInt64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeInt64( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedInt64( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedInt64( + 7, + f + ); + } + f = message.getExampleList(); + if (f.length > 0) { + writer.writeRepeatedInt64( + 9, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.Int64Rules.extensionsBinary, proto.buf.validate.Int64Rules.prototype.getExtension); +}; + + +/** + * optional int64 const = 1; + * @return {number} + */ +proto.buf.validate.Int64Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Int64Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 lt = 2; + * @return {number} + */ +proto.buf.validate.Int64Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.setLt = function(value) { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.Int64Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.clearLt = function() { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.Int64Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Int64Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 lte = 3; + * @return {number} + */ +proto.buf.validate.Int64Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.setLte = function(value) { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.Int64Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.clearLte = function() { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.Int64Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Int64Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional int64 gt = 4; + * @return {number} + */ +proto.buf.validate.Int64Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.setGt = function(value) { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.Int64Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.clearGt = function() { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.Int64Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Int64Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional int64 gte = 5; + * @return {number} + */ +proto.buf.validate.Int64Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.setGte = function(value) { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.Int64Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.clearGte = function() { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.Int64Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Int64Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated int64 in = 6; + * @return {!Array} + */ +proto.buf.validate.Int64Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated int64 not_in = 7; + * @return {!Array} + */ +proto.buf.validate.Int64Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * repeated int64 example = 9; + * @return {!Array} + */ +proto.buf.validate.Int64Rules.prototype.getExampleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.setExampleList = function(value) { + return jspb.Message.setField(this, 9, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.addExample = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 9, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.Int64Rules} returns this + */ +proto.buf.validate.Int64Rules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.UInt32Rules.repeatedFields_ = [6,7,8]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.UInt32Rules.oneofGroups_ = [[2,3],[4,5]]; + +/** + * @enum {number} + */ +proto.buf.validate.UInt32Rules.LessThanCase = { + LESS_THAN_NOT_SET: 0, + LT: 2, + LTE: 3 +}; + +/** + * @return {proto.buf.validate.UInt32Rules.LessThanCase} + */ +proto.buf.validate.UInt32Rules.prototype.getLessThanCase = function() { + return /** @type {proto.buf.validate.UInt32Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.UInt32Rules.oneofGroups_[0])); +}; + +/** + * @enum {number} + */ +proto.buf.validate.UInt32Rules.GreaterThanCase = { + GREATER_THAN_NOT_SET: 0, + GT: 4, + GTE: 5 +}; + +/** + * @return {proto.buf.validate.UInt32Rules.GreaterThanCase} + */ +proto.buf.validate.UInt32Rules.prototype.getGreaterThanCase = function() { + return /** @type {proto.buf.validate.UInt32Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.UInt32Rules.oneofGroups_[1])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.UInt32Rules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.UInt32Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.UInt32Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.UInt32Rules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, +notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, +exampleList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.UInt32Rules.extensions, proto.buf.validate.UInt32Rules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.UInt32Rules} + */ +proto.buf.validate.UInt32Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.UInt32Rules; + return proto.buf.validate.UInt32Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.UInt32Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.UInt32Rules} + */ +proto.buf.validate.UInt32Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint32() : [reader.readUint32()]); + for (var i = 0; i < values.length; i++) { + msg.addExample(values[i]); + } + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.UInt32Rules.extensionsBinary, + proto.buf.validate.UInt32Rules.prototype.getExtension, + proto.buf.validate.UInt32Rules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.UInt32Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.UInt32Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.UInt32Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.UInt32Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint32( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint32( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint32( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedUint32( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedUint32( + 7, + f + ); + } + f = message.getExampleList(); + if (f.length > 0) { + writer.writeRepeatedUint32( + 8, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.UInt32Rules.extensionsBinary, proto.buf.validate.UInt32Rules.prototype.getExtension); +}; + + +/** + * optional uint32 const = 1; + * @return {number} + */ +proto.buf.validate.UInt32Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.UInt32Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint32 lt = 2; + * @return {number} + */ +proto.buf.validate.UInt32Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.setLt = function(value) { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.UInt32Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.clearLt = function() { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.UInt32Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.UInt32Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 lte = 3; + * @return {number} + */ +proto.buf.validate.UInt32Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.setLte = function(value) { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.UInt32Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.clearLte = function() { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.UInt32Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.UInt32Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint32 gt = 4; + * @return {number} + */ +proto.buf.validate.UInt32Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.setGt = function(value) { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.UInt32Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.clearGt = function() { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.UInt32Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.UInt32Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint32 gte = 5; + * @return {number} + */ +proto.buf.validate.UInt32Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.setGte = function(value) { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.UInt32Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.clearGte = function() { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.UInt32Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.UInt32Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated uint32 in = 6; + * @return {!Array} + */ +proto.buf.validate.UInt32Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated uint32 not_in = 7; + * @return {!Array} + */ +proto.buf.validate.UInt32Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * repeated uint32 example = 8; + * @return {!Array} + */ +proto.buf.validate.UInt32Rules.prototype.getExampleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.setExampleList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.addExample = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.UInt32Rules} returns this + */ +proto.buf.validate.UInt32Rules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.UInt64Rules.repeatedFields_ = [6,7,8]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.UInt64Rules.oneofGroups_ = [[2,3],[4,5]]; + +/** + * @enum {number} + */ +proto.buf.validate.UInt64Rules.LessThanCase = { + LESS_THAN_NOT_SET: 0, + LT: 2, + LTE: 3 +}; + +/** + * @return {proto.buf.validate.UInt64Rules.LessThanCase} + */ +proto.buf.validate.UInt64Rules.prototype.getLessThanCase = function() { + return /** @type {proto.buf.validate.UInt64Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.UInt64Rules.oneofGroups_[0])); +}; + +/** + * @enum {number} + */ +proto.buf.validate.UInt64Rules.GreaterThanCase = { + GREATER_THAN_NOT_SET: 0, + GT: 4, + GTE: 5 +}; + +/** + * @return {proto.buf.validate.UInt64Rules.GreaterThanCase} + */ +proto.buf.validate.UInt64Rules.prototype.getGreaterThanCase = function() { + return /** @type {proto.buf.validate.UInt64Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.UInt64Rules.oneofGroups_[1])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.UInt64Rules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.UInt64Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.UInt64Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.UInt64Rules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, +notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, +exampleList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.UInt64Rules.extensions, proto.buf.validate.UInt64Rules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.UInt64Rules} + */ +proto.buf.validate.UInt64Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.UInt64Rules; + return proto.buf.validate.UInt64Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.UInt64Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.UInt64Rules} + */ +proto.buf.validate.UInt64Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedUint64() : [reader.readUint64()]); + for (var i = 0; i < values.length; i++) { + msg.addExample(values[i]); + } + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.UInt64Rules.extensionsBinary, + proto.buf.validate.UInt64Rules.prototype.getExtension, + proto.buf.validate.UInt64Rules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.UInt64Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.UInt64Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.UInt64Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.UInt64Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint64( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedUint64( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedUint64( + 7, + f + ); + } + f = message.getExampleList(); + if (f.length > 0) { + writer.writeRepeatedUint64( + 8, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.UInt64Rules.extensionsBinary, proto.buf.validate.UInt64Rules.prototype.getExtension); +}; + + +/** + * optional uint64 const = 1; + * @return {number} + */ +proto.buf.validate.UInt64Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.UInt64Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 lt = 2; + * @return {number} + */ +proto.buf.validate.UInt64Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.setLt = function(value) { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.UInt64Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.clearLt = function() { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.UInt64Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.UInt64Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 lte = 3; + * @return {number} + */ +proto.buf.validate.UInt64Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.setLte = function(value) { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.UInt64Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.clearLte = function() { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.UInt64Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.UInt64Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 gt = 4; + * @return {number} + */ +proto.buf.validate.UInt64Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.setGt = function(value) { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.UInt64Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.clearGt = function() { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.UInt64Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.UInt64Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint64 gte = 5; + * @return {number} + */ +proto.buf.validate.UInt64Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.setGte = function(value) { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.UInt64Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.clearGte = function() { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.UInt64Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.UInt64Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated uint64 in = 6; + * @return {!Array} + */ +proto.buf.validate.UInt64Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated uint64 not_in = 7; + * @return {!Array} + */ +proto.buf.validate.UInt64Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * repeated uint64 example = 8; + * @return {!Array} + */ +proto.buf.validate.UInt64Rules.prototype.getExampleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.setExampleList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.addExample = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.UInt64Rules} returns this + */ +proto.buf.validate.UInt64Rules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.SInt32Rules.repeatedFields_ = [6,7,8]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.SInt32Rules.oneofGroups_ = [[2,3],[4,5]]; + +/** + * @enum {number} + */ +proto.buf.validate.SInt32Rules.LessThanCase = { + LESS_THAN_NOT_SET: 0, + LT: 2, + LTE: 3 +}; + +/** + * @return {proto.buf.validate.SInt32Rules.LessThanCase} + */ +proto.buf.validate.SInt32Rules.prototype.getLessThanCase = function() { + return /** @type {proto.buf.validate.SInt32Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.SInt32Rules.oneofGroups_[0])); +}; + +/** + * @enum {number} + */ +proto.buf.validate.SInt32Rules.GreaterThanCase = { + GREATER_THAN_NOT_SET: 0, + GT: 4, + GTE: 5 +}; + +/** + * @return {proto.buf.validate.SInt32Rules.GreaterThanCase} + */ +proto.buf.validate.SInt32Rules.prototype.getGreaterThanCase = function() { + return /** @type {proto.buf.validate.SInt32Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.SInt32Rules.oneofGroups_[1])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.SInt32Rules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.SInt32Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.SInt32Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.SInt32Rules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, +notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, +exampleList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.SInt32Rules.extensions, proto.buf.validate.SInt32Rules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.SInt32Rules} + */ +proto.buf.validate.SInt32Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.SInt32Rules; + return proto.buf.validate.SInt32Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.SInt32Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.SInt32Rules} + */ +proto.buf.validate.SInt32Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readSint32()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readSint32()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readSint32()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readSint32()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readSint32()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSint32() : [reader.readSint32()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSint32() : [reader.readSint32()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSint32() : [reader.readSint32()]); + for (var i = 0; i < values.length; i++) { + msg.addExample(values[i]); + } + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.SInt32Rules.extensionsBinary, + proto.buf.validate.SInt32Rules.prototype.getExtension, + proto.buf.validate.SInt32Rules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.SInt32Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.SInt32Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.SInt32Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.SInt32Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeSint32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeSint32( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeSint32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeSint32( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeSint32( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedSint32( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedSint32( + 7, + f + ); + } + f = message.getExampleList(); + if (f.length > 0) { + writer.writeRepeatedSint32( + 8, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.SInt32Rules.extensionsBinary, proto.buf.validate.SInt32Rules.prototype.getExtension); +}; + + +/** + * optional sint32 const = 1; + * @return {number} + */ +proto.buf.validate.SInt32Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SInt32Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional sint32 lt = 2; + * @return {number} + */ +proto.buf.validate.SInt32Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.setLt = function(value) { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.SInt32Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.clearLt = function() { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.SInt32Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SInt32Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional sint32 lte = 3; + * @return {number} + */ +proto.buf.validate.SInt32Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.setLte = function(value) { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.SInt32Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.clearLte = function() { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.SInt32Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SInt32Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional sint32 gt = 4; + * @return {number} + */ +proto.buf.validate.SInt32Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.setGt = function(value) { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.SInt32Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.clearGt = function() { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.SInt32Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SInt32Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional sint32 gte = 5; + * @return {number} + */ +proto.buf.validate.SInt32Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.setGte = function(value) { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.SInt32Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.clearGte = function() { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.SInt32Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SInt32Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated sint32 in = 6; + * @return {!Array} + */ +proto.buf.validate.SInt32Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated sint32 not_in = 7; + * @return {!Array} + */ +proto.buf.validate.SInt32Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * repeated sint32 example = 8; + * @return {!Array} + */ +proto.buf.validate.SInt32Rules.prototype.getExampleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.setExampleList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.addExample = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.SInt32Rules} returns this + */ +proto.buf.validate.SInt32Rules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.SInt64Rules.repeatedFields_ = [6,7,8]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.SInt64Rules.oneofGroups_ = [[2,3],[4,5]]; + +/** + * @enum {number} + */ +proto.buf.validate.SInt64Rules.LessThanCase = { + LESS_THAN_NOT_SET: 0, + LT: 2, + LTE: 3 +}; + +/** + * @return {proto.buf.validate.SInt64Rules.LessThanCase} + */ +proto.buf.validate.SInt64Rules.prototype.getLessThanCase = function() { + return /** @type {proto.buf.validate.SInt64Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.SInt64Rules.oneofGroups_[0])); +}; + +/** + * @enum {number} + */ +proto.buf.validate.SInt64Rules.GreaterThanCase = { + GREATER_THAN_NOT_SET: 0, + GT: 4, + GTE: 5 +}; + +/** + * @return {proto.buf.validate.SInt64Rules.GreaterThanCase} + */ +proto.buf.validate.SInt64Rules.prototype.getGreaterThanCase = function() { + return /** @type {proto.buf.validate.SInt64Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.SInt64Rules.oneofGroups_[1])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.SInt64Rules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.SInt64Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.SInt64Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.SInt64Rules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, +notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, +exampleList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.SInt64Rules.extensions, proto.buf.validate.SInt64Rules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.SInt64Rules} + */ +proto.buf.validate.SInt64Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.SInt64Rules; + return proto.buf.validate.SInt64Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.SInt64Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.SInt64Rules} + */ +proto.buf.validate.SInt64Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readSint64()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readSint64()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readSint64()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readSint64()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readSint64()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSint64() : [reader.readSint64()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSint64() : [reader.readSint64()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSint64() : [reader.readSint64()]); + for (var i = 0; i < values.length; i++) { + msg.addExample(values[i]); + } + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.SInt64Rules.extensionsBinary, + proto.buf.validate.SInt64Rules.prototype.getExtension, + proto.buf.validate.SInt64Rules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.SInt64Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.SInt64Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.SInt64Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.SInt64Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeSint64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeSint64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeSint64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeSint64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeSint64( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedSint64( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedSint64( + 7, + f + ); + } + f = message.getExampleList(); + if (f.length > 0) { + writer.writeRepeatedSint64( + 8, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.SInt64Rules.extensionsBinary, proto.buf.validate.SInt64Rules.prototype.getExtension); +}; + + +/** + * optional sint64 const = 1; + * @return {number} + */ +proto.buf.validate.SInt64Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SInt64Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional sint64 lt = 2; + * @return {number} + */ +proto.buf.validate.SInt64Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.setLt = function(value) { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.SInt64Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.clearLt = function() { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.SInt64Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SInt64Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional sint64 lte = 3; + * @return {number} + */ +proto.buf.validate.SInt64Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.setLte = function(value) { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.SInt64Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.clearLte = function() { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.SInt64Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SInt64Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional sint64 gt = 4; + * @return {number} + */ +proto.buf.validate.SInt64Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.setGt = function(value) { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.SInt64Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.clearGt = function() { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.SInt64Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SInt64Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional sint64 gte = 5; + * @return {number} + */ +proto.buf.validate.SInt64Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.setGte = function(value) { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.SInt64Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.clearGte = function() { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.SInt64Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SInt64Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated sint64 in = 6; + * @return {!Array} + */ +proto.buf.validate.SInt64Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated sint64 not_in = 7; + * @return {!Array} + */ +proto.buf.validate.SInt64Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * repeated sint64 example = 8; + * @return {!Array} + */ +proto.buf.validate.SInt64Rules.prototype.getExampleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.setExampleList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.addExample = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.SInt64Rules} returns this + */ +proto.buf.validate.SInt64Rules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.Fixed32Rules.repeatedFields_ = [6,7,8]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.Fixed32Rules.oneofGroups_ = [[2,3],[4,5]]; + +/** + * @enum {number} + */ +proto.buf.validate.Fixed32Rules.LessThanCase = { + LESS_THAN_NOT_SET: 0, + LT: 2, + LTE: 3 +}; + +/** + * @return {proto.buf.validate.Fixed32Rules.LessThanCase} + */ +proto.buf.validate.Fixed32Rules.prototype.getLessThanCase = function() { + return /** @type {proto.buf.validate.Fixed32Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.Fixed32Rules.oneofGroups_[0])); +}; + +/** + * @enum {number} + */ +proto.buf.validate.Fixed32Rules.GreaterThanCase = { + GREATER_THAN_NOT_SET: 0, + GT: 4, + GTE: 5 +}; + +/** + * @return {proto.buf.validate.Fixed32Rules.GreaterThanCase} + */ +proto.buf.validate.Fixed32Rules.prototype.getGreaterThanCase = function() { + return /** @type {proto.buf.validate.Fixed32Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.Fixed32Rules.oneofGroups_[1])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.Fixed32Rules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.Fixed32Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.Fixed32Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.Fixed32Rules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, +notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, +exampleList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.Fixed32Rules.extensions, proto.buf.validate.Fixed32Rules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.Fixed32Rules} + */ +proto.buf.validate.Fixed32Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.Fixed32Rules; + return proto.buf.validate.Fixed32Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.Fixed32Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.Fixed32Rules} + */ +proto.buf.validate.Fixed32Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readFixed32()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readFixed32()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readFixed32()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readFixed32()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readFixed32()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFixed32() : [reader.readFixed32()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFixed32() : [reader.readFixed32()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFixed32() : [reader.readFixed32()]); + for (var i = 0; i < values.length; i++) { + msg.addExample(values[i]); + } + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.Fixed32Rules.extensionsBinary, + proto.buf.validate.Fixed32Rules.prototype.getExtension, + proto.buf.validate.Fixed32Rules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.Fixed32Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.Fixed32Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.Fixed32Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.Fixed32Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeFixed32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeFixed32( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeFixed32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeFixed32( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeFixed32( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedFixed32( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedFixed32( + 7, + f + ); + } + f = message.getExampleList(); + if (f.length > 0) { + writer.writeRepeatedFixed32( + 8, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.Fixed32Rules.extensionsBinary, proto.buf.validate.Fixed32Rules.prototype.getExtension); +}; + + +/** + * optional fixed32 const = 1; + * @return {number} + */ +proto.buf.validate.Fixed32Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Fixed32Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional fixed32 lt = 2; + * @return {number} + */ +proto.buf.validate.Fixed32Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.setLt = function(value) { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.Fixed32Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.clearLt = function() { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.Fixed32Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Fixed32Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional fixed32 lte = 3; + * @return {number} + */ +proto.buf.validate.Fixed32Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.setLte = function(value) { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.Fixed32Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.clearLte = function() { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.Fixed32Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Fixed32Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional fixed32 gt = 4; + * @return {number} + */ +proto.buf.validate.Fixed32Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.setGt = function(value) { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.Fixed32Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.clearGt = function() { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.Fixed32Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Fixed32Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional fixed32 gte = 5; + * @return {number} + */ +proto.buf.validate.Fixed32Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.setGte = function(value) { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.Fixed32Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.clearGte = function() { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.Fixed32Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Fixed32Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated fixed32 in = 6; + * @return {!Array} + */ +proto.buf.validate.Fixed32Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated fixed32 not_in = 7; + * @return {!Array} + */ +proto.buf.validate.Fixed32Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * repeated fixed32 example = 8; + * @return {!Array} + */ +proto.buf.validate.Fixed32Rules.prototype.getExampleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.setExampleList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.addExample = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.Fixed32Rules} returns this + */ +proto.buf.validate.Fixed32Rules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.Fixed64Rules.repeatedFields_ = [6,7,8]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.Fixed64Rules.oneofGroups_ = [[2,3],[4,5]]; + +/** + * @enum {number} + */ +proto.buf.validate.Fixed64Rules.LessThanCase = { + LESS_THAN_NOT_SET: 0, + LT: 2, + LTE: 3 +}; + +/** + * @return {proto.buf.validate.Fixed64Rules.LessThanCase} + */ +proto.buf.validate.Fixed64Rules.prototype.getLessThanCase = function() { + return /** @type {proto.buf.validate.Fixed64Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.Fixed64Rules.oneofGroups_[0])); +}; + +/** + * @enum {number} + */ +proto.buf.validate.Fixed64Rules.GreaterThanCase = { + GREATER_THAN_NOT_SET: 0, + GT: 4, + GTE: 5 +}; + +/** + * @return {proto.buf.validate.Fixed64Rules.GreaterThanCase} + */ +proto.buf.validate.Fixed64Rules.prototype.getGreaterThanCase = function() { + return /** @type {proto.buf.validate.Fixed64Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.Fixed64Rules.oneofGroups_[1])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.Fixed64Rules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.Fixed64Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.Fixed64Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.Fixed64Rules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, +notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, +exampleList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.Fixed64Rules.extensions, proto.buf.validate.Fixed64Rules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.Fixed64Rules} + */ +proto.buf.validate.Fixed64Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.Fixed64Rules; + return proto.buf.validate.Fixed64Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.Fixed64Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.Fixed64Rules} + */ +proto.buf.validate.Fixed64Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readFixed64()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readFixed64()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readFixed64()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readFixed64()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readFixed64()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFixed64() : [reader.readFixed64()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFixed64() : [reader.readFixed64()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedFixed64() : [reader.readFixed64()]); + for (var i = 0; i < values.length; i++) { + msg.addExample(values[i]); + } + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.Fixed64Rules.extensionsBinary, + proto.buf.validate.Fixed64Rules.prototype.getExtension, + proto.buf.validate.Fixed64Rules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.Fixed64Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.Fixed64Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.Fixed64Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.Fixed64Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeFixed64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeFixed64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeFixed64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeFixed64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeFixed64( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedFixed64( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedFixed64( + 7, + f + ); + } + f = message.getExampleList(); + if (f.length > 0) { + writer.writeRepeatedFixed64( + 8, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.Fixed64Rules.extensionsBinary, proto.buf.validate.Fixed64Rules.prototype.getExtension); +}; + + +/** + * optional fixed64 const = 1; + * @return {number} + */ +proto.buf.validate.Fixed64Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Fixed64Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional fixed64 lt = 2; + * @return {number} + */ +proto.buf.validate.Fixed64Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.setLt = function(value) { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.Fixed64Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.clearLt = function() { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.Fixed64Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Fixed64Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional fixed64 lte = 3; + * @return {number} + */ +proto.buf.validate.Fixed64Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.setLte = function(value) { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.Fixed64Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.clearLte = function() { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.Fixed64Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Fixed64Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional fixed64 gt = 4; + * @return {number} + */ +proto.buf.validate.Fixed64Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.setGt = function(value) { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.Fixed64Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.clearGt = function() { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.Fixed64Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Fixed64Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional fixed64 gte = 5; + * @return {number} + */ +proto.buf.validate.Fixed64Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.setGte = function(value) { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.Fixed64Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.clearGte = function() { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.Fixed64Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Fixed64Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated fixed64 in = 6; + * @return {!Array} + */ +proto.buf.validate.Fixed64Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated fixed64 not_in = 7; + * @return {!Array} + */ +proto.buf.validate.Fixed64Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * repeated fixed64 example = 8; + * @return {!Array} + */ +proto.buf.validate.Fixed64Rules.prototype.getExampleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.setExampleList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.addExample = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.Fixed64Rules} returns this + */ +proto.buf.validate.Fixed64Rules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.SFixed32Rules.repeatedFields_ = [6,7,8]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.SFixed32Rules.oneofGroups_ = [[2,3],[4,5]]; + +/** + * @enum {number} + */ +proto.buf.validate.SFixed32Rules.LessThanCase = { + LESS_THAN_NOT_SET: 0, + LT: 2, + LTE: 3 +}; + +/** + * @return {proto.buf.validate.SFixed32Rules.LessThanCase} + */ +proto.buf.validate.SFixed32Rules.prototype.getLessThanCase = function() { + return /** @type {proto.buf.validate.SFixed32Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.SFixed32Rules.oneofGroups_[0])); +}; + +/** + * @enum {number} + */ +proto.buf.validate.SFixed32Rules.GreaterThanCase = { + GREATER_THAN_NOT_SET: 0, + GT: 4, + GTE: 5 +}; + +/** + * @return {proto.buf.validate.SFixed32Rules.GreaterThanCase} + */ +proto.buf.validate.SFixed32Rules.prototype.getGreaterThanCase = function() { + return /** @type {proto.buf.validate.SFixed32Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.SFixed32Rules.oneofGroups_[1])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.SFixed32Rules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.SFixed32Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.SFixed32Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.SFixed32Rules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, +notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, +exampleList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.SFixed32Rules.extensions, proto.buf.validate.SFixed32Rules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.SFixed32Rules} + */ +proto.buf.validate.SFixed32Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.SFixed32Rules; + return proto.buf.validate.SFixed32Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.SFixed32Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.SFixed32Rules} + */ +proto.buf.validate.SFixed32Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readSfixed32()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readSfixed32()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readSfixed32()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readSfixed32()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readSfixed32()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSfixed32() : [reader.readSfixed32()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSfixed32() : [reader.readSfixed32()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSfixed32() : [reader.readSfixed32()]); + for (var i = 0; i < values.length; i++) { + msg.addExample(values[i]); + } + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.SFixed32Rules.extensionsBinary, + proto.buf.validate.SFixed32Rules.prototype.getExtension, + proto.buf.validate.SFixed32Rules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.SFixed32Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.SFixed32Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.SFixed32Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.SFixed32Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeSfixed32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeSfixed32( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeSfixed32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeSfixed32( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeSfixed32( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedSfixed32( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedSfixed32( + 7, + f + ); + } + f = message.getExampleList(); + if (f.length > 0) { + writer.writeRepeatedSfixed32( + 8, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.SFixed32Rules.extensionsBinary, proto.buf.validate.SFixed32Rules.prototype.getExtension); +}; + + +/** + * optional sfixed32 const = 1; + * @return {number} + */ +proto.buf.validate.SFixed32Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SFixed32Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional sfixed32 lt = 2; + * @return {number} + */ +proto.buf.validate.SFixed32Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.setLt = function(value) { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.SFixed32Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.clearLt = function() { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.SFixed32Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SFixed32Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional sfixed32 lte = 3; + * @return {number} + */ +proto.buf.validate.SFixed32Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.setLte = function(value) { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.SFixed32Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.clearLte = function() { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.SFixed32Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SFixed32Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional sfixed32 gt = 4; + * @return {number} + */ +proto.buf.validate.SFixed32Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.setGt = function(value) { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.SFixed32Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.clearGt = function() { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.SFixed32Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SFixed32Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional sfixed32 gte = 5; + * @return {number} + */ +proto.buf.validate.SFixed32Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.setGte = function(value) { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.SFixed32Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.clearGte = function() { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.SFixed32Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SFixed32Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated sfixed32 in = 6; + * @return {!Array} + */ +proto.buf.validate.SFixed32Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated sfixed32 not_in = 7; + * @return {!Array} + */ +proto.buf.validate.SFixed32Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * repeated sfixed32 example = 8; + * @return {!Array} + */ +proto.buf.validate.SFixed32Rules.prototype.getExampleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.setExampleList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.addExample = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.SFixed32Rules} returns this + */ +proto.buf.validate.SFixed32Rules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.SFixed64Rules.repeatedFields_ = [6,7,8]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.SFixed64Rules.oneofGroups_ = [[2,3],[4,5]]; + +/** + * @enum {number} + */ +proto.buf.validate.SFixed64Rules.LessThanCase = { + LESS_THAN_NOT_SET: 0, + LT: 2, + LTE: 3 +}; + +/** + * @return {proto.buf.validate.SFixed64Rules.LessThanCase} + */ +proto.buf.validate.SFixed64Rules.prototype.getLessThanCase = function() { + return /** @type {proto.buf.validate.SFixed64Rules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.SFixed64Rules.oneofGroups_[0])); +}; + +/** + * @enum {number} + */ +proto.buf.validate.SFixed64Rules.GreaterThanCase = { + GREATER_THAN_NOT_SET: 0, + GT: 4, + GTE: 5 +}; + +/** + * @return {proto.buf.validate.SFixed64Rules.GreaterThanCase} + */ +proto.buf.validate.SFixed64Rules.prototype.getGreaterThanCase = function() { + return /** @type {proto.buf.validate.SFixed64Rules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.SFixed64Rules.oneofGroups_[1])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.SFixed64Rules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.SFixed64Rules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.SFixed64Rules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.SFixed64Rules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +lt: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +lte: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +gt: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +gte: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +inList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, +notInList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, +exampleList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.SFixed64Rules.extensions, proto.buf.validate.SFixed64Rules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.SFixed64Rules} + */ +proto.buf.validate.SFixed64Rules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.SFixed64Rules; + return proto.buf.validate.SFixed64Rules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.SFixed64Rules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.SFixed64Rules} + */ +proto.buf.validate.SFixed64Rules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readSfixed64()); + msg.setConst(value); + break; + case 2: + var value = /** @type {number} */ (reader.readSfixed64()); + msg.setLt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readSfixed64()); + msg.setLte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readSfixed64()); + msg.setGt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readSfixed64()); + msg.setGte(value); + break; + case 6: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSfixed64() : [reader.readSfixed64()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 7: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSfixed64() : [reader.readSfixed64()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 8: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedSfixed64() : [reader.readSfixed64()]); + for (var i = 0; i < values.length; i++) { + msg.addExample(values[i]); + } + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.SFixed64Rules.extensionsBinary, + proto.buf.validate.SFixed64Rules.prototype.getExtension, + proto.buf.validate.SFixed64Rules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.SFixed64Rules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.SFixed64Rules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.SFixed64Rules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.SFixed64Rules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeSfixed64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeSfixed64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeSfixed64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeSfixed64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeSfixed64( + 5, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedSfixed64( + 6, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedSfixed64( + 7, + f + ); + } + f = message.getExampleList(); + if (f.length > 0) { + writer.writeRepeatedSfixed64( + 8, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.SFixed64Rules.extensionsBinary, proto.buf.validate.SFixed64Rules.prototype.getExtension); +}; + + +/** + * optional sfixed64 const = 1; + * @return {number} + */ +proto.buf.validate.SFixed64Rules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SFixed64Rules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional sfixed64 lt = 2; + * @return {number} + */ +proto.buf.validate.SFixed64Rules.prototype.getLt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.setLt = function(value) { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.SFixed64Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.clearLt = function() { + return jspb.Message.setOneofField(this, 2, proto.buf.validate.SFixed64Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SFixed64Rules.prototype.hasLt = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional sfixed64 lte = 3; + * @return {number} + */ +proto.buf.validate.SFixed64Rules.prototype.getLte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.setLte = function(value) { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.SFixed64Rules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.clearLte = function() { + return jspb.Message.setOneofField(this, 3, proto.buf.validate.SFixed64Rules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SFixed64Rules.prototype.hasLte = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional sfixed64 gt = 4; + * @return {number} + */ +proto.buf.validate.SFixed64Rules.prototype.getGt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.setGt = function(value) { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.SFixed64Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.clearGt = function() { + return jspb.Message.setOneofField(this, 4, proto.buf.validate.SFixed64Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SFixed64Rules.prototype.hasGt = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional sfixed64 gte = 5; + * @return {number} + */ +proto.buf.validate.SFixed64Rules.prototype.getGte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.setGte = function(value) { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.SFixed64Rules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.clearGte = function() { + return jspb.Message.setOneofField(this, 5, proto.buf.validate.SFixed64Rules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.SFixed64Rules.prototype.hasGte = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated sfixed64 in = 6; + * @return {!Array} + */ +proto.buf.validate.SFixed64Rules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated sfixed64 not_in = 7; + * @return {!Array} + */ +proto.buf.validate.SFixed64Rules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * repeated sfixed64 example = 8; + * @return {!Array} + */ +proto.buf.validate.SFixed64Rules.prototype.getExampleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.setExampleList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.addExample = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.SFixed64Rules} returns this + */ +proto.buf.validate.SFixed64Rules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.BoolRules.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.BoolRules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.BoolRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.BoolRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.BoolRules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: (f = jspb.Message.getBooleanField(msg, 1)) == null ? undefined : f, +exampleList: (f = jspb.Message.getRepeatedBooleanField(msg, 2)) == null ? undefined : f + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.BoolRules.extensions, proto.buf.validate.BoolRules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.BoolRules} + */ +proto.buf.validate.BoolRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.BoolRules; + return proto.buf.validate.BoolRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.BoolRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.BoolRules} + */ +proto.buf.validate.BoolRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setConst(value); + break; + case 2: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedBool() : [reader.readBool()]); + for (var i = 0; i < values.length; i++) { + msg.addExample(values[i]); + } + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.BoolRules.extensionsBinary, + proto.buf.validate.BoolRules.prototype.getExtension, + proto.buf.validate.BoolRules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.BoolRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.BoolRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.BoolRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.BoolRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( + 1, + f + ); + } + f = message.getExampleList(); + if (f.length > 0) { + writer.writeRepeatedBool( + 2, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.BoolRules.extensionsBinary, proto.buf.validate.BoolRules.prototype.getExtension); +}; + + +/** + * optional bool const = 1; + * @return {boolean} + */ +proto.buf.validate.BoolRules.prototype.getConst = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.BoolRules} returns this + */ +proto.buf.validate.BoolRules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.BoolRules} returns this + */ +proto.buf.validate.BoolRules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.BoolRules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated bool example = 2; + * @return {!Array} + */ +proto.buf.validate.BoolRules.prototype.getExampleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedBooleanField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.BoolRules} returns this + */ +proto.buf.validate.BoolRules.prototype.setExampleList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {boolean} value + * @param {number=} opt_index + * @return {!proto.buf.validate.BoolRules} returns this + */ +proto.buf.validate.BoolRules.prototype.addExample = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.BoolRules} returns this + */ +proto.buf.validate.BoolRules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.StringRules.repeatedFields_ = [10,11,34]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.StringRules.oneofGroups_ = [[12,13,14,15,16,17,18,21,22,33,26,27,28,29,30,31,32,24]]; + +/** + * @enum {number} + */ +proto.buf.validate.StringRules.WellKnownCase = { + WELL_KNOWN_NOT_SET: 0, + EMAIL: 12, + HOSTNAME: 13, + IP: 14, + IPV4: 15, + IPV6: 16, + URI: 17, + URI_REF: 18, + ADDRESS: 21, + UUID: 22, + TUUID: 33, + IP_WITH_PREFIXLEN: 26, + IPV4_WITH_PREFIXLEN: 27, + IPV6_WITH_PREFIXLEN: 28, + IP_PREFIX: 29, + IPV4_PREFIX: 30, + IPV6_PREFIX: 31, + HOST_AND_PORT: 32, + WELL_KNOWN_REGEX: 24 +}; + +/** + * @return {proto.buf.validate.StringRules.WellKnownCase} + */ +proto.buf.validate.StringRules.prototype.getWellKnownCase = function() { + return /** @type {proto.buf.validate.StringRules.WellKnownCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.StringRules.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.StringRules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.StringRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.StringRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.StringRules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +len: (f = jspb.Message.getField(msg, 19)) == null ? undefined : f, +minLen: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +maxLen: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +lenBytes: (f = jspb.Message.getField(msg, 20)) == null ? undefined : f, +minBytes: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +maxBytes: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +pattern: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f, +prefix: (f = jspb.Message.getField(msg, 7)) == null ? undefined : f, +suffix: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f, +contains: (f = jspb.Message.getField(msg, 9)) == null ? undefined : f, +notContains: (f = jspb.Message.getField(msg, 23)) == null ? undefined : f, +inList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, +notInList: (f = jspb.Message.getRepeatedField(msg, 11)) == null ? undefined : f, +email: (f = jspb.Message.getBooleanField(msg, 12)) == null ? undefined : f, +hostname: (f = jspb.Message.getBooleanField(msg, 13)) == null ? undefined : f, +ip: (f = jspb.Message.getBooleanField(msg, 14)) == null ? undefined : f, +ipv4: (f = jspb.Message.getBooleanField(msg, 15)) == null ? undefined : f, +ipv6: (f = jspb.Message.getBooleanField(msg, 16)) == null ? undefined : f, +uri: (f = jspb.Message.getBooleanField(msg, 17)) == null ? undefined : f, +uriRef: (f = jspb.Message.getBooleanField(msg, 18)) == null ? undefined : f, +address: (f = jspb.Message.getBooleanField(msg, 21)) == null ? undefined : f, +uuid: (f = jspb.Message.getBooleanField(msg, 22)) == null ? undefined : f, +tuuid: (f = jspb.Message.getBooleanField(msg, 33)) == null ? undefined : f, +ipWithPrefixlen: (f = jspb.Message.getBooleanField(msg, 26)) == null ? undefined : f, +ipv4WithPrefixlen: (f = jspb.Message.getBooleanField(msg, 27)) == null ? undefined : f, +ipv6WithPrefixlen: (f = jspb.Message.getBooleanField(msg, 28)) == null ? undefined : f, +ipPrefix: (f = jspb.Message.getBooleanField(msg, 29)) == null ? undefined : f, +ipv4Prefix: (f = jspb.Message.getBooleanField(msg, 30)) == null ? undefined : f, +ipv6Prefix: (f = jspb.Message.getBooleanField(msg, 31)) == null ? undefined : f, +hostAndPort: (f = jspb.Message.getBooleanField(msg, 32)) == null ? undefined : f, +wellKnownRegex: (f = jspb.Message.getField(msg, 24)) == null ? undefined : f, +strict: (f = jspb.Message.getBooleanField(msg, 25)) == null ? undefined : f, +exampleList: (f = jspb.Message.getRepeatedField(msg, 34)) == null ? undefined : f + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.StringRules.extensions, proto.buf.validate.StringRules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.StringRules} + */ +proto.buf.validate.StringRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.StringRules; + return proto.buf.validate.StringRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.StringRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.StringRules} + */ +proto.buf.validate.StringRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setConst(value); + break; + case 19: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLen(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinLen(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxLen(value); + break; + case 20: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLenBytes(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinBytes(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxBytes(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setPattern(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setPrefix(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setSuffix(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setContains(value); + break; + case 23: + var value = /** @type {string} */ (reader.readString()); + msg.setNotContains(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.addIn(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.addNotIn(value); + break; + case 12: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setEmail(value); + break; + case 13: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setHostname(value); + break; + case 14: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIp(value); + break; + case 15: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIpv4(value); + break; + case 16: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIpv6(value); + break; + case 17: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUri(value); + break; + case 18: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUriRef(value); + break; + case 21: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAddress(value); + break; + case 22: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUuid(value); + break; + case 33: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setTuuid(value); + break; + case 26: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIpWithPrefixlen(value); + break; + case 27: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIpv4WithPrefixlen(value); + break; + case 28: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIpv6WithPrefixlen(value); + break; + case 29: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIpPrefix(value); + break; + case 30: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIpv4Prefix(value); + break; + case 31: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIpv6Prefix(value); + break; + case 32: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setHostAndPort(value); + break; + case 24: + var value = /** @type {!proto.buf.validate.KnownRegex} */ (reader.readEnum()); + msg.setWellKnownRegex(value); + break; + case 25: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStrict(value); + break; + case 34: + var value = /** @type {string} */ (reader.readString()); + msg.addExample(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.StringRules.extensionsBinary, + proto.buf.validate.StringRules.prototype.getExtension, + proto.buf.validate.StringRules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.StringRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.StringRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.StringRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.StringRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 19)); + if (f != null) { + writer.writeUint64( + 19, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint64( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 20)); + if (f != null) { + writer.writeUint64( + 20, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint64( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeString( + 7, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeString( + 9, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 23)); + if (f != null) { + writer.writeString( + 23, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedString( + 10, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedString( + 11, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeBool( + 12, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 13)); + if (f != null) { + writer.writeBool( + 13, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 14)); + if (f != null) { + writer.writeBool( + 14, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 15)); + if (f != null) { + writer.writeBool( + 15, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 16)); + if (f != null) { + writer.writeBool( + 16, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 17)); + if (f != null) { + writer.writeBool( + 17, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 18)); + if (f != null) { + writer.writeBool( + 18, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 21)); + if (f != null) { + writer.writeBool( + 21, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 22)); + if (f != null) { + writer.writeBool( + 22, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 33)); + if (f != null) { + writer.writeBool( + 33, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 26)); + if (f != null) { + writer.writeBool( + 26, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 27)); + if (f != null) { + writer.writeBool( + 27, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 28)); + if (f != null) { + writer.writeBool( + 28, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 29)); + if (f != null) { + writer.writeBool( + 29, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 30)); + if (f != null) { + writer.writeBool( + 30, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 31)); + if (f != null) { + writer.writeBool( + 31, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 32)); + if (f != null) { + writer.writeBool( + 32, + f + ); + } + f = /** @type {!proto.buf.validate.KnownRegex} */ (jspb.Message.getField(message, 24)); + if (f != null) { + writer.writeEnum( + 24, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 25)); + if (f != null) { + writer.writeBool( + 25, + f + ); + } + f = message.getExampleList(); + if (f.length > 0) { + writer.writeRepeatedString( + 34, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.StringRules.extensionsBinary, proto.buf.validate.StringRules.prototype.getExtension); +}; + + +/** + * optional string const = 1; + * @return {string} + */ +proto.buf.validate.StringRules.prototype.getConst = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 len = 19; + * @return {number} + */ +proto.buf.validate.StringRules.prototype.getLen = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setLen = function(value) { + return jspb.Message.setField(this, 19, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearLen = function() { + return jspb.Message.setField(this, 19, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasLen = function() { + return jspb.Message.getField(this, 19) != null; +}; + + +/** + * optional uint64 min_len = 2; + * @return {number} + */ +proto.buf.validate.StringRules.prototype.getMinLen = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setMinLen = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearMinLen = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasMinLen = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 max_len = 3; + * @return {number} + */ +proto.buf.validate.StringRules.prototype.getMaxLen = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setMaxLen = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearMaxLen = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasMaxLen = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 len_bytes = 20; + * @return {number} + */ +proto.buf.validate.StringRules.prototype.getLenBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setLenBytes = function(value) { + return jspb.Message.setField(this, 20, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearLenBytes = function() { + return jspb.Message.setField(this, 20, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasLenBytes = function() { + return jspb.Message.getField(this, 20) != null; +}; + + +/** + * optional uint64 min_bytes = 4; + * @return {number} + */ +proto.buf.validate.StringRules.prototype.getMinBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setMinBytes = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearMinBytes = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasMinBytes = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint64 max_bytes = 5; + * @return {number} + */ +proto.buf.validate.StringRules.prototype.getMaxBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setMaxBytes = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearMaxBytes = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasMaxBytes = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string pattern = 6; + * @return {string} + */ +proto.buf.validate.StringRules.prototype.getPattern = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setPattern = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearPattern = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasPattern = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string prefix = 7; + * @return {string} + */ +proto.buf.validate.StringRules.prototype.getPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setPrefix = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearPrefix = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasPrefix = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional string suffix = 8; + * @return {string} + */ +proto.buf.validate.StringRules.prototype.getSuffix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setSuffix = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearSuffix = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasSuffix = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string contains = 9; + * @return {string} + */ +proto.buf.validate.StringRules.prototype.getContains = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setContains = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearContains = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasContains = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string not_contains = 23; + * @return {string} + */ +proto.buf.validate.StringRules.prototype.getNotContains = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 23, "")); +}; + + +/** + * @param {string} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setNotContains = function(value) { + return jspb.Message.setField(this, 23, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearNotContains = function() { + return jspb.Message.setField(this, 23, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasNotContains = function() { + return jspb.Message.getField(this, 23) != null; +}; + + +/** + * repeated string in = 10; + * @return {!Array} + */ +proto.buf.validate.StringRules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 10, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated string not_in = 11; + * @return {!Array} + */ +proto.buf.validate.StringRules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 11)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 11, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 11, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool email = 12; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getEmail = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setEmail = function(value) { + return jspb.Message.setOneofField(this, 12, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearEmail = function() { + return jspb.Message.setOneofField(this, 12, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasEmail = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional bool hostname = 13; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getHostname = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 13, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setHostname = function(value) { + return jspb.Message.setOneofField(this, 13, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearHostname = function() { + return jspb.Message.setOneofField(this, 13, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasHostname = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional bool ip = 14; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getIp = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setIp = function(value) { + return jspb.Message.setOneofField(this, 14, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearIp = function() { + return jspb.Message.setOneofField(this, 14, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasIp = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional bool ipv4 = 15; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getIpv4 = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setIpv4 = function(value) { + return jspb.Message.setOneofField(this, 15, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearIpv4 = function() { + return jspb.Message.setOneofField(this, 15, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasIpv4 = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional bool ipv6 = 16; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getIpv6 = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 16, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setIpv6 = function(value) { + return jspb.Message.setOneofField(this, 16, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearIpv6 = function() { + return jspb.Message.setOneofField(this, 16, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasIpv6 = function() { + return jspb.Message.getField(this, 16) != null; +}; + + +/** + * optional bool uri = 17; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getUri = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setUri = function(value) { + return jspb.Message.setOneofField(this, 17, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearUri = function() { + return jspb.Message.setOneofField(this, 17, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasUri = function() { + return jspb.Message.getField(this, 17) != null; +}; + + +/** + * optional bool uri_ref = 18; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getUriRef = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setUriRef = function(value) { + return jspb.Message.setOneofField(this, 18, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearUriRef = function() { + return jspb.Message.setOneofField(this, 18, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasUriRef = function() { + return jspb.Message.getField(this, 18) != null; +}; + + +/** + * optional bool address = 21; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getAddress = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 21, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setAddress = function(value) { + return jspb.Message.setOneofField(this, 21, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearAddress = function() { + return jspb.Message.setOneofField(this, 21, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasAddress = function() { + return jspb.Message.getField(this, 21) != null; +}; + + +/** + * optional bool uuid = 22; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getUuid = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 22, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setUuid = function(value) { + return jspb.Message.setOneofField(this, 22, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearUuid = function() { + return jspb.Message.setOneofField(this, 22, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasUuid = function() { + return jspb.Message.getField(this, 22) != null; +}; + + +/** + * optional bool tuuid = 33; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getTuuid = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 33, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setTuuid = function(value) { + return jspb.Message.setOneofField(this, 33, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearTuuid = function() { + return jspb.Message.setOneofField(this, 33, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasTuuid = function() { + return jspb.Message.getField(this, 33) != null; +}; + + +/** + * optional bool ip_with_prefixlen = 26; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getIpWithPrefixlen = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 26, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setIpWithPrefixlen = function(value) { + return jspb.Message.setOneofField(this, 26, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearIpWithPrefixlen = function() { + return jspb.Message.setOneofField(this, 26, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasIpWithPrefixlen = function() { + return jspb.Message.getField(this, 26) != null; +}; + + +/** + * optional bool ipv4_with_prefixlen = 27; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getIpv4WithPrefixlen = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 27, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setIpv4WithPrefixlen = function(value) { + return jspb.Message.setOneofField(this, 27, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearIpv4WithPrefixlen = function() { + return jspb.Message.setOneofField(this, 27, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasIpv4WithPrefixlen = function() { + return jspb.Message.getField(this, 27) != null; +}; + + +/** + * optional bool ipv6_with_prefixlen = 28; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getIpv6WithPrefixlen = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 28, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setIpv6WithPrefixlen = function(value) { + return jspb.Message.setOneofField(this, 28, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearIpv6WithPrefixlen = function() { + return jspb.Message.setOneofField(this, 28, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasIpv6WithPrefixlen = function() { + return jspb.Message.getField(this, 28) != null; +}; + + +/** + * optional bool ip_prefix = 29; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getIpPrefix = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 29, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setIpPrefix = function(value) { + return jspb.Message.setOneofField(this, 29, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearIpPrefix = function() { + return jspb.Message.setOneofField(this, 29, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasIpPrefix = function() { + return jspb.Message.getField(this, 29) != null; +}; + + +/** + * optional bool ipv4_prefix = 30; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getIpv4Prefix = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 30, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setIpv4Prefix = function(value) { + return jspb.Message.setOneofField(this, 30, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearIpv4Prefix = function() { + return jspb.Message.setOneofField(this, 30, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasIpv4Prefix = function() { + return jspb.Message.getField(this, 30) != null; +}; + + +/** + * optional bool ipv6_prefix = 31; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getIpv6Prefix = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 31, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setIpv6Prefix = function(value) { + return jspb.Message.setOneofField(this, 31, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearIpv6Prefix = function() { + return jspb.Message.setOneofField(this, 31, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasIpv6Prefix = function() { + return jspb.Message.getField(this, 31) != null; +}; + + +/** + * optional bool host_and_port = 32; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getHostAndPort = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 32, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setHostAndPort = function(value) { + return jspb.Message.setOneofField(this, 32, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearHostAndPort = function() { + return jspb.Message.setOneofField(this, 32, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasHostAndPort = function() { + return jspb.Message.getField(this, 32) != null; +}; + + +/** + * optional KnownRegex well_known_regex = 24; + * @return {!proto.buf.validate.KnownRegex} + */ +proto.buf.validate.StringRules.prototype.getWellKnownRegex = function() { + return /** @type {!proto.buf.validate.KnownRegex} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); +}; + + +/** + * @param {!proto.buf.validate.KnownRegex} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setWellKnownRegex = function(value) { + return jspb.Message.setOneofField(this, 24, proto.buf.validate.StringRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearWellKnownRegex = function() { + return jspb.Message.setOneofField(this, 24, proto.buf.validate.StringRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasWellKnownRegex = function() { + return jspb.Message.getField(this, 24) != null; +}; + + +/** + * optional bool strict = 25; + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.getStrict = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 25, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setStrict = function(value) { + return jspb.Message.setField(this, 25, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearStrict = function() { + return jspb.Message.setField(this, 25, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.StringRules.prototype.hasStrict = function() { + return jspb.Message.getField(this, 25) != null; +}; + + +/** + * repeated string example = 34; + * @return {!Array} + */ +proto.buf.validate.StringRules.prototype.getExampleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 34)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.setExampleList = function(value) { + return jspb.Message.setField(this, 34, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.addExample = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 34, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.StringRules} returns this + */ +proto.buf.validate.StringRules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.BytesRules.repeatedFields_ = [8,9,14]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.BytesRules.oneofGroups_ = [[10,11,12]]; + +/** + * @enum {number} + */ +proto.buf.validate.BytesRules.WellKnownCase = { + WELL_KNOWN_NOT_SET: 0, + IP: 10, + IPV4: 11, + IPV6: 12 +}; + +/** + * @return {proto.buf.validate.BytesRules.WellKnownCase} + */ +proto.buf.validate.BytesRules.prototype.getWellKnownCase = function() { + return /** @type {proto.buf.validate.BytesRules.WellKnownCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.BytesRules.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.BytesRules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.BytesRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.BytesRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.BytesRules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: msg.getConst_asB64(), +len: (f = jspb.Message.getField(msg, 13)) == null ? undefined : f, +minLen: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +maxLen: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +pattern: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +prefix: msg.getPrefix_asB64(), +suffix: msg.getSuffix_asB64(), +contains: msg.getContains_asB64(), +inList: msg.getInList_asB64(), +notInList: msg.getNotInList_asB64(), +ip: (f = jspb.Message.getBooleanField(msg, 10)) == null ? undefined : f, +ipv4: (f = jspb.Message.getBooleanField(msg, 11)) == null ? undefined : f, +ipv6: (f = jspb.Message.getBooleanField(msg, 12)) == null ? undefined : f, +exampleList: msg.getExampleList_asB64() + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.BytesRules.extensions, proto.buf.validate.BytesRules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.BytesRules} + */ +proto.buf.validate.BytesRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.BytesRules; + return proto.buf.validate.BytesRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.BytesRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.BytesRules} + */ +proto.buf.validate.BytesRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setConst(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLen(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinLen(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxLen(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPattern(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPrefix(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSuffix(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContains(value); + break; + case 8: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIn(value); + break; + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addNotIn(value); + break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIp(value); + break; + case 11: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIpv4(value); + break; + case 12: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIpv6(value); + break; + case 14: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addExample(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.BytesRules.extensionsBinary, + proto.buf.validate.BytesRules.prototype.getExtension, + proto.buf.validate.BytesRules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.BytesRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.BytesRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.BytesRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.BytesRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 13)); + if (f != null) { + writer.writeUint64( + 13, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint64( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBytes( + 5, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBytes( + 6, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBytes( + 7, + f + ); + } + f = message.getInList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 8, + f + ); + } + f = message.getNotInList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 9, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeBool( + 10, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeBool( + 11, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeBool( + 12, + f + ); + } + f = message.getExampleList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 14, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.BytesRules.extensionsBinary, proto.buf.validate.BytesRules.prototype.getExtension); +}; + + +/** + * optional bytes const = 1; + * @return {!(string|Uint8Array)} + */ +proto.buf.validate.BytesRules.prototype.getConst = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes const = 1; + * This is a type-conversion wrapper around `getConst()` + * @return {string} + */ +proto.buf.validate.BytesRules.prototype.getConst_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getConst())); +}; + + +/** + * optional bytes const = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getConst()` + * @return {!Uint8Array} + */ +proto.buf.validate.BytesRules.prototype.getConst_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getConst())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.BytesRules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 len = 13; + * @return {number} + */ +proto.buf.validate.BytesRules.prototype.getLen = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.setLen = function(value) { + return jspb.Message.setField(this, 13, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.clearLen = function() { + return jspb.Message.setField(this, 13, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.BytesRules.prototype.hasLen = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional uint64 min_len = 2; + * @return {number} + */ +proto.buf.validate.BytesRules.prototype.getMinLen = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.setMinLen = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.clearMinLen = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.BytesRules.prototype.hasMinLen = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 max_len = 3; + * @return {number} + */ +proto.buf.validate.BytesRules.prototype.getMaxLen = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.setMaxLen = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.clearMaxLen = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.BytesRules.prototype.hasMaxLen = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string pattern = 4; + * @return {string} + */ +proto.buf.validate.BytesRules.prototype.getPattern = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.setPattern = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.clearPattern = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.BytesRules.prototype.hasPattern = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bytes prefix = 5; + * @return {!(string|Uint8Array)} + */ +proto.buf.validate.BytesRules.prototype.getPrefix = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes prefix = 5; + * This is a type-conversion wrapper around `getPrefix()` + * @return {string} + */ +proto.buf.validate.BytesRules.prototype.getPrefix_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPrefix())); +}; + + +/** + * optional bytes prefix = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPrefix()` + * @return {!Uint8Array} + */ +proto.buf.validate.BytesRules.prototype.getPrefix_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPrefix())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.setPrefix = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.clearPrefix = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.BytesRules.prototype.hasPrefix = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes suffix = 6; + * @return {!(string|Uint8Array)} + */ +proto.buf.validate.BytesRules.prototype.getSuffix = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes suffix = 6; + * This is a type-conversion wrapper around `getSuffix()` + * @return {string} + */ +proto.buf.validate.BytesRules.prototype.getSuffix_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSuffix())); +}; + + +/** + * optional bytes suffix = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSuffix()` + * @return {!Uint8Array} + */ +proto.buf.validate.BytesRules.prototype.getSuffix_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSuffix())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.setSuffix = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.clearSuffix = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.BytesRules.prototype.hasSuffix = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes contains = 7; + * @return {!(string|Uint8Array)} + */ +proto.buf.validate.BytesRules.prototype.getContains = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes contains = 7; + * This is a type-conversion wrapper around `getContains()` + * @return {string} + */ +proto.buf.validate.BytesRules.prototype.getContains_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContains())); +}; + + +/** + * optional bytes contains = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContains()` + * @return {!Uint8Array} + */ +proto.buf.validate.BytesRules.prototype.getContains_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContains())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.setContains = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.clearContains = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.BytesRules.prototype.hasContains = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * repeated bytes in = 8; + * @return {!(Array|Array)} + */ +proto.buf.validate.BytesRules.prototype.getInList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * repeated bytes in = 8; + * This is a type-conversion wrapper around `getInList()` + * @return {!Array} + */ +proto.buf.validate.BytesRules.prototype.getInList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getInList())); +}; + + +/** + * repeated bytes in = 8; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getInList()` + * @return {!Array} + */ +proto.buf.validate.BytesRules.prototype.getInList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getInList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated bytes not_in = 9; + * @return {!(Array|Array)} + */ +proto.buf.validate.BytesRules.prototype.getNotInList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 9)); +}; + + +/** + * repeated bytes not_in = 9; + * This is a type-conversion wrapper around `getNotInList()` + * @return {!Array} + */ +proto.buf.validate.BytesRules.prototype.getNotInList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getNotInList())); +}; + + +/** + * repeated bytes not_in = 9; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNotInList()` + * @return {!Array} + */ +proto.buf.validate.BytesRules.prototype.getNotInList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getNotInList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 9, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 9, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * optional bool ip = 10; + * @return {boolean} + */ +proto.buf.validate.BytesRules.prototype.getIp = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.setIp = function(value) { + return jspb.Message.setOneofField(this, 10, proto.buf.validate.BytesRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.clearIp = function() { + return jspb.Message.setOneofField(this, 10, proto.buf.validate.BytesRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.BytesRules.prototype.hasIp = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional bool ipv4 = 11; + * @return {boolean} + */ +proto.buf.validate.BytesRules.prototype.getIpv4 = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.setIpv4 = function(value) { + return jspb.Message.setOneofField(this, 11, proto.buf.validate.BytesRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.clearIpv4 = function() { + return jspb.Message.setOneofField(this, 11, proto.buf.validate.BytesRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.BytesRules.prototype.hasIpv4 = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional bool ipv6 = 12; + * @return {boolean} + */ +proto.buf.validate.BytesRules.prototype.getIpv6 = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.setIpv6 = function(value) { + return jspb.Message.setOneofField(this, 12, proto.buf.validate.BytesRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.clearIpv6 = function() { + return jspb.Message.setOneofField(this, 12, proto.buf.validate.BytesRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.BytesRules.prototype.hasIpv6 = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * repeated bytes example = 14; + * @return {!(Array|Array)} + */ +proto.buf.validate.BytesRules.prototype.getExampleList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 14)); +}; + + +/** + * repeated bytes example = 14; + * This is a type-conversion wrapper around `getExampleList()` + * @return {!Array} + */ +proto.buf.validate.BytesRules.prototype.getExampleList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getExampleList())); +}; + + +/** + * repeated bytes example = 14; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getExampleList()` + * @return {!Array} + */ +proto.buf.validate.BytesRules.prototype.getExampleList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getExampleList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.setExampleList = function(value) { + return jspb.Message.setField(this, 14, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.addExample = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 14, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.BytesRules} returns this + */ +proto.buf.validate.BytesRules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.EnumRules.repeatedFields_ = [3,4,5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.EnumRules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.EnumRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.EnumRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.EnumRules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +definedOnly: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f, +inList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, +notInList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, +exampleList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.EnumRules.extensions, proto.buf.validate.EnumRules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.EnumRules} + */ +proto.buf.validate.EnumRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.EnumRules; + return proto.buf.validate.EnumRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.EnumRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.EnumRules} + */ +proto.buf.validate.EnumRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setConst(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDefinedOnly(value); + break; + case 3: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addIn(values[i]); + } + break; + case 4: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addNotIn(values[i]); + } + break; + case 5: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addExample(values[i]); + } + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.EnumRules.extensionsBinary, + proto.buf.validate.EnumRules.prototype.getExtension, + proto.buf.validate.EnumRules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.EnumRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.EnumRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.EnumRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.EnumRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt32( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedInt32( + 3, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedInt32( + 4, + f + ); + } + f = message.getExampleList(); + if (f.length > 0) { + writer.writeRepeatedInt32( + 5, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.EnumRules.extensionsBinary, proto.buf.validate.EnumRules.prototype.getExtension); +}; + + +/** + * optional int32 const = 1; + * @return {number} + */ +proto.buf.validate.EnumRules.prototype.getConst = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.EnumRules} returns this + */ +proto.buf.validate.EnumRules.prototype.setConst = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.EnumRules} returns this + */ +proto.buf.validate.EnumRules.prototype.clearConst = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.EnumRules.prototype.hasConst = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool defined_only = 2; + * @return {boolean} + */ +proto.buf.validate.EnumRules.prototype.getDefinedOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.EnumRules} returns this + */ +proto.buf.validate.EnumRules.prototype.setDefinedOnly = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.EnumRules} returns this + */ +proto.buf.validate.EnumRules.prototype.clearDefinedOnly = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.EnumRules.prototype.hasDefinedOnly = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated int32 in = 3; + * @return {!Array} + */ +proto.buf.validate.EnumRules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.EnumRules} returns this + */ +proto.buf.validate.EnumRules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.EnumRules} returns this + */ +proto.buf.validate.EnumRules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.EnumRules} returns this + */ +proto.buf.validate.EnumRules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated int32 not_in = 4; + * @return {!Array} + */ +proto.buf.validate.EnumRules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.EnumRules} returns this + */ +proto.buf.validate.EnumRules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.EnumRules} returns this + */ +proto.buf.validate.EnumRules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.EnumRules} returns this + */ +proto.buf.validate.EnumRules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * repeated int32 example = 5; + * @return {!Array} + */ +proto.buf.validate.EnumRules.prototype.getExampleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.EnumRules} returns this + */ +proto.buf.validate.EnumRules.prototype.setExampleList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.buf.validate.EnumRules} returns this + */ +proto.buf.validate.EnumRules.prototype.addExample = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.EnumRules} returns this + */ +proto.buf.validate.EnumRules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.RepeatedRules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.RepeatedRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.RepeatedRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.RepeatedRules.toObject = function(includeInstance, msg) { + var f, obj = { +minItems: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +maxItems: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +unique: (f = jspb.Message.getBooleanField(msg, 3)) == null ? undefined : f, +items: (f = msg.getItems()) && proto.buf.validate.FieldConstraints.toObject(includeInstance, f) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.RepeatedRules.extensions, proto.buf.validate.RepeatedRules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.RepeatedRules} + */ +proto.buf.validate.RepeatedRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.RepeatedRules; + return proto.buf.validate.RepeatedRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.RepeatedRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.RepeatedRules} + */ +proto.buf.validate.RepeatedRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinItems(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxItems(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUnique(value); + break; + case 4: + var value = new proto.buf.validate.FieldConstraints; + reader.readMessage(value,proto.buf.validate.FieldConstraints.deserializeBinaryFromReader); + msg.setItems(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.RepeatedRules.extensionsBinary, + proto.buf.validate.RepeatedRules.prototype.getExtension, + proto.buf.validate.RepeatedRules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.RepeatedRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.RepeatedRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.RepeatedRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.RepeatedRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } + f = message.getItems(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.buf.validate.FieldConstraints.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.RepeatedRules.extensionsBinary, proto.buf.validate.RepeatedRules.prototype.getExtension); +}; + + +/** + * optional uint64 min_items = 1; + * @return {number} + */ +proto.buf.validate.RepeatedRules.prototype.getMinItems = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.RepeatedRules} returns this + */ +proto.buf.validate.RepeatedRules.prototype.setMinItems = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.RepeatedRules} returns this + */ +proto.buf.validate.RepeatedRules.prototype.clearMinItems = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.RepeatedRules.prototype.hasMinItems = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 max_items = 2; + * @return {number} + */ +proto.buf.validate.RepeatedRules.prototype.getMaxItems = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.RepeatedRules} returns this + */ +proto.buf.validate.RepeatedRules.prototype.setMaxItems = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.RepeatedRules} returns this + */ +proto.buf.validate.RepeatedRules.prototype.clearMaxItems = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.RepeatedRules.prototype.hasMaxItems = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool unique = 3; + * @return {boolean} + */ +proto.buf.validate.RepeatedRules.prototype.getUnique = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.RepeatedRules} returns this + */ +proto.buf.validate.RepeatedRules.prototype.setUnique = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.RepeatedRules} returns this + */ +proto.buf.validate.RepeatedRules.prototype.clearUnique = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.RepeatedRules.prototype.hasUnique = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional FieldConstraints items = 4; + * @return {?proto.buf.validate.FieldConstraints} + */ +proto.buf.validate.RepeatedRules.prototype.getItems = function() { + return /** @type{?proto.buf.validate.FieldConstraints} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.FieldConstraints, 4)); +}; + + +/** + * @param {?proto.buf.validate.FieldConstraints|undefined} value + * @return {!proto.buf.validate.RepeatedRules} returns this +*/ +proto.buf.validate.RepeatedRules.prototype.setItems = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.RepeatedRules} returns this + */ +proto.buf.validate.RepeatedRules.prototype.clearItems = function() { + return this.setItems(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.RepeatedRules.prototype.hasItems = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.MapRules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.MapRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.MapRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.MapRules.toObject = function(includeInstance, msg) { + var f, obj = { +minPairs: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +maxPairs: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +keys: (f = msg.getKeys()) && proto.buf.validate.FieldConstraints.toObject(includeInstance, f), +values: (f = msg.getValues()) && proto.buf.validate.FieldConstraints.toObject(includeInstance, f) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.MapRules.extensions, proto.buf.validate.MapRules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.MapRules} + */ +proto.buf.validate.MapRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.MapRules; + return proto.buf.validate.MapRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.MapRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.MapRules} + */ +proto.buf.validate.MapRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinPairs(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxPairs(value); + break; + case 4: + var value = new proto.buf.validate.FieldConstraints; + reader.readMessage(value,proto.buf.validate.FieldConstraints.deserializeBinaryFromReader); + msg.setKeys(value); + break; + case 5: + var value = new proto.buf.validate.FieldConstraints; + reader.readMessage(value,proto.buf.validate.FieldConstraints.deserializeBinaryFromReader); + msg.setValues(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.MapRules.extensionsBinary, + proto.buf.validate.MapRules.prototype.getExtension, + proto.buf.validate.MapRules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.MapRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.MapRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.MapRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.MapRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } + f = message.getKeys(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.buf.validate.FieldConstraints.serializeBinaryToWriter + ); + } + f = message.getValues(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.buf.validate.FieldConstraints.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.MapRules.extensionsBinary, proto.buf.validate.MapRules.prototype.getExtension); +}; + + +/** + * optional uint64 min_pairs = 1; + * @return {number} + */ +proto.buf.validate.MapRules.prototype.getMinPairs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.MapRules} returns this + */ +proto.buf.validate.MapRules.prototype.setMinPairs = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.MapRules} returns this + */ +proto.buf.validate.MapRules.prototype.clearMinPairs = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.MapRules.prototype.hasMinPairs = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint64 max_pairs = 2; + * @return {number} + */ +proto.buf.validate.MapRules.prototype.getMaxPairs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.MapRules} returns this + */ +proto.buf.validate.MapRules.prototype.setMaxPairs = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.MapRules} returns this + */ +proto.buf.validate.MapRules.prototype.clearMaxPairs = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.MapRules.prototype.hasMaxPairs = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional FieldConstraints keys = 4; + * @return {?proto.buf.validate.FieldConstraints} + */ +proto.buf.validate.MapRules.prototype.getKeys = function() { + return /** @type{?proto.buf.validate.FieldConstraints} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.FieldConstraints, 4)); +}; + + +/** + * @param {?proto.buf.validate.FieldConstraints|undefined} value + * @return {!proto.buf.validate.MapRules} returns this +*/ +proto.buf.validate.MapRules.prototype.setKeys = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.MapRules} returns this + */ +proto.buf.validate.MapRules.prototype.clearKeys = function() { + return this.setKeys(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.MapRules.prototype.hasKeys = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional FieldConstraints values = 5; + * @return {?proto.buf.validate.FieldConstraints} + */ +proto.buf.validate.MapRules.prototype.getValues = function() { + return /** @type{?proto.buf.validate.FieldConstraints} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.FieldConstraints, 5)); +}; + + +/** + * @param {?proto.buf.validate.FieldConstraints|undefined} value + * @return {!proto.buf.validate.MapRules} returns this +*/ +proto.buf.validate.MapRules.prototype.setValues = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.MapRules} returns this + */ +proto.buf.validate.MapRules.prototype.clearValues = function() { + return this.setValues(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.MapRules.prototype.hasValues = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.AnyRules.repeatedFields_ = [2,3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.AnyRules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.AnyRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.AnyRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.AnyRules.toObject = function(includeInstance, msg) { + var f, obj = { +inList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, +notInList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.AnyRules} + */ +proto.buf.validate.AnyRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.AnyRules; + return proto.buf.validate.AnyRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.AnyRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.AnyRules} + */ +proto.buf.validate.AnyRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addIn(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addNotIn(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.AnyRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.AnyRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.AnyRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.AnyRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } +}; + + +/** + * repeated string in = 2; + * @return {!Array} + */ +proto.buf.validate.AnyRules.prototype.getInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.AnyRules} returns this + */ +proto.buf.validate.AnyRules.prototype.setInList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.buf.validate.AnyRules} returns this + */ +proto.buf.validate.AnyRules.prototype.addIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.AnyRules} returns this + */ +proto.buf.validate.AnyRules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated string not_in = 3; + * @return {!Array} + */ +proto.buf.validate.AnyRules.prototype.getNotInList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.AnyRules} returns this + */ +proto.buf.validate.AnyRules.prototype.setNotInList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.buf.validate.AnyRules} returns this + */ +proto.buf.validate.AnyRules.prototype.addNotIn = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.AnyRules} returns this + */ +proto.buf.validate.AnyRules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.DurationRules.repeatedFields_ = [7,8,9]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.DurationRules.oneofGroups_ = [[3,4],[5,6]]; + +/** + * @enum {number} + */ +proto.buf.validate.DurationRules.LessThanCase = { + LESS_THAN_NOT_SET: 0, + LT: 3, + LTE: 4 +}; + +/** + * @return {proto.buf.validate.DurationRules.LessThanCase} + */ +proto.buf.validate.DurationRules.prototype.getLessThanCase = function() { + return /** @type {proto.buf.validate.DurationRules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.DurationRules.oneofGroups_[0])); +}; + +/** + * @enum {number} + */ +proto.buf.validate.DurationRules.GreaterThanCase = { + GREATER_THAN_NOT_SET: 0, + GT: 5, + GTE: 6 +}; + +/** + * @return {proto.buf.validate.DurationRules.GreaterThanCase} + */ +proto.buf.validate.DurationRules.prototype.getGreaterThanCase = function() { + return /** @type {proto.buf.validate.DurationRules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.DurationRules.oneofGroups_[1])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.DurationRules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.DurationRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.DurationRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.DurationRules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: (f = msg.getConst()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), +lt: (f = msg.getLt()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), +lte: (f = msg.getLte()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), +gt: (f = msg.getGt()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), +gte: (f = msg.getGte()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), +inList: jspb.Message.toObjectList(msg.getInList(), + google_protobuf_duration_pb.Duration.toObject, includeInstance), +notInList: jspb.Message.toObjectList(msg.getNotInList(), + google_protobuf_duration_pb.Duration.toObject, includeInstance), +exampleList: jspb.Message.toObjectList(msg.getExampleList(), + google_protobuf_duration_pb.Duration.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.DurationRules.extensions, proto.buf.validate.DurationRules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.DurationRules} + */ +proto.buf.validate.DurationRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.DurationRules; + return proto.buf.validate.DurationRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.DurationRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.DurationRules} + */ +proto.buf.validate.DurationRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setConst(value); + break; + case 3: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setLt(value); + break; + case 4: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setLte(value); + break; + case 5: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setGt(value); + break; + case 6: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setGte(value); + break; + case 7: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.addIn(value); + break; + case 8: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.addNotIn(value); + break; + case 9: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.addExample(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.DurationRules.extensionsBinary, + proto.buf.validate.DurationRules.prototype.getExtension, + proto.buf.validate.DurationRules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.DurationRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.DurationRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.DurationRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.DurationRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConst(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getLt(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getLte(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getGt(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getGte(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getInList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getNotInList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getExampleList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.DurationRules.extensionsBinary, proto.buf.validate.DurationRules.prototype.getExtension); +}; + + +/** + * optional google.protobuf.Duration const = 2; + * @return {?proto.google.protobuf.Duration} + */ +proto.buf.validate.DurationRules.prototype.getConst = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.buf.validate.DurationRules} returns this +*/ +proto.buf.validate.DurationRules.prototype.setConst = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.DurationRules} returns this + */ +proto.buf.validate.DurationRules.prototype.clearConst = function() { + return this.setConst(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.DurationRules.prototype.hasConst = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Duration lt = 3; + * @return {?proto.google.protobuf.Duration} + */ +proto.buf.validate.DurationRules.prototype.getLt = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.buf.validate.DurationRules} returns this +*/ +proto.buf.validate.DurationRules.prototype.setLt = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.buf.validate.DurationRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.DurationRules} returns this + */ +proto.buf.validate.DurationRules.prototype.clearLt = function() { + return this.setLt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.DurationRules.prototype.hasLt = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Duration lte = 4; + * @return {?proto.google.protobuf.Duration} + */ +proto.buf.validate.DurationRules.prototype.getLte = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.buf.validate.DurationRules} returns this +*/ +proto.buf.validate.DurationRules.prototype.setLte = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.buf.validate.DurationRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.DurationRules} returns this + */ +proto.buf.validate.DurationRules.prototype.clearLte = function() { + return this.setLte(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.DurationRules.prototype.hasLte = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.Duration gt = 5; + * @return {?proto.google.protobuf.Duration} + */ +proto.buf.validate.DurationRules.prototype.getGt = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.buf.validate.DurationRules} returns this +*/ +proto.buf.validate.DurationRules.prototype.setGt = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.buf.validate.DurationRules.oneofGroups_[1], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.DurationRules} returns this + */ +proto.buf.validate.DurationRules.prototype.clearGt = function() { + return this.setGt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.DurationRules.prototype.hasGt = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional google.protobuf.Duration gte = 6; + * @return {?proto.google.protobuf.Duration} + */ +proto.buf.validate.DurationRules.prototype.getGte = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.buf.validate.DurationRules} returns this +*/ +proto.buf.validate.DurationRules.prototype.setGte = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.buf.validate.DurationRules.oneofGroups_[1], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.DurationRules} returns this + */ +proto.buf.validate.DurationRules.prototype.clearGte = function() { + return this.setGte(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.DurationRules.prototype.hasGte = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * repeated google.protobuf.Duration in = 7; + * @return {!Array} + */ +proto.buf.validate.DurationRules.prototype.getInList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_duration_pb.Duration, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.DurationRules} returns this +*/ +proto.buf.validate.DurationRules.prototype.setInList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.google.protobuf.Duration=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Duration} + */ +proto.buf.validate.DurationRules.prototype.addIn = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.google.protobuf.Duration, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.DurationRules} returns this + */ +proto.buf.validate.DurationRules.prototype.clearInList = function() { + return this.setInList([]); +}; + + +/** + * repeated google.protobuf.Duration not_in = 8; + * @return {!Array} + */ +proto.buf.validate.DurationRules.prototype.getNotInList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_duration_pb.Duration, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.DurationRules} returns this +*/ +proto.buf.validate.DurationRules.prototype.setNotInList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.google.protobuf.Duration=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Duration} + */ +proto.buf.validate.DurationRules.prototype.addNotIn = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.google.protobuf.Duration, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.DurationRules} returns this + */ +proto.buf.validate.DurationRules.prototype.clearNotInList = function() { + return this.setNotInList([]); +}; + + +/** + * repeated google.protobuf.Duration example = 9; + * @return {!Array} + */ +proto.buf.validate.DurationRules.prototype.getExampleList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_duration_pb.Duration, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.DurationRules} returns this +*/ +proto.buf.validate.DurationRules.prototype.setExampleList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.google.protobuf.Duration=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Duration} + */ +proto.buf.validate.DurationRules.prototype.addExample = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.google.protobuf.Duration, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.DurationRules} returns this + */ +proto.buf.validate.DurationRules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.TimestampRules.repeatedFields_ = [10]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.TimestampRules.oneofGroups_ = [[3,4,7],[5,6,8]]; + +/** + * @enum {number} + */ +proto.buf.validate.TimestampRules.LessThanCase = { + LESS_THAN_NOT_SET: 0, + LT: 3, + LTE: 4, + LT_NOW: 7 +}; + +/** + * @return {proto.buf.validate.TimestampRules.LessThanCase} + */ +proto.buf.validate.TimestampRules.prototype.getLessThanCase = function() { + return /** @type {proto.buf.validate.TimestampRules.LessThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.TimestampRules.oneofGroups_[0])); +}; + +/** + * @enum {number} + */ +proto.buf.validate.TimestampRules.GreaterThanCase = { + GREATER_THAN_NOT_SET: 0, + GT: 5, + GTE: 6, + GT_NOW: 8 +}; + +/** + * @return {proto.buf.validate.TimestampRules.GreaterThanCase} + */ +proto.buf.validate.TimestampRules.prototype.getGreaterThanCase = function() { + return /** @type {proto.buf.validate.TimestampRules.GreaterThanCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.TimestampRules.oneofGroups_[1])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.TimestampRules.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.TimestampRules.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.TimestampRules} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.TimestampRules.toObject = function(includeInstance, msg) { + var f, obj = { +pb_const: (f = msg.getConst()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), +lt: (f = msg.getLt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), +lte: (f = msg.getLte()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), +ltNow: (f = jspb.Message.getBooleanField(msg, 7)) == null ? undefined : f, +gt: (f = msg.getGt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), +gte: (f = msg.getGte()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), +gtNow: (f = jspb.Message.getBooleanField(msg, 8)) == null ? undefined : f, +within: (f = msg.getWithin()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), +exampleList: jspb.Message.toObjectList(msg.getExampleList(), + google_protobuf_timestamp_pb.Timestamp.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.buf.validate.TimestampRules.extensions, proto.buf.validate.TimestampRules.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.TimestampRules} + */ +proto.buf.validate.TimestampRules.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.TimestampRules; + return proto.buf.validate.TimestampRules.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.TimestampRules} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.TimestampRules} + */ +proto.buf.validate.TimestampRules.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setConst(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLt(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLte(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLtNow(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setGt(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setGte(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setGtNow(value); + break; + case 9: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setWithin(value); + break; + case 10: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.addExample(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.buf.validate.TimestampRules.extensionsBinary, + proto.buf.validate.TimestampRules.prototype.getExtension, + proto.buf.validate.TimestampRules.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.TimestampRules.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.TimestampRules.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.TimestampRules} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.TimestampRules.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConst(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getLt(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getLte(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBool( + 7, + f + ); + } + f = message.getGt(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getGte(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeBool( + 8, + f + ); + } + f = message.getWithin(); + if (f != null) { + writer.writeMessage( + 9, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getExampleList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 10, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.buf.validate.TimestampRules.extensionsBinary, proto.buf.validate.TimestampRules.prototype.getExtension); +}; + + +/** + * optional google.protobuf.Timestamp const = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.buf.validate.TimestampRules.prototype.getConst = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.buf.validate.TimestampRules} returns this +*/ +proto.buf.validate.TimestampRules.prototype.setConst = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.TimestampRules} returns this + */ +proto.buf.validate.TimestampRules.prototype.clearConst = function() { + return this.setConst(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.TimestampRules.prototype.hasConst = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Timestamp lt = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.buf.validate.TimestampRules.prototype.getLt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.buf.validate.TimestampRules} returns this +*/ +proto.buf.validate.TimestampRules.prototype.setLt = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.buf.validate.TimestampRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.TimestampRules} returns this + */ +proto.buf.validate.TimestampRules.prototype.clearLt = function() { + return this.setLt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.TimestampRules.prototype.hasLt = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Timestamp lte = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.buf.validate.TimestampRules.prototype.getLte = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.buf.validate.TimestampRules} returns this +*/ +proto.buf.validate.TimestampRules.prototype.setLte = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.buf.validate.TimestampRules.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.TimestampRules} returns this + */ +proto.buf.validate.TimestampRules.prototype.clearLte = function() { + return this.setLte(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.TimestampRules.prototype.hasLte = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bool lt_now = 7; + * @return {boolean} + */ +proto.buf.validate.TimestampRules.prototype.getLtNow = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.TimestampRules} returns this + */ +proto.buf.validate.TimestampRules.prototype.setLtNow = function(value) { + return jspb.Message.setOneofField(this, 7, proto.buf.validate.TimestampRules.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.TimestampRules} returns this + */ +proto.buf.validate.TimestampRules.prototype.clearLtNow = function() { + return jspb.Message.setOneofField(this, 7, proto.buf.validate.TimestampRules.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.TimestampRules.prototype.hasLtNow = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional google.protobuf.Timestamp gt = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.buf.validate.TimestampRules.prototype.getGt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.buf.validate.TimestampRules} returns this +*/ +proto.buf.validate.TimestampRules.prototype.setGt = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.buf.validate.TimestampRules.oneofGroups_[1], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.TimestampRules} returns this + */ +proto.buf.validate.TimestampRules.prototype.clearGt = function() { + return this.setGt(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.TimestampRules.prototype.hasGt = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional google.protobuf.Timestamp gte = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.buf.validate.TimestampRules.prototype.getGte = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.buf.validate.TimestampRules} returns this +*/ +proto.buf.validate.TimestampRules.prototype.setGte = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.buf.validate.TimestampRules.oneofGroups_[1], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.TimestampRules} returns this + */ +proto.buf.validate.TimestampRules.prototype.clearGte = function() { + return this.setGte(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.TimestampRules.prototype.hasGte = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bool gt_now = 8; + * @return {boolean} + */ +proto.buf.validate.TimestampRules.prototype.getGtNow = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.TimestampRules} returns this + */ +proto.buf.validate.TimestampRules.prototype.setGtNow = function(value) { + return jspb.Message.setOneofField(this, 8, proto.buf.validate.TimestampRules.oneofGroups_[1], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.TimestampRules} returns this + */ +proto.buf.validate.TimestampRules.prototype.clearGtNow = function() { + return jspb.Message.setOneofField(this, 8, proto.buf.validate.TimestampRules.oneofGroups_[1], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.TimestampRules.prototype.hasGtNow = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional google.protobuf.Duration within = 9; + * @return {?proto.google.protobuf.Duration} + */ +proto.buf.validate.TimestampRules.prototype.getWithin = function() { + return /** @type{?proto.google.protobuf.Duration} */ ( + jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 9)); +}; + + +/** + * @param {?proto.google.protobuf.Duration|undefined} value + * @return {!proto.buf.validate.TimestampRules} returns this +*/ +proto.buf.validate.TimestampRules.prototype.setWithin = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.TimestampRules} returns this + */ +proto.buf.validate.TimestampRules.prototype.clearWithin = function() { + return this.setWithin(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.TimestampRules.prototype.hasWithin = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * repeated google.protobuf.Timestamp example = 10; + * @return {!Array} + */ +proto.buf.validate.TimestampRules.prototype.getExampleList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.TimestampRules} returns this +*/ +proto.buf.validate.TimestampRules.prototype.setExampleList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 10, value); +}; + + +/** + * @param {!proto.google.protobuf.Timestamp=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Timestamp} + */ +proto.buf.validate.TimestampRules.prototype.addExample = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.google.protobuf.Timestamp, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.TimestampRules} returns this + */ +proto.buf.validate.TimestampRules.prototype.clearExampleList = function() { + return this.setExampleList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.Violations.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.Violations.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.Violations.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.Violations} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.Violations.toObject = function(includeInstance, msg) { + var f, obj = { +violationsList: jspb.Message.toObjectList(msg.getViolationsList(), + proto.buf.validate.Violation.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.Violations} + */ +proto.buf.validate.Violations.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.Violations; + return proto.buf.validate.Violations.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.Violations} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.Violations} + */ +proto.buf.validate.Violations.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.buf.validate.Violation; + reader.readMessage(value,proto.buf.validate.Violation.deserializeBinaryFromReader); + msg.addViolations(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.Violations.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.Violations.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.Violations} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.Violations.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getViolationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.buf.validate.Violation.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Violation violations = 1; + * @return {!Array} + */ +proto.buf.validate.Violations.prototype.getViolationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.buf.validate.Violation, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.Violations} returns this +*/ +proto.buf.validate.Violations.prototype.setViolationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.buf.validate.Violation=} opt_value + * @param {number=} opt_index + * @return {!proto.buf.validate.Violation} + */ +proto.buf.validate.Violations.prototype.addViolations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.buf.validate.Violation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.Violations} returns this + */ +proto.buf.validate.Violations.prototype.clearViolationsList = function() { + return this.setViolationsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.Violation.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.Violation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.Violation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.Violation.toObject = function(includeInstance, msg) { + var f, obj = { +field: (f = msg.getField()) && proto.buf.validate.FieldPath.toObject(includeInstance, f), +rule: (f = msg.getRule()) && proto.buf.validate.FieldPath.toObject(includeInstance, f), +fieldPath: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +constraintId: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +message: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +forKey: (f = jspb.Message.getBooleanField(msg, 4)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.Violation} + */ +proto.buf.validate.Violation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.Violation; + return proto.buf.validate.Violation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.Violation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.Violation} + */ +proto.buf.validate.Violation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 5: + var value = new proto.buf.validate.FieldPath; + reader.readMessage(value,proto.buf.validate.FieldPath.deserializeBinaryFromReader); + msg.setField(value); + break; + case 6: + var value = new proto.buf.validate.FieldPath; + reader.readMessage(value,proto.buf.validate.FieldPath.deserializeBinaryFromReader); + msg.setRule(value); + break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setFieldPath(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConstraintId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setForKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.Violation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.Violation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.Violation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.Violation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getField(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.buf.validate.FieldPath.serializeBinaryToWriter + ); + } + f = message.getRule(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.buf.validate.FieldPath.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional FieldPath field = 5; + * @return {?proto.buf.validate.FieldPath} + */ +proto.buf.validate.Violation.prototype.getField = function() { + return /** @type{?proto.buf.validate.FieldPath} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.FieldPath, 5)); +}; + + +/** + * @param {?proto.buf.validate.FieldPath|undefined} value + * @return {!proto.buf.validate.Violation} returns this +*/ +proto.buf.validate.Violation.prototype.setField = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.Violation} returns this + */ +proto.buf.validate.Violation.prototype.clearField = function() { + return this.setField(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Violation.prototype.hasField = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional FieldPath rule = 6; + * @return {?proto.buf.validate.FieldPath} + */ +proto.buf.validate.Violation.prototype.getRule = function() { + return /** @type{?proto.buf.validate.FieldPath} */ ( + jspb.Message.getWrapperField(this, proto.buf.validate.FieldPath, 6)); +}; + + +/** + * @param {?proto.buf.validate.FieldPath|undefined} value + * @return {!proto.buf.validate.Violation} returns this +*/ +proto.buf.validate.Violation.prototype.setRule = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.buf.validate.Violation} returns this + */ +proto.buf.validate.Violation.prototype.clearRule = function() { + return this.setRule(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Violation.prototype.hasRule = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string field_path = 1; + * @return {string} + */ +proto.buf.validate.Violation.prototype.getFieldPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.buf.validate.Violation} returns this + */ +proto.buf.validate.Violation.prototype.setFieldPath = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Violation} returns this + */ +proto.buf.validate.Violation.prototype.clearFieldPath = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Violation.prototype.hasFieldPath = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string constraint_id = 2; + * @return {string} + */ +proto.buf.validate.Violation.prototype.getConstraintId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.buf.validate.Violation} returns this + */ +proto.buf.validate.Violation.prototype.setConstraintId = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Violation} returns this + */ +proto.buf.validate.Violation.prototype.clearConstraintId = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Violation.prototype.hasConstraintId = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string message = 3; + * @return {string} + */ +proto.buf.validate.Violation.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.buf.validate.Violation} returns this + */ +proto.buf.validate.Violation.prototype.setMessage = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Violation} returns this + */ +proto.buf.validate.Violation.prototype.clearMessage = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Violation.prototype.hasMessage = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool for_key = 4; + * @return {boolean} + */ +proto.buf.validate.Violation.prototype.getForKey = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.Violation} returns this + */ +proto.buf.validate.Violation.prototype.setForKey = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.Violation} returns this + */ +proto.buf.validate.Violation.prototype.clearForKey = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.Violation.prototype.hasForKey = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.buf.validate.FieldPath.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.FieldPath.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.FieldPath.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.FieldPath} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.FieldPath.toObject = function(includeInstance, msg) { + var f, obj = { +elementsList: jspb.Message.toObjectList(msg.getElementsList(), + proto.buf.validate.FieldPathElement.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.FieldPath} + */ +proto.buf.validate.FieldPath.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.FieldPath; + return proto.buf.validate.FieldPath.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.FieldPath} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.FieldPath} + */ +proto.buf.validate.FieldPath.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.buf.validate.FieldPathElement; + reader.readMessage(value,proto.buf.validate.FieldPathElement.deserializeBinaryFromReader); + msg.addElements(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.FieldPath.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.FieldPath.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.FieldPath} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.FieldPath.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getElementsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.buf.validate.FieldPathElement.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated FieldPathElement elements = 1; + * @return {!Array} + */ +proto.buf.validate.FieldPath.prototype.getElementsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.buf.validate.FieldPathElement, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.buf.validate.FieldPath} returns this +*/ +proto.buf.validate.FieldPath.prototype.setElementsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.buf.validate.FieldPathElement=} opt_value + * @param {number=} opt_index + * @return {!proto.buf.validate.FieldPathElement} + */ +proto.buf.validate.FieldPath.prototype.addElements = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.buf.validate.FieldPathElement, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.buf.validate.FieldPath} returns this + */ +proto.buf.validate.FieldPath.prototype.clearElementsList = function() { + return this.setElementsList([]); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.buf.validate.FieldPathElement.oneofGroups_ = [[6,7,8,9,10]]; + +/** + * @enum {number} + */ +proto.buf.validate.FieldPathElement.SubscriptCase = { + SUBSCRIPT_NOT_SET: 0, + INDEX: 6, + BOOL_KEY: 7, + INT_KEY: 8, + UINT_KEY: 9, + STRING_KEY: 10 +}; + +/** + * @return {proto.buf.validate.FieldPathElement.SubscriptCase} + */ +proto.buf.validate.FieldPathElement.prototype.getSubscriptCase = function() { + return /** @type {proto.buf.validate.FieldPathElement.SubscriptCase} */(jspb.Message.computeOneofCase(this, proto.buf.validate.FieldPathElement.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.buf.validate.FieldPathElement.prototype.toObject = function(opt_includeInstance) { + return proto.buf.validate.FieldPathElement.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.buf.validate.FieldPathElement} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.FieldPathElement.toObject = function(includeInstance, msg) { + var f, obj = { +fieldNumber: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +fieldName: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +fieldType: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +keyType: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +valueType: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +index: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f, +boolKey: (f = jspb.Message.getBooleanField(msg, 7)) == null ? undefined : f, +intKey: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f, +uintKey: (f = jspb.Message.getField(msg, 9)) == null ? undefined : f, +stringKey: (f = jspb.Message.getField(msg, 10)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.buf.validate.FieldPathElement} + */ +proto.buf.validate.FieldPathElement.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.buf.validate.FieldPathElement; + return proto.buf.validate.FieldPathElement.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.buf.validate.FieldPathElement} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.buf.validate.FieldPathElement} + */ +proto.buf.validate.FieldPathElement.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setFieldNumber(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFieldName(value); + break; + case 3: + var value = /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (reader.readEnum()); + msg.setFieldType(value); + break; + case 4: + var value = /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (reader.readEnum()); + msg.setKeyType(value); + break; + case 5: + var value = /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (reader.readEnum()); + msg.setValueType(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setIndex(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setBoolKey(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setIntKey(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUintKey(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setStringKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.buf.validate.FieldPathElement.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.buf.validate.FieldPathElement.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.buf.validate.FieldPathElement} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.buf.validate.FieldPathElement.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt32( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeEnum( + 3, + f + ); + } + f = /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeEnum( + 4, + f + ); + } + f = /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeEnum( + 5, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeUint64( + 6, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBool( + 7, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeInt64( + 8, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeUint64( + 9, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeString( + 10, + f + ); + } +}; + + +/** + * optional int32 field_number = 1; + * @return {number} + */ +proto.buf.validate.FieldPathElement.prototype.getFieldNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.setFieldNumber = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.clearFieldNumber = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldPathElement.prototype.hasFieldNumber = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string field_name = 2; + * @return {string} + */ +proto.buf.validate.FieldPathElement.prototype.getFieldName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.setFieldName = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.clearFieldName = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldPathElement.prototype.hasFieldName = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.FieldDescriptorProto.Type field_type = 3; + * @return {!proto.google.protobuf.FieldDescriptorProto.Type} + */ +proto.buf.validate.FieldPathElement.prototype.getFieldType = function() { + return /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (jspb.Message.getFieldWithDefault(this, 3, 1)); +}; + + +/** + * @param {!proto.google.protobuf.FieldDescriptorProto.Type} value + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.setFieldType = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.clearFieldType = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldPathElement.prototype.hasFieldType = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.FieldDescriptorProto.Type key_type = 4; + * @return {!proto.google.protobuf.FieldDescriptorProto.Type} + */ +proto.buf.validate.FieldPathElement.prototype.getKeyType = function() { + return /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (jspb.Message.getFieldWithDefault(this, 4, 1)); +}; + + +/** + * @param {!proto.google.protobuf.FieldDescriptorProto.Type} value + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.setKeyType = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.clearKeyType = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldPathElement.prototype.hasKeyType = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.FieldDescriptorProto.Type value_type = 5; + * @return {!proto.google.protobuf.FieldDescriptorProto.Type} + */ +proto.buf.validate.FieldPathElement.prototype.getValueType = function() { + return /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (jspb.Message.getFieldWithDefault(this, 5, 1)); +}; + + +/** + * @param {!proto.google.protobuf.FieldDescriptorProto.Type} value + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.setValueType = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.clearValueType = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldPathElement.prototype.hasValueType = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional uint64 index = 6; + * @return {number} + */ +proto.buf.validate.FieldPathElement.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.setIndex = function(value) { + return jspb.Message.setOneofField(this, 6, proto.buf.validate.FieldPathElement.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.clearIndex = function() { + return jspb.Message.setOneofField(this, 6, proto.buf.validate.FieldPathElement.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldPathElement.prototype.hasIndex = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bool bool_key = 7; + * @return {boolean} + */ +proto.buf.validate.FieldPathElement.prototype.getBoolKey = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.setBoolKey = function(value) { + return jspb.Message.setOneofField(this, 7, proto.buf.validate.FieldPathElement.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.clearBoolKey = function() { + return jspb.Message.setOneofField(this, 7, proto.buf.validate.FieldPathElement.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldPathElement.prototype.hasBoolKey = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional int64 int_key = 8; + * @return {number} + */ +proto.buf.validate.FieldPathElement.prototype.getIntKey = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.setIntKey = function(value) { + return jspb.Message.setOneofField(this, 8, proto.buf.validate.FieldPathElement.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.clearIntKey = function() { + return jspb.Message.setOneofField(this, 8, proto.buf.validate.FieldPathElement.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldPathElement.prototype.hasIntKey = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional uint64 uint_key = 9; + * @return {number} + */ +proto.buf.validate.FieldPathElement.prototype.getUintKey = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.setUintKey = function(value) { + return jspb.Message.setOneofField(this, 9, proto.buf.validate.FieldPathElement.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.clearUintKey = function() { + return jspb.Message.setOneofField(this, 9, proto.buf.validate.FieldPathElement.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldPathElement.prototype.hasUintKey = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string string_key = 10; + * @return {string} + */ +proto.buf.validate.FieldPathElement.prototype.getStringKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.setStringKey = function(value) { + return jspb.Message.setOneofField(this, 10, proto.buf.validate.FieldPathElement.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.buf.validate.FieldPathElement} returns this + */ +proto.buf.validate.FieldPathElement.prototype.clearStringKey = function() { + return jspb.Message.setOneofField(this, 10, proto.buf.validate.FieldPathElement.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.buf.validate.FieldPathElement.prototype.hasStringKey = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * @enum {number} + */ +proto.buf.validate.Ignore = { + IGNORE_UNSPECIFIED: 0, + IGNORE_IF_UNPOPULATED: 1, + IGNORE_IF_DEFAULT_VALUE: 2, + IGNORE_ALWAYS: 3, + IGNORE_EMPTY: 1, + IGNORE_DEFAULT: 2 +}; + +/** + * @enum {number} + */ +proto.buf.validate.KnownRegex = { + KNOWN_REGEX_UNSPECIFIED: 0, + KNOWN_REGEX_HTTP_HEADER_NAME: 1, + KNOWN_REGEX_HTTP_HEADER_VALUE: 2 +}; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `message`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.buf.validate.message = new jspb.ExtensionFieldInfo( + 1159, + {message: 0}, + proto.buf.validate.MessageConstraints, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.buf.validate.MessageConstraints.toObject), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[1159] = new jspb.ExtensionFieldBinaryInfo( + proto.buf.validate.message, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.buf.validate.MessageConstraints.serializeBinaryToWriter, + proto.buf.validate.MessageConstraints.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[1159] = proto.buf.validate.message; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `oneof`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.buf.validate.oneof = new jspb.ExtensionFieldInfo( + 1159, + {oneof: 0}, + proto.buf.validate.OneofConstraints, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.buf.validate.OneofConstraints.toObject), + 0); + +google_protobuf_descriptor_pb.OneofOptions.extensionsBinary[1159] = new jspb.ExtensionFieldBinaryInfo( + proto.buf.validate.oneof, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.buf.validate.OneofConstraints.serializeBinaryToWriter, + proto.buf.validate.OneofConstraints.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.OneofOptions.extensions[1159] = proto.buf.validate.oneof; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `field`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.buf.validate.field = new jspb.ExtensionFieldInfo( + 1159, + {field: 0}, + proto.buf.validate.FieldConstraints, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.buf.validate.FieldConstraints.toObject), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[1159] = new jspb.ExtensionFieldBinaryInfo( + proto.buf.validate.field, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.buf.validate.FieldConstraints.serializeBinaryToWriter, + proto.buf.validate.FieldConstraints.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[1159] = proto.buf.validate.field; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `predefined`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.buf.validate.predefined = new jspb.ExtensionFieldInfo( + 1160, + {predefined: 0}, + proto.buf.validate.PredefinedConstraints, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.buf.validate.PredefinedConstraints.toObject), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[1160] = new jspb.ExtensionFieldBinaryInfo( + proto.buf.validate.predefined, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.buf.validate.PredefinedConstraints.serializeBinaryToWriter, + proto.buf.validate.PredefinedConstraints.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[1160] = proto.buf.validate.predefined; + +goog.object.extend(exports, proto.buf.validate); diff --git a/proto/google/api/annotations.pb.go b/proto/google/api/annotations.pb.go new file mode 100644 index 000000000..f1c3e8084 --- /dev/null +++ b/proto/google/api/annotations.pb.go @@ -0,0 +1,118 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.1 +// protoc (unknown) +// source: google/api/annotations.proto + +package annotations + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var file_google_api_annotations_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*HttpRule)(nil), + Field: 72295728, + Name: "google.api.http", + Tag: "bytes,72295728,opt,name=http", + Filename: "google/api/annotations.proto", + }, +} + +// Extension fields to descriptorpb.MethodOptions. +var ( + // See `HttpRule`. + // + // optional google.api.HttpRule http = 72295728; + E_Http = &file_google_api_annotations_proto_extTypes[0] +) + +var File_google_api_annotations_proto protoreflect.FileDescriptor + +var file_google_api_annotations_proto_rawDesc = []byte{ + 0x0a, 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, 0x12, 0x0a, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x3a, 0x4b, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb0, 0xca, 0xbc, 0x22, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, + 0x42, 0x6e, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x42, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_google_api_annotations_proto_goTypes = []any{ + (*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions + (*HttpRule)(nil), // 1: google.api.HttpRule +} +var file_google_api_annotations_proto_depIdxs = []int32{ + 0, // 0: google.api.http:extendee -> google.protobuf.MethodOptions + 1, // 1: google.api.http:type_name -> google.api.HttpRule + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 1, // [1:2] is the sub-list for extension type_name + 0, // [0:1] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_api_annotations_proto_init() } +func file_google_api_annotations_proto_init() { + if File_google_api_annotations_proto != nil { + return + } + file_google_api_http_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_api_annotations_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 1, + NumServices: 0, + }, + GoTypes: file_google_api_annotations_proto_goTypes, + DependencyIndexes: file_google_api_annotations_proto_depIdxs, + ExtensionInfos: file_google_api_annotations_proto_extTypes, + }.Build() + File_google_api_annotations_proto = out.File + file_google_api_annotations_proto_rawDesc = nil + file_google_api_annotations_proto_goTypes = nil + file_google_api_annotations_proto_depIdxs = nil +} diff --git a/proto/google/api/annotations_grpc_pb.js b/proto/google/api/annotations_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/google/api/annotations_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/google/api/annotations_pb.d.ts b/proto/google/api/annotations_pb.d.ts new file mode 100644 index 000000000..06072f3bd --- /dev/null +++ b/proto/google/api/annotations_pb.d.ts @@ -0,0 +1,11 @@ +// package: google.api +// file: google/api/annotations.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_api_http_pb from "../../google/api/http_pb"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; + +export const http: jspb.ExtensionFieldInfo; diff --git a/proto/google/api/annotations_pb.js b/proto/google/api/annotations_pb.js new file mode 100644 index 000000000..53c05ed02 --- /dev/null +++ b/proto/google/api/annotations_pb.js @@ -0,0 +1,54 @@ +// source: google/api/annotations.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +var google_api_http_pb = require('../../google/api/http_pb.js'); +goog.object.extend(proto, google_api_http_pb); +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.google.api.http', null, global); + +/** + * A tuple of {field number, class constructor} for the extension + * field named `http`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.http = new jspb.ExtensionFieldInfo( + 72295728, + {http: 0}, + google_api_http_pb.HttpRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + google_api_http_pb.HttpRule.toObject), + 0); + +google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[72295728] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.http, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + google_api_http_pb.HttpRule.serializeBinaryToWriter, + google_api_http_pb.HttpRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MethodOptions.extensions[72295728] = proto.google.api.http; + +goog.object.extend(exports, proto.google.api); diff --git a/proto/google/api/field_behavior.pb.go b/proto/google/api/field_behavior.pb.go new file mode 100644 index 000000000..f317276ad --- /dev/null +++ b/proto/google/api/field_behavior.pb.go @@ -0,0 +1,265 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.1 +// protoc (unknown) +// source: google/api/field_behavior.proto + +package annotations + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// An indicator of the behavior of a given field (for example, that a field +// is required in requests, or given as output but ignored as input). +// This **does not** change the behavior in protocol buffers itself; it only +// denotes the behavior and may affect how API tooling handles the field. +// +// Note: This enum **may** receive new values in the future. +type FieldBehavior int32 + +const ( + // Conventional default for enums. Do not use this. + FieldBehavior_FIELD_BEHAVIOR_UNSPECIFIED FieldBehavior = 0 + // Specifically denotes a field as optional. + // While all fields in protocol buffers are optional, this may be specified + // for emphasis if appropriate. + FieldBehavior_OPTIONAL FieldBehavior = 1 + // Denotes a field as required. + // This indicates that the field **must** be provided as part of the request, + // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + FieldBehavior_REQUIRED FieldBehavior = 2 + // Denotes a field as output only. + // This indicates that the field is provided in responses, but including the + // field in a request does nothing (the server *must* ignore it and + // *must not* throw an error as a result of the field's presence). + FieldBehavior_OUTPUT_ONLY FieldBehavior = 3 + // Denotes a field as input only. + // This indicates that the field is provided in requests, and the + // corresponding field is not included in output. + FieldBehavior_INPUT_ONLY FieldBehavior = 4 + // Denotes a field as immutable. + // This indicates that the field may be set once in a request to create a + // resource, but may not be changed thereafter. + FieldBehavior_IMMUTABLE FieldBehavior = 5 + // Denotes that a (repeated) field is an unordered list. + // This indicates that the service may provide the elements of the list + // in any arbitrary order, rather than the order the user originally + // provided. Additionally, the list's order may or may not be stable. + FieldBehavior_UNORDERED_LIST FieldBehavior = 6 + // Denotes that this field returns a non-empty default value if not set. + // This indicates that if the user provides the empty value in a request, + // a non-empty value will be returned. The user will not be aware of what + // non-empty value to expect. + FieldBehavior_NON_EMPTY_DEFAULT FieldBehavior = 7 + // Denotes that the field in a resource (a message annotated with + // google.api.resource) is used in the resource name to uniquely identify the + // resource. For AIP-compliant APIs, this should only be applied to the + // `name` field on the resource. + // + // This behavior should not be applied to references to other resources within + // the message. + // + // The identifier field of resources often have different field behavior + // depending on the request it is embedded in (e.g. for Create methods name + // is optional and unused, while for Update methods it is required). Instead + // of method-specific annotations, only `IDENTIFIER` is required. + FieldBehavior_IDENTIFIER FieldBehavior = 8 +) + +// Enum value maps for FieldBehavior. +var ( + FieldBehavior_name = map[int32]string{ + 0: "FIELD_BEHAVIOR_UNSPECIFIED", + 1: "OPTIONAL", + 2: "REQUIRED", + 3: "OUTPUT_ONLY", + 4: "INPUT_ONLY", + 5: "IMMUTABLE", + 6: "UNORDERED_LIST", + 7: "NON_EMPTY_DEFAULT", + 8: "IDENTIFIER", + } + FieldBehavior_value = map[string]int32{ + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8, + } +) + +func (x FieldBehavior) Enum() *FieldBehavior { + p := new(FieldBehavior) + *p = x + return p +} + +func (x FieldBehavior) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FieldBehavior) Descriptor() protoreflect.EnumDescriptor { + return file_google_api_field_behavior_proto_enumTypes[0].Descriptor() +} + +func (FieldBehavior) Type() protoreflect.EnumType { + return &file_google_api_field_behavior_proto_enumTypes[0] +} + +func (x FieldBehavior) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FieldBehavior.Descriptor instead. +func (FieldBehavior) EnumDescriptor() ([]byte, []int) { + return file_google_api_field_behavior_proto_rawDescGZIP(), []int{0} +} + +var file_google_api_field_behavior_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: ([]FieldBehavior)(nil), + Field: 1052, + Name: "google.api.field_behavior", + Tag: "varint,1052,rep,name=field_behavior,enum=google.api.FieldBehavior", + Filename: "google/api/field_behavior.proto", + }, +} + +// Extension fields to descriptorpb.FieldOptions. +var ( + // A designation of a specific field behavior (required, output only, etc.) + // in protobuf messages. + // + // Examples: + // + // string name = 1 [(google.api.field_behavior) = REQUIRED]; + // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // google.protobuf.Duration ttl = 1 + // [(google.api.field_behavior) = INPUT_ONLY]; + // google.protobuf.Timestamp expire_time = 1 + // [(google.api.field_behavior) = OUTPUT_ONLY, + // (google.api.field_behavior) = IMMUTABLE]; + // + // repeated google.api.FieldBehavior field_behavior = 1052; + E_FieldBehavior = &file_google_api_field_behavior_proto_extTypes[0] +) + +var File_google_api_field_behavior_proto protoreflect.FileDescriptor + +var file_google_api_field_behavior_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, + 0xb6, 0x01, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, + 0x72, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x42, 0x45, 0x48, 0x41, 0x56, + 0x49, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, + 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0f, 0x0a, + 0x0b, 0x4f, 0x55, 0x54, 0x50, 0x55, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x03, 0x12, 0x0e, + 0x0a, 0x0a, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x04, 0x12, 0x0d, + 0x0a, 0x09, 0x49, 0x4d, 0x4d, 0x55, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x05, 0x12, 0x12, 0x0a, + 0x0e, 0x55, 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, + 0x06, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x4f, 0x4e, 0x5f, 0x45, 0x4d, 0x50, 0x54, 0x59, 0x5f, 0x44, + 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x07, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4e, + 0x54, 0x49, 0x46, 0x49, 0x45, 0x52, 0x10, 0x08, 0x3a, 0x64, 0x0a, 0x0e, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9c, 0x08, 0x20, 0x03, 0x28, 0x0e, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x02, 0x10, 0x00, 0x52, + 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x70, + 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x42, 0x12, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_api_field_behavior_proto_rawDescOnce sync.Once + file_google_api_field_behavior_proto_rawDescData = file_google_api_field_behavior_proto_rawDesc +) + +func file_google_api_field_behavior_proto_rawDescGZIP() []byte { + file_google_api_field_behavior_proto_rawDescOnce.Do(func() { + file_google_api_field_behavior_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_field_behavior_proto_rawDescData) + }) + return file_google_api_field_behavior_proto_rawDescData +} + +var file_google_api_field_behavior_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_api_field_behavior_proto_goTypes = []any{ + (FieldBehavior)(0), // 0: google.api.FieldBehavior + (*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions +} +var file_google_api_field_behavior_proto_depIdxs = []int32{ + 1, // 0: google.api.field_behavior:extendee -> google.protobuf.FieldOptions + 0, // 1: google.api.field_behavior:type_name -> google.api.FieldBehavior + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 1, // [1:2] is the sub-list for extension type_name + 0, // [0:1] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_api_field_behavior_proto_init() } +func file_google_api_field_behavior_proto_init() { + if File_google_api_field_behavior_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_api_field_behavior_proto_rawDesc, + NumEnums: 1, + NumMessages: 0, + NumExtensions: 1, + NumServices: 0, + }, + GoTypes: file_google_api_field_behavior_proto_goTypes, + DependencyIndexes: file_google_api_field_behavior_proto_depIdxs, + EnumInfos: file_google_api_field_behavior_proto_enumTypes, + ExtensionInfos: file_google_api_field_behavior_proto_extTypes, + }.Build() + File_google_api_field_behavior_proto = out.File + file_google_api_field_behavior_proto_rawDesc = nil + file_google_api_field_behavior_proto_goTypes = nil + file_google_api_field_behavior_proto_depIdxs = nil +} diff --git a/proto/google/api/field_behavior_grpc_pb.js b/proto/google/api/field_behavior_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/google/api/field_behavior_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/google/api/field_behavior_pb.d.ts b/proto/google/api/field_behavior_pb.d.ts new file mode 100644 index 000000000..4e192e933 --- /dev/null +++ b/proto/google/api/field_behavior_pb.d.ts @@ -0,0 +1,22 @@ +// package: google.api +// file: google/api/field_behavior.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; + +export const fieldBehavior: jspb.ExtensionFieldInfo; + +export enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8, +} diff --git a/proto/google/api/field_behavior_pb.js b/proto/google/api/field_behavior_pb.js new file mode 100644 index 000000000..3e51e31fe --- /dev/null +++ b/proto/google/api/field_behavior_pb.js @@ -0,0 +1,68 @@ +// source: google/api/field_behavior.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.google.api.FieldBehavior', null, global); +goog.exportSymbol('proto.google.api.fieldBehaviorList', null, global); +/** + * @enum {number} + */ +proto.google.api.FieldBehavior = { + FIELD_BEHAVIOR_UNSPECIFIED: 0, + OPTIONAL: 1, + REQUIRED: 2, + OUTPUT_ONLY: 3, + INPUT_ONLY: 4, + IMMUTABLE: 5, + UNORDERED_LIST: 6, + NON_EMPTY_DEFAULT: 7, + IDENTIFIER: 8 +}; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `fieldBehaviorList`. + * @type {!jspb.ExtensionFieldInfo>} + */ +proto.google.api.fieldBehaviorList = new jspb.ExtensionFieldInfo( + 1052, + {fieldBehaviorList: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 1); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[1052] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.fieldBehaviorList, + jspb.BinaryReader.prototype.readEnum, + jspb.BinaryWriter.prototype.writeRepeatedEnum, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[1052] = proto.google.api.fieldBehaviorList; + +goog.object.extend(exports, proto.google.api); diff --git a/proto/google/api/http.pb.go b/proto/google/api/http.pb.go new file mode 100644 index 000000000..8ff95a538 --- /dev/null +++ b/proto/google/api/http.pb.go @@ -0,0 +1,738 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.1 +// protoc (unknown) +// source: google/api/http.proto + +package annotations + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Defines the HTTP configuration for an API service. It contains a list of +// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method +// to one or more HTTP REST API methods. +type Http struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A list of HTTP configuration rules that apply to individual API methods. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + Rules []*HttpRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` + // When set to true, URL path parameters will be fully URI-decoded except in + // cases of single segment matches in reserved expansion, where "%2F" will be + // left encoded. + // + // The default behavior is to not decode RFC 6570 reserved characters in multi + // segment matches. + FullyDecodeReservedExpansion bool `protobuf:"varint,2,opt,name=fully_decode_reserved_expansion,json=fullyDecodeReservedExpansion,proto3" json:"fully_decode_reserved_expansion,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Http) Reset() { + *x = Http{} + mi := &file_google_api_http_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Http) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Http) ProtoMessage() {} + +func (x *Http) ProtoReflect() protoreflect.Message { + mi := &file_google_api_http_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Http.ProtoReflect.Descriptor instead. +func (*Http) Descriptor() ([]byte, []int) { + return file_google_api_http_proto_rawDescGZIP(), []int{0} +} + +func (x *Http) GetRules() []*HttpRule { + if x != nil { + return x.Rules + } + return nil +} + +func (x *Http) GetFullyDecodeReservedExpansion() bool { + if x != nil { + return x.FullyDecodeReservedExpansion + } + return false +} + +// gRPC Transcoding +// +// gRPC Transcoding is a feature for mapping between a gRPC method and one or +// more HTTP REST endpoints. It allows developers to build a single API service +// that supports both gRPC APIs and REST APIs. Many systems, including [Google +// APIs](https://github.com/googleapis/googleapis), +// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC +// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), +// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature +// and use it for large scale production services. +// +// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies +// how different portions of the gRPC request message are mapped to the URL +// path, URL query parameters, and HTTP request body. It also controls how the +// gRPC response message is mapped to the HTTP response body. `HttpRule` is +// typically specified as an `google.api.http` annotation on the gRPC method. +// +// Each mapping specifies a URL path template and an HTTP method. The path +// template may refer to one or more fields in the gRPC request message, as long +// as each field is a non-repeated field with a primitive (non-message) type. +// The path template controls how fields of the request message are mapped to +// the URL path. +// +// Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/{name=messages/*}" +// }; +// } +// } +// message GetMessageRequest { +// string name = 1; // Mapped to URL path. +// } +// message Message { +// string text = 1; // The resource content. +// } +// +// This enables an HTTP REST to gRPC mapping as below: +// +// - HTTP: `GET /v1/messages/123456` +// - gRPC: `GetMessage(name: "messages/123456")` +// +// Any fields in the request message which are not bound by the path template +// automatically become HTTP query parameters if there is no HTTP request body. +// For example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get:"/v1/messages/{message_id}" +// }; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // Mapped to URL path. +// int64 revision = 2; // Mapped to URL query parameter `revision`. +// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. +// } +// +// This enables a HTTP JSON to RPC mapping as below: +// +// - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo` +// - gRPC: `GetMessage(message_id: "123456" revision: 2 sub: +// SubMessage(subfield: "foo"))` +// +// Note that fields which are mapped to URL query parameters must have a +// primitive type or a repeated primitive type or a non-repeated message type. +// In the case of a repeated type, the parameter can be repeated in the URL +// as `...?param=A¶m=B`. In the case of a message type, each field of the +// message is mapped to a separate parameter, such as +// `...?foo.a=A&foo.b=B&foo.c=C`. +// +// For HTTP methods that allow a request body, the `body` field +// specifies the mapping. Consider a REST update method on the +// message resource collection: +// +// service Messaging { +// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { +// option (google.api.http) = { +// patch: "/v1/messages/{message_id}" +// body: "message" +// }; +// } +// } +// message UpdateMessageRequest { +// string message_id = 1; // mapped to the URL +// Message message = 2; // mapped to the body +// } +// +// The following HTTP JSON to RPC mapping is enabled, where the +// representation of the JSON in the request body is determined by +// protos JSON encoding: +// +// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` +// - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })` +// +// The special name `*` can be used in the body mapping to define that +// every field not bound by the path template should be mapped to the +// request body. This enables the following alternative definition of +// the update method: +// +// service Messaging { +// rpc UpdateMessage(Message) returns (Message) { +// option (google.api.http) = { +// patch: "/v1/messages/{message_id}" +// body: "*" +// }; +// } +// } +// message Message { +// string message_id = 1; +// string text = 2; +// } +// +// The following HTTP JSON to RPC mapping is enabled: +// +// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }` +// - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")` +// +// Note that when using `*` in the body mapping, it is not possible to +// have HTTP parameters, as all fields not bound by the path end in +// the body. This makes this option more rarely used in practice when +// defining REST APIs. The common usage of `*` is in custom methods +// which don't use the URL at all for transferring data. +// +// It is possible to define multiple HTTP methods for one RPC by using +// the `additional_bindings` option. Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/messages/{message_id}" +// additional_bindings { +// get: "/v1/users/{user_id}/messages/{message_id}" +// } +// }; +// } +// } +// message GetMessageRequest { +// string message_id = 1; +// string user_id = 2; +// } +// +// This enables the following two alternative HTTP JSON to RPC mappings: +// +// - HTTP: `GET /v1/messages/123456` +// - gRPC: `GetMessage(message_id: "123456")` +// +// - HTTP: `GET /v1/users/me/messages/123456` +// - gRPC: `GetMessage(user_id: "me" message_id: "123456")` +// +// # Rules for HTTP mapping +// +// 1. Leaf request fields (recursive expansion nested messages in the request +// message) are classified into three categories: +// - Fields referred by the path template. They are passed via the URL path. +// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They +// are passed via the HTTP +// request body. +// - All other fields are passed via the URL query parameters, and the +// parameter name is the field path in the request message. A repeated +// field can be represented as multiple query parameters under the same +// name. +// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL +// query parameter, all fields +// are passed via URL path and HTTP request body. +// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP +// request body, all +// fields are passed via URL path and URL query parameters. +// +// Path template syntax +// +// Template = "/" Segments [ Verb ] ; +// Segments = Segment { "/" Segment } ; +// Segment = "*" | "**" | LITERAL | Variable ; +// Variable = "{" FieldPath [ "=" Segments ] "}" ; +// FieldPath = IDENT { "." IDENT } ; +// Verb = ":" LITERAL ; +// +// The syntax `*` matches a single URL path segment. The syntax `**` matches +// zero or more URL path segments, which must be the last part of the URL path +// except the `Verb`. +// +// The syntax `Variable` matches part of the URL path as specified by its +// template. A variable template must not contain other variables. If a variable +// matches a single path segment, its template may be omitted, e.g. `{var}` +// is equivalent to `{var=*}`. +// +// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` +// contains any reserved character, such characters should be percent-encoded +// before the matching. +// +// If a variable contains exactly one path segment, such as `"{var}"` or +// `"{var=*}"`, when such a variable is expanded into a URL path on the client +// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The +// server side does the reverse decoding. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{var}`. +// +// If a variable contains multiple path segments, such as `"{var=foo/*}"` +// or `"{var=**}"`, when such a variable is expanded into a URL path on the +// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. +// The server side does the reverse decoding, except "%2F" and "%2f" are left +// unchanged. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{+var}`. +// +// # Using gRPC API Service Configuration +// +// gRPC API Service Configuration (service config) is a configuration language +// for configuring a gRPC service to become a user-facing product. The +// service config is simply the YAML representation of the `google.api.Service` +// proto message. +// +// As an alternative to annotating your proto file, you can configure gRPC +// transcoding in your service config YAML files. You do this by specifying a +// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same +// effect as the proto annotation. This can be particularly useful if you +// have a proto that is reused in multiple services. Note that any transcoding +// specified in the service config will override any matching transcoding +// configuration in the proto. +// +// The following example selects a gRPC method and applies an `HttpRule` to it: +// +// http: +// rules: +// - selector: example.v1.Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// # Special notes +// +// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the +// proto to JSON conversion must follow the [proto3 +// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). +// +// While the single segment variable follows the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String +// Expansion, the multi segment variable **does not** follow RFC 6570 Section +// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion +// does not expand special characters like `?` and `#`, which would lead +// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding +// for multi segment variables. +// +// The path variables **must not** refer to any repeated or mapped field, +// because client libraries are not capable of handling such variable expansion. +// +// The path variables **must not** capture the leading "/" character. The reason +// is that the most common use case "{var}" does not capture the leading "/" +// character. For consistency, all path variables must share the same behavior. +// +// Repeated message fields must not be mapped to URL query parameters, because +// no client library can support such complicated mapping. +// +// If an API needs to use a JSON array for request or response body, it can map +// the request or response body to a repeated field. However, some gRPC +// Transcoding implementations may not support this feature. +type HttpRule struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Selects a method to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax + // details. + Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` + // Determines the URL pattern is matched by this rules. This pattern can be + // used with any of the {get|put|post|delete|patch} methods. A custom method + // can be defined using the 'custom' field. + // + // Types that are valid to be assigned to Pattern: + // + // *HttpRule_Get + // *HttpRule_Put + // *HttpRule_Post + // *HttpRule_Delete + // *HttpRule_Patch + // *HttpRule_Custom + Pattern isHttpRule_Pattern `protobuf_oneof:"pattern"` + // The name of the request field whose value is mapped to the HTTP request + // body, or `*` for mapping all request fields not captured by the path + // pattern to the HTTP body, or omitted for not having any HTTP request body. + // + // NOTE: the referred field must be present at the top-level of the request + // message type. + Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"` + // Optional. The name of the response field whose value is mapped to the HTTP + // response body. When omitted, the entire response message will be used + // as the HTTP response body. + // + // NOTE: The referred field must be present at the top-level of the response + // message type. + ResponseBody string `protobuf:"bytes,12,opt,name=response_body,json=responseBody,proto3" json:"response_body,omitempty"` + // Additional HTTP bindings for the selector. Nested bindings must + // not contain an `additional_bindings` field themselves (that is, + // the nesting may only be one level deep). + AdditionalBindings []*HttpRule `protobuf:"bytes,11,rep,name=additional_bindings,json=additionalBindings,proto3" json:"additional_bindings,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HttpRule) Reset() { + *x = HttpRule{} + mi := &file_google_api_http_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HttpRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HttpRule) ProtoMessage() {} + +func (x *HttpRule) ProtoReflect() protoreflect.Message { + mi := &file_google_api_http_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HttpRule.ProtoReflect.Descriptor instead. +func (*HttpRule) Descriptor() ([]byte, []int) { + return file_google_api_http_proto_rawDescGZIP(), []int{1} +} + +func (x *HttpRule) GetSelector() string { + if x != nil { + return x.Selector + } + return "" +} + +func (x *HttpRule) GetPattern() isHttpRule_Pattern { + if x != nil { + return x.Pattern + } + return nil +} + +func (x *HttpRule) GetGet() string { + if x != nil { + if x, ok := x.Pattern.(*HttpRule_Get); ok { + return x.Get + } + } + return "" +} + +func (x *HttpRule) GetPut() string { + if x != nil { + if x, ok := x.Pattern.(*HttpRule_Put); ok { + return x.Put + } + } + return "" +} + +func (x *HttpRule) GetPost() string { + if x != nil { + if x, ok := x.Pattern.(*HttpRule_Post); ok { + return x.Post + } + } + return "" +} + +func (x *HttpRule) GetDelete() string { + if x != nil { + if x, ok := x.Pattern.(*HttpRule_Delete); ok { + return x.Delete + } + } + return "" +} + +func (x *HttpRule) GetPatch() string { + if x != nil { + if x, ok := x.Pattern.(*HttpRule_Patch); ok { + return x.Patch + } + } + return "" +} + +func (x *HttpRule) GetCustom() *CustomHttpPattern { + if x != nil { + if x, ok := x.Pattern.(*HttpRule_Custom); ok { + return x.Custom + } + } + return nil +} + +func (x *HttpRule) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +func (x *HttpRule) GetResponseBody() string { + if x != nil { + return x.ResponseBody + } + return "" +} + +func (x *HttpRule) GetAdditionalBindings() []*HttpRule { + if x != nil { + return x.AdditionalBindings + } + return nil +} + +type isHttpRule_Pattern interface { + isHttpRule_Pattern() +} + +type HttpRule_Get struct { + // Maps to HTTP GET. Used for listing and getting information about + // resources. + Get string `protobuf:"bytes,2,opt,name=get,proto3,oneof"` +} + +type HttpRule_Put struct { + // Maps to HTTP PUT. Used for replacing a resource. + Put string `protobuf:"bytes,3,opt,name=put,proto3,oneof"` +} + +type HttpRule_Post struct { + // Maps to HTTP POST. Used for creating a resource or performing an action. + Post string `protobuf:"bytes,4,opt,name=post,proto3,oneof"` +} + +type HttpRule_Delete struct { + // Maps to HTTP DELETE. Used for deleting a resource. + Delete string `protobuf:"bytes,5,opt,name=delete,proto3,oneof"` +} + +type HttpRule_Patch struct { + // Maps to HTTP PATCH. Used for updating a resource. + Patch string `protobuf:"bytes,6,opt,name=patch,proto3,oneof"` +} + +type HttpRule_Custom struct { + // The custom pattern is used for specifying an HTTP method that is not + // included in the `pattern` field, such as HEAD, or "*" to leave the + // HTTP method unspecified for this rule. The wild-card rule is useful + // for services that provide content to Web (HTML) clients. + Custom *CustomHttpPattern `protobuf:"bytes,8,opt,name=custom,proto3,oneof"` +} + +func (*HttpRule_Get) isHttpRule_Pattern() {} + +func (*HttpRule_Put) isHttpRule_Pattern() {} + +func (*HttpRule_Post) isHttpRule_Pattern() {} + +func (*HttpRule_Delete) isHttpRule_Pattern() {} + +func (*HttpRule_Patch) isHttpRule_Pattern() {} + +func (*HttpRule_Custom) isHttpRule_Pattern() {} + +// A custom pattern is used for defining custom HTTP verb. +type CustomHttpPattern struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The name of this custom HTTP verb. + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + // The path matched by this custom verb. + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CustomHttpPattern) Reset() { + *x = CustomHttpPattern{} + mi := &file_google_api_http_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CustomHttpPattern) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomHttpPattern) ProtoMessage() {} + +func (x *CustomHttpPattern) ProtoReflect() protoreflect.Message { + mi := &file_google_api_http_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomHttpPattern.ProtoReflect.Descriptor instead. +func (*CustomHttpPattern) Descriptor() ([]byte, []int) { + return file_google_api_http_proto_rawDescGZIP(), []int{2} +} + +func (x *CustomHttpPattern) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *CustomHttpPattern) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +var File_google_api_http_proto protoreflect.FileDescriptor + +var file_google_api_http_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x22, 0x79, 0x0a, 0x04, 0x48, 0x74, 0x74, 0x70, 0x12, 0x2a, 0x0a, 0x05, 0x72, + 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, + 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x45, 0x0a, 0x1f, 0x66, 0x75, 0x6c, 0x6c, 0x79, + 0x5f, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x5f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x1c, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xda, + 0x02, 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x03, 0x67, 0x65, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x03, 0x70, + 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x70, 0x75, 0x74, 0x12, + 0x14, 0x0a, 0x04, 0x70, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x04, 0x70, 0x6f, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, + 0x16, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x37, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x48, 0x00, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x62, 0x6f, 0x64, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x45, 0x0a, 0x13, 0x61, 0x64, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, + 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x12, 0x61, 0x64, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, + 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x22, 0x3b, 0x0a, 0x11, 0x43, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x6a, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x09, 0x48, 0x74, 0x74, 0x70, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x04, + 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_api_http_proto_rawDescOnce sync.Once + file_google_api_http_proto_rawDescData = file_google_api_http_proto_rawDesc +) + +func file_google_api_http_proto_rawDescGZIP() []byte { + file_google_api_http_proto_rawDescOnce.Do(func() { + file_google_api_http_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_http_proto_rawDescData) + }) + return file_google_api_http_proto_rawDescData +} + +var file_google_api_http_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_google_api_http_proto_goTypes = []any{ + (*Http)(nil), // 0: google.api.Http + (*HttpRule)(nil), // 1: google.api.HttpRule + (*CustomHttpPattern)(nil), // 2: google.api.CustomHttpPattern +} +var file_google_api_http_proto_depIdxs = []int32{ + 1, // 0: google.api.Http.rules:type_name -> google.api.HttpRule + 2, // 1: google.api.HttpRule.custom:type_name -> google.api.CustomHttpPattern + 1, // 2: google.api.HttpRule.additional_bindings:type_name -> google.api.HttpRule + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_google_api_http_proto_init() } +func file_google_api_http_proto_init() { + if File_google_api_http_proto != nil { + return + } + file_google_api_http_proto_msgTypes[1].OneofWrappers = []any{ + (*HttpRule_Get)(nil), + (*HttpRule_Put)(nil), + (*HttpRule_Post)(nil), + (*HttpRule_Delete)(nil), + (*HttpRule_Patch)(nil), + (*HttpRule_Custom)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_api_http_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_api_http_proto_goTypes, + DependencyIndexes: file_google_api_http_proto_depIdxs, + MessageInfos: file_google_api_http_proto_msgTypes, + }.Build() + File_google_api_http_proto = out.File + file_google_api_http_proto_rawDesc = nil + file_google_api_http_proto_goTypes = nil + file_google_api_http_proto_depIdxs = nil +} diff --git a/proto/google/api/http_grpc_pb.js b/proto/google/api/http_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/google/api/http_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/google/api/http_pb.d.ts b/proto/google/api/http_pb.d.ts new file mode 100644 index 000000000..02c3b1ece --- /dev/null +++ b/proto/google/api/http_pb.d.ts @@ -0,0 +1,135 @@ +// package: google.api +// file: google/api/http.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Http extends jspb.Message { + clearRulesList(): void; + getRulesList(): Array; + setRulesList(value: Array): Http; + addRules(value?: HttpRule, index?: number): HttpRule; + getFullyDecodeReservedExpansion(): boolean; + setFullyDecodeReservedExpansion(value: boolean): Http; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Http.AsObject; + static toObject(includeInstance: boolean, msg: Http): Http.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Http, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Http; + static deserializeBinaryFromReader(message: Http, reader: jspb.BinaryReader): Http; +} + +export namespace Http { + export type AsObject = { + rulesList: Array, + fullyDecodeReservedExpansion: boolean, + } +} + +export class HttpRule extends jspb.Message { + getSelector(): string; + setSelector(value: string): HttpRule; + + hasGet(): boolean; + clearGet(): void; + getGet(): string; + setGet(value: string): HttpRule; + + hasPut(): boolean; + clearPut(): void; + getPut(): string; + setPut(value: string): HttpRule; + + hasPost(): boolean; + clearPost(): void; + getPost(): string; + setPost(value: string): HttpRule; + + hasDelete(): boolean; + clearDelete(): void; + getDelete(): string; + setDelete(value: string): HttpRule; + + hasPatch(): boolean; + clearPatch(): void; + getPatch(): string; + setPatch(value: string): HttpRule; + + hasCustom(): boolean; + clearCustom(): void; + getCustom(): CustomHttpPattern | undefined; + setCustom(value?: CustomHttpPattern): HttpRule; + getBody(): string; + setBody(value: string): HttpRule; + getResponseBody(): string; + setResponseBody(value: string): HttpRule; + clearAdditionalBindingsList(): void; + getAdditionalBindingsList(): Array; + setAdditionalBindingsList(value: Array): HttpRule; + addAdditionalBindings(value?: HttpRule, index?: number): HttpRule; + + getPatternCase(): HttpRule.PatternCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HttpRule.AsObject; + static toObject(includeInstance: boolean, msg: HttpRule): HttpRule.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HttpRule, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HttpRule; + static deserializeBinaryFromReader(message: HttpRule, reader: jspb.BinaryReader): HttpRule; +} + +export namespace HttpRule { + export type AsObject = { + selector: string, + get: string, + put: string, + post: string, + pb_delete: string, + patch: string, + custom?: CustomHttpPattern.AsObject, + body: string, + responseBody: string, + additionalBindingsList: Array, + } + + export enum PatternCase { + PATTERN_NOT_SET = 0, + GET = 2, + PUT = 3, + POST = 4, + DELETE = 5, + PATCH = 6, + CUSTOM = 8, + } + +} + +export class CustomHttpPattern extends jspb.Message { + getKind(): string; + setKind(value: string): CustomHttpPattern; + getPath(): string; + setPath(value: string): CustomHttpPattern; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CustomHttpPattern.AsObject; + static toObject(includeInstance: boolean, msg: CustomHttpPattern): CustomHttpPattern.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CustomHttpPattern, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CustomHttpPattern; + static deserializeBinaryFromReader(message: CustomHttpPattern, reader: jspb.BinaryReader): CustomHttpPattern; +} + +export namespace CustomHttpPattern { + export type AsObject = { + kind: string, + path: string, + } +} diff --git a/proto/google/api/http_pb.js b/proto/google/api/http_pb.js new file mode 100644 index 000000000..01b39deb1 --- /dev/null +++ b/proto/google/api/http_pb.js @@ -0,0 +1,1012 @@ +// source: google/api/http.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +goog.exportSymbol('proto.google.api.CustomHttpPattern', null, global); +goog.exportSymbol('proto.google.api.Http', null, global); +goog.exportSymbol('proto.google.api.HttpRule', null, global); +goog.exportSymbol('proto.google.api.HttpRule.PatternCase', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.Http = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Http.repeatedFields_, null); +}; +goog.inherits(proto.google.api.Http, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.Http.displayName = 'proto.google.api.Http'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.HttpRule = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.HttpRule.repeatedFields_, proto.google.api.HttpRule.oneofGroups_); +}; +goog.inherits(proto.google.api.HttpRule, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.HttpRule.displayName = 'proto.google.api.HttpRule'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.CustomHttpPattern = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.CustomHttpPattern, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.CustomHttpPattern.displayName = 'proto.google.api.CustomHttpPattern'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.Http.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.Http.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.Http.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.Http} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Http.toObject = function(includeInstance, msg) { + var f, obj = { +rulesList: jspb.Message.toObjectList(msg.getRulesList(), + proto.google.api.HttpRule.toObject, includeInstance), +fullyDecodeReservedExpansion: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.Http} + */ +proto.google.api.Http.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.Http; + return proto.google.api.Http.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.Http} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.Http} + */ +proto.google.api.Http.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.HttpRule; + reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); + msg.addRules(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFullyDecodeReservedExpansion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.Http.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.Http.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.Http} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Http.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRulesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.HttpRule.serializeBinaryToWriter + ); + } + f = message.getFullyDecodeReservedExpansion(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * repeated HttpRule rules = 1; + * @return {!Array} + */ +proto.google.api.Http.prototype.getRulesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.Http} returns this +*/ +proto.google.api.Http.prototype.setRulesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.HttpRule=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.Http.prototype.addRules = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.HttpRule, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.Http} returns this + */ +proto.google.api.Http.prototype.clearRulesList = function() { + return this.setRulesList([]); +}; + + +/** + * optional bool fully_decode_reserved_expansion = 2; + * @return {boolean} + */ +proto.google.api.Http.prototype.getFullyDecodeReservedExpansion = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.api.Http} returns this + */ +proto.google.api.Http.prototype.setFullyDecodeReservedExpansion = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.HttpRule.repeatedFields_ = [11]; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.api.HttpRule.oneofGroups_ = [[2,3,4,5,6,8]]; + +/** + * @enum {number} + */ +proto.google.api.HttpRule.PatternCase = { + PATTERN_NOT_SET: 0, + GET: 2, + PUT: 3, + POST: 4, + DELETE: 5, + PATCH: 6, + CUSTOM: 8 +}; + +/** + * @return {proto.google.api.HttpRule.PatternCase} + */ +proto.google.api.HttpRule.prototype.getPatternCase = function() { + return /** @type {proto.google.api.HttpRule.PatternCase} */(jspb.Message.computeOneofCase(this, proto.google.api.HttpRule.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.HttpRule.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.HttpRule.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.HttpRule} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpRule.toObject = function(includeInstance, msg) { + var f, obj = { +selector: jspb.Message.getFieldWithDefault(msg, 1, ""), +get: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +put: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +post: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +pb_delete: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +patch: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f, +custom: (f = msg.getCustom()) && proto.google.api.CustomHttpPattern.toObject(includeInstance, f), +body: jspb.Message.getFieldWithDefault(msg, 7, ""), +responseBody: jspb.Message.getFieldWithDefault(msg, 12, ""), +additionalBindingsList: jspb.Message.toObjectList(msg.getAdditionalBindingsList(), + proto.google.api.HttpRule.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.HttpRule.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.HttpRule; + return proto.google.api.HttpRule.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.HttpRule} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.HttpRule.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSelector(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setGet(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPut(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPost(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDelete(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setPatch(value); + break; + case 8: + var value = new proto.google.api.CustomHttpPattern; + reader.readMessage(value,proto.google.api.CustomHttpPattern.deserializeBinaryFromReader); + msg.setCustom(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setBody(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setResponseBody(value); + break; + case 11: + var value = new proto.google.api.HttpRule; + reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); + msg.addAdditionalBindings(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.HttpRule.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.HttpRule.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.HttpRule} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpRule.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSelector(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeString( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = message.getCustom(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.google.api.CustomHttpPattern.serializeBinaryToWriter + ); + } + f = message.getBody(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getResponseBody(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getAdditionalBindingsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + proto.google.api.HttpRule.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string selector = 1; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getSelector = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setSelector = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string get = 2; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getGet = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setGet = function(value) { + return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearGet = function() { + return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasGet = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string put = 3; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPut = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPut = function(value) { + return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPut = function() { + return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPut = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string post = 4; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPost = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPost = function(value) { + return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPost = function() { + return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPost = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string delete = 5; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getDelete = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setDelete = function(value) { + return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearDelete = function() { + return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasDelete = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string patch = 6; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPatch = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPatch = function(value) { + return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPatch = function() { + return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPatch = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional CustomHttpPattern custom = 8; + * @return {?proto.google.api.CustomHttpPattern} + */ +proto.google.api.HttpRule.prototype.getCustom = function() { + return /** @type{?proto.google.api.CustomHttpPattern} */ ( + jspb.Message.getWrapperField(this, proto.google.api.CustomHttpPattern, 8)); +}; + + +/** + * @param {?proto.google.api.CustomHttpPattern|undefined} value + * @return {!proto.google.api.HttpRule} returns this +*/ +proto.google.api.HttpRule.prototype.setCustom = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearCustom = function() { + return this.setCustom(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasCustom = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string body = 7; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getBody = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setBody = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string response_body = 12; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getResponseBody = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setResponseBody = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * repeated HttpRule additional_bindings = 11; + * @return {!Array} + */ +proto.google.api.HttpRule.prototype.getAdditionalBindingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 11)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.HttpRule} returns this +*/ +proto.google.api.HttpRule.prototype.setAdditionalBindingsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); +}; + + +/** + * @param {!proto.google.api.HttpRule=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.HttpRule.prototype.addAdditionalBindings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.google.api.HttpRule, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearAdditionalBindingsList = function() { + return this.setAdditionalBindingsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.CustomHttpPattern.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.CustomHttpPattern.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.CustomHttpPattern} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.CustomHttpPattern.toObject = function(includeInstance, msg) { + var f, obj = { +kind: jspb.Message.getFieldWithDefault(msg, 1, ""), +path: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.CustomHttpPattern} + */ +proto.google.api.CustomHttpPattern.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.CustomHttpPattern; + return proto.google.api.CustomHttpPattern.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.CustomHttpPattern} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.CustomHttpPattern} + */ +proto.google.api.CustomHttpPattern.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKind(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPath(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.CustomHttpPattern.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.CustomHttpPattern.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.CustomHttpPattern} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.CustomHttpPattern.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKind(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string kind = 1; + * @return {string} + */ +proto.google.api.CustomHttpPattern.prototype.getKind = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.CustomHttpPattern} returns this + */ +proto.google.api.CustomHttpPattern.prototype.setKind = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string path = 2; + * @return {string} + */ +proto.google.api.CustomHttpPattern.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.CustomHttpPattern} returns this + */ +proto.google.api.CustomHttpPattern.prototype.setPath = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.api); diff --git a/proto/google/api/visibility.pb.go b/proto/google/api/visibility.pb.go new file mode 100644 index 000000000..4812f7f87 --- /dev/null +++ b/proto/google/api/visibility.pb.go @@ -0,0 +1,415 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.1 +// protoc (unknown) +// source: google/api/visibility.proto + +package visibility + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// `Visibility` restricts service consumer's access to service elements, +// such as whether an application can call a visibility-restricted method. +// The restriction is expressed by applying visibility labels on service +// elements. The visibility labels are elsewhere linked to service consumers. +// +// A service can define multiple visibility labels, but a service consumer +// should be granted at most one visibility label. Multiple visibility +// labels for a single service consumer are not supported. +// +// If an element and all its parents have no visibility label, its visibility +// is unconditionally granted. +// +// Example: +// +// visibility: +// rules: +// - selector: google.calendar.Calendar.EnhancedSearch +// restriction: PREVIEW +// - selector: google.calendar.Calendar.Delegate +// restriction: INTERNAL +// +// Here, all methods are publicly visible except for the restricted methods +// EnhancedSearch and Delegate. +type Visibility struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A list of visibility rules that apply to individual API elements. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + Rules []*VisibilityRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Visibility) Reset() { + *x = Visibility{} + mi := &file_google_api_visibility_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Visibility) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Visibility) ProtoMessage() {} + +func (x *Visibility) ProtoReflect() protoreflect.Message { + mi := &file_google_api_visibility_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Visibility.ProtoReflect.Descriptor instead. +func (*Visibility) Descriptor() ([]byte, []int) { + return file_google_api_visibility_proto_rawDescGZIP(), []int{0} +} + +func (x *Visibility) GetRules() []*VisibilityRule { + if x != nil { + return x.Rules + } + return nil +} + +// A visibility rule provides visibility configuration for an individual API +// element. +type VisibilityRule struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Selects methods, messages, fields, enums, etc. to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax + // details. + Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` + // A comma-separated list of visibility labels that apply to the `selector`. + // Any of the listed labels can be used to grant the visibility. + // + // If a rule has multiple labels, removing one of the labels but not all of + // them can break clients. + // + // Example: + // + // visibility: + // rules: + // - selector: google.calendar.Calendar.EnhancedSearch + // restriction: INTERNAL, PREVIEW + // + // Removing INTERNAL from this restriction will break clients that rely on + // this method and only had access to it through INTERNAL. + Restriction string `protobuf:"bytes,2,opt,name=restriction,proto3" json:"restriction,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VisibilityRule) Reset() { + *x = VisibilityRule{} + mi := &file_google_api_visibility_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VisibilityRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VisibilityRule) ProtoMessage() {} + +func (x *VisibilityRule) ProtoReflect() protoreflect.Message { + mi := &file_google_api_visibility_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VisibilityRule.ProtoReflect.Descriptor instead. +func (*VisibilityRule) Descriptor() ([]byte, []int) { + return file_google_api_visibility_proto_rawDescGZIP(), []int{1} +} + +func (x *VisibilityRule) GetSelector() string { + if x != nil { + return x.Selector + } + return "" +} + +func (x *VisibilityRule) GetRestriction() string { + if x != nil { + return x.Restriction + } + return "" +} + +var file_google_api_visibility_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.EnumOptions)(nil), + ExtensionType: (*VisibilityRule)(nil), + Field: 72295727, + Name: "google.api.enum_visibility", + Tag: "bytes,72295727,opt,name=enum_visibility", + Filename: "google/api/visibility.proto", + }, + { + ExtendedType: (*descriptorpb.EnumValueOptions)(nil), + ExtensionType: (*VisibilityRule)(nil), + Field: 72295727, + Name: "google.api.value_visibility", + Tag: "bytes,72295727,opt,name=value_visibility", + Filename: "google/api/visibility.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*VisibilityRule)(nil), + Field: 72295727, + Name: "google.api.field_visibility", + Tag: "bytes,72295727,opt,name=field_visibility", + Filename: "google/api/visibility.proto", + }, + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*VisibilityRule)(nil), + Field: 72295727, + Name: "google.api.message_visibility", + Tag: "bytes,72295727,opt,name=message_visibility", + Filename: "google/api/visibility.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*VisibilityRule)(nil), + Field: 72295727, + Name: "google.api.method_visibility", + Tag: "bytes,72295727,opt,name=method_visibility", + Filename: "google/api/visibility.proto", + }, + { + ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtensionType: (*VisibilityRule)(nil), + Field: 72295727, + Name: "google.api.api_visibility", + Tag: "bytes,72295727,opt,name=api_visibility", + Filename: "google/api/visibility.proto", + }, +} + +// Extension fields to descriptorpb.EnumOptions. +var ( + // See `VisibilityRule`. + // + // optional google.api.VisibilityRule enum_visibility = 72295727; + E_EnumVisibility = &file_google_api_visibility_proto_extTypes[0] +) + +// Extension fields to descriptorpb.EnumValueOptions. +var ( + // See `VisibilityRule`. + // + // optional google.api.VisibilityRule value_visibility = 72295727; + E_ValueVisibility = &file_google_api_visibility_proto_extTypes[1] +) + +// Extension fields to descriptorpb.FieldOptions. +var ( + // See `VisibilityRule`. + // + // optional google.api.VisibilityRule field_visibility = 72295727; + E_FieldVisibility = &file_google_api_visibility_proto_extTypes[2] +) + +// Extension fields to descriptorpb.MessageOptions. +var ( + // See `VisibilityRule`. + // + // optional google.api.VisibilityRule message_visibility = 72295727; + E_MessageVisibility = &file_google_api_visibility_proto_extTypes[3] +) + +// Extension fields to descriptorpb.MethodOptions. +var ( + // See `VisibilityRule`. + // + // optional google.api.VisibilityRule method_visibility = 72295727; + E_MethodVisibility = &file_google_api_visibility_proto_extTypes[4] +) + +// Extension fields to descriptorpb.ServiceOptions. +var ( + // See `VisibilityRule`. + // + // optional google.api.VisibilityRule api_visibility = 72295727; + E_ApiVisibility = &file_google_api_visibility_proto_extTypes[5] +) + +var File_google_api_visibility_proto protoreflect.FileDescriptor + +var file_google_api_visibility_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, + 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x0a, 0x56, + 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x4e, 0x0a, 0x0e, 0x56, + 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x73, + 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x64, 0x0a, 0x0f, 0x65, + 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0xca, 0xbc, + 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, + 0x65, 0x52, 0x0e, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x3a, 0x6b, 0x0a, 0x10, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0xca, 0xbc, 0x22, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, + 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x67, + 0x0a, 0x10, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0xaf, 0xca, 0xbc, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x73, + 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x6d, 0x0a, 0x12, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, + 0xca, 0xbc, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, + 0x75, 0x6c, 0x65, 0x52, 0x11, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x56, 0x69, 0x73, 0x69, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x3a, 0x6a, 0x0a, 0x11, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0xca, 0xbc, 0x22, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, + 0x52, 0x10, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x3a, 0x65, 0x0a, 0x0e, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0xca, 0xbc, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x56, 0x69, 0x73, 0x69, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0d, 0x61, 0x70, 0x69, 0x56, + 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x42, 0x6e, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0f, 0x56, 0x69, 0x73, + 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, + 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x3b, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0xf8, + 0x01, 0x01, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_google_api_visibility_proto_rawDescOnce sync.Once + file_google_api_visibility_proto_rawDescData = file_google_api_visibility_proto_rawDesc +) + +func file_google_api_visibility_proto_rawDescGZIP() []byte { + file_google_api_visibility_proto_rawDescOnce.Do(func() { + file_google_api_visibility_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_visibility_proto_rawDescData) + }) + return file_google_api_visibility_proto_rawDescData +} + +var file_google_api_visibility_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_google_api_visibility_proto_goTypes = []any{ + (*Visibility)(nil), // 0: google.api.Visibility + (*VisibilityRule)(nil), // 1: google.api.VisibilityRule + (*descriptorpb.EnumOptions)(nil), // 2: google.protobuf.EnumOptions + (*descriptorpb.EnumValueOptions)(nil), // 3: google.protobuf.EnumValueOptions + (*descriptorpb.FieldOptions)(nil), // 4: google.protobuf.FieldOptions + (*descriptorpb.MessageOptions)(nil), // 5: google.protobuf.MessageOptions + (*descriptorpb.MethodOptions)(nil), // 6: google.protobuf.MethodOptions + (*descriptorpb.ServiceOptions)(nil), // 7: google.protobuf.ServiceOptions +} +var file_google_api_visibility_proto_depIdxs = []int32{ + 1, // 0: google.api.Visibility.rules:type_name -> google.api.VisibilityRule + 2, // 1: google.api.enum_visibility:extendee -> google.protobuf.EnumOptions + 3, // 2: google.api.value_visibility:extendee -> google.protobuf.EnumValueOptions + 4, // 3: google.api.field_visibility:extendee -> google.protobuf.FieldOptions + 5, // 4: google.api.message_visibility:extendee -> google.protobuf.MessageOptions + 6, // 5: google.api.method_visibility:extendee -> google.protobuf.MethodOptions + 7, // 6: google.api.api_visibility:extendee -> google.protobuf.ServiceOptions + 1, // 7: google.api.enum_visibility:type_name -> google.api.VisibilityRule + 1, // 8: google.api.value_visibility:type_name -> google.api.VisibilityRule + 1, // 9: google.api.field_visibility:type_name -> google.api.VisibilityRule + 1, // 10: google.api.message_visibility:type_name -> google.api.VisibilityRule + 1, // 11: google.api.method_visibility:type_name -> google.api.VisibilityRule + 1, // 12: google.api.api_visibility:type_name -> google.api.VisibilityRule + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 7, // [7:13] is the sub-list for extension type_name + 1, // [1:7] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_google_api_visibility_proto_init() } +func file_google_api_visibility_proto_init() { + if File_google_api_visibility_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_api_visibility_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 6, + NumServices: 0, + }, + GoTypes: file_google_api_visibility_proto_goTypes, + DependencyIndexes: file_google_api_visibility_proto_depIdxs, + MessageInfos: file_google_api_visibility_proto_msgTypes, + ExtensionInfos: file_google_api_visibility_proto_extTypes, + }.Build() + File_google_api_visibility_proto = out.File + file_google_api_visibility_proto_rawDesc = nil + file_google_api_visibility_proto_goTypes = nil + file_google_api_visibility_proto_depIdxs = nil +} diff --git a/proto/google/api/visibility_grpc_pb.js b/proto/google/api/visibility_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/google/api/visibility_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/google/api/visibility_pb.d.ts b/proto/google/api/visibility_pb.d.ts new file mode 100644 index 000000000..5efefe7d7 --- /dev/null +++ b/proto/google/api/visibility_pb.d.ts @@ -0,0 +1,65 @@ +// package: google.api +// file: google/api/visibility.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; + +export class Visibility extends jspb.Message { + clearRulesList(): void; + getRulesList(): Array; + setRulesList(value: Array): Visibility; + addRules(value?: VisibilityRule, index?: number): VisibilityRule; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Visibility.AsObject; + static toObject(includeInstance: boolean, msg: Visibility): Visibility.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Visibility, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Visibility; + static deserializeBinaryFromReader(message: Visibility, reader: jspb.BinaryReader): Visibility; +} + +export namespace Visibility { + export type AsObject = { + rulesList: Array, + } +} + +export class VisibilityRule extends jspb.Message { + getSelector(): string; + setSelector(value: string): VisibilityRule; + getRestriction(): string; + setRestriction(value: string): VisibilityRule; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): VisibilityRule.AsObject; + static toObject(includeInstance: boolean, msg: VisibilityRule): VisibilityRule.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: VisibilityRule, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): VisibilityRule; + static deserializeBinaryFromReader(message: VisibilityRule, reader: jspb.BinaryReader): VisibilityRule; +} + +export namespace VisibilityRule { + export type AsObject = { + selector: string, + restriction: string, + } +} + +export const enumVisibility: jspb.ExtensionFieldInfo; + +export const valueVisibility: jspb.ExtensionFieldInfo; + +export const fieldVisibility: jspb.ExtensionFieldInfo; + +export const messageVisibility: jspb.ExtensionFieldInfo; + +export const methodVisibility: jspb.ExtensionFieldInfo; + +export const apiVisibility: jspb.ExtensionFieldInfo; diff --git a/proto/google/api/visibility_pb.js b/proto/google/api/visibility_pb.js new file mode 100644 index 000000000..cbb0106d3 --- /dev/null +++ b/proto/google/api/visibility_pb.js @@ -0,0 +1,546 @@ +// source: google/api/visibility.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.google.api.Visibility', null, global); +goog.exportSymbol('proto.google.api.VisibilityRule', null, global); +goog.exportSymbol('proto.google.api.apiVisibility', null, global); +goog.exportSymbol('proto.google.api.enumVisibility', null, global); +goog.exportSymbol('proto.google.api.fieldVisibility', null, global); +goog.exportSymbol('proto.google.api.messageVisibility', null, global); +goog.exportSymbol('proto.google.api.methodVisibility', null, global); +goog.exportSymbol('proto.google.api.valueVisibility', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.Visibility = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Visibility.repeatedFields_, null); +}; +goog.inherits(proto.google.api.Visibility, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.Visibility.displayName = 'proto.google.api.Visibility'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.VisibilityRule = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.VisibilityRule, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.VisibilityRule.displayName = 'proto.google.api.VisibilityRule'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.Visibility.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.Visibility.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.Visibility.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.Visibility} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Visibility.toObject = function(includeInstance, msg) { + var f, obj = { +rulesList: jspb.Message.toObjectList(msg.getRulesList(), + proto.google.api.VisibilityRule.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.Visibility} + */ +proto.google.api.Visibility.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.Visibility; + return proto.google.api.Visibility.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.Visibility} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.Visibility} + */ +proto.google.api.Visibility.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.VisibilityRule; + reader.readMessage(value,proto.google.api.VisibilityRule.deserializeBinaryFromReader); + msg.addRules(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.Visibility.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.Visibility.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.Visibility} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Visibility.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRulesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.VisibilityRule.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated VisibilityRule rules = 1; + * @return {!Array} + */ +proto.google.api.Visibility.prototype.getRulesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.VisibilityRule, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.Visibility} returns this +*/ +proto.google.api.Visibility.prototype.setRulesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.VisibilityRule=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.VisibilityRule} + */ +proto.google.api.Visibility.prototype.addRules = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.VisibilityRule, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.Visibility} returns this + */ +proto.google.api.Visibility.prototype.clearRulesList = function() { + return this.setRulesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.VisibilityRule.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.VisibilityRule.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.VisibilityRule} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.VisibilityRule.toObject = function(includeInstance, msg) { + var f, obj = { +selector: jspb.Message.getFieldWithDefault(msg, 1, ""), +restriction: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.api.VisibilityRule} + */ +proto.google.api.VisibilityRule.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.VisibilityRule; + return proto.google.api.VisibilityRule.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.VisibilityRule} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.VisibilityRule} + */ +proto.google.api.VisibilityRule.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSelector(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRestriction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.VisibilityRule.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.VisibilityRule.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.VisibilityRule} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.VisibilityRule.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSelector(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRestriction(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string selector = 1; + * @return {string} + */ +proto.google.api.VisibilityRule.prototype.getSelector = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.VisibilityRule} returns this + */ +proto.google.api.VisibilityRule.prototype.setSelector = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string restriction = 2; + * @return {string} + */ +proto.google.api.VisibilityRule.prototype.getRestriction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.VisibilityRule} returns this + */ +proto.google.api.VisibilityRule.prototype.setRestriction = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.enumVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {enumVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.enumVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumOptions.extensions[72295727] = proto.google.api.enumVisibility; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `valueVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.valueVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {valueVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.EnumValueOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.valueVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumValueOptions.extensions[72295727] = proto.google.api.valueVisibility; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `fieldVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.fieldVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {fieldVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.fieldVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[72295727] = proto.google.api.fieldVisibility; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `messageVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.messageVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {messageVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.messageVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[72295727] = proto.google.api.messageVisibility; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `methodVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.methodVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {methodVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.methodVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MethodOptions.extensions[72295727] = proto.google.api.methodVisibility; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `apiVisibility`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.apiVisibility = new jspb.ExtensionFieldInfo( + 72295727, + {apiVisibility: 0}, + proto.google.api.VisibilityRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + proto.google.api.VisibilityRule.toObject), + 0); + +google_protobuf_descriptor_pb.ServiceOptions.extensionsBinary[72295727] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.apiVisibility, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + proto.google.api.VisibilityRule.serializeBinaryToWriter, + proto.google.api.VisibilityRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.ServiceOptions.extensions[72295727] = proto.google.api.apiVisibility; + +goog.object.extend(exports, proto.google.api); diff --git a/proto/google/protobuf/descriptor.pb.go b/proto/google/protobuf/descriptor.pb.go new file mode 100644 index 000000000..f49e6156f --- /dev/null +++ b/proto/google/protobuf/descriptor.pb.go @@ -0,0 +1,5164 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Author: kenton@google.com (Kenton Varda) +// Based on original Protocol Buffers design by +// Sanjay Ghemawat, Jeff Dean, and others. +// +// The messages in this file describe the definitions found in .proto files. +// A valid .proto file can be translated directly to a FileDescriptorProto +// without any other information (e.g. without reading its imports). + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.1 +// protoc (unknown) +// source: google/protobuf/descriptor.proto + +package descriptorpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The full set of known editions. +type Edition int32 + +const ( + // A placeholder for an unknown edition value. + Edition_EDITION_UNKNOWN Edition = 0 + // Legacy syntax "editions". These pre-date editions, but behave much like + // distinct editions. These can't be used to specify the edition of proto + // files, but feature definitions must supply proto2/proto3 defaults for + // backwards compatibility. + Edition_EDITION_PROTO2 Edition = 998 + Edition_EDITION_PROTO3 Edition = 999 + // Editions that have been released. The specific values are arbitrary and + // should not be depended on, but they will always be time-ordered for easy + // comparison. + Edition_EDITION_2023 Edition = 1000 + // Placeholder editions for testing feature resolution. These should not be + // used or relyed on outside of tests. + Edition_EDITION_1_TEST_ONLY Edition = 1 + Edition_EDITION_2_TEST_ONLY Edition = 2 + Edition_EDITION_99997_TEST_ONLY Edition = 99997 + Edition_EDITION_99998_TEST_ONLY Edition = 99998 + Edition_EDITION_99999_TEST_ONLY Edition = 99999 +) + +// Enum value maps for Edition. +var ( + Edition_name = map[int32]string{ + 0: "EDITION_UNKNOWN", + 998: "EDITION_PROTO2", + 999: "EDITION_PROTO3", + 1000: "EDITION_2023", + 1: "EDITION_1_TEST_ONLY", + 2: "EDITION_2_TEST_ONLY", + 99997: "EDITION_99997_TEST_ONLY", + 99998: "EDITION_99998_TEST_ONLY", + 99999: "EDITION_99999_TEST_ONLY", + } + Edition_value = map[string]int32{ + "EDITION_UNKNOWN": 0, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + } +) + +func (x Edition) Enum() *Edition { + p := new(Edition) + *p = x + return p +} + +func (x Edition) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Edition) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[0].Descriptor() +} + +func (Edition) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[0] +} + +func (x Edition) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *Edition) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = Edition(num) + return nil +} + +// Deprecated: Use Edition.Descriptor instead. +func (Edition) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{0} +} + +// The verification state of the extension range. +type ExtensionRangeOptions_VerificationState int32 + +const ( + // All the extensions of the range must be declared. + ExtensionRangeOptions_DECLARATION ExtensionRangeOptions_VerificationState = 0 + ExtensionRangeOptions_UNVERIFIED ExtensionRangeOptions_VerificationState = 1 +) + +// Enum value maps for ExtensionRangeOptions_VerificationState. +var ( + ExtensionRangeOptions_VerificationState_name = map[int32]string{ + 0: "DECLARATION", + 1: "UNVERIFIED", + } + ExtensionRangeOptions_VerificationState_value = map[string]int32{ + "DECLARATION": 0, + "UNVERIFIED": 1, + } +) + +func (x ExtensionRangeOptions_VerificationState) Enum() *ExtensionRangeOptions_VerificationState { + p := new(ExtensionRangeOptions_VerificationState) + *p = x + return p +} + +func (x ExtensionRangeOptions_VerificationState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ExtensionRangeOptions_VerificationState) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[1].Descriptor() +} + +func (ExtensionRangeOptions_VerificationState) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[1] +} + +func (x ExtensionRangeOptions_VerificationState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *ExtensionRangeOptions_VerificationState) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = ExtensionRangeOptions_VerificationState(num) + return nil +} + +// Deprecated: Use ExtensionRangeOptions_VerificationState.Descriptor instead. +func (ExtensionRangeOptions_VerificationState) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{3, 0} +} + +type FieldDescriptorProto_Type int32 + +const ( + // 0 is reserved for errors. + // Order is weird for historical reasons. + FieldDescriptorProto_TYPE_DOUBLE FieldDescriptorProto_Type = 1 + FieldDescriptorProto_TYPE_FLOAT FieldDescriptorProto_Type = 2 + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + // negative values are likely. + FieldDescriptorProto_TYPE_INT64 FieldDescriptorProto_Type = 3 + FieldDescriptorProto_TYPE_UINT64 FieldDescriptorProto_Type = 4 + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + // negative values are likely. + FieldDescriptorProto_TYPE_INT32 FieldDescriptorProto_Type = 5 + FieldDescriptorProto_TYPE_FIXED64 FieldDescriptorProto_Type = 6 + FieldDescriptorProto_TYPE_FIXED32 FieldDescriptorProto_Type = 7 + FieldDescriptorProto_TYPE_BOOL FieldDescriptorProto_Type = 8 + FieldDescriptorProto_TYPE_STRING FieldDescriptorProto_Type = 9 + // Tag-delimited aggregate. + // Group type is deprecated and not supported after google.protobuf. However, Proto3 + // implementations should still be able to parse the group wire format and + // treat group fields as unknown fields. In Editions, the group wire format + // can be enabled via the `message_encoding` feature. + FieldDescriptorProto_TYPE_GROUP FieldDescriptorProto_Type = 10 + FieldDescriptorProto_TYPE_MESSAGE FieldDescriptorProto_Type = 11 // Length-delimited aggregate. + // New in version 2. + FieldDescriptorProto_TYPE_BYTES FieldDescriptorProto_Type = 12 + FieldDescriptorProto_TYPE_UINT32 FieldDescriptorProto_Type = 13 + FieldDescriptorProto_TYPE_ENUM FieldDescriptorProto_Type = 14 + FieldDescriptorProto_TYPE_SFIXED32 FieldDescriptorProto_Type = 15 + FieldDescriptorProto_TYPE_SFIXED64 FieldDescriptorProto_Type = 16 + FieldDescriptorProto_TYPE_SINT32 FieldDescriptorProto_Type = 17 // Uses ZigZag encoding. + FieldDescriptorProto_TYPE_SINT64 FieldDescriptorProto_Type = 18 // Uses ZigZag encoding. +) + +// Enum value maps for FieldDescriptorProto_Type. +var ( + FieldDescriptorProto_Type_name = map[int32]string{ + 1: "TYPE_DOUBLE", + 2: "TYPE_FLOAT", + 3: "TYPE_INT64", + 4: "TYPE_UINT64", + 5: "TYPE_INT32", + 6: "TYPE_FIXED64", + 7: "TYPE_FIXED32", + 8: "TYPE_BOOL", + 9: "TYPE_STRING", + 10: "TYPE_GROUP", + 11: "TYPE_MESSAGE", + 12: "TYPE_BYTES", + 13: "TYPE_UINT32", + 14: "TYPE_ENUM", + 15: "TYPE_SFIXED32", + 16: "TYPE_SFIXED64", + 17: "TYPE_SINT32", + 18: "TYPE_SINT64", + } + FieldDescriptorProto_Type_value = map[string]int32{ + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18, + } +) + +func (x FieldDescriptorProto_Type) Enum() *FieldDescriptorProto_Type { + p := new(FieldDescriptorProto_Type) + *p = x + return p +} + +func (x FieldDescriptorProto_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FieldDescriptorProto_Type) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[2].Descriptor() +} + +func (FieldDescriptorProto_Type) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[2] +} + +func (x FieldDescriptorProto_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FieldDescriptorProto_Type) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FieldDescriptorProto_Type(num) + return nil +} + +// Deprecated: Use FieldDescriptorProto_Type.Descriptor instead. +func (FieldDescriptorProto_Type) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{4, 0} +} + +type FieldDescriptorProto_Label int32 + +const ( + // 0 is reserved for errors + FieldDescriptorProto_LABEL_OPTIONAL FieldDescriptorProto_Label = 1 + FieldDescriptorProto_LABEL_REPEATED FieldDescriptorProto_Label = 3 + // The required label is only allowed in google.protobuf. In proto3 and Editions + // it's explicitly prohibited. In Editions, the `field_presence` feature + // can be used to get this behavior. + FieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_Label = 2 +) + +// Enum value maps for FieldDescriptorProto_Label. +var ( + FieldDescriptorProto_Label_name = map[int32]string{ + 1: "LABEL_OPTIONAL", + 3: "LABEL_REPEATED", + 2: "LABEL_REQUIRED", + } + FieldDescriptorProto_Label_value = map[string]int32{ + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2, + } +) + +func (x FieldDescriptorProto_Label) Enum() *FieldDescriptorProto_Label { + p := new(FieldDescriptorProto_Label) + *p = x + return p +} + +func (x FieldDescriptorProto_Label) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FieldDescriptorProto_Label) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[3].Descriptor() +} + +func (FieldDescriptorProto_Label) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[3] +} + +func (x FieldDescriptorProto_Label) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FieldDescriptorProto_Label) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FieldDescriptorProto_Label(num) + return nil +} + +// Deprecated: Use FieldDescriptorProto_Label.Descriptor instead. +func (FieldDescriptorProto_Label) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{4, 1} +} + +// Generated classes can be optimized for speed or code size. +type FileOptions_OptimizeMode int32 + +const ( + FileOptions_SPEED FileOptions_OptimizeMode = 1 // Generate complete code for parsing, serialization, + // etc. + FileOptions_CODE_SIZE FileOptions_OptimizeMode = 2 // Use ReflectionOps to implement these methods. + FileOptions_LITE_RUNTIME FileOptions_OptimizeMode = 3 // Generate code using MessageLite and the lite runtime. +) + +// Enum value maps for FileOptions_OptimizeMode. +var ( + FileOptions_OptimizeMode_name = map[int32]string{ + 1: "SPEED", + 2: "CODE_SIZE", + 3: "LITE_RUNTIME", + } + FileOptions_OptimizeMode_value = map[string]int32{ + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3, + } +) + +func (x FileOptions_OptimizeMode) Enum() *FileOptions_OptimizeMode { + p := new(FileOptions_OptimizeMode) + *p = x + return p +} + +func (x FileOptions_OptimizeMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FileOptions_OptimizeMode) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[4].Descriptor() +} + +func (FileOptions_OptimizeMode) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[4] +} + +func (x FileOptions_OptimizeMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FileOptions_OptimizeMode) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FileOptions_OptimizeMode(num) + return nil +} + +// Deprecated: Use FileOptions_OptimizeMode.Descriptor instead. +func (FileOptions_OptimizeMode) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{10, 0} +} + +type FieldOptions_CType int32 + +const ( + // Default mode. + FieldOptions_STRING FieldOptions_CType = 0 + // The option [ctype=CORD] may be applied to a non-repeated field of type + // "bytes". It indicates that in C++, the data should be stored in a Cord + // instead of a string. For very large strings, this may reduce memory + // fragmentation. It may also allow better performance when parsing from a + // Cord, or when parsing with aliasing enabled, as the parsed Cord may then + // alias the original buffer. + FieldOptions_CORD FieldOptions_CType = 1 + FieldOptions_STRING_PIECE FieldOptions_CType = 2 +) + +// Enum value maps for FieldOptions_CType. +var ( + FieldOptions_CType_name = map[int32]string{ + 0: "STRING", + 1: "CORD", + 2: "STRING_PIECE", + } + FieldOptions_CType_value = map[string]int32{ + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2, + } +) + +func (x FieldOptions_CType) Enum() *FieldOptions_CType { + p := new(FieldOptions_CType) + *p = x + return p +} + +func (x FieldOptions_CType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FieldOptions_CType) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[5].Descriptor() +} + +func (FieldOptions_CType) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[5] +} + +func (x FieldOptions_CType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FieldOptions_CType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FieldOptions_CType(num) + return nil +} + +// Deprecated: Use FieldOptions_CType.Descriptor instead. +func (FieldOptions_CType) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 0} +} + +type FieldOptions_JSType int32 + +const ( + // Use the default type. + FieldOptions_JS_NORMAL FieldOptions_JSType = 0 + // Use JavaScript strings. + FieldOptions_JS_STRING FieldOptions_JSType = 1 + // Use JavaScript numbers. + FieldOptions_JS_NUMBER FieldOptions_JSType = 2 +) + +// Enum value maps for FieldOptions_JSType. +var ( + FieldOptions_JSType_name = map[int32]string{ + 0: "JS_NORMAL", + 1: "JS_STRING", + 2: "JS_NUMBER", + } + FieldOptions_JSType_value = map[string]int32{ + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2, + } +) + +func (x FieldOptions_JSType) Enum() *FieldOptions_JSType { + p := new(FieldOptions_JSType) + *p = x + return p +} + +func (x FieldOptions_JSType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FieldOptions_JSType) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[6].Descriptor() +} + +func (FieldOptions_JSType) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[6] +} + +func (x FieldOptions_JSType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FieldOptions_JSType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FieldOptions_JSType(num) + return nil +} + +// Deprecated: Use FieldOptions_JSType.Descriptor instead. +func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 1} +} + +// If set to RETENTION_SOURCE, the option will be omitted from the binary. +// Note: as of January 2023, support for this is in progress and does not yet +// have an effect (b/264593489). +type FieldOptions_OptionRetention int32 + +const ( + FieldOptions_RETENTION_UNKNOWN FieldOptions_OptionRetention = 0 + FieldOptions_RETENTION_RUNTIME FieldOptions_OptionRetention = 1 + FieldOptions_RETENTION_SOURCE FieldOptions_OptionRetention = 2 +) + +// Enum value maps for FieldOptions_OptionRetention. +var ( + FieldOptions_OptionRetention_name = map[int32]string{ + 0: "RETENTION_UNKNOWN", + 1: "RETENTION_RUNTIME", + 2: "RETENTION_SOURCE", + } + FieldOptions_OptionRetention_value = map[string]int32{ + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2, + } +) + +func (x FieldOptions_OptionRetention) Enum() *FieldOptions_OptionRetention { + p := new(FieldOptions_OptionRetention) + *p = x + return p +} + +func (x FieldOptions_OptionRetention) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FieldOptions_OptionRetention) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[7].Descriptor() +} + +func (FieldOptions_OptionRetention) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[7] +} + +func (x FieldOptions_OptionRetention) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FieldOptions_OptionRetention) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FieldOptions_OptionRetention(num) + return nil +} + +// Deprecated: Use FieldOptions_OptionRetention.Descriptor instead. +func (FieldOptions_OptionRetention) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 2} +} + +// This indicates the types of entities that the field may apply to when used +// as an option. If it is unset, then the field may be freely used as an +// option on any kind of entity. Note: as of January 2023, support for this is +// in progress and does not yet have an effect (b/264593489). +type FieldOptions_OptionTargetType int32 + +const ( + FieldOptions_TARGET_TYPE_UNKNOWN FieldOptions_OptionTargetType = 0 + FieldOptions_TARGET_TYPE_FILE FieldOptions_OptionTargetType = 1 + FieldOptions_TARGET_TYPE_EXTENSION_RANGE FieldOptions_OptionTargetType = 2 + FieldOptions_TARGET_TYPE_MESSAGE FieldOptions_OptionTargetType = 3 + FieldOptions_TARGET_TYPE_FIELD FieldOptions_OptionTargetType = 4 + FieldOptions_TARGET_TYPE_ONEOF FieldOptions_OptionTargetType = 5 + FieldOptions_TARGET_TYPE_ENUM FieldOptions_OptionTargetType = 6 + FieldOptions_TARGET_TYPE_ENUM_ENTRY FieldOptions_OptionTargetType = 7 + FieldOptions_TARGET_TYPE_SERVICE FieldOptions_OptionTargetType = 8 + FieldOptions_TARGET_TYPE_METHOD FieldOptions_OptionTargetType = 9 +) + +// Enum value maps for FieldOptions_OptionTargetType. +var ( + FieldOptions_OptionTargetType_name = map[int32]string{ + 0: "TARGET_TYPE_UNKNOWN", + 1: "TARGET_TYPE_FILE", + 2: "TARGET_TYPE_EXTENSION_RANGE", + 3: "TARGET_TYPE_MESSAGE", + 4: "TARGET_TYPE_FIELD", + 5: "TARGET_TYPE_ONEOF", + 6: "TARGET_TYPE_ENUM", + 7: "TARGET_TYPE_ENUM_ENTRY", + 8: "TARGET_TYPE_SERVICE", + 9: "TARGET_TYPE_METHOD", + } + FieldOptions_OptionTargetType_value = map[string]int32{ + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9, + } +) + +func (x FieldOptions_OptionTargetType) Enum() *FieldOptions_OptionTargetType { + p := new(FieldOptions_OptionTargetType) + *p = x + return p +} + +func (x FieldOptions_OptionTargetType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FieldOptions_OptionTargetType) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[8].Descriptor() +} + +func (FieldOptions_OptionTargetType) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[8] +} + +func (x FieldOptions_OptionTargetType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FieldOptions_OptionTargetType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FieldOptions_OptionTargetType(num) + return nil +} + +// Deprecated: Use FieldOptions_OptionTargetType.Descriptor instead. +func (FieldOptions_OptionTargetType) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 3} +} + +// Is this method side-effect-free (or safe in HTTP parlance), or idempotent, +// or neither? HTTP based RPC implementation may choose GET verb for safe +// methods, and PUT verb for idempotent methods instead of the default POST. +type MethodOptions_IdempotencyLevel int32 + +const ( + MethodOptions_IDEMPOTENCY_UNKNOWN MethodOptions_IdempotencyLevel = 0 + MethodOptions_NO_SIDE_EFFECTS MethodOptions_IdempotencyLevel = 1 // implies idempotent + MethodOptions_IDEMPOTENT MethodOptions_IdempotencyLevel = 2 // idempotent, but may have side effects +) + +// Enum value maps for MethodOptions_IdempotencyLevel. +var ( + MethodOptions_IdempotencyLevel_name = map[int32]string{ + 0: "IDEMPOTENCY_UNKNOWN", + 1: "NO_SIDE_EFFECTS", + 2: "IDEMPOTENT", + } + MethodOptions_IdempotencyLevel_value = map[string]int32{ + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2, + } +) + +func (x MethodOptions_IdempotencyLevel) Enum() *MethodOptions_IdempotencyLevel { + p := new(MethodOptions_IdempotencyLevel) + *p = x + return p +} + +func (x MethodOptions_IdempotencyLevel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MethodOptions_IdempotencyLevel) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[9].Descriptor() +} + +func (MethodOptions_IdempotencyLevel) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[9] +} + +func (x MethodOptions_IdempotencyLevel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = MethodOptions_IdempotencyLevel(num) + return nil +} + +// Deprecated: Use MethodOptions_IdempotencyLevel.Descriptor instead. +func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{17, 0} +} + +type FeatureSet_FieldPresence int32 + +const ( + FeatureSet_FIELD_PRESENCE_UNKNOWN FeatureSet_FieldPresence = 0 + FeatureSet_EXPLICIT FeatureSet_FieldPresence = 1 + FeatureSet_IMPLICIT FeatureSet_FieldPresence = 2 + FeatureSet_LEGACY_REQUIRED FeatureSet_FieldPresence = 3 +) + +// Enum value maps for FeatureSet_FieldPresence. +var ( + FeatureSet_FieldPresence_name = map[int32]string{ + 0: "FIELD_PRESENCE_UNKNOWN", + 1: "EXPLICIT", + 2: "IMPLICIT", + 3: "LEGACY_REQUIRED", + } + FeatureSet_FieldPresence_value = map[string]int32{ + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3, + } +) + +func (x FeatureSet_FieldPresence) Enum() *FeatureSet_FieldPresence { + p := new(FeatureSet_FieldPresence) + *p = x + return p +} + +func (x FeatureSet_FieldPresence) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FeatureSet_FieldPresence) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[10].Descriptor() +} + +func (FeatureSet_FieldPresence) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[10] +} + +func (x FeatureSet_FieldPresence) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FeatureSet_FieldPresence) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FeatureSet_FieldPresence(num) + return nil +} + +// Deprecated: Use FeatureSet_FieldPresence.Descriptor instead. +func (FeatureSet_FieldPresence) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 0} +} + +type FeatureSet_EnumType int32 + +const ( + FeatureSet_ENUM_TYPE_UNKNOWN FeatureSet_EnumType = 0 + FeatureSet_OPEN FeatureSet_EnumType = 1 + FeatureSet_CLOSED FeatureSet_EnumType = 2 +) + +// Enum value maps for FeatureSet_EnumType. +var ( + FeatureSet_EnumType_name = map[int32]string{ + 0: "ENUM_TYPE_UNKNOWN", + 1: "OPEN", + 2: "CLOSED", + } + FeatureSet_EnumType_value = map[string]int32{ + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2, + } +) + +func (x FeatureSet_EnumType) Enum() *FeatureSet_EnumType { + p := new(FeatureSet_EnumType) + *p = x + return p +} + +func (x FeatureSet_EnumType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FeatureSet_EnumType) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[11].Descriptor() +} + +func (FeatureSet_EnumType) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[11] +} + +func (x FeatureSet_EnumType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FeatureSet_EnumType) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FeatureSet_EnumType(num) + return nil +} + +// Deprecated: Use FeatureSet_EnumType.Descriptor instead. +func (FeatureSet_EnumType) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 1} +} + +type FeatureSet_RepeatedFieldEncoding int32 + +const ( + FeatureSet_REPEATED_FIELD_ENCODING_UNKNOWN FeatureSet_RepeatedFieldEncoding = 0 + FeatureSet_PACKED FeatureSet_RepeatedFieldEncoding = 1 + FeatureSet_EXPANDED FeatureSet_RepeatedFieldEncoding = 2 +) + +// Enum value maps for FeatureSet_RepeatedFieldEncoding. +var ( + FeatureSet_RepeatedFieldEncoding_name = map[int32]string{ + 0: "REPEATED_FIELD_ENCODING_UNKNOWN", + 1: "PACKED", + 2: "EXPANDED", + } + FeatureSet_RepeatedFieldEncoding_value = map[string]int32{ + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2, + } +) + +func (x FeatureSet_RepeatedFieldEncoding) Enum() *FeatureSet_RepeatedFieldEncoding { + p := new(FeatureSet_RepeatedFieldEncoding) + *p = x + return p +} + +func (x FeatureSet_RepeatedFieldEncoding) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FeatureSet_RepeatedFieldEncoding) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[12].Descriptor() +} + +func (FeatureSet_RepeatedFieldEncoding) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[12] +} + +func (x FeatureSet_RepeatedFieldEncoding) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FeatureSet_RepeatedFieldEncoding) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FeatureSet_RepeatedFieldEncoding(num) + return nil +} + +// Deprecated: Use FeatureSet_RepeatedFieldEncoding.Descriptor instead. +func (FeatureSet_RepeatedFieldEncoding) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 2} +} + +type FeatureSet_Utf8Validation int32 + +const ( + FeatureSet_UTF8_VALIDATION_UNKNOWN FeatureSet_Utf8Validation = 0 + FeatureSet_NONE FeatureSet_Utf8Validation = 1 + FeatureSet_VERIFY FeatureSet_Utf8Validation = 2 +) + +// Enum value maps for FeatureSet_Utf8Validation. +var ( + FeatureSet_Utf8Validation_name = map[int32]string{ + 0: "UTF8_VALIDATION_UNKNOWN", + 1: "NONE", + 2: "VERIFY", + } + FeatureSet_Utf8Validation_value = map[string]int32{ + "UTF8_VALIDATION_UNKNOWN": 0, + "NONE": 1, + "VERIFY": 2, + } +) + +func (x FeatureSet_Utf8Validation) Enum() *FeatureSet_Utf8Validation { + p := new(FeatureSet_Utf8Validation) + *p = x + return p +} + +func (x FeatureSet_Utf8Validation) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FeatureSet_Utf8Validation) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[13].Descriptor() +} + +func (FeatureSet_Utf8Validation) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[13] +} + +func (x FeatureSet_Utf8Validation) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FeatureSet_Utf8Validation) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FeatureSet_Utf8Validation(num) + return nil +} + +// Deprecated: Use FeatureSet_Utf8Validation.Descriptor instead. +func (FeatureSet_Utf8Validation) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 3} +} + +type FeatureSet_MessageEncoding int32 + +const ( + FeatureSet_MESSAGE_ENCODING_UNKNOWN FeatureSet_MessageEncoding = 0 + FeatureSet_LENGTH_PREFIXED FeatureSet_MessageEncoding = 1 + FeatureSet_DELIMITED FeatureSet_MessageEncoding = 2 +) + +// Enum value maps for FeatureSet_MessageEncoding. +var ( + FeatureSet_MessageEncoding_name = map[int32]string{ + 0: "MESSAGE_ENCODING_UNKNOWN", + 1: "LENGTH_PREFIXED", + 2: "DELIMITED", + } + FeatureSet_MessageEncoding_value = map[string]int32{ + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2, + } +) + +func (x FeatureSet_MessageEncoding) Enum() *FeatureSet_MessageEncoding { + p := new(FeatureSet_MessageEncoding) + *p = x + return p +} + +func (x FeatureSet_MessageEncoding) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FeatureSet_MessageEncoding) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[14].Descriptor() +} + +func (FeatureSet_MessageEncoding) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[14] +} + +func (x FeatureSet_MessageEncoding) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FeatureSet_MessageEncoding) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FeatureSet_MessageEncoding(num) + return nil +} + +// Deprecated: Use FeatureSet_MessageEncoding.Descriptor instead. +func (FeatureSet_MessageEncoding) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 4} +} + +type FeatureSet_JsonFormat int32 + +const ( + FeatureSet_JSON_FORMAT_UNKNOWN FeatureSet_JsonFormat = 0 + FeatureSet_ALLOW FeatureSet_JsonFormat = 1 + FeatureSet_LEGACY_BEST_EFFORT FeatureSet_JsonFormat = 2 +) + +// Enum value maps for FeatureSet_JsonFormat. +var ( + FeatureSet_JsonFormat_name = map[int32]string{ + 0: "JSON_FORMAT_UNKNOWN", + 1: "ALLOW", + 2: "LEGACY_BEST_EFFORT", + } + FeatureSet_JsonFormat_value = map[string]int32{ + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2, + } +) + +func (x FeatureSet_JsonFormat) Enum() *FeatureSet_JsonFormat { + p := new(FeatureSet_JsonFormat) + *p = x + return p +} + +func (x FeatureSet_JsonFormat) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FeatureSet_JsonFormat) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[15].Descriptor() +} + +func (FeatureSet_JsonFormat) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[15] +} + +func (x FeatureSet_JsonFormat) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *FeatureSet_JsonFormat) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = FeatureSet_JsonFormat(num) + return nil +} + +// Deprecated: Use FeatureSet_JsonFormat.Descriptor instead. +func (FeatureSet_JsonFormat) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 5} +} + +// Represents the identified object's effect on the element in the original +// .proto file. +type GeneratedCodeInfo_Annotation_Semantic int32 + +const ( + // There is no effect or the effect is indescribable. + GeneratedCodeInfo_Annotation_NONE GeneratedCodeInfo_Annotation_Semantic = 0 + // The element is set or otherwise mutated. + GeneratedCodeInfo_Annotation_SET GeneratedCodeInfo_Annotation_Semantic = 1 + // An alias to the element is returned. + GeneratedCodeInfo_Annotation_ALIAS GeneratedCodeInfo_Annotation_Semantic = 2 +) + +// Enum value maps for GeneratedCodeInfo_Annotation_Semantic. +var ( + GeneratedCodeInfo_Annotation_Semantic_name = map[int32]string{ + 0: "NONE", + 1: "SET", + 2: "ALIAS", + } + GeneratedCodeInfo_Annotation_Semantic_value = map[string]int32{ + "NONE": 0, + "SET": 1, + "ALIAS": 2, + } +) + +func (x GeneratedCodeInfo_Annotation_Semantic) Enum() *GeneratedCodeInfo_Annotation_Semantic { + p := new(GeneratedCodeInfo_Annotation_Semantic) + *p = x + return p +} + +func (x GeneratedCodeInfo_Annotation_Semantic) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GeneratedCodeInfo_Annotation_Semantic) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_descriptor_proto_enumTypes[16].Descriptor() +} + +func (GeneratedCodeInfo_Annotation_Semantic) Type() protoreflect.EnumType { + return &file_google_protobuf_descriptor_proto_enumTypes[16] +} + +func (x GeneratedCodeInfo_Annotation_Semantic) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *GeneratedCodeInfo_Annotation_Semantic) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = GeneratedCodeInfo_Annotation_Semantic(num) + return nil +} + +// Deprecated: Use GeneratedCodeInfo_Annotation_Semantic.Descriptor instead. +func (GeneratedCodeInfo_Annotation_Semantic) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{22, 0, 0} +} + +// The protocol compiler can output a FileDescriptorSet containing the .proto +// files it parses. +type FileDescriptorSet struct { + state protoimpl.MessageState `protogen:"open.v1"` + File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FileDescriptorSet) Reset() { + *x = FileDescriptorSet{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FileDescriptorSet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileDescriptorSet) ProtoMessage() {} + +func (x *FileDescriptorSet) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FileDescriptorSet.ProtoReflect.Descriptor instead. +func (*FileDescriptorSet) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{0} +} + +func (x *FileDescriptorSet) GetFile() []*FileDescriptorProto { + if x != nil { + return x.File + } + return nil +} + +// Describes a complete .proto file. +type FileDescriptorProto struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // file name, relative to root of source tree + Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"` // e.g. "foo", "foo.bar", etc. + // Names of files imported by this file. + Dependency []string `protobuf:"bytes,3,rep,name=dependency" json:"dependency,omitempty"` + // Indexes of the public imported files in the dependency list above. + PublicDependency []int32 `protobuf:"varint,10,rep,name=public_dependency,json=publicDependency" json:"public_dependency,omitempty"` + // Indexes of the weak imported files in the dependency list. + // For Google-internal migration only. Do not use. + WeakDependency []int32 `protobuf:"varint,11,rep,name=weak_dependency,json=weakDependency" json:"weak_dependency,omitempty"` + // All top-level definitions in this file. + MessageType []*DescriptorProto `protobuf:"bytes,4,rep,name=message_type,json=messageType" json:"message_type,omitempty"` + EnumType []*EnumDescriptorProto `protobuf:"bytes,5,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` + Service []*ServiceDescriptorProto `protobuf:"bytes,6,rep,name=service" json:"service,omitempty"` + Extension []*FieldDescriptorProto `protobuf:"bytes,7,rep,name=extension" json:"extension,omitempty"` + Options *FileOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` + // This field contains optional information about the original source code. + // You may safely remove this entire field without harming runtime + // functionality of the descriptors -- the information is needed only by + // development tools. + SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"` + // The syntax of the proto file. + // The supported values are "proto2", "proto3", and "editions". + // + // If `edition` is present, this value must be "editions". + Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"` + // The edition of the proto file. + Edition *Edition `protobuf:"varint,14,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FileDescriptorProto) Reset() { + *x = FileDescriptorProto{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FileDescriptorProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileDescriptorProto) ProtoMessage() {} + +func (x *FileDescriptorProto) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FileDescriptorProto.ProtoReflect.Descriptor instead. +func (*FileDescriptorProto) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{1} +} + +func (x *FileDescriptorProto) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *FileDescriptorProto) GetPackage() string { + if x != nil && x.Package != nil { + return *x.Package + } + return "" +} + +func (x *FileDescriptorProto) GetDependency() []string { + if x != nil { + return x.Dependency + } + return nil +} + +func (x *FileDescriptorProto) GetPublicDependency() []int32 { + if x != nil { + return x.PublicDependency + } + return nil +} + +func (x *FileDescriptorProto) GetWeakDependency() []int32 { + if x != nil { + return x.WeakDependency + } + return nil +} + +func (x *FileDescriptorProto) GetMessageType() []*DescriptorProto { + if x != nil { + return x.MessageType + } + return nil +} + +func (x *FileDescriptorProto) GetEnumType() []*EnumDescriptorProto { + if x != nil { + return x.EnumType + } + return nil +} + +func (x *FileDescriptorProto) GetService() []*ServiceDescriptorProto { + if x != nil { + return x.Service + } + return nil +} + +func (x *FileDescriptorProto) GetExtension() []*FieldDescriptorProto { + if x != nil { + return x.Extension + } + return nil +} + +func (x *FileDescriptorProto) GetOptions() *FileOptions { + if x != nil { + return x.Options + } + return nil +} + +func (x *FileDescriptorProto) GetSourceCodeInfo() *SourceCodeInfo { + if x != nil { + return x.SourceCodeInfo + } + return nil +} + +func (x *FileDescriptorProto) GetSyntax() string { + if x != nil && x.Syntax != nil { + return *x.Syntax + } + return "" +} + +func (x *FileDescriptorProto) GetEdition() Edition { + if x != nil && x.Edition != nil { + return *x.Edition + } + return Edition_EDITION_UNKNOWN +} + +// Describes a message type. +type DescriptorProto struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Field []*FieldDescriptorProto `protobuf:"bytes,2,rep,name=field" json:"field,omitempty"` + Extension []*FieldDescriptorProto `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"` + NestedType []*DescriptorProto `protobuf:"bytes,3,rep,name=nested_type,json=nestedType" json:"nested_type,omitempty"` + EnumType []*EnumDescriptorProto `protobuf:"bytes,4,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` + ExtensionRange []*DescriptorProto_ExtensionRange `protobuf:"bytes,5,rep,name=extension_range,json=extensionRange" json:"extension_range,omitempty"` + OneofDecl []*OneofDescriptorProto `protobuf:"bytes,8,rep,name=oneof_decl,json=oneofDecl" json:"oneof_decl,omitempty"` + Options *MessageOptions `protobuf:"bytes,7,opt,name=options" json:"options,omitempty"` + ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` + // Reserved field names, which may not be used by fields in the same message. + // A given name may only be reserved once. + ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescriptorProto) Reset() { + *x = DescriptorProto{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescriptorProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescriptorProto) ProtoMessage() {} + +func (x *DescriptorProto) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescriptorProto.ProtoReflect.Descriptor instead. +func (*DescriptorProto) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{2} +} + +func (x *DescriptorProto) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *DescriptorProto) GetField() []*FieldDescriptorProto { + if x != nil { + return x.Field + } + return nil +} + +func (x *DescriptorProto) GetExtension() []*FieldDescriptorProto { + if x != nil { + return x.Extension + } + return nil +} + +func (x *DescriptorProto) GetNestedType() []*DescriptorProto { + if x != nil { + return x.NestedType + } + return nil +} + +func (x *DescriptorProto) GetEnumType() []*EnumDescriptorProto { + if x != nil { + return x.EnumType + } + return nil +} + +func (x *DescriptorProto) GetExtensionRange() []*DescriptorProto_ExtensionRange { + if x != nil { + return x.ExtensionRange + } + return nil +} + +func (x *DescriptorProto) GetOneofDecl() []*OneofDescriptorProto { + if x != nil { + return x.OneofDecl + } + return nil +} + +func (x *DescriptorProto) GetOptions() *MessageOptions { + if x != nil { + return x.Options + } + return nil +} + +func (x *DescriptorProto) GetReservedRange() []*DescriptorProto_ReservedRange { + if x != nil { + return x.ReservedRange + } + return nil +} + +func (x *DescriptorProto) GetReservedName() []string { + if x != nil { + return x.ReservedName + } + return nil +} + +type ExtensionRangeOptions struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + // For external users: DO NOT USE. We are in the process of open sourcing + // extension declaration and executing internal cleanups before it can be + // used externally. + Declaration []*ExtensionRangeOptions_Declaration `protobuf:"bytes,2,rep,name=declaration" json:"declaration,omitempty"` + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,50,opt,name=features" json:"features,omitempty"` + // The verification state of the range. + // TODO: flip the default to DECLARATION once all empty ranges + // are marked as UNVERIFIED. + Verification *ExtensionRangeOptions_VerificationState `protobuf:"varint,3,opt,name=verification,enum=google.protobuf.ExtensionRangeOptions_VerificationState,def=1" json:"verification,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// Default values for ExtensionRangeOptions fields. +const ( + Default_ExtensionRangeOptions_Verification = ExtensionRangeOptions_UNVERIFIED +) + +func (x *ExtensionRangeOptions) Reset() { + *x = ExtensionRangeOptions{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExtensionRangeOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExtensionRangeOptions) ProtoMessage() {} + +func (x *ExtensionRangeOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExtensionRangeOptions.ProtoReflect.Descriptor instead. +func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{3} +} + +func (x *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption { + if x != nil { + return x.UninterpretedOption + } + return nil +} + +func (x *ExtensionRangeOptions) GetDeclaration() []*ExtensionRangeOptions_Declaration { + if x != nil { + return x.Declaration + } + return nil +} + +func (x *ExtensionRangeOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + +func (x *ExtensionRangeOptions) GetVerification() ExtensionRangeOptions_VerificationState { + if x != nil && x.Verification != nil { + return *x.Verification + } + return Default_ExtensionRangeOptions_Verification +} + +// Describes a field within a message. +type FieldDescriptorProto struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Number *int32 `protobuf:"varint,3,opt,name=number" json:"number,omitempty"` + Label *FieldDescriptorProto_Label `protobuf:"varint,4,opt,name=label,enum=google.protobuf.FieldDescriptorProto_Label" json:"label,omitempty"` + // If type_name is set, this need not be set. If both this and type_name + // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + Type *FieldDescriptorProto_Type `protobuf:"varint,5,opt,name=type,enum=google.protobuf.FieldDescriptorProto_Type" json:"type,omitempty"` + // For message and enum types, this is the name of the type. If the name + // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + // rules are used to find the type (i.e. first the nested types within this + // message are searched, then within the parent, on up to the root + // namespace). + TypeName *string `protobuf:"bytes,6,opt,name=type_name,json=typeName" json:"type_name,omitempty"` + // For extensions, this is the name of the type being extended. It is + // resolved in the same manner as type_name. + Extendee *string `protobuf:"bytes,2,opt,name=extendee" json:"extendee,omitempty"` + // For numeric types, contains the original text representation of the value. + // For booleans, "true" or "false". + // For strings, contains the default text contents (not escaped in any way). + // For bytes, contains the C escaped value. All bytes >= 128 are escaped. + DefaultValue *string `protobuf:"bytes,7,opt,name=default_value,json=defaultValue" json:"default_value,omitempty"` + // If set, gives the index of a oneof in the containing type's oneof_decl + // list. This field is a member of that oneof. + OneofIndex *int32 `protobuf:"varint,9,opt,name=oneof_index,json=oneofIndex" json:"oneof_index,omitempty"` + // JSON name of this field. The value is set by protocol compiler. If the + // user has set a "json_name" option on this field, that option's value + // will be used. Otherwise, it's deduced from the field's name by converting + // it to camelCase. + JsonName *string `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"` + Options *FieldOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` + // If true, this is a proto3 "optional". When a proto3 field is optional, it + // tracks presence regardless of field type. + // + // When proto3_optional is true, this field must be belong to a oneof to + // signal to old proto3 clients that presence is tracked for this field. This + // oneof is known as a "synthetic" oneof, and this field must be its sole + // member (each proto3 optional field gets its own synthetic oneof). Synthetic + // oneofs exist in the descriptor only, and do not generate any API. Synthetic + // oneofs must be ordered after all "real" oneofs. + // + // For message fields, proto3_optional doesn't create any semantic change, + // since non-repeated message fields always track presence. However it still + // indicates the semantic detail of whether the user wrote "optional" or not. + // This can be useful for round-tripping the .proto file. For consistency we + // give message fields a synthetic oneof also, even though it is not required + // to track presence. This is especially important because the parser can't + // tell if a field is a message or an enum, so it must always create a + // synthetic oneof. + // + // Proto2 optional fields do not set this flag, because they already indicate + // optional with `LABEL_OPTIONAL`. + Proto3Optional *bool `protobuf:"varint,17,opt,name=proto3_optional,json=proto3Optional" json:"proto3_optional,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FieldDescriptorProto) Reset() { + *x = FieldDescriptorProto{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FieldDescriptorProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldDescriptorProto) ProtoMessage() {} + +func (x *FieldDescriptorProto) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldDescriptorProto.ProtoReflect.Descriptor instead. +func (*FieldDescriptorProto) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{4} +} + +func (x *FieldDescriptorProto) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *FieldDescriptorProto) GetNumber() int32 { + if x != nil && x.Number != nil { + return *x.Number + } + return 0 +} + +func (x *FieldDescriptorProto) GetLabel() FieldDescriptorProto_Label { + if x != nil && x.Label != nil { + return *x.Label + } + return FieldDescriptorProto_LABEL_OPTIONAL +} + +func (x *FieldDescriptorProto) GetType() FieldDescriptorProto_Type { + if x != nil && x.Type != nil { + return *x.Type + } + return FieldDescriptorProto_TYPE_DOUBLE +} + +func (x *FieldDescriptorProto) GetTypeName() string { + if x != nil && x.TypeName != nil { + return *x.TypeName + } + return "" +} + +func (x *FieldDescriptorProto) GetExtendee() string { + if x != nil && x.Extendee != nil { + return *x.Extendee + } + return "" +} + +func (x *FieldDescriptorProto) GetDefaultValue() string { + if x != nil && x.DefaultValue != nil { + return *x.DefaultValue + } + return "" +} + +func (x *FieldDescriptorProto) GetOneofIndex() int32 { + if x != nil && x.OneofIndex != nil { + return *x.OneofIndex + } + return 0 +} + +func (x *FieldDescriptorProto) GetJsonName() string { + if x != nil && x.JsonName != nil { + return *x.JsonName + } + return "" +} + +func (x *FieldDescriptorProto) GetOptions() *FieldOptions { + if x != nil { + return x.Options + } + return nil +} + +func (x *FieldDescriptorProto) GetProto3Optional() bool { + if x != nil && x.Proto3Optional != nil { + return *x.Proto3Optional + } + return false +} + +// Describes a oneof. +type OneofDescriptorProto struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OneofDescriptorProto) Reset() { + *x = OneofDescriptorProto{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OneofDescriptorProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OneofDescriptorProto) ProtoMessage() {} + +func (x *OneofDescriptorProto) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OneofDescriptorProto.ProtoReflect.Descriptor instead. +func (*OneofDescriptorProto) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{5} +} + +func (x *OneofDescriptorProto) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *OneofDescriptorProto) GetOptions() *OneofOptions { + if x != nil { + return x.Options + } + return nil +} + +// Describes an enum type. +type EnumDescriptorProto struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` + Options *EnumOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + // Range of reserved numeric values. Reserved numeric values may not be used + // by enum values in the same enum declaration. Reserved ranges may not + // overlap. + ReservedRange []*EnumDescriptorProto_EnumReservedRange `protobuf:"bytes,4,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` + // Reserved enum value names, which may not be reused. A given name may only + // be reserved once. + ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnumDescriptorProto) Reset() { + *x = EnumDescriptorProto{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnumDescriptorProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnumDescriptorProto) ProtoMessage() {} + +func (x *EnumDescriptorProto) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnumDescriptorProto.ProtoReflect.Descriptor instead. +func (*EnumDescriptorProto) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{6} +} + +func (x *EnumDescriptorProto) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *EnumDescriptorProto) GetValue() []*EnumValueDescriptorProto { + if x != nil { + return x.Value + } + return nil +} + +func (x *EnumDescriptorProto) GetOptions() *EnumOptions { + if x != nil { + return x.Options + } + return nil +} + +func (x *EnumDescriptorProto) GetReservedRange() []*EnumDescriptorProto_EnumReservedRange { + if x != nil { + return x.ReservedRange + } + return nil +} + +func (x *EnumDescriptorProto) GetReservedName() []string { + if x != nil { + return x.ReservedName + } + return nil +} + +// Describes a value within an enum. +type EnumValueDescriptorProto struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` + Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnumValueDescriptorProto) Reset() { + *x = EnumValueDescriptorProto{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnumValueDescriptorProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnumValueDescriptorProto) ProtoMessage() {} + +func (x *EnumValueDescriptorProto) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnumValueDescriptorProto.ProtoReflect.Descriptor instead. +func (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{7} +} + +func (x *EnumValueDescriptorProto) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *EnumValueDescriptorProto) GetNumber() int32 { + if x != nil && x.Number != nil { + return *x.Number + } + return 0 +} + +func (x *EnumValueDescriptorProto) GetOptions() *EnumValueOptions { + if x != nil { + return x.Options + } + return nil +} + +// Describes a service. +type ServiceDescriptorProto struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` + Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ServiceDescriptorProto) Reset() { + *x = ServiceDescriptorProto{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ServiceDescriptorProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceDescriptorProto) ProtoMessage() {} + +func (x *ServiceDescriptorProto) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceDescriptorProto.ProtoReflect.Descriptor instead. +func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{8} +} + +func (x *ServiceDescriptorProto) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *ServiceDescriptorProto) GetMethod() []*MethodDescriptorProto { + if x != nil { + return x.Method + } + return nil +} + +func (x *ServiceDescriptorProto) GetOptions() *ServiceOptions { + if x != nil { + return x.Options + } + return nil +} + +// Describes a method of a service. +type MethodDescriptorProto struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Input and output type names. These are resolved in the same way as + // FieldDescriptorProto.type_name, but must refer to a message type. + InputType *string `protobuf:"bytes,2,opt,name=input_type,json=inputType" json:"input_type,omitempty"` + OutputType *string `protobuf:"bytes,3,opt,name=output_type,json=outputType" json:"output_type,omitempty"` + Options *MethodOptions `protobuf:"bytes,4,opt,name=options" json:"options,omitempty"` + // Identifies if client streams multiple client messages + ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,json=clientStreaming,def=0" json:"client_streaming,omitempty"` + // Identifies if server streams multiple server messages + ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// Default values for MethodDescriptorProto fields. +const ( + Default_MethodDescriptorProto_ClientStreaming = bool(false) + Default_MethodDescriptorProto_ServerStreaming = bool(false) +) + +func (x *MethodDescriptorProto) Reset() { + *x = MethodDescriptorProto{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MethodDescriptorProto) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MethodDescriptorProto) ProtoMessage() {} + +func (x *MethodDescriptorProto) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MethodDescriptorProto.ProtoReflect.Descriptor instead. +func (*MethodDescriptorProto) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{9} +} + +func (x *MethodDescriptorProto) GetName() string { + if x != nil && x.Name != nil { + return *x.Name + } + return "" +} + +func (x *MethodDescriptorProto) GetInputType() string { + if x != nil && x.InputType != nil { + return *x.InputType + } + return "" +} + +func (x *MethodDescriptorProto) GetOutputType() string { + if x != nil && x.OutputType != nil { + return *x.OutputType + } + return "" +} + +func (x *MethodDescriptorProto) GetOptions() *MethodOptions { + if x != nil { + return x.Options + } + return nil +} + +func (x *MethodDescriptorProto) GetClientStreaming() bool { + if x != nil && x.ClientStreaming != nil { + return *x.ClientStreaming + } + return Default_MethodDescriptorProto_ClientStreaming +} + +func (x *MethodDescriptorProto) GetServerStreaming() bool { + if x != nil && x.ServerStreaming != nil { + return *x.ServerStreaming + } + return Default_MethodDescriptorProto_ServerStreaming +} + +type FileOptions struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Sets the Java package where classes generated from this .proto will be + // placed. By default, the proto package is used, but this is often + // inappropriate because proto packages do not normally start with backwards + // domain names. + JavaPackage *string `protobuf:"bytes,1,opt,name=java_package,json=javaPackage" json:"java_package,omitempty"` + // Controls the name of the wrapper Java class generated for the .proto file. + // That class will always contain the .proto file's getDescriptor() method as + // well as any top-level extensions defined in the .proto file. + // If java_multiple_files is disabled, then all the other classes from the + // .proto file will be nested inside the single wrapper outer class. + JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname,json=javaOuterClassname" json:"java_outer_classname,omitempty"` + // If enabled, then the Java code generator will generate a separate .java + // file for each top-level message, enum, and service defined in the .proto + // file. Thus, these types will *not* be nested inside the wrapper class + // named by java_outer_classname. However, the wrapper class will still be + // generated to contain the file's getDescriptor() method as well as any + // top-level extensions defined in the file. + JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"` + // This option does nothing. + // + // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. + JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"` + // If set true, then the Java2 code generator will generate code that + // throws an exception whenever an attempt is made to assign a non-UTF-8 + // byte sequence to a string field. + // Message reflection will do the same. + // However, an extension field still accepts non-UTF-8 byte sequences. + // This option has no effect on when used with the lite runtime. + JavaStringCheckUtf8 *bool `protobuf:"varint,27,opt,name=java_string_check_utf8,json=javaStringCheckUtf8,def=0" json:"java_string_check_utf8,omitempty"` + OptimizeFor *FileOptions_OptimizeMode `protobuf:"varint,9,opt,name=optimize_for,json=optimizeFor,enum=google.protobuf.FileOptions_OptimizeMode,def=1" json:"optimize_for,omitempty"` + // Sets the Go package where structs generated from this .proto will be + // placed. If omitted, the Go package will be derived from the following: + // - The basename of the package import path, if provided. + // - Otherwise, the package statement in the .proto file, if present. + // - Otherwise, the basename of the .proto file, without extension. + GoPackage *string `protobuf:"bytes,11,opt,name=go_package,json=goPackage" json:"go_package,omitempty"` + // Should generic services be generated in each language? "Generic" services + // are not specific to any particular RPC system. They are generated by the + // main code generators in each language (without additional plugins). + // Generic services were the only kind of service generation supported by + // early versions of google.protobuf. + // + // Generic services are now considered deprecated in favor of using plugins + // that generate code specific to your particular RPC system. Therefore, + // these default to false. Old code which depends on generic services should + // explicitly set them to true. + CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,json=ccGenericServices,def=0" json:"cc_generic_services,omitempty"` + JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,json=javaGenericServices,def=0" json:"java_generic_services,omitempty"` + PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,json=pyGenericServices,def=0" json:"py_generic_services,omitempty"` + PhpGenericServices *bool `protobuf:"varint,42,opt,name=php_generic_services,json=phpGenericServices,def=0" json:"php_generic_services,omitempty"` + // Is this file deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for everything in the file, or it will be completely ignored; in the very + // least, this is a formalization for deprecating files. + Deprecated *bool `protobuf:"varint,23,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // Enables the use of arenas for the proto messages in this file. This applies + // only to generated classes for C++. + CcEnableArenas *bool `protobuf:"varint,31,opt,name=cc_enable_arenas,json=ccEnableArenas,def=1" json:"cc_enable_arenas,omitempty"` + // Sets the objective c class prefix which is prepended to all objective c + // generated classes from this .proto. There is no default. + ObjcClassPrefix *string `protobuf:"bytes,36,opt,name=objc_class_prefix,json=objcClassPrefix" json:"objc_class_prefix,omitempty"` + // Namespace for generated classes; defaults to the package. + CsharpNamespace *string `protobuf:"bytes,37,opt,name=csharp_namespace,json=csharpNamespace" json:"csharp_namespace,omitempty"` + // By default Swift generators will take the proto package and CamelCase it + // replacing '.' with underscore and use that to prefix the types/symbols + // defined. When this options is provided, they will use this value instead + // to prefix the types/symbols defined. + SwiftPrefix *string `protobuf:"bytes,39,opt,name=swift_prefix,json=swiftPrefix" json:"swift_prefix,omitempty"` + // Sets the php class prefix which is prepended to all php generated classes + // from this .proto. Default is empty. + PhpClassPrefix *string `protobuf:"bytes,40,opt,name=php_class_prefix,json=phpClassPrefix" json:"php_class_prefix,omitempty"` + // Use this option to change the namespace of php generated classes. Default + // is empty. When this option is empty, the package name will be used for + // determining the namespace. + PhpNamespace *string `protobuf:"bytes,41,opt,name=php_namespace,json=phpNamespace" json:"php_namespace,omitempty"` + // Use this option to change the namespace of php generated metadata classes. + // Default is empty. When this option is empty, the proto file name will be + // used for determining the namespace. + PhpMetadataNamespace *string `protobuf:"bytes,44,opt,name=php_metadata_namespace,json=phpMetadataNamespace" json:"php_metadata_namespace,omitempty"` + // Use this option to change the package of ruby generated classes. Default + // is empty. When this option is not set, the package name will be used for + // determining the ruby package. + RubyPackage *string `protobuf:"bytes,45,opt,name=ruby_package,json=rubyPackage" json:"ruby_package,omitempty"` + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,50,opt,name=features" json:"features,omitempty"` + // The parser stores options it doesn't recognize here. + // See the documentation for the "Options" section above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// Default values for FileOptions fields. +const ( + Default_FileOptions_JavaMultipleFiles = bool(false) + Default_FileOptions_JavaStringCheckUtf8 = bool(false) + Default_FileOptions_OptimizeFor = FileOptions_SPEED + Default_FileOptions_CcGenericServices = bool(false) + Default_FileOptions_JavaGenericServices = bool(false) + Default_FileOptions_PyGenericServices = bool(false) + Default_FileOptions_PhpGenericServices = bool(false) + Default_FileOptions_Deprecated = bool(false) + Default_FileOptions_CcEnableArenas = bool(true) +) + +func (x *FileOptions) Reset() { + *x = FileOptions{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FileOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileOptions) ProtoMessage() {} + +func (x *FileOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FileOptions.ProtoReflect.Descriptor instead. +func (*FileOptions) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{10} +} + +func (x *FileOptions) GetJavaPackage() string { + if x != nil && x.JavaPackage != nil { + return *x.JavaPackage + } + return "" +} + +func (x *FileOptions) GetJavaOuterClassname() string { + if x != nil && x.JavaOuterClassname != nil { + return *x.JavaOuterClassname + } + return "" +} + +func (x *FileOptions) GetJavaMultipleFiles() bool { + if x != nil && x.JavaMultipleFiles != nil { + return *x.JavaMultipleFiles + } + return Default_FileOptions_JavaMultipleFiles +} + +// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. +func (x *FileOptions) GetJavaGenerateEqualsAndHash() bool { + if x != nil && x.JavaGenerateEqualsAndHash != nil { + return *x.JavaGenerateEqualsAndHash + } + return false +} + +func (x *FileOptions) GetJavaStringCheckUtf8() bool { + if x != nil && x.JavaStringCheckUtf8 != nil { + return *x.JavaStringCheckUtf8 + } + return Default_FileOptions_JavaStringCheckUtf8 +} + +func (x *FileOptions) GetOptimizeFor() FileOptions_OptimizeMode { + if x != nil && x.OptimizeFor != nil { + return *x.OptimizeFor + } + return Default_FileOptions_OptimizeFor +} + +func (x *FileOptions) GetGoPackage() string { + if x != nil && x.GoPackage != nil { + return *x.GoPackage + } + return "" +} + +func (x *FileOptions) GetCcGenericServices() bool { + if x != nil && x.CcGenericServices != nil { + return *x.CcGenericServices + } + return Default_FileOptions_CcGenericServices +} + +func (x *FileOptions) GetJavaGenericServices() bool { + if x != nil && x.JavaGenericServices != nil { + return *x.JavaGenericServices + } + return Default_FileOptions_JavaGenericServices +} + +func (x *FileOptions) GetPyGenericServices() bool { + if x != nil && x.PyGenericServices != nil { + return *x.PyGenericServices + } + return Default_FileOptions_PyGenericServices +} + +func (x *FileOptions) GetPhpGenericServices() bool { + if x != nil && x.PhpGenericServices != nil { + return *x.PhpGenericServices + } + return Default_FileOptions_PhpGenericServices +} + +func (x *FileOptions) GetDeprecated() bool { + if x != nil && x.Deprecated != nil { + return *x.Deprecated + } + return Default_FileOptions_Deprecated +} + +func (x *FileOptions) GetCcEnableArenas() bool { + if x != nil && x.CcEnableArenas != nil { + return *x.CcEnableArenas + } + return Default_FileOptions_CcEnableArenas +} + +func (x *FileOptions) GetObjcClassPrefix() string { + if x != nil && x.ObjcClassPrefix != nil { + return *x.ObjcClassPrefix + } + return "" +} + +func (x *FileOptions) GetCsharpNamespace() string { + if x != nil && x.CsharpNamespace != nil { + return *x.CsharpNamespace + } + return "" +} + +func (x *FileOptions) GetSwiftPrefix() string { + if x != nil && x.SwiftPrefix != nil { + return *x.SwiftPrefix + } + return "" +} + +func (x *FileOptions) GetPhpClassPrefix() string { + if x != nil && x.PhpClassPrefix != nil { + return *x.PhpClassPrefix + } + return "" +} + +func (x *FileOptions) GetPhpNamespace() string { + if x != nil && x.PhpNamespace != nil { + return *x.PhpNamespace + } + return "" +} + +func (x *FileOptions) GetPhpMetadataNamespace() string { + if x != nil && x.PhpMetadataNamespace != nil { + return *x.PhpMetadataNamespace + } + return "" +} + +func (x *FileOptions) GetRubyPackage() string { + if x != nil && x.RubyPackage != nil { + return *x.RubyPackage + } + return "" +} + +func (x *FileOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + +func (x *FileOptions) GetUninterpretedOption() []*UninterpretedOption { + if x != nil { + return x.UninterpretedOption + } + return nil +} + +type MessageOptions struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Set true to use the old proto1 MessageSet wire format for extensions. + // This is provided for backwards-compatibility with the MessageSet wire + // format. You should not use this for any other reason: It's less + // efficient, has fewer features, and is more complicated. + // + // The message must be defined exactly as follows: + // + // message Foo { + // option message_set_wire_format = true; + // extensions 4 to max; + // } + // + // Note that the message cannot have any defined fields; MessageSets only + // have extensions. + // + // All extensions of your type must be singular messages; e.g. they cannot + // be int32s, enums, or repeated messages. + // + // Because this is an option, the above two restrictions are not enforced by + // the protocol compiler. + MessageSetWireFormat *bool `protobuf:"varint,1,opt,name=message_set_wire_format,json=messageSetWireFormat,def=0" json:"message_set_wire_format,omitempty"` + // Disables the generation of the standard "descriptor()" accessor, which can + // conflict with a field of the same name. This is meant to make migration + // from proto1 easier; new code should avoid fields named "descriptor". + NoStandardDescriptorAccessor *bool `protobuf:"varint,2,opt,name=no_standard_descriptor_accessor,json=noStandardDescriptorAccessor,def=0" json:"no_standard_descriptor_accessor,omitempty"` + // Is this message deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the message, or it will be completely ignored; in the very least, + // this is a formalization for deprecating messages. + Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // NOTE: Do not set the option in .proto files. Always use the maps syntax + // instead. The option should only be implicitly set by the proto compiler + // parser. + // + // Whether the message is an automatically generated map entry type for the + // maps field. + // + // For maps fields: + // + // map map_field = 1; + // + // The parsed descriptor looks like: + // + // message MapFieldEntry { + // option map_entry = true; + // optional KeyType key = 1; + // optional ValueType value = 2; + // } + // repeated MapFieldEntry map_field = 1; + // + // Implementations may choose not to generate the map_entry=true message, but + // use a native map in the target language to hold the keys and values. + // The reflection APIs in such implementations still need to work as + // if the field is a repeated message field. + MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"` + // Enable the legacy handling of JSON field name conflicts. This lowercases + // and strips underscored from the fields before comparison in proto3 only. + // The new behavior takes `json_name` into account and applies to proto2 as + // well. + // + // This should only be used as a temporary measure against broken builds due + // to the change in behavior for JSON field name conflicts. + // + // TODO This is legacy behavior we plan to remove once downstream + // teams have had time to migrate. + // + // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. + DeprecatedLegacyJsonFieldConflicts *bool `protobuf:"varint,11,opt,name=deprecated_legacy_json_field_conflicts,json=deprecatedLegacyJsonFieldConflicts" json:"deprecated_legacy_json_field_conflicts,omitempty"` + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,12,opt,name=features" json:"features,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// Default values for MessageOptions fields. +const ( + Default_MessageOptions_MessageSetWireFormat = bool(false) + Default_MessageOptions_NoStandardDescriptorAccessor = bool(false) + Default_MessageOptions_Deprecated = bool(false) +) + +func (x *MessageOptions) Reset() { + *x = MessageOptions{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MessageOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageOptions) ProtoMessage() {} + +func (x *MessageOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MessageOptions.ProtoReflect.Descriptor instead. +func (*MessageOptions) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{11} +} + +func (x *MessageOptions) GetMessageSetWireFormat() bool { + if x != nil && x.MessageSetWireFormat != nil { + return *x.MessageSetWireFormat + } + return Default_MessageOptions_MessageSetWireFormat +} + +func (x *MessageOptions) GetNoStandardDescriptorAccessor() bool { + if x != nil && x.NoStandardDescriptorAccessor != nil { + return *x.NoStandardDescriptorAccessor + } + return Default_MessageOptions_NoStandardDescriptorAccessor +} + +func (x *MessageOptions) GetDeprecated() bool { + if x != nil && x.Deprecated != nil { + return *x.Deprecated + } + return Default_MessageOptions_Deprecated +} + +func (x *MessageOptions) GetMapEntry() bool { + if x != nil && x.MapEntry != nil { + return *x.MapEntry + } + return false +} + +// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. +func (x *MessageOptions) GetDeprecatedLegacyJsonFieldConflicts() bool { + if x != nil && x.DeprecatedLegacyJsonFieldConflicts != nil { + return *x.DeprecatedLegacyJsonFieldConflicts + } + return false +} + +func (x *MessageOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + +func (x *MessageOptions) GetUninterpretedOption() []*UninterpretedOption { + if x != nil { + return x.UninterpretedOption + } + return nil +} + +type FieldOptions struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The ctype option instructs the C++ code generator to use a different + // representation of the field than it normally would. See the specific + // options below. This option is only implemented to support use of + // [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of + // type "bytes" in the open source release -- sorry, we'll try to include + // other types in a future version! + Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0" json:"ctype,omitempty"` + // The packed option can be enabled for repeated primitive fields to enable + // a more efficient representation on the wire. Rather than repeatedly + // writing the tag and type for each element, the entire array is encoded as + // a single length-delimited blob. In proto3, only explicit setting it to + // false will avoid using packed encoding. This option is prohibited in + // Editions, but the `repeated_field_encoding` feature can be used to control + // the behavior. + Packed *bool `protobuf:"varint,2,opt,name=packed" json:"packed,omitempty"` + // The jstype option determines the JavaScript type used for values of the + // field. The option is permitted only for 64 bit integral and fixed types + // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + // is represented as JavaScript string, which avoids loss of precision that + // can happen when a large value is converted to a floating point JavaScript. + // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + // use the JavaScript "number" type. The behavior of the default option + // JS_NORMAL is implementation dependent. + // + // This option is an enum to permit additional types to be added, e.g. + // goog.math.Integer. + Jstype *FieldOptions_JSType `protobuf:"varint,6,opt,name=jstype,enum=google.protobuf.FieldOptions_JSType,def=0" json:"jstype,omitempty"` + // Should this field be parsed lazily? Lazy applies only to message-type + // fields. It means that when the outer message is initially parsed, the + // inner message's contents will not be parsed but instead stored in encoded + // form. The inner message will actually be parsed when it is first accessed. + // + // This is only a hint. Implementations are free to choose whether to use + // eager or lazy parsing regardless of the value of this option. However, + // setting this option true suggests that the protocol author believes that + // using lazy parsing on this field is worth the additional bookkeeping + // overhead typically needed to implement it. + // + // This option does not affect the public interface of any generated code; + // all method signatures remain the same. Furthermore, thread-safety of the + // interface is not affected by this option; const methods remain safe to + // call from multiple threads concurrently, while non-const methods continue + // to require exclusive access. + // + // Note that implementations may choose not to check required fields within + // a lazy sub-message. That is, calling IsInitialized() on the outer message + // may return true even if the inner message has missing required fields. + // This is necessary because otherwise the inner message would have to be + // parsed in order to perform the check, defeating the purpose of lazy + // parsing. An implementation which chooses not to check required fields + // must be consistent about it. That is, for any particular sub-message, the + // implementation must either *always* check its required fields, or *never* + // check its required fields, regardless of whether or not the message has + // been parsed. + // + // As of May 2022, lazy verifies the contents of the byte stream during + // parsing. An invalid byte stream will cause the overall parsing to fail. + Lazy *bool `protobuf:"varint,5,opt,name=lazy,def=0" json:"lazy,omitempty"` + // unverified_lazy does no correctness checks on the byte stream. This should + // only be used where lazy with verification is prohibitive for performance + // reasons. + UnverifiedLazy *bool `protobuf:"varint,15,opt,name=unverified_lazy,json=unverifiedLazy,def=0" json:"unverified_lazy,omitempty"` + // Is this field deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for accessors, or it will be completely ignored; in the very least, this + // is a formalization for deprecating fields. + Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // For Google-internal migration only. Do not use. + Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"` + // Indicate that the field value should not be printed out when using debug + // formats, e.g. when the field contains sensitive credentials. + DebugRedact *bool `protobuf:"varint,16,opt,name=debug_redact,json=debugRedact,def=0" json:"debug_redact,omitempty"` + Retention *FieldOptions_OptionRetention `protobuf:"varint,17,opt,name=retention,enum=google.protobuf.FieldOptions_OptionRetention" json:"retention,omitempty"` + Targets []FieldOptions_OptionTargetType `protobuf:"varint,19,rep,name=targets,enum=google.protobuf.FieldOptions_OptionTargetType" json:"targets,omitempty"` + EditionDefaults []*FieldOptions_EditionDefault `protobuf:"bytes,20,rep,name=edition_defaults,json=editionDefaults" json:"edition_defaults,omitempty"` + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,21,opt,name=features" json:"features,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// Default values for FieldOptions fields. +const ( + Default_FieldOptions_Ctype = FieldOptions_STRING + Default_FieldOptions_Jstype = FieldOptions_JS_NORMAL + Default_FieldOptions_Lazy = bool(false) + Default_FieldOptions_UnverifiedLazy = bool(false) + Default_FieldOptions_Deprecated = bool(false) + Default_FieldOptions_Weak = bool(false) + Default_FieldOptions_DebugRedact = bool(false) +) + +func (x *FieldOptions) Reset() { + *x = FieldOptions{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FieldOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldOptions) ProtoMessage() {} + +func (x *FieldOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldOptions.ProtoReflect.Descriptor instead. +func (*FieldOptions) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12} +} + +func (x *FieldOptions) GetCtype() FieldOptions_CType { + if x != nil && x.Ctype != nil { + return *x.Ctype + } + return Default_FieldOptions_Ctype +} + +func (x *FieldOptions) GetPacked() bool { + if x != nil && x.Packed != nil { + return *x.Packed + } + return false +} + +func (x *FieldOptions) GetJstype() FieldOptions_JSType { + if x != nil && x.Jstype != nil { + return *x.Jstype + } + return Default_FieldOptions_Jstype +} + +func (x *FieldOptions) GetLazy() bool { + if x != nil && x.Lazy != nil { + return *x.Lazy + } + return Default_FieldOptions_Lazy +} + +func (x *FieldOptions) GetUnverifiedLazy() bool { + if x != nil && x.UnverifiedLazy != nil { + return *x.UnverifiedLazy + } + return Default_FieldOptions_UnverifiedLazy +} + +func (x *FieldOptions) GetDeprecated() bool { + if x != nil && x.Deprecated != nil { + return *x.Deprecated + } + return Default_FieldOptions_Deprecated +} + +func (x *FieldOptions) GetWeak() bool { + if x != nil && x.Weak != nil { + return *x.Weak + } + return Default_FieldOptions_Weak +} + +func (x *FieldOptions) GetDebugRedact() bool { + if x != nil && x.DebugRedact != nil { + return *x.DebugRedact + } + return Default_FieldOptions_DebugRedact +} + +func (x *FieldOptions) GetRetention() FieldOptions_OptionRetention { + if x != nil && x.Retention != nil { + return *x.Retention + } + return FieldOptions_RETENTION_UNKNOWN +} + +func (x *FieldOptions) GetTargets() []FieldOptions_OptionTargetType { + if x != nil { + return x.Targets + } + return nil +} + +func (x *FieldOptions) GetEditionDefaults() []*FieldOptions_EditionDefault { + if x != nil { + return x.EditionDefaults + } + return nil +} + +func (x *FieldOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + +func (x *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { + if x != nil { + return x.UninterpretedOption + } + return nil +} + +type OneofOptions struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,1,opt,name=features" json:"features,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OneofOptions) Reset() { + *x = OneofOptions{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OneofOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OneofOptions) ProtoMessage() {} + +func (x *OneofOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OneofOptions.ProtoReflect.Descriptor instead. +func (*OneofOptions) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{13} +} + +func (x *OneofOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + +func (x *OneofOptions) GetUninterpretedOption() []*UninterpretedOption { + if x != nil { + return x.UninterpretedOption + } + return nil +} + +type EnumOptions struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Set this option to true to allow mapping different tag names to the same + // value. + AllowAlias *bool `protobuf:"varint,2,opt,name=allow_alias,json=allowAlias" json:"allow_alias,omitempty"` + // Is this enum deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum, or it will be completely ignored; in the very least, this + // is a formalization for deprecating enums. + Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // Enable the legacy handling of JSON field name conflicts. This lowercases + // and strips underscored from the fields before comparison in proto3 only. + // The new behavior takes `json_name` into account and applies to proto2 as + // well. + // TODO Remove this legacy behavior once downstream teams have + // had time to migrate. + // + // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. + DeprecatedLegacyJsonFieldConflicts *bool `protobuf:"varint,6,opt,name=deprecated_legacy_json_field_conflicts,json=deprecatedLegacyJsonFieldConflicts" json:"deprecated_legacy_json_field_conflicts,omitempty"` + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,7,opt,name=features" json:"features,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// Default values for EnumOptions fields. +const ( + Default_EnumOptions_Deprecated = bool(false) +) + +func (x *EnumOptions) Reset() { + *x = EnumOptions{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnumOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnumOptions) ProtoMessage() {} + +func (x *EnumOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnumOptions.ProtoReflect.Descriptor instead. +func (*EnumOptions) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{14} +} + +func (x *EnumOptions) GetAllowAlias() bool { + if x != nil && x.AllowAlias != nil { + return *x.AllowAlias + } + return false +} + +func (x *EnumOptions) GetDeprecated() bool { + if x != nil && x.Deprecated != nil { + return *x.Deprecated + } + return Default_EnumOptions_Deprecated +} + +// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. +func (x *EnumOptions) GetDeprecatedLegacyJsonFieldConflicts() bool { + if x != nil && x.DeprecatedLegacyJsonFieldConflicts != nil { + return *x.DeprecatedLegacyJsonFieldConflicts + } + return false +} + +func (x *EnumOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + +func (x *EnumOptions) GetUninterpretedOption() []*UninterpretedOption { + if x != nil { + return x.UninterpretedOption + } + return nil +} + +type EnumValueOptions struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Is this enum value deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum value, or it will be completely ignored; in the very least, + // this is a formalization for deprecating enum values. + Deprecated *bool `protobuf:"varint,1,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,2,opt,name=features" json:"features,omitempty"` + // Indicate that fields annotated with this enum value should not be printed + // out when using debug formats, e.g. when the field contains sensitive + // credentials. + DebugRedact *bool `protobuf:"varint,3,opt,name=debug_redact,json=debugRedact,def=0" json:"debug_redact,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// Default values for EnumValueOptions fields. +const ( + Default_EnumValueOptions_Deprecated = bool(false) + Default_EnumValueOptions_DebugRedact = bool(false) +) + +func (x *EnumValueOptions) Reset() { + *x = EnumValueOptions{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnumValueOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnumValueOptions) ProtoMessage() {} + +func (x *EnumValueOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnumValueOptions.ProtoReflect.Descriptor instead. +func (*EnumValueOptions) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{15} +} + +func (x *EnumValueOptions) GetDeprecated() bool { + if x != nil && x.Deprecated != nil { + return *x.Deprecated + } + return Default_EnumValueOptions_Deprecated +} + +func (x *EnumValueOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + +func (x *EnumValueOptions) GetDebugRedact() bool { + if x != nil && x.DebugRedact != nil { + return *x.DebugRedact + } + return Default_EnumValueOptions_DebugRedact +} + +func (x *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { + if x != nil { + return x.UninterpretedOption + } + return nil +} + +type ServiceOptions struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,34,opt,name=features" json:"features,omitempty"` + // Is this service deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the service, or it will be completely ignored; in the very least, + // this is a formalization for deprecating services. + Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// Default values for ServiceOptions fields. +const ( + Default_ServiceOptions_Deprecated = bool(false) +) + +func (x *ServiceOptions) Reset() { + *x = ServiceOptions{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ServiceOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceOptions) ProtoMessage() {} + +func (x *ServiceOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceOptions.ProtoReflect.Descriptor instead. +func (*ServiceOptions) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{16} +} + +func (x *ServiceOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + +func (x *ServiceOptions) GetDeprecated() bool { + if x != nil && x.Deprecated != nil { + return *x.Deprecated + } + return Default_ServiceOptions_Deprecated +} + +func (x *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption { + if x != nil { + return x.UninterpretedOption + } + return nil +} + +type MethodOptions struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Is this method deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the method, or it will be completely ignored; in the very least, + // this is a formalization for deprecating methods. + Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + IdempotencyLevel *MethodOptions_IdempotencyLevel `protobuf:"varint,34,opt,name=idempotency_level,json=idempotencyLevel,enum=google.protobuf.MethodOptions_IdempotencyLevel,def=0" json:"idempotency_level,omitempty"` + // Any features defined in the specific edition. + Features *FeatureSet `protobuf:"bytes,35,opt,name=features" json:"features,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// Default values for MethodOptions fields. +const ( + Default_MethodOptions_Deprecated = bool(false) + Default_MethodOptions_IdempotencyLevel = MethodOptions_IDEMPOTENCY_UNKNOWN +) + +func (x *MethodOptions) Reset() { + *x = MethodOptions{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MethodOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MethodOptions) ProtoMessage() {} + +func (x *MethodOptions) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MethodOptions.ProtoReflect.Descriptor instead. +func (*MethodOptions) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{17} +} + +func (x *MethodOptions) GetDeprecated() bool { + if x != nil && x.Deprecated != nil { + return *x.Deprecated + } + return Default_MethodOptions_Deprecated +} + +func (x *MethodOptions) GetIdempotencyLevel() MethodOptions_IdempotencyLevel { + if x != nil && x.IdempotencyLevel != nil { + return *x.IdempotencyLevel + } + return Default_MethodOptions_IdempotencyLevel +} + +func (x *MethodOptions) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + +func (x *MethodOptions) GetUninterpretedOption() []*UninterpretedOption { + if x != nil { + return x.UninterpretedOption + } + return nil +} + +// A message representing a option the parser does not recognize. This only +// appears in options protos created by the compiler::Parser class. +// DescriptorPool resolves these when building Descriptor objects. Therefore, +// options protos in descriptor objects (e.g. returned by Descriptor::options(), +// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions +// in them. +type UninterpretedOption struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"` + // The value of the uninterpreted option, in whatever type the tokenizer + // identified it as during parsing. Exactly one of these should be set. + IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"` + PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value,json=positiveIntValue" json:"positive_int_value,omitempty"` + NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value,json=negativeIntValue" json:"negative_int_value,omitempty"` + DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"` + StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` + AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UninterpretedOption) Reset() { + *x = UninterpretedOption{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UninterpretedOption) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UninterpretedOption) ProtoMessage() {} + +func (x *UninterpretedOption) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UninterpretedOption.ProtoReflect.Descriptor instead. +func (*UninterpretedOption) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{18} +} + +func (x *UninterpretedOption) GetName() []*UninterpretedOption_NamePart { + if x != nil { + return x.Name + } + return nil +} + +func (x *UninterpretedOption) GetIdentifierValue() string { + if x != nil && x.IdentifierValue != nil { + return *x.IdentifierValue + } + return "" +} + +func (x *UninterpretedOption) GetPositiveIntValue() uint64 { + if x != nil && x.PositiveIntValue != nil { + return *x.PositiveIntValue + } + return 0 +} + +func (x *UninterpretedOption) GetNegativeIntValue() int64 { + if x != nil && x.NegativeIntValue != nil { + return *x.NegativeIntValue + } + return 0 +} + +func (x *UninterpretedOption) GetDoubleValue() float64 { + if x != nil && x.DoubleValue != nil { + return *x.DoubleValue + } + return 0 +} + +func (x *UninterpretedOption) GetStringValue() []byte { + if x != nil { + return x.StringValue + } + return nil +} + +func (x *UninterpretedOption) GetAggregateValue() string { + if x != nil && x.AggregateValue != nil { + return *x.AggregateValue + } + return "" +} + +// TODO Enums in C++ gencode (and potentially other languages) are +// not well scoped. This means that each of the feature enums below can clash +// with each other. The short names we've chosen maximize call-site +// readability, but leave us very open to this scenario. A future feature will +// be designed and implemented to handle this, hopefully before we ever hit a +// conflict here. +type FeatureSet struct { + state protoimpl.MessageState `protogen:"open.v1"` + FieldPresence *FeatureSet_FieldPresence `protobuf:"varint,1,opt,name=field_presence,json=fieldPresence,enum=google.protobuf.FeatureSet_FieldPresence" json:"field_presence,omitempty"` + EnumType *FeatureSet_EnumType `protobuf:"varint,2,opt,name=enum_type,json=enumType,enum=google.protobuf.FeatureSet_EnumType" json:"enum_type,omitempty"` + RepeatedFieldEncoding *FeatureSet_RepeatedFieldEncoding `protobuf:"varint,3,opt,name=repeated_field_encoding,json=repeatedFieldEncoding,enum=google.protobuf.FeatureSet_RepeatedFieldEncoding" json:"repeated_field_encoding,omitempty"` + Utf8Validation *FeatureSet_Utf8Validation `protobuf:"varint,4,opt,name=utf8_validation,json=utf8Validation,enum=google.protobuf.FeatureSet_Utf8Validation" json:"utf8_validation,omitempty"` + MessageEncoding *FeatureSet_MessageEncoding `protobuf:"varint,5,opt,name=message_encoding,json=messageEncoding,enum=google.protobuf.FeatureSet_MessageEncoding" json:"message_encoding,omitempty"` + JsonFormat *FeatureSet_JsonFormat `protobuf:"varint,6,opt,name=json_format,json=jsonFormat,enum=google.protobuf.FeatureSet_JsonFormat" json:"json_format,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FeatureSet) Reset() { + *x = FeatureSet{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FeatureSet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeatureSet) ProtoMessage() {} + +func (x *FeatureSet) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FeatureSet.ProtoReflect.Descriptor instead. +func (*FeatureSet) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19} +} + +func (x *FeatureSet) GetFieldPresence() FeatureSet_FieldPresence { + if x != nil && x.FieldPresence != nil { + return *x.FieldPresence + } + return FeatureSet_FIELD_PRESENCE_UNKNOWN +} + +func (x *FeatureSet) GetEnumType() FeatureSet_EnumType { + if x != nil && x.EnumType != nil { + return *x.EnumType + } + return FeatureSet_ENUM_TYPE_UNKNOWN +} + +func (x *FeatureSet) GetRepeatedFieldEncoding() FeatureSet_RepeatedFieldEncoding { + if x != nil && x.RepeatedFieldEncoding != nil { + return *x.RepeatedFieldEncoding + } + return FeatureSet_REPEATED_FIELD_ENCODING_UNKNOWN +} + +func (x *FeatureSet) GetUtf8Validation() FeatureSet_Utf8Validation { + if x != nil && x.Utf8Validation != nil { + return *x.Utf8Validation + } + return FeatureSet_UTF8_VALIDATION_UNKNOWN +} + +func (x *FeatureSet) GetMessageEncoding() FeatureSet_MessageEncoding { + if x != nil && x.MessageEncoding != nil { + return *x.MessageEncoding + } + return FeatureSet_MESSAGE_ENCODING_UNKNOWN +} + +func (x *FeatureSet) GetJsonFormat() FeatureSet_JsonFormat { + if x != nil && x.JsonFormat != nil { + return *x.JsonFormat + } + return FeatureSet_JSON_FORMAT_UNKNOWN +} + +// A compiled specification for the defaults of a set of features. These +// messages are generated from FeatureSet extensions and can be used to seed +// feature resolution. The resolution with this object becomes a simple search +// for the closest matching edition, followed by proto merges. +type FeatureSetDefaults struct { + state protoimpl.MessageState `protogen:"open.v1"` + Defaults []*FeatureSetDefaults_FeatureSetEditionDefault `protobuf:"bytes,1,rep,name=defaults" json:"defaults,omitempty"` + // The minimum supported edition (inclusive) when this was constructed. + // Editions before this will not have defaults. + MinimumEdition *Edition `protobuf:"varint,4,opt,name=minimum_edition,json=minimumEdition,enum=google.protobuf.Edition" json:"minimum_edition,omitempty"` + // The maximum known edition (inclusive) when this was constructed. Editions + // after this will not have reliable defaults. + MaximumEdition *Edition `protobuf:"varint,5,opt,name=maximum_edition,json=maximumEdition,enum=google.protobuf.Edition" json:"maximum_edition,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FeatureSetDefaults) Reset() { + *x = FeatureSetDefaults{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FeatureSetDefaults) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeatureSetDefaults) ProtoMessage() {} + +func (x *FeatureSetDefaults) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FeatureSetDefaults.ProtoReflect.Descriptor instead. +func (*FeatureSetDefaults) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20} +} + +func (x *FeatureSetDefaults) GetDefaults() []*FeatureSetDefaults_FeatureSetEditionDefault { + if x != nil { + return x.Defaults + } + return nil +} + +func (x *FeatureSetDefaults) GetMinimumEdition() Edition { + if x != nil && x.MinimumEdition != nil { + return *x.MinimumEdition + } + return Edition_EDITION_UNKNOWN +} + +func (x *FeatureSetDefaults) GetMaximumEdition() Edition { + if x != nil && x.MaximumEdition != nil { + return *x.MaximumEdition + } + return Edition_EDITION_UNKNOWN +} + +// Encapsulates information about the original source file from which a +// FileDescriptorProto was generated. +type SourceCodeInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A Location identifies a piece of source code in a .proto file which + // corresponds to a particular definition. This information is intended + // to be useful to IDEs, code indexers, documentation generators, and similar + // tools. + // + // For example, say we have a file like: + // + // message Foo { + // optional string foo = 1; + // } + // + // Let's look at just the field definition: + // + // optional string foo = 1; + // ^ ^^ ^^ ^ ^^^ + // a bc de f ghi + // + // We have the following locations: + // + // span path represents + // [a,i) [ 4, 0, 2, 0 ] The whole field definition. + // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + // + // Notes: + // - A location may refer to a repeated field itself (i.e. not to any + // particular index within it). This is used whenever a set of elements are + // logically enclosed in a single code segment. For example, an entire + // extend block (possibly containing multiple extension definitions) will + // have an outer location whose path refers to the "extensions" repeated + // field without an index. + // - Multiple locations may have the same path. This happens when a single + // logical declaration is spread out across multiple places. The most + // obvious example is the "extend" block again -- there may be multiple + // extend blocks in the same scope, each of which will have the same path. + // - A location's span is not always a subset of its parent's span. For + // example, the "extendee" of an extension declaration appears at the + // beginning of the "extend" block and is shared by all extensions within + // the block. + // - Just because a location's span is a subset of some other location's span + // does not mean that it is a descendant. For example, a "group" defines + // both a type and a field in a single declaration. Thus, the locations + // corresponding to the type and field and their components will overlap. + // - Code which tries to interpret locations should probably be designed to + // ignore those that it doesn't understand, as more types of locations could + // be recorded in the future. + Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SourceCodeInfo) Reset() { + *x = SourceCodeInfo{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SourceCodeInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SourceCodeInfo) ProtoMessage() {} + +func (x *SourceCodeInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SourceCodeInfo.ProtoReflect.Descriptor instead. +func (*SourceCodeInfo) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{21} +} + +func (x *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location { + if x != nil { + return x.Location + } + return nil +} + +// Describes the relationship between generated code and its original source +// file. A GeneratedCodeInfo message is associated with only one generated +// source file, but may contain references to different source .proto files. +type GeneratedCodeInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + // An Annotation connects some span of text in generated code to an element + // of its generating .proto file. + Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GeneratedCodeInfo) Reset() { + *x = GeneratedCodeInfo{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GeneratedCodeInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GeneratedCodeInfo) ProtoMessage() {} + +func (x *GeneratedCodeInfo) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GeneratedCodeInfo.ProtoReflect.Descriptor instead. +func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{22} +} + +func (x *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation { + if x != nil { + return x.Annotation + } + return nil +} + +type DescriptorProto_ExtensionRange struct { + state protoimpl.MessageState `protogen:"open.v1"` + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. + Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescriptorProto_ExtensionRange) Reset() { + *x = DescriptorProto_ExtensionRange{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescriptorProto_ExtensionRange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescriptorProto_ExtensionRange) ProtoMessage() {} + +func (x *DescriptorProto_ExtensionRange) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescriptorProto_ExtensionRange.ProtoReflect.Descriptor instead. +func (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *DescriptorProto_ExtensionRange) GetStart() int32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *DescriptorProto_ExtensionRange) GetEnd() int32 { + if x != nil && x.End != nil { + return *x.End + } + return 0 +} + +func (x *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions { + if x != nil { + return x.Options + } + return nil +} + +// Range of reserved tag numbers. Reserved tag numbers may not be used by +// fields or extension ranges in the same message. Reserved ranges may +// not overlap. +type DescriptorProto_ReservedRange struct { + state protoimpl.MessageState `protogen:"open.v1"` + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Exclusive. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescriptorProto_ReservedRange) Reset() { + *x = DescriptorProto_ReservedRange{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescriptorProto_ReservedRange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescriptorProto_ReservedRange) ProtoMessage() {} + +func (x *DescriptorProto_ReservedRange) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescriptorProto_ReservedRange.ProtoReflect.Descriptor instead. +func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *DescriptorProto_ReservedRange) GetStart() int32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *DescriptorProto_ReservedRange) GetEnd() int32 { + if x != nil && x.End != nil { + return *x.End + } + return 0 +} + +type ExtensionRangeOptions_Declaration struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The extension number declared within the extension range. + Number *int32 `protobuf:"varint,1,opt,name=number" json:"number,omitempty"` + // The fully-qualified name of the extension field. There must be a leading + // dot in front of the full name. + FullName *string `protobuf:"bytes,2,opt,name=full_name,json=fullName" json:"full_name,omitempty"` + // The fully-qualified type name of the extension field. Unlike + // Metadata.type, Declaration.type must have a leading dot for messages + // and enums. + Type *string `protobuf:"bytes,3,opt,name=type" json:"type,omitempty"` + // If true, indicates that the number is reserved in the extension range, + // and any extension field with the number will fail to compile. Set this + // when a declared extension field is deleted. + Reserved *bool `protobuf:"varint,5,opt,name=reserved" json:"reserved,omitempty"` + // If true, indicates that the extension must be defined as repeated. + // Otherwise the extension must be defined as optional. + Repeated *bool `protobuf:"varint,6,opt,name=repeated" json:"repeated,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExtensionRangeOptions_Declaration) Reset() { + *x = ExtensionRangeOptions_Declaration{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExtensionRangeOptions_Declaration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExtensionRangeOptions_Declaration) ProtoMessage() {} + +func (x *ExtensionRangeOptions_Declaration) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExtensionRangeOptions_Declaration.ProtoReflect.Descriptor instead. +func (*ExtensionRangeOptions_Declaration) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *ExtensionRangeOptions_Declaration) GetNumber() int32 { + if x != nil && x.Number != nil { + return *x.Number + } + return 0 +} + +func (x *ExtensionRangeOptions_Declaration) GetFullName() string { + if x != nil && x.FullName != nil { + return *x.FullName + } + return "" +} + +func (x *ExtensionRangeOptions_Declaration) GetType() string { + if x != nil && x.Type != nil { + return *x.Type + } + return "" +} + +func (x *ExtensionRangeOptions_Declaration) GetReserved() bool { + if x != nil && x.Reserved != nil { + return *x.Reserved + } + return false +} + +func (x *ExtensionRangeOptions_Declaration) GetRepeated() bool { + if x != nil && x.Repeated != nil { + return *x.Repeated + } + return false +} + +// Range of reserved numeric values. Reserved values may not be used by +// entries in the same enum. Reserved ranges may not overlap. +// +// Note that this is distinct from DescriptorProto.ReservedRange in that it +// is inclusive such that it can appropriately represent the entire int32 +// domain. +type EnumDescriptorProto_EnumReservedRange struct { + state protoimpl.MessageState `protogen:"open.v1"` + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` // Inclusive. + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` // Inclusive. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnumDescriptorProto_EnumReservedRange) Reset() { + *x = EnumDescriptorProto_EnumReservedRange{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnumDescriptorProto_EnumReservedRange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {} + +func (x *EnumDescriptorProto_EnumReservedRange) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnumDescriptorProto_EnumReservedRange.ProtoReflect.Descriptor instead. +func (*EnumDescriptorProto_EnumReservedRange) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{6, 0} +} + +func (x *EnumDescriptorProto_EnumReservedRange) GetStart() int32 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 { + if x != nil && x.End != nil { + return *x.End + } + return 0 +} + +type FieldOptions_EditionDefault struct { + state protoimpl.MessageState `protogen:"open.v1"` + Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` + Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` // Textproto value. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FieldOptions_EditionDefault) Reset() { + *x = FieldOptions_EditionDefault{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FieldOptions_EditionDefault) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldOptions_EditionDefault) ProtoMessage() {} + +func (x *FieldOptions_EditionDefault) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldOptions_EditionDefault.ProtoReflect.Descriptor instead. +func (*FieldOptions_EditionDefault) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12, 0} +} + +func (x *FieldOptions_EditionDefault) GetEdition() Edition { + if x != nil && x.Edition != nil { + return *x.Edition + } + return Edition_EDITION_UNKNOWN +} + +func (x *FieldOptions_EditionDefault) GetValue() string { + if x != nil && x.Value != nil { + return *x.Value + } + return "" +} + +// The name of the uninterpreted option. Each string represents a segment in +// a dot-separated name. is_extension is true iff a segment represents an +// extension (denoted with parentheses in options specs in .proto files). +// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents +// "foo.(bar.baz).moo". +type UninterpretedOption_NamePart struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"` + IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UninterpretedOption_NamePart) Reset() { + *x = UninterpretedOption_NamePart{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UninterpretedOption_NamePart) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UninterpretedOption_NamePart) ProtoMessage() {} + +func (x *UninterpretedOption_NamePart) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UninterpretedOption_NamePart.ProtoReflect.Descriptor instead. +func (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{18, 0} +} + +func (x *UninterpretedOption_NamePart) GetNamePart() string { + if x != nil && x.NamePart != nil { + return *x.NamePart + } + return "" +} + +func (x *UninterpretedOption_NamePart) GetIsExtension() bool { + if x != nil && x.IsExtension != nil { + return *x.IsExtension + } + return false +} + +// A map from every known edition with a unique set of defaults to its +// defaults. Not all editions may be contained here. For a given edition, +// the defaults at the closest matching edition ordered at or before it should +// be used. This field must be in strict ascending order by edition. +type FeatureSetDefaults_FeatureSetEditionDefault struct { + state protoimpl.MessageState `protogen:"open.v1"` + Edition *Edition `protobuf:"varint,3,opt,name=edition,enum=google.protobuf.Edition" json:"edition,omitempty"` + Features *FeatureSet `protobuf:"bytes,2,opt,name=features" json:"features,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FeatureSetDefaults_FeatureSetEditionDefault) Reset() { + *x = FeatureSetDefaults_FeatureSetEditionDefault{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FeatureSetDefaults_FeatureSetEditionDefault) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeatureSetDefaults_FeatureSetEditionDefault) ProtoMessage() {} + +func (x *FeatureSetDefaults_FeatureSetEditionDefault) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FeatureSetDefaults_FeatureSetEditionDefault.ProtoReflect.Descriptor instead. +func (*FeatureSetDefaults_FeatureSetEditionDefault) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20, 0} +} + +func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetEdition() Edition { + if x != nil && x.Edition != nil { + return *x.Edition + } + return Edition_EDITION_UNKNOWN +} + +func (x *FeatureSetDefaults_FeatureSetEditionDefault) GetFeatures() *FeatureSet { + if x != nil { + return x.Features + } + return nil +} + +type SourceCodeInfo_Location struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Identifies which part of the FileDescriptorProto was defined at this + // location. + // + // Each element is a field number or an index. They form a path from + // the root FileDescriptorProto to the place where the definition occurs. + // For example, this path: + // + // [ 4, 3, 2, 7, 1 ] + // + // refers to: + // + // file.message_type(3) // 4, 3 + // .field(7) // 2, 7 + // .name() // 1 + // + // This is because FileDescriptorProto.message_type has field number 4: + // + // repeated DescriptorProto message_type = 4; + // + // and DescriptorProto.field has field number 2: + // + // repeated FieldDescriptorProto field = 2; + // + // and FieldDescriptorProto.name has field number 1: + // + // optional string name = 1; + // + // Thus, the above path gives the location of a field name. If we removed + // the last element: + // + // [ 4, 3, 2, 7 ] + // + // this path refers to the whole field declaration (from the beginning + // of the label to the terminating semicolon). + Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` + // Always has exactly three or four elements: start line, start column, + // end line (optional, otherwise assumed same as start line), end column. + // These are packed into a single field for efficiency. Note that line + // and column numbers are zero-based -- typically you will want to add + // 1 to each before displaying to a user. + Span []int32 `protobuf:"varint,2,rep,packed,name=span" json:"span,omitempty"` + // If this SourceCodeInfo represents a complete declaration, these are any + // comments appearing before and after the declaration which appear to be + // attached to the declaration. + // + // A series of line comments appearing on consecutive lines, with no other + // tokens appearing on those lines, will be treated as a single comment. + // + // leading_detached_comments will keep paragraphs of comments that appear + // before (but not connected to) the current element. Each paragraph, + // separated by empty lines, will be one comment element in the repeated + // field. + // + // Only the comment content is provided; comment markers (e.g. //) are + // stripped out. For block comments, leading whitespace and an asterisk + // will be stripped from the beginning of each line other than the first. + // Newlines are included in the output. + // + // Examples: + // + // optional int32 foo = 1; // Comment attached to foo. + // // Comment attached to bar. + // optional int32 bar = 2; + // + // optional string baz = 3; + // // Comment attached to baz. + // // Another line attached to baz. + // + // // Comment attached to moo. + // // + // // Another line attached to moo. + // optional double moo = 4; + // + // // Detached comment for corge. This is not leading or trailing comments + // // to moo or corge because there are blank lines separating it from + // // both. + // + // // Detached comment for corge paragraph 2. + // + // optional string corge = 5; + // /* Block comment attached + // * to corge. Leading asterisks + // * will be removed. */ + // /* Block comment attached to + // * grault. */ + // optional int32 grault = 6; + // + // // ignored detached comments. + LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"` + TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"` + LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SourceCodeInfo_Location) Reset() { + *x = SourceCodeInfo_Location{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SourceCodeInfo_Location) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SourceCodeInfo_Location) ProtoMessage() {} + +func (x *SourceCodeInfo_Location) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SourceCodeInfo_Location.ProtoReflect.Descriptor instead. +func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{21, 0} +} + +func (x *SourceCodeInfo_Location) GetPath() []int32 { + if x != nil { + return x.Path + } + return nil +} + +func (x *SourceCodeInfo_Location) GetSpan() []int32 { + if x != nil { + return x.Span + } + return nil +} + +func (x *SourceCodeInfo_Location) GetLeadingComments() string { + if x != nil && x.LeadingComments != nil { + return *x.LeadingComments + } + return "" +} + +func (x *SourceCodeInfo_Location) GetTrailingComments() string { + if x != nil && x.TrailingComments != nil { + return *x.TrailingComments + } + return "" +} + +func (x *SourceCodeInfo_Location) GetLeadingDetachedComments() []string { + if x != nil { + return x.LeadingDetachedComments + } + return nil +} + +type GeneratedCodeInfo_Annotation struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Identifies the element in the original source .proto file. This field + // is formatted the same as SourceCodeInfo.Location.path. + Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` + // Identifies the filesystem path to the original source .proto. + SourceFile *string `protobuf:"bytes,2,opt,name=source_file,json=sourceFile" json:"source_file,omitempty"` + // Identifies the starting offset in bytes in the generated code + // that relates to the identified object. + Begin *int32 `protobuf:"varint,3,opt,name=begin" json:"begin,omitempty"` + // Identifies the ending offset in bytes in the generated code that + // relates to the identified object. The end offset should be one past + // the last relevant byte (so the length of the text = end - begin). + End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` + Semantic *GeneratedCodeInfo_Annotation_Semantic `protobuf:"varint,5,opt,name=semantic,enum=google.protobuf.GeneratedCodeInfo_Annotation_Semantic" json:"semantic,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GeneratedCodeInfo_Annotation) Reset() { + *x = GeneratedCodeInfo_Annotation{} + mi := &file_google_protobuf_descriptor_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GeneratedCodeInfo_Annotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GeneratedCodeInfo_Annotation) ProtoMessage() {} + +func (x *GeneratedCodeInfo_Annotation) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_descriptor_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GeneratedCodeInfo_Annotation.ProtoReflect.Descriptor instead. +func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) { + return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{22, 0} +} + +func (x *GeneratedCodeInfo_Annotation) GetPath() []int32 { + if x != nil { + return x.Path + } + return nil +} + +func (x *GeneratedCodeInfo_Annotation) GetSourceFile() string { + if x != nil && x.SourceFile != nil { + return *x.SourceFile + } + return "" +} + +func (x *GeneratedCodeInfo_Annotation) GetBegin() int32 { + if x != nil && x.Begin != nil { + return *x.Begin + } + return 0 +} + +func (x *GeneratedCodeInfo_Annotation) GetEnd() int32 { + if x != nil && x.End != nil { + return *x.End + } + return 0 +} + +func (x *GeneratedCodeInfo_Annotation) GetSemantic() GeneratedCodeInfo_Annotation_Semantic { + if x != nil && x.Semantic != nil { + return *x.Semantic + } + return GeneratedCodeInfo_Annotation_NONE +} + +var File_google_protobuf_descriptor_proto protoreflect.FileDescriptor + +var file_google_protobuf_descriptor_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x22, 0x4d, 0x0a, 0x11, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x12, 0x38, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x04, 0x66, 0x69, + 0x6c, 0x65, 0x22, 0x98, 0x05, 0x0a, 0x13, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0a, 0x20, + 0x03, 0x28, 0x05, 0x52, 0x10, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x44, 0x65, 0x70, 0x65, 0x6e, + 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x65, 0x61, 0x6b, 0x5f, 0x64, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0e, + 0x77, 0x65, 0x61, 0x6b, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x43, + 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, + 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, + 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x49, 0x0a, 0x10, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xb9, 0x06, + 0x0a, 0x0f, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x05, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x12, 0x43, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x09, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, + 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, 0x0a, + 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x65, 0x6e, + 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, + 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, + 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, + 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x63, 0x6c, 0x12, 0x39, 0x0a, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x55, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x7a, 0x0a, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x40, + 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x1a, 0x37, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xc7, 0x04, 0x0a, 0x15, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, + 0x0b, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, + 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x6c, 0x61, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0x88, 0x01, 0x02, 0x52, 0x0b, 0x64, 0x65, 0x63, + 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x12, 0x68, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x3a, 0x0a, 0x55, 0x4e, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x52, 0x0c, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x94, 0x01, 0x0a, 0x0b, + 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x04, 0x08, 0x04, + 0x10, 0x05, 0x22, 0x34, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x45, 0x43, 0x4c, 0x41, + 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x55, 0x4e, 0x56, 0x45, + 0x52, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, + 0x80, 0x80, 0x02, 0x22, 0xc1, 0x06, 0x0a, 0x14, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x3e, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, + 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x64, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x64, 0x65, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, + 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, + 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x73, + 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, + 0x73, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0xb6, 0x02, 0x0a, 0x04, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c, + 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x4f, 0x41, + 0x54, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x36, + 0x34, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, + 0x36, 0x34, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, + 0x33, 0x32, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, + 0x45, 0x44, 0x36, 0x34, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, + 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x0a, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x0b, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x10, 0x0f, 0x12, 0x11, 0x0a, + 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x10, 0x10, + 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, + 0x11, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x36, 0x34, + 0x10, 0x12, 0x22, 0x43, 0x0a, 0x05, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x0e, 0x4c, + 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x10, 0x01, 0x12, + 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x50, 0x45, 0x41, 0x54, 0x45, + 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x51, + 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x02, 0x22, 0x63, 0x0a, 0x14, 0x4f, 0x6e, 0x65, 0x6f, 0x66, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe3, 0x02, 0x0a, + 0x13, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x5d, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, + 0x65, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x11, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, + 0x6e, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x18, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x52, + 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x89, 0x02, 0x0a, 0x15, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x38, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x10, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x0a, 0x10, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x22, 0xca, + 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, + 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x12, 0x6a, 0x61, 0x76, 0x61, 0x4f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x6a, 0x61, 0x76, 0x61, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x70, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x44, 0x0a, 0x1d, 0x6a, 0x61, + 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x65, 0x71, 0x75, 0x61, + 0x6c, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x14, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x19, 0x6a, 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x45, 0x71, 0x75, 0x61, 0x6c, 0x73, 0x41, 0x6e, 0x64, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x3a, 0x0a, 0x16, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x75, 0x74, 0x66, 0x38, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x74, 0x66, 0x38, 0x12, 0x53, 0x0a, 0x0c, + 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x3a, 0x05, 0x53, + 0x50, 0x45, 0x45, 0x44, 0x52, 0x0b, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x46, 0x6f, + 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x12, 0x35, 0x0a, 0x13, 0x63, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, + 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x63, 0x63, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x15, 0x6a, 0x61, 0x76, 0x61, 0x5f, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x13, 0x6a, + 0x61, 0x76, 0x61, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x12, 0x35, 0x0a, 0x13, 0x70, 0x79, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, + 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x3a, + 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x11, 0x70, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, + 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x14, 0x70, 0x68, 0x70, + 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x12, + 0x70, 0x68, 0x70, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x63, 0x5f, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x18, 0x1f, 0x20, + 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x0e, 0x63, 0x63, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x6a, + 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x24, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x62, 0x6a, 0x63, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, + 0x18, 0x27, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x77, 0x69, 0x66, 0x74, 0x50, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x70, + 0x68, 0x70, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, + 0x0d, 0x70, 0x68, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x29, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x68, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x68, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x2c, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x14, 0x70, 0x68, 0x70, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x75, 0x62, 0x79, + 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x72, 0x75, 0x62, 0x79, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, + 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x09, + 0x0a, 0x05, 0x53, 0x50, 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, + 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, + 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, + 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x22, 0xf4, 0x03, 0x0a, 0x0e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, + 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, + 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, + 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, + 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, + 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, + 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x56, + 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, + 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, + 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, + 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, + 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, + 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, + 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, + 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, + 0x10, 0x0a, 0x22, 0xad, 0x0a, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x52, + 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, + 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, + 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x52, + 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, + 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, + 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x4c, 0x61, + 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, + 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, + 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, + 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, + 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x4b, + 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x07, 0x74, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x0f, 0x65, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x37, + 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x1a, 0x5a, 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, + 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2f, 0x0a, + 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, + 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, + 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, 0x22, 0x35, + 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, + 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x53, 0x54, + 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, + 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, + 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x55, 0x4e, + 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c, 0x02, 0x0a, + 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, + 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, + 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, + 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, + 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, + 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, + 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06, 0x12, 0x1a, + 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, + 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, + 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, + 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08, 0xe8, 0x07, + 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, + 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, + 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, + 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, + 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, + 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, + 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, + 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, + 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, + 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, + 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x81, 0x02, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, + 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, + 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, + 0x64, 0x61, 0x63, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, + 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, + 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, + 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, + 0x02, 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, + 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, 0x69, 0x64, + 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, + 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, + 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, + 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, 0x64, 0x65, + 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x37, 0x0a, + 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, + 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, + 0x0f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, + 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, + 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, + 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, + 0x72, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, + 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x10, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, + 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, + 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, + 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, + 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xfc, 0x09, 0x0a, 0x0a, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x8b, 0x01, 0x0a, 0x0e, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x39, 0x88, + 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, + 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, 0x4d, 0x50, + 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, + 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe8, 0x07, 0x52, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x50, + 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, + 0x42, 0x23, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0b, 0x12, 0x06, + 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4f, 0x50, + 0x45, 0x4e, 0x18, 0xe7, 0x07, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x92, 0x01, 0x0a, 0x17, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x52, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x42, 0x27, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, + 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, + 0x01, 0x0b, 0x12, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0x52, 0x15, 0x72, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, + 0x64, 0x69, 0x6e, 0x67, 0x12, 0x78, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66, 0x38, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x23, 0x88, 0x01, 0x01, 0x98, 0x01, + 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18, 0xe6, 0x07, + 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07, 0x52, 0x0e, + 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x78, + 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, + 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x20, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, + 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, + 0x49, 0x58, 0x45, 0x44, 0x18, 0xe6, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x7c, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, + 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x33, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, 0x06, + 0x98, 0x01, 0x01, 0xa2, 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, + 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0a, + 0x12, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, + 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, + 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x49, 0x45, 0x4c, 0x44, + 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, + 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, 0x02, 0x12, + 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, + 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x10, + 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x02, 0x22, 0x56, 0x0a, + 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x50, 0x45, 0x41, 0x54, + 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, + 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x50, + 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x41, 0x4e, + 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x43, 0x0a, 0x0e, 0x55, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x54, 0x46, 0x38, 0x5f, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0a, + 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x02, 0x22, 0x53, 0x0a, 0x0f, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, + 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, + 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, + 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x01, + 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, + 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x17, 0x0a, + 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, + 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, + 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0xe9, + 0x07, 0x2a, 0x06, 0x08, 0xe9, 0x07, 0x10, 0xea, 0x07, 0x2a, 0x06, 0x08, 0x8b, 0x4e, 0x10, 0x90, + 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, 0x10, 0xe8, 0x07, 0x22, 0xfe, 0x02, 0x0a, 0x12, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, + 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, + 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x69, + 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, + 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, + 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x1a, 0x87, 0x01, 0x0a, 0x18, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, + 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, + 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, + 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, + 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, + 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, + 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, + 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, + 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, + 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, + 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd0, 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x6d, + 0x61, 0x6e, 0x74, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, + 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, + 0x74, 0x69, 0x63, 0x52, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22, 0x28, 0x0a, + 0x08, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, + 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, + 0x41, 0x4c, 0x49, 0x41, 0x53, 0x10, 0x02, 0x2a, 0xea, 0x01, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, 0x13, 0x0a, + 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x10, + 0xe7, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, + 0x32, 0x33, 0x10, 0xe8, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x17, + 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x5f, 0x54, 0x45, 0x53, 0x54, + 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, + 0x4c, 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, + 0x59, 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, + 0x10, 0x9f, 0x8d, 0x06, 0x42, 0x7e, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, + 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, + 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, +} + +var ( + file_google_protobuf_descriptor_proto_rawDescOnce sync.Once + file_google_protobuf_descriptor_proto_rawDescData = file_google_protobuf_descriptor_proto_rawDesc +) + +func file_google_protobuf_descriptor_proto_rawDescGZIP() []byte { + file_google_protobuf_descriptor_proto_rawDescOnce.Do(func() { + file_google_protobuf_descriptor_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_descriptor_proto_rawDescData) + }) + return file_google_protobuf_descriptor_proto_rawDescData +} + +var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 17) +var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +var file_google_protobuf_descriptor_proto_goTypes = []any{ + (Edition)(0), // 0: google.protobuf.Edition + (ExtensionRangeOptions_VerificationState)(0), // 1: google.protobuf.ExtensionRangeOptions.VerificationState + (FieldDescriptorProto_Type)(0), // 2: google.protobuf.FieldDescriptorProto.Type + (FieldDescriptorProto_Label)(0), // 3: google.protobuf.FieldDescriptorProto.Label + (FileOptions_OptimizeMode)(0), // 4: google.protobuf.FileOptions.OptimizeMode + (FieldOptions_CType)(0), // 5: google.protobuf.FieldOptions.CType + (FieldOptions_JSType)(0), // 6: google.protobuf.FieldOptions.JSType + (FieldOptions_OptionRetention)(0), // 7: google.protobuf.FieldOptions.OptionRetention + (FieldOptions_OptionTargetType)(0), // 8: google.protobuf.FieldOptions.OptionTargetType + (MethodOptions_IdempotencyLevel)(0), // 9: google.protobuf.MethodOptions.IdempotencyLevel + (FeatureSet_FieldPresence)(0), // 10: google.protobuf.FeatureSet.FieldPresence + (FeatureSet_EnumType)(0), // 11: google.protobuf.FeatureSet.EnumType + (FeatureSet_RepeatedFieldEncoding)(0), // 12: google.protobuf.FeatureSet.RepeatedFieldEncoding + (FeatureSet_Utf8Validation)(0), // 13: google.protobuf.FeatureSet.Utf8Validation + (FeatureSet_MessageEncoding)(0), // 14: google.protobuf.FeatureSet.MessageEncoding + (FeatureSet_JsonFormat)(0), // 15: google.protobuf.FeatureSet.JsonFormat + (GeneratedCodeInfo_Annotation_Semantic)(0), // 16: google.protobuf.GeneratedCodeInfo.Annotation.Semantic + (*FileDescriptorSet)(nil), // 17: google.protobuf.FileDescriptorSet + (*FileDescriptorProto)(nil), // 18: google.protobuf.FileDescriptorProto + (*DescriptorProto)(nil), // 19: google.protobuf.DescriptorProto + (*ExtensionRangeOptions)(nil), // 20: google.protobuf.ExtensionRangeOptions + (*FieldDescriptorProto)(nil), // 21: google.protobuf.FieldDescriptorProto + (*OneofDescriptorProto)(nil), // 22: google.protobuf.OneofDescriptorProto + (*EnumDescriptorProto)(nil), // 23: google.protobuf.EnumDescriptorProto + (*EnumValueDescriptorProto)(nil), // 24: google.protobuf.EnumValueDescriptorProto + (*ServiceDescriptorProto)(nil), // 25: google.protobuf.ServiceDescriptorProto + (*MethodDescriptorProto)(nil), // 26: google.protobuf.MethodDescriptorProto + (*FileOptions)(nil), // 27: google.protobuf.FileOptions + (*MessageOptions)(nil), // 28: google.protobuf.MessageOptions + (*FieldOptions)(nil), // 29: google.protobuf.FieldOptions + (*OneofOptions)(nil), // 30: google.protobuf.OneofOptions + (*EnumOptions)(nil), // 31: google.protobuf.EnumOptions + (*EnumValueOptions)(nil), // 32: google.protobuf.EnumValueOptions + (*ServiceOptions)(nil), // 33: google.protobuf.ServiceOptions + (*MethodOptions)(nil), // 34: google.protobuf.MethodOptions + (*UninterpretedOption)(nil), // 35: google.protobuf.UninterpretedOption + (*FeatureSet)(nil), // 36: google.protobuf.FeatureSet + (*FeatureSetDefaults)(nil), // 37: google.protobuf.FeatureSetDefaults + (*SourceCodeInfo)(nil), // 38: google.protobuf.SourceCodeInfo + (*GeneratedCodeInfo)(nil), // 39: google.protobuf.GeneratedCodeInfo + (*DescriptorProto_ExtensionRange)(nil), // 40: google.protobuf.DescriptorProto.ExtensionRange + (*DescriptorProto_ReservedRange)(nil), // 41: google.protobuf.DescriptorProto.ReservedRange + (*ExtensionRangeOptions_Declaration)(nil), // 42: google.protobuf.ExtensionRangeOptions.Declaration + (*EnumDescriptorProto_EnumReservedRange)(nil), // 43: google.protobuf.EnumDescriptorProto.EnumReservedRange + (*FieldOptions_EditionDefault)(nil), // 44: google.protobuf.FieldOptions.EditionDefault + (*UninterpretedOption_NamePart)(nil), // 45: google.protobuf.UninterpretedOption.NamePart + (*FeatureSetDefaults_FeatureSetEditionDefault)(nil), // 46: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + (*SourceCodeInfo_Location)(nil), // 47: google.protobuf.SourceCodeInfo.Location + (*GeneratedCodeInfo_Annotation)(nil), // 48: google.protobuf.GeneratedCodeInfo.Annotation +} +var file_google_protobuf_descriptor_proto_depIdxs = []int32{ + 18, // 0: google.protobuf.FileDescriptorSet.file:type_name -> google.protobuf.FileDescriptorProto + 19, // 1: google.protobuf.FileDescriptorProto.message_type:type_name -> google.protobuf.DescriptorProto + 23, // 2: google.protobuf.FileDescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto + 25, // 3: google.protobuf.FileDescriptorProto.service:type_name -> google.protobuf.ServiceDescriptorProto + 21, // 4: google.protobuf.FileDescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto + 27, // 5: google.protobuf.FileDescriptorProto.options:type_name -> google.protobuf.FileOptions + 38, // 6: google.protobuf.FileDescriptorProto.source_code_info:type_name -> google.protobuf.SourceCodeInfo + 0, // 7: google.protobuf.FileDescriptorProto.edition:type_name -> google.protobuf.Edition + 21, // 8: google.protobuf.DescriptorProto.field:type_name -> google.protobuf.FieldDescriptorProto + 21, // 9: google.protobuf.DescriptorProto.extension:type_name -> google.protobuf.FieldDescriptorProto + 19, // 10: google.protobuf.DescriptorProto.nested_type:type_name -> google.protobuf.DescriptorProto + 23, // 11: google.protobuf.DescriptorProto.enum_type:type_name -> google.protobuf.EnumDescriptorProto + 40, // 12: google.protobuf.DescriptorProto.extension_range:type_name -> google.protobuf.DescriptorProto.ExtensionRange + 22, // 13: google.protobuf.DescriptorProto.oneof_decl:type_name -> google.protobuf.OneofDescriptorProto + 28, // 14: google.protobuf.DescriptorProto.options:type_name -> google.protobuf.MessageOptions + 41, // 15: google.protobuf.DescriptorProto.reserved_range:type_name -> google.protobuf.DescriptorProto.ReservedRange + 35, // 16: google.protobuf.ExtensionRangeOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 42, // 17: google.protobuf.ExtensionRangeOptions.declaration:type_name -> google.protobuf.ExtensionRangeOptions.Declaration + 36, // 18: google.protobuf.ExtensionRangeOptions.features:type_name -> google.protobuf.FeatureSet + 1, // 19: google.protobuf.ExtensionRangeOptions.verification:type_name -> google.protobuf.ExtensionRangeOptions.VerificationState + 3, // 20: google.protobuf.FieldDescriptorProto.label:type_name -> google.protobuf.FieldDescriptorProto.Label + 2, // 21: google.protobuf.FieldDescriptorProto.type:type_name -> google.protobuf.FieldDescriptorProto.Type + 29, // 22: google.protobuf.FieldDescriptorProto.options:type_name -> google.protobuf.FieldOptions + 30, // 23: google.protobuf.OneofDescriptorProto.options:type_name -> google.protobuf.OneofOptions + 24, // 24: google.protobuf.EnumDescriptorProto.value:type_name -> google.protobuf.EnumValueDescriptorProto + 31, // 25: google.protobuf.EnumDescriptorProto.options:type_name -> google.protobuf.EnumOptions + 43, // 26: google.protobuf.EnumDescriptorProto.reserved_range:type_name -> google.protobuf.EnumDescriptorProto.EnumReservedRange + 32, // 27: google.protobuf.EnumValueDescriptorProto.options:type_name -> google.protobuf.EnumValueOptions + 26, // 28: google.protobuf.ServiceDescriptorProto.method:type_name -> google.protobuf.MethodDescriptorProto + 33, // 29: google.protobuf.ServiceDescriptorProto.options:type_name -> google.protobuf.ServiceOptions + 34, // 30: google.protobuf.MethodDescriptorProto.options:type_name -> google.protobuf.MethodOptions + 4, // 31: google.protobuf.FileOptions.optimize_for:type_name -> google.protobuf.FileOptions.OptimizeMode + 36, // 32: google.protobuf.FileOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 33: google.protobuf.FileOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 36, // 34: google.protobuf.MessageOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 35: google.protobuf.MessageOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 5, // 36: google.protobuf.FieldOptions.ctype:type_name -> google.protobuf.FieldOptions.CType + 6, // 37: google.protobuf.FieldOptions.jstype:type_name -> google.protobuf.FieldOptions.JSType + 7, // 38: google.protobuf.FieldOptions.retention:type_name -> google.protobuf.FieldOptions.OptionRetention + 8, // 39: google.protobuf.FieldOptions.targets:type_name -> google.protobuf.FieldOptions.OptionTargetType + 44, // 40: google.protobuf.FieldOptions.edition_defaults:type_name -> google.protobuf.FieldOptions.EditionDefault + 36, // 41: google.protobuf.FieldOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 42: google.protobuf.FieldOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 36, // 43: google.protobuf.OneofOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 44: google.protobuf.OneofOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 36, // 45: google.protobuf.EnumOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 46: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 36, // 47: google.protobuf.EnumValueOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 48: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 36, // 49: google.protobuf.ServiceOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 50: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 9, // 51: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel + 36, // 52: google.protobuf.MethodOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 53: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 45, // 54: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart + 10, // 55: google.protobuf.FeatureSet.field_presence:type_name -> google.protobuf.FeatureSet.FieldPresence + 11, // 56: google.protobuf.FeatureSet.enum_type:type_name -> google.protobuf.FeatureSet.EnumType + 12, // 57: google.protobuf.FeatureSet.repeated_field_encoding:type_name -> google.protobuf.FeatureSet.RepeatedFieldEncoding + 13, // 58: google.protobuf.FeatureSet.utf8_validation:type_name -> google.protobuf.FeatureSet.Utf8Validation + 14, // 59: google.protobuf.FeatureSet.message_encoding:type_name -> google.protobuf.FeatureSet.MessageEncoding + 15, // 60: google.protobuf.FeatureSet.json_format:type_name -> google.protobuf.FeatureSet.JsonFormat + 46, // 61: google.protobuf.FeatureSetDefaults.defaults:type_name -> google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + 0, // 62: google.protobuf.FeatureSetDefaults.minimum_edition:type_name -> google.protobuf.Edition + 0, // 63: google.protobuf.FeatureSetDefaults.maximum_edition:type_name -> google.protobuf.Edition + 47, // 64: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location + 48, // 65: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation + 20, // 66: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions + 0, // 67: google.protobuf.FieldOptions.EditionDefault.edition:type_name -> google.protobuf.Edition + 0, // 68: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition:type_name -> google.protobuf.Edition + 36, // 69: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features:type_name -> google.protobuf.FeatureSet + 16, // 70: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic + 71, // [71:71] is the sub-list for method output_type + 71, // [71:71] is the sub-list for method input_type + 71, // [71:71] is the sub-list for extension type_name + 71, // [71:71] is the sub-list for extension extendee + 0, // [0:71] is the sub-list for field type_name +} + +func init() { file_google_protobuf_descriptor_proto_init() } +func file_google_protobuf_descriptor_proto_init() { + if File_google_protobuf_descriptor_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_protobuf_descriptor_proto_rawDesc, + NumEnums: 17, + NumMessages: 32, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_protobuf_descriptor_proto_goTypes, + DependencyIndexes: file_google_protobuf_descriptor_proto_depIdxs, + EnumInfos: file_google_protobuf_descriptor_proto_enumTypes, + MessageInfos: file_google_protobuf_descriptor_proto_msgTypes, + }.Build() + File_google_protobuf_descriptor_proto = out.File + file_google_protobuf_descriptor_proto_rawDesc = nil + file_google_protobuf_descriptor_proto_goTypes = nil + file_google_protobuf_descriptor_proto_depIdxs = nil +} diff --git a/proto/google/protobuf/descriptor_grpc_pb.js b/proto/google/protobuf/descriptor_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/google/protobuf/descriptor_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/google/protobuf/descriptor_pb.d.ts b/proto/google/protobuf/descriptor_pb.d.ts new file mode 100644 index 000000000..b9e8d8cf2 --- /dev/null +++ b/proto/google/protobuf/descriptor_pb.d.ts @@ -0,0 +1,1650 @@ +// package: google.protobuf +// file: google/protobuf/descriptor.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class FileDescriptorSet extends jspb.Message { + clearFileList(): void; + getFileList(): Array; + setFileList(value: Array): FileDescriptorSet; + addFile(value?: FileDescriptorProto, index?: number): FileDescriptorProto; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileDescriptorSet.AsObject; + static toObject(includeInstance: boolean, msg: FileDescriptorSet): FileDescriptorSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileDescriptorSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileDescriptorSet; + static deserializeBinaryFromReader(message: FileDescriptorSet, reader: jspb.BinaryReader): FileDescriptorSet; +} + +export namespace FileDescriptorSet { + export type AsObject = { + fileList: Array, + } +} + +export class FileDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): FileDescriptorProto; + + hasPackage(): boolean; + clearPackage(): void; + getPackage(): string | undefined; + setPackage(value: string): FileDescriptorProto; + clearDependencyList(): void; + getDependencyList(): Array; + setDependencyList(value: Array): FileDescriptorProto; + addDependency(value: string, index?: number): string; + clearPublicDependencyList(): void; + getPublicDependencyList(): Array; + setPublicDependencyList(value: Array): FileDescriptorProto; + addPublicDependency(value: number, index?: number): number; + clearWeakDependencyList(): void; + getWeakDependencyList(): Array; + setWeakDependencyList(value: Array): FileDescriptorProto; + addWeakDependency(value: number, index?: number): number; + clearMessageTypeList(): void; + getMessageTypeList(): Array; + setMessageTypeList(value: Array): FileDescriptorProto; + addMessageType(value?: DescriptorProto, index?: number): DescriptorProto; + clearEnumTypeList(): void; + getEnumTypeList(): Array; + setEnumTypeList(value: Array): FileDescriptorProto; + addEnumType(value?: EnumDescriptorProto, index?: number): EnumDescriptorProto; + clearServiceList(): void; + getServiceList(): Array; + setServiceList(value: Array): FileDescriptorProto; + addService(value?: ServiceDescriptorProto, index?: number): ServiceDescriptorProto; + clearExtensionList(): void; + getExtensionList(): Array; + setExtensionList(value: Array): FileDescriptorProto; + addExtension$(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): FileOptions | undefined; + setOptions(value?: FileOptions): FileDescriptorProto; + + hasSourceCodeInfo(): boolean; + clearSourceCodeInfo(): void; + getSourceCodeInfo(): SourceCodeInfo | undefined; + setSourceCodeInfo(value?: SourceCodeInfo): FileDescriptorProto; + + hasSyntax(): boolean; + clearSyntax(): void; + getSyntax(): string | undefined; + setSyntax(value: string): FileDescriptorProto; + + hasEdition(): boolean; + clearEdition(): void; + getEdition(): Edition | undefined; + setEdition(value: Edition): FileDescriptorProto; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: FileDescriptorProto): FileDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileDescriptorProto; + static deserializeBinaryFromReader(message: FileDescriptorProto, reader: jspb.BinaryReader): FileDescriptorProto; +} + +export namespace FileDescriptorProto { + export type AsObject = { + name?: string, + pb_package?: string, + dependencyList: Array, + publicDependencyList: Array, + weakDependencyList: Array, + messageTypeList: Array, + enumTypeList: Array, + serviceList: Array, + extensionList: Array, + options?: FileOptions.AsObject, + sourceCodeInfo?: SourceCodeInfo.AsObject, + syntax?: string, + edition?: Edition, + } +} + +export class DescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): DescriptorProto; + clearFieldList(): void; + getFieldList(): Array; + setFieldList(value: Array): DescriptorProto; + addField(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; + clearExtensionList(): void; + getExtensionList(): Array; + setExtensionList(value: Array): DescriptorProto; + addExtension$(value?: FieldDescriptorProto, index?: number): FieldDescriptorProto; + clearNestedTypeList(): void; + getNestedTypeList(): Array; + setNestedTypeList(value: Array): DescriptorProto; + addNestedType(value?: DescriptorProto, index?: number): DescriptorProto; + clearEnumTypeList(): void; + getEnumTypeList(): Array; + setEnumTypeList(value: Array): DescriptorProto; + addEnumType(value?: EnumDescriptorProto, index?: number): EnumDescriptorProto; + clearExtensionRangeList(): void; + getExtensionRangeList(): Array; + setExtensionRangeList(value: Array): DescriptorProto; + addExtensionRange(value?: DescriptorProto.ExtensionRange, index?: number): DescriptorProto.ExtensionRange; + clearOneofDeclList(): void; + getOneofDeclList(): Array; + setOneofDeclList(value: Array): DescriptorProto; + addOneofDecl(value?: OneofDescriptorProto, index?: number): OneofDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): MessageOptions | undefined; + setOptions(value?: MessageOptions): DescriptorProto; + clearReservedRangeList(): void; + getReservedRangeList(): Array; + setReservedRangeList(value: Array): DescriptorProto; + addReservedRange(value?: DescriptorProto.ReservedRange, index?: number): DescriptorProto.ReservedRange; + clearReservedNameList(): void; + getReservedNameList(): Array; + setReservedNameList(value: Array): DescriptorProto; + addReservedName(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: DescriptorProto): DescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DescriptorProto; + static deserializeBinaryFromReader(message: DescriptorProto, reader: jspb.BinaryReader): DescriptorProto; +} + +export namespace DescriptorProto { + export type AsObject = { + name?: string, + fieldList: Array, + extensionList: Array, + nestedTypeList: Array, + enumTypeList: Array, + extensionRangeList: Array, + oneofDeclList: Array, + options?: MessageOptions.AsObject, + reservedRangeList: Array, + reservedNameList: Array, + } + + + export class ExtensionRange extends jspb.Message { + + hasStart(): boolean; + clearStart(): void; + getStart(): number | undefined; + setStart(value: number): ExtensionRange; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number | undefined; + setEnd(value: number): ExtensionRange; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): ExtensionRangeOptions | undefined; + setOptions(value?: ExtensionRangeOptions): ExtensionRange; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExtensionRange.AsObject; + static toObject(includeInstance: boolean, msg: ExtensionRange): ExtensionRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExtensionRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExtensionRange; + static deserializeBinaryFromReader(message: ExtensionRange, reader: jspb.BinaryReader): ExtensionRange; + } + + export namespace ExtensionRange { + export type AsObject = { + start?: number, + end?: number, + options?: ExtensionRangeOptions.AsObject, + } + } + + export class ReservedRange extends jspb.Message { + + hasStart(): boolean; + clearStart(): void; + getStart(): number | undefined; + setStart(value: number): ReservedRange; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number | undefined; + setEnd(value: number): ReservedRange; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ReservedRange.AsObject; + static toObject(includeInstance: boolean, msg: ReservedRange): ReservedRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ReservedRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ReservedRange; + static deserializeBinaryFromReader(message: ReservedRange, reader: jspb.BinaryReader): ReservedRange; + } + + export namespace ReservedRange { + export type AsObject = { + start?: number, + end?: number, + } + } + +} + +export class ExtensionRangeOptions extends jspb.Message { + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): ExtensionRangeOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + clearDeclarationList(): void; + getDeclarationList(): Array; + setDeclarationList(value: Array): ExtensionRangeOptions; + addDeclaration(value?: ExtensionRangeOptions.Declaration, index?: number): ExtensionRangeOptions.Declaration; + + hasFeatures(): boolean; + clearFeatures(): void; + getFeatures(): FeatureSet | undefined; + setFeatures(value?: FeatureSet): ExtensionRangeOptions; + + hasVerification(): boolean; + clearVerification(): void; + getVerification(): ExtensionRangeOptions.VerificationState | undefined; + setVerification(value: ExtensionRangeOptions.VerificationState): ExtensionRangeOptions; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExtensionRangeOptions.AsObject; + static toObject(includeInstance: boolean, msg: ExtensionRangeOptions): ExtensionRangeOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExtensionRangeOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExtensionRangeOptions; + static deserializeBinaryFromReader(message: ExtensionRangeOptions, reader: jspb.BinaryReader): ExtensionRangeOptions; +} + +export namespace ExtensionRangeOptions { + export type AsObject = { + uninterpretedOptionList: Array, + declarationList: Array, + features?: FeatureSet.AsObject, + verification?: ExtensionRangeOptions.VerificationState, + } + + + export class Declaration extends jspb.Message { + + hasNumber(): boolean; + clearNumber(): void; + getNumber(): number | undefined; + setNumber(value: number): Declaration; + + hasFullName(): boolean; + clearFullName(): void; + getFullName(): string | undefined; + setFullName(value: string): Declaration; + + hasType(): boolean; + clearType(): void; + getType(): string | undefined; + setType(value: string): Declaration; + + hasReserved(): boolean; + clearReserved(): void; + getReserved(): boolean | undefined; + setReserved(value: boolean): Declaration; + + hasRepeated(): boolean; + clearRepeated(): void; + getRepeated(): boolean | undefined; + setRepeated(value: boolean): Declaration; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Declaration.AsObject; + static toObject(includeInstance: boolean, msg: Declaration): Declaration.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Declaration, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Declaration; + static deserializeBinaryFromReader(message: Declaration, reader: jspb.BinaryReader): Declaration; + } + + export namespace Declaration { + export type AsObject = { + number?: number, + fullName?: string, + type?: string, + reserved?: boolean, + repeated?: boolean, + } + } + + + export enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1, + } + +} + +export class FieldDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): FieldDescriptorProto; + + hasNumber(): boolean; + clearNumber(): void; + getNumber(): number | undefined; + setNumber(value: number): FieldDescriptorProto; + + hasLabel(): boolean; + clearLabel(): void; + getLabel(): FieldDescriptorProto.Label | undefined; + setLabel(value: FieldDescriptorProto.Label): FieldDescriptorProto; + + hasType(): boolean; + clearType(): void; + getType(): FieldDescriptorProto.Type | undefined; + setType(value: FieldDescriptorProto.Type): FieldDescriptorProto; + + hasTypeName(): boolean; + clearTypeName(): void; + getTypeName(): string | undefined; + setTypeName(value: string): FieldDescriptorProto; + + hasExtendee(): boolean; + clearExtendee(): void; + getExtendee(): string | undefined; + setExtendee(value: string): FieldDescriptorProto; + + hasDefaultValue(): boolean; + clearDefaultValue(): void; + getDefaultValue(): string | undefined; + setDefaultValue(value: string): FieldDescriptorProto; + + hasOneofIndex(): boolean; + clearOneofIndex(): void; + getOneofIndex(): number | undefined; + setOneofIndex(value: number): FieldDescriptorProto; + + hasJsonName(): boolean; + clearJsonName(): void; + getJsonName(): string | undefined; + setJsonName(value: string): FieldDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): FieldOptions | undefined; + setOptions(value?: FieldOptions): FieldDescriptorProto; + + hasProto3Optional(): boolean; + clearProto3Optional(): void; + getProto3Optional(): boolean | undefined; + setProto3Optional(value: boolean): FieldDescriptorProto; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: FieldDescriptorProto): FieldDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldDescriptorProto; + static deserializeBinaryFromReader(message: FieldDescriptorProto, reader: jspb.BinaryReader): FieldDescriptorProto; +} + +export namespace FieldDescriptorProto { + export type AsObject = { + name?: string, + number?: number, + label?: FieldDescriptorProto.Label, + type?: FieldDescriptorProto.Type, + typeName?: string, + extendee?: string, + defaultValue?: string, + oneofIndex?: number, + jsonName?: string, + options?: FieldOptions.AsObject, + proto3Optional?: boolean, + } + + export enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18, + } + + export enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2, + } + +} + +export class OneofDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): OneofDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): OneofOptions | undefined; + setOptions(value?: OneofOptions): OneofDescriptorProto; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OneofDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: OneofDescriptorProto): OneofDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OneofDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OneofDescriptorProto; + static deserializeBinaryFromReader(message: OneofDescriptorProto, reader: jspb.BinaryReader): OneofDescriptorProto; +} + +export namespace OneofDescriptorProto { + export type AsObject = { + name?: string, + options?: OneofOptions.AsObject, + } +} + +export class EnumDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): EnumDescriptorProto; + clearValueList(): void; + getValueList(): Array; + setValueList(value: Array): EnumDescriptorProto; + addValue(value?: EnumValueDescriptorProto, index?: number): EnumValueDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): EnumOptions | undefined; + setOptions(value?: EnumOptions): EnumDescriptorProto; + clearReservedRangeList(): void; + getReservedRangeList(): Array; + setReservedRangeList(value: Array): EnumDescriptorProto; + addReservedRange(value?: EnumDescriptorProto.EnumReservedRange, index?: number): EnumDescriptorProto.EnumReservedRange; + clearReservedNameList(): void; + getReservedNameList(): Array; + setReservedNameList(value: Array): EnumDescriptorProto; + addReservedName(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: EnumDescriptorProto): EnumDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumDescriptorProto; + static deserializeBinaryFromReader(message: EnumDescriptorProto, reader: jspb.BinaryReader): EnumDescriptorProto; +} + +export namespace EnumDescriptorProto { + export type AsObject = { + name?: string, + valueList: Array, + options?: EnumOptions.AsObject, + reservedRangeList: Array, + reservedNameList: Array, + } + + + export class EnumReservedRange extends jspb.Message { + + hasStart(): boolean; + clearStart(): void; + getStart(): number | undefined; + setStart(value: number): EnumReservedRange; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number | undefined; + setEnd(value: number): EnumReservedRange; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumReservedRange.AsObject; + static toObject(includeInstance: boolean, msg: EnumReservedRange): EnumReservedRange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumReservedRange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumReservedRange; + static deserializeBinaryFromReader(message: EnumReservedRange, reader: jspb.BinaryReader): EnumReservedRange; + } + + export namespace EnumReservedRange { + export type AsObject = { + start?: number, + end?: number, + } + } + +} + +export class EnumValueDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): EnumValueDescriptorProto; + + hasNumber(): boolean; + clearNumber(): void; + getNumber(): number | undefined; + setNumber(value: number): EnumValueDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): EnumValueOptions | undefined; + setOptions(value?: EnumValueOptions): EnumValueDescriptorProto; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumValueDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: EnumValueDescriptorProto): EnumValueDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumValueDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumValueDescriptorProto; + static deserializeBinaryFromReader(message: EnumValueDescriptorProto, reader: jspb.BinaryReader): EnumValueDescriptorProto; +} + +export namespace EnumValueDescriptorProto { + export type AsObject = { + name?: string, + number?: number, + options?: EnumValueOptions.AsObject, + } +} + +export class ServiceDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): ServiceDescriptorProto; + clearMethodList(): void; + getMethodList(): Array; + setMethodList(value: Array): ServiceDescriptorProto; + addMethod(value?: MethodDescriptorProto, index?: number): MethodDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): ServiceOptions | undefined; + setOptions(value?: ServiceOptions): ServiceDescriptorProto; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ServiceDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: ServiceDescriptorProto): ServiceDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ServiceDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ServiceDescriptorProto; + static deserializeBinaryFromReader(message: ServiceDescriptorProto, reader: jspb.BinaryReader): ServiceDescriptorProto; +} + +export namespace ServiceDescriptorProto { + export type AsObject = { + name?: string, + methodList: Array, + options?: ServiceOptions.AsObject, + } +} + +export class MethodDescriptorProto extends jspb.Message { + + hasName(): boolean; + clearName(): void; + getName(): string | undefined; + setName(value: string): MethodDescriptorProto; + + hasInputType(): boolean; + clearInputType(): void; + getInputType(): string | undefined; + setInputType(value: string): MethodDescriptorProto; + + hasOutputType(): boolean; + clearOutputType(): void; + getOutputType(): string | undefined; + setOutputType(value: string): MethodDescriptorProto; + + hasOptions(): boolean; + clearOptions(): void; + getOptions(): MethodOptions | undefined; + setOptions(value?: MethodOptions): MethodDescriptorProto; + + hasClientStreaming(): boolean; + clearClientStreaming(): void; + getClientStreaming(): boolean | undefined; + setClientStreaming(value: boolean): MethodDescriptorProto; + + hasServerStreaming(): boolean; + clearServerStreaming(): void; + getServerStreaming(): boolean | undefined; + setServerStreaming(value: boolean): MethodDescriptorProto; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MethodDescriptorProto.AsObject; + static toObject(includeInstance: boolean, msg: MethodDescriptorProto): MethodDescriptorProto.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MethodDescriptorProto, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MethodDescriptorProto; + static deserializeBinaryFromReader(message: MethodDescriptorProto, reader: jspb.BinaryReader): MethodDescriptorProto; +} + +export namespace MethodDescriptorProto { + export type AsObject = { + name?: string, + inputType?: string, + outputType?: string, + options?: MethodOptions.AsObject, + clientStreaming?: boolean, + serverStreaming?: boolean, + } +} + +export class FileOptions extends jspb.Message { + + hasJavaPackage(): boolean; + clearJavaPackage(): void; + getJavaPackage(): string | undefined; + setJavaPackage(value: string): FileOptions; + + hasJavaOuterClassname(): boolean; + clearJavaOuterClassname(): void; + getJavaOuterClassname(): string | undefined; + setJavaOuterClassname(value: string): FileOptions; + + hasJavaMultipleFiles(): boolean; + clearJavaMultipleFiles(): void; + getJavaMultipleFiles(): boolean | undefined; + setJavaMultipleFiles(value: boolean): FileOptions; + + hasJavaGenerateEqualsAndHash(): boolean; + clearJavaGenerateEqualsAndHash(): void; + getJavaGenerateEqualsAndHash(): boolean | undefined; + setJavaGenerateEqualsAndHash(value: boolean): FileOptions; + + hasJavaStringCheckUtf8(): boolean; + clearJavaStringCheckUtf8(): void; + getJavaStringCheckUtf8(): boolean | undefined; + setJavaStringCheckUtf8(value: boolean): FileOptions; + + hasOptimizeFor(): boolean; + clearOptimizeFor(): void; + getOptimizeFor(): FileOptions.OptimizeMode | undefined; + setOptimizeFor(value: FileOptions.OptimizeMode): FileOptions; + + hasGoPackage(): boolean; + clearGoPackage(): void; + getGoPackage(): string | undefined; + setGoPackage(value: string): FileOptions; + + hasCcGenericServices(): boolean; + clearCcGenericServices(): void; + getCcGenericServices(): boolean | undefined; + setCcGenericServices(value: boolean): FileOptions; + + hasJavaGenericServices(): boolean; + clearJavaGenericServices(): void; + getJavaGenericServices(): boolean | undefined; + setJavaGenericServices(value: boolean): FileOptions; + + hasPyGenericServices(): boolean; + clearPyGenericServices(): void; + getPyGenericServices(): boolean | undefined; + setPyGenericServices(value: boolean): FileOptions; + + hasPhpGenericServices(): boolean; + clearPhpGenericServices(): void; + getPhpGenericServices(): boolean | undefined; + setPhpGenericServices(value: boolean): FileOptions; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): FileOptions; + + hasCcEnableArenas(): boolean; + clearCcEnableArenas(): void; + getCcEnableArenas(): boolean | undefined; + setCcEnableArenas(value: boolean): FileOptions; + + hasObjcClassPrefix(): boolean; + clearObjcClassPrefix(): void; + getObjcClassPrefix(): string | undefined; + setObjcClassPrefix(value: string): FileOptions; + + hasCsharpNamespace(): boolean; + clearCsharpNamespace(): void; + getCsharpNamespace(): string | undefined; + setCsharpNamespace(value: string): FileOptions; + + hasSwiftPrefix(): boolean; + clearSwiftPrefix(): void; + getSwiftPrefix(): string | undefined; + setSwiftPrefix(value: string): FileOptions; + + hasPhpClassPrefix(): boolean; + clearPhpClassPrefix(): void; + getPhpClassPrefix(): string | undefined; + setPhpClassPrefix(value: string): FileOptions; + + hasPhpNamespace(): boolean; + clearPhpNamespace(): void; + getPhpNamespace(): string | undefined; + setPhpNamespace(value: string): FileOptions; + + hasPhpMetadataNamespace(): boolean; + clearPhpMetadataNamespace(): void; + getPhpMetadataNamespace(): string | undefined; + setPhpMetadataNamespace(value: string): FileOptions; + + hasRubyPackage(): boolean; + clearRubyPackage(): void; + getRubyPackage(): string | undefined; + setRubyPackage(value: string): FileOptions; + + hasFeatures(): boolean; + clearFeatures(): void; + getFeatures(): FeatureSet | undefined; + setFeatures(value?: FeatureSet): FileOptions; + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): FileOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FileOptions.AsObject; + static toObject(includeInstance: boolean, msg: FileOptions): FileOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FileOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FileOptions; + static deserializeBinaryFromReader(message: FileOptions, reader: jspb.BinaryReader): FileOptions; +} + +export namespace FileOptions { + export type AsObject = { + javaPackage?: string, + javaOuterClassname?: string, + javaMultipleFiles?: boolean, + javaGenerateEqualsAndHash?: boolean, + javaStringCheckUtf8?: boolean, + optimizeFor?: FileOptions.OptimizeMode, + goPackage?: string, + ccGenericServices?: boolean, + javaGenericServices?: boolean, + pyGenericServices?: boolean, + phpGenericServices?: boolean, + deprecated?: boolean, + ccEnableArenas?: boolean, + objcClassPrefix?: string, + csharpNamespace?: string, + swiftPrefix?: string, + phpClassPrefix?: string, + phpNamespace?: string, + phpMetadataNamespace?: string, + rubyPackage?: string, + features?: FeatureSet.AsObject, + uninterpretedOptionList: Array, + } + + export enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3, + } + +} + +export class MessageOptions extends jspb.Message { + + hasMessageSetWireFormat(): boolean; + clearMessageSetWireFormat(): void; + getMessageSetWireFormat(): boolean | undefined; + setMessageSetWireFormat(value: boolean): MessageOptions; + + hasNoStandardDescriptorAccessor(): boolean; + clearNoStandardDescriptorAccessor(): void; + getNoStandardDescriptorAccessor(): boolean | undefined; + setNoStandardDescriptorAccessor(value: boolean): MessageOptions; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): MessageOptions; + + hasMapEntry(): boolean; + clearMapEntry(): void; + getMapEntry(): boolean | undefined; + setMapEntry(value: boolean): MessageOptions; + + hasDeprecatedLegacyJsonFieldConflicts(): boolean; + clearDeprecatedLegacyJsonFieldConflicts(): void; + getDeprecatedLegacyJsonFieldConflicts(): boolean | undefined; + setDeprecatedLegacyJsonFieldConflicts(value: boolean): MessageOptions; + + hasFeatures(): boolean; + clearFeatures(): void; + getFeatures(): FeatureSet | undefined; + setFeatures(value?: FeatureSet): MessageOptions; + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): MessageOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MessageOptions.AsObject; + static toObject(includeInstance: boolean, msg: MessageOptions): MessageOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MessageOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MessageOptions; + static deserializeBinaryFromReader(message: MessageOptions, reader: jspb.BinaryReader): MessageOptions; +} + +export namespace MessageOptions { + export type AsObject = { + messageSetWireFormat?: boolean, + noStandardDescriptorAccessor?: boolean, + deprecated?: boolean, + mapEntry?: boolean, + deprecatedLegacyJsonFieldConflicts?: boolean, + features?: FeatureSet.AsObject, + uninterpretedOptionList: Array, + } +} + +export class FieldOptions extends jspb.Message { + + hasCtype(): boolean; + clearCtype(): void; + getCtype(): FieldOptions.CType | undefined; + setCtype(value: FieldOptions.CType): FieldOptions; + + hasPacked(): boolean; + clearPacked(): void; + getPacked(): boolean | undefined; + setPacked(value: boolean): FieldOptions; + + hasJstype(): boolean; + clearJstype(): void; + getJstype(): FieldOptions.JSType | undefined; + setJstype(value: FieldOptions.JSType): FieldOptions; + + hasLazy(): boolean; + clearLazy(): void; + getLazy(): boolean | undefined; + setLazy(value: boolean): FieldOptions; + + hasUnverifiedLazy(): boolean; + clearUnverifiedLazy(): void; + getUnverifiedLazy(): boolean | undefined; + setUnverifiedLazy(value: boolean): FieldOptions; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): FieldOptions; + + hasWeak(): boolean; + clearWeak(): void; + getWeak(): boolean | undefined; + setWeak(value: boolean): FieldOptions; + + hasDebugRedact(): boolean; + clearDebugRedact(): void; + getDebugRedact(): boolean | undefined; + setDebugRedact(value: boolean): FieldOptions; + + hasRetention(): boolean; + clearRetention(): void; + getRetention(): FieldOptions.OptionRetention | undefined; + setRetention(value: FieldOptions.OptionRetention): FieldOptions; + clearTargetsList(): void; + getTargetsList(): Array; + setTargetsList(value: Array): FieldOptions; + addTargets(value: FieldOptions.OptionTargetType, index?: number): FieldOptions.OptionTargetType; + clearEditionDefaultsList(): void; + getEditionDefaultsList(): Array; + setEditionDefaultsList(value: Array): FieldOptions; + addEditionDefaults(value?: FieldOptions.EditionDefault, index?: number): FieldOptions.EditionDefault; + + hasFeatures(): boolean; + clearFeatures(): void; + getFeatures(): FeatureSet | undefined; + setFeatures(value?: FeatureSet): FieldOptions; + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): FieldOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldOptions.AsObject; + static toObject(includeInstance: boolean, msg: FieldOptions): FieldOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldOptions; + static deserializeBinaryFromReader(message: FieldOptions, reader: jspb.BinaryReader): FieldOptions; +} + +export namespace FieldOptions { + export type AsObject = { + ctype?: FieldOptions.CType, + packed?: boolean, + jstype?: FieldOptions.JSType, + lazy?: boolean, + unverifiedLazy?: boolean, + deprecated?: boolean, + weak?: boolean, + debugRedact?: boolean, + retention?: FieldOptions.OptionRetention, + targetsList: Array, + editionDefaultsList: Array, + features?: FeatureSet.AsObject, + uninterpretedOptionList: Array, + } + + + export class EditionDefault extends jspb.Message { + + hasEdition(): boolean; + clearEdition(): void; + getEdition(): Edition | undefined; + setEdition(value: Edition): EditionDefault; + + hasValue(): boolean; + clearValue(): void; + getValue(): string | undefined; + setValue(value: string): EditionDefault; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EditionDefault.AsObject; + static toObject(includeInstance: boolean, msg: EditionDefault): EditionDefault.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EditionDefault, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EditionDefault; + static deserializeBinaryFromReader(message: EditionDefault, reader: jspb.BinaryReader): EditionDefault; + } + + export namespace EditionDefault { + export type AsObject = { + edition?: Edition, + value?: string, + } + } + + + export enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2, + } + + export enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2, + } + + export enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2, + } + + export enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9, + } + +} + +export class OneofOptions extends jspb.Message { + + hasFeatures(): boolean; + clearFeatures(): void; + getFeatures(): FeatureSet | undefined; + setFeatures(value?: FeatureSet): OneofOptions; + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): OneofOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OneofOptions.AsObject; + static toObject(includeInstance: boolean, msg: OneofOptions): OneofOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OneofOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OneofOptions; + static deserializeBinaryFromReader(message: OneofOptions, reader: jspb.BinaryReader): OneofOptions; +} + +export namespace OneofOptions { + export type AsObject = { + features?: FeatureSet.AsObject, + uninterpretedOptionList: Array, + } +} + +export class EnumOptions extends jspb.Message { + + hasAllowAlias(): boolean; + clearAllowAlias(): void; + getAllowAlias(): boolean | undefined; + setAllowAlias(value: boolean): EnumOptions; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): EnumOptions; + + hasDeprecatedLegacyJsonFieldConflicts(): boolean; + clearDeprecatedLegacyJsonFieldConflicts(): void; + getDeprecatedLegacyJsonFieldConflicts(): boolean | undefined; + setDeprecatedLegacyJsonFieldConflicts(value: boolean): EnumOptions; + + hasFeatures(): boolean; + clearFeatures(): void; + getFeatures(): FeatureSet | undefined; + setFeatures(value?: FeatureSet): EnumOptions; + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): EnumOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumOptions.AsObject; + static toObject(includeInstance: boolean, msg: EnumOptions): EnumOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumOptions; + static deserializeBinaryFromReader(message: EnumOptions, reader: jspb.BinaryReader): EnumOptions; +} + +export namespace EnumOptions { + export type AsObject = { + allowAlias?: boolean, + deprecated?: boolean, + deprecatedLegacyJsonFieldConflicts?: boolean, + features?: FeatureSet.AsObject, + uninterpretedOptionList: Array, + } +} + +export class EnumValueOptions extends jspb.Message { + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): EnumValueOptions; + + hasFeatures(): boolean; + clearFeatures(): void; + getFeatures(): FeatureSet | undefined; + setFeatures(value?: FeatureSet): EnumValueOptions; + + hasDebugRedact(): boolean; + clearDebugRedact(): void; + getDebugRedact(): boolean | undefined; + setDebugRedact(value: boolean): EnumValueOptions; + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): EnumValueOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumValueOptions.AsObject; + static toObject(includeInstance: boolean, msg: EnumValueOptions): EnumValueOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumValueOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumValueOptions; + static deserializeBinaryFromReader(message: EnumValueOptions, reader: jspb.BinaryReader): EnumValueOptions; +} + +export namespace EnumValueOptions { + export type AsObject = { + deprecated?: boolean, + features?: FeatureSet.AsObject, + debugRedact?: boolean, + uninterpretedOptionList: Array, + } +} + +export class ServiceOptions extends jspb.Message { + + hasFeatures(): boolean; + clearFeatures(): void; + getFeatures(): FeatureSet | undefined; + setFeatures(value?: FeatureSet): ServiceOptions; + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): ServiceOptions; + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): ServiceOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ServiceOptions.AsObject; + static toObject(includeInstance: boolean, msg: ServiceOptions): ServiceOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ServiceOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ServiceOptions; + static deserializeBinaryFromReader(message: ServiceOptions, reader: jspb.BinaryReader): ServiceOptions; +} + +export namespace ServiceOptions { + export type AsObject = { + features?: FeatureSet.AsObject, + deprecated?: boolean, + uninterpretedOptionList: Array, + } +} + +export class MethodOptions extends jspb.Message { + + hasDeprecated(): boolean; + clearDeprecated(): void; + getDeprecated(): boolean | undefined; + setDeprecated(value: boolean): MethodOptions; + + hasIdempotencyLevel(): boolean; + clearIdempotencyLevel(): void; + getIdempotencyLevel(): MethodOptions.IdempotencyLevel | undefined; + setIdempotencyLevel(value: MethodOptions.IdempotencyLevel): MethodOptions; + + hasFeatures(): boolean; + clearFeatures(): void; + getFeatures(): FeatureSet | undefined; + setFeatures(value?: FeatureSet): MethodOptions; + clearUninterpretedOptionList(): void; + getUninterpretedOptionList(): Array; + setUninterpretedOptionList(value: Array): MethodOptions; + addUninterpretedOption(value?: UninterpretedOption, index?: number): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MethodOptions.AsObject; + static toObject(includeInstance: boolean, msg: MethodOptions): MethodOptions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MethodOptions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MethodOptions; + static deserializeBinaryFromReader(message: MethodOptions, reader: jspb.BinaryReader): MethodOptions; +} + +export namespace MethodOptions { + export type AsObject = { + deprecated?: boolean, + idempotencyLevel?: MethodOptions.IdempotencyLevel, + features?: FeatureSet.AsObject, + uninterpretedOptionList: Array, + } + + export enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2, + } + +} + +export class UninterpretedOption extends jspb.Message { + clearNameList(): void; + getNameList(): Array; + setNameList(value: Array): UninterpretedOption; + addName(value?: UninterpretedOption.NamePart, index?: number): UninterpretedOption.NamePart; + + hasIdentifierValue(): boolean; + clearIdentifierValue(): void; + getIdentifierValue(): string | undefined; + setIdentifierValue(value: string): UninterpretedOption; + + hasPositiveIntValue(): boolean; + clearPositiveIntValue(): void; + getPositiveIntValue(): number | undefined; + setPositiveIntValue(value: number): UninterpretedOption; + + hasNegativeIntValue(): boolean; + clearNegativeIntValue(): void; + getNegativeIntValue(): number | undefined; + setNegativeIntValue(value: number): UninterpretedOption; + + hasDoubleValue(): boolean; + clearDoubleValue(): void; + getDoubleValue(): number | undefined; + setDoubleValue(value: number): UninterpretedOption; + + hasStringValue(): boolean; + clearStringValue(): void; + getStringValue(): Uint8Array | string; + getStringValue_asU8(): Uint8Array; + getStringValue_asB64(): string; + setStringValue(value: Uint8Array | string): UninterpretedOption; + + hasAggregateValue(): boolean; + clearAggregateValue(): void; + getAggregateValue(): string | undefined; + setAggregateValue(value: string): UninterpretedOption; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UninterpretedOption.AsObject; + static toObject(includeInstance: boolean, msg: UninterpretedOption): UninterpretedOption.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UninterpretedOption, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UninterpretedOption; + static deserializeBinaryFromReader(message: UninterpretedOption, reader: jspb.BinaryReader): UninterpretedOption; +} + +export namespace UninterpretedOption { + export type AsObject = { + nameList: Array, + identifierValue?: string, + positiveIntValue?: number, + negativeIntValue?: number, + doubleValue?: number, + stringValue: Uint8Array | string, + aggregateValue?: string, + } + + + export class NamePart extends jspb.Message { + + hasNamePart(): boolean; + clearNamePart(): void; + getNamePart(): string | undefined; + setNamePart(value: string): NamePart; + + hasIsExtension(): boolean; + clearIsExtension(): void; + getIsExtension(): boolean | undefined; + setIsExtension(value: boolean): NamePart; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NamePart.AsObject; + static toObject(includeInstance: boolean, msg: NamePart): NamePart.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NamePart, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NamePart; + static deserializeBinaryFromReader(message: NamePart, reader: jspb.BinaryReader): NamePart; + } + + export namespace NamePart { + export type AsObject = { + namePart?: string, + isExtension?: boolean, + } + } + +} + +export class FeatureSet extends jspb.Message { + + hasFieldPresence(): boolean; + clearFieldPresence(): void; + getFieldPresence(): FeatureSet.FieldPresence | undefined; + setFieldPresence(value: FeatureSet.FieldPresence): FeatureSet; + + hasEnumType(): boolean; + clearEnumType(): void; + getEnumType(): FeatureSet.EnumType | undefined; + setEnumType(value: FeatureSet.EnumType): FeatureSet; + + hasRepeatedFieldEncoding(): boolean; + clearRepeatedFieldEncoding(): void; + getRepeatedFieldEncoding(): FeatureSet.RepeatedFieldEncoding | undefined; + setRepeatedFieldEncoding(value: FeatureSet.RepeatedFieldEncoding): FeatureSet; + + hasUtf8Validation(): boolean; + clearUtf8Validation(): void; + getUtf8Validation(): FeatureSet.Utf8Validation | undefined; + setUtf8Validation(value: FeatureSet.Utf8Validation): FeatureSet; + + hasMessageEncoding(): boolean; + clearMessageEncoding(): void; + getMessageEncoding(): FeatureSet.MessageEncoding | undefined; + setMessageEncoding(value: FeatureSet.MessageEncoding): FeatureSet; + + hasJsonFormat(): boolean; + clearJsonFormat(): void; + getJsonFormat(): FeatureSet.JsonFormat | undefined; + setJsonFormat(value: FeatureSet.JsonFormat): FeatureSet; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FeatureSet.AsObject; + static toObject(includeInstance: boolean, msg: FeatureSet): FeatureSet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FeatureSet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FeatureSet; + static deserializeBinaryFromReader(message: FeatureSet, reader: jspb.BinaryReader): FeatureSet; +} + +export namespace FeatureSet { + export type AsObject = { + fieldPresence?: FeatureSet.FieldPresence, + enumType?: FeatureSet.EnumType, + repeatedFieldEncoding?: FeatureSet.RepeatedFieldEncoding, + utf8Validation?: FeatureSet.Utf8Validation, + messageEncoding?: FeatureSet.MessageEncoding, + jsonFormat?: FeatureSet.JsonFormat, + } + + export enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3, + } + + export enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2, + } + + export enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2, + } + + export enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + NONE = 1, + VERIFY = 2, + } + + export enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2, + } + + export enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2, + } + +} + +export class FeatureSetDefaults extends jspb.Message { + clearDefaultsList(): void; + getDefaultsList(): Array; + setDefaultsList(value: Array): FeatureSetDefaults; + addDefaults(value?: FeatureSetDefaults.FeatureSetEditionDefault, index?: number): FeatureSetDefaults.FeatureSetEditionDefault; + + hasMinimumEdition(): boolean; + clearMinimumEdition(): void; + getMinimumEdition(): Edition | undefined; + setMinimumEdition(value: Edition): FeatureSetDefaults; + + hasMaximumEdition(): boolean; + clearMaximumEdition(): void; + getMaximumEdition(): Edition | undefined; + setMaximumEdition(value: Edition): FeatureSetDefaults; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FeatureSetDefaults.AsObject; + static toObject(includeInstance: boolean, msg: FeatureSetDefaults): FeatureSetDefaults.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FeatureSetDefaults, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FeatureSetDefaults; + static deserializeBinaryFromReader(message: FeatureSetDefaults, reader: jspb.BinaryReader): FeatureSetDefaults; +} + +export namespace FeatureSetDefaults { + export type AsObject = { + defaultsList: Array, + minimumEdition?: Edition, + maximumEdition?: Edition, + } + + + export class FeatureSetEditionDefault extends jspb.Message { + + hasEdition(): boolean; + clearEdition(): void; + getEdition(): Edition | undefined; + setEdition(value: Edition): FeatureSetEditionDefault; + + hasFeatures(): boolean; + clearFeatures(): void; + getFeatures(): FeatureSet | undefined; + setFeatures(value?: FeatureSet): FeatureSetEditionDefault; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FeatureSetEditionDefault.AsObject; + static toObject(includeInstance: boolean, msg: FeatureSetEditionDefault): FeatureSetEditionDefault.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FeatureSetEditionDefault, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FeatureSetEditionDefault; + static deserializeBinaryFromReader(message: FeatureSetEditionDefault, reader: jspb.BinaryReader): FeatureSetEditionDefault; + } + + export namespace FeatureSetEditionDefault { + export type AsObject = { + edition?: Edition, + features?: FeatureSet.AsObject, + } + } + +} + +export class SourceCodeInfo extends jspb.Message { + clearLocationList(): void; + getLocationList(): Array; + setLocationList(value: Array): SourceCodeInfo; + addLocation(value?: SourceCodeInfo.Location, index?: number): SourceCodeInfo.Location; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SourceCodeInfo.AsObject; + static toObject(includeInstance: boolean, msg: SourceCodeInfo): SourceCodeInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SourceCodeInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SourceCodeInfo; + static deserializeBinaryFromReader(message: SourceCodeInfo, reader: jspb.BinaryReader): SourceCodeInfo; +} + +export namespace SourceCodeInfo { + export type AsObject = { + locationList: Array, + } + + + export class Location extends jspb.Message { + clearPathList(): void; + getPathList(): Array; + setPathList(value: Array): Location; + addPath(value: number, index?: number): number; + clearSpanList(): void; + getSpanList(): Array; + setSpanList(value: Array): Location; + addSpan(value: number, index?: number): number; + + hasLeadingComments(): boolean; + clearLeadingComments(): void; + getLeadingComments(): string | undefined; + setLeadingComments(value: string): Location; + + hasTrailingComments(): boolean; + clearTrailingComments(): void; + getTrailingComments(): string | undefined; + setTrailingComments(value: string): Location; + clearLeadingDetachedCommentsList(): void; + getLeadingDetachedCommentsList(): Array; + setLeadingDetachedCommentsList(value: Array): Location; + addLeadingDetachedComments(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Location.AsObject; + static toObject(includeInstance: boolean, msg: Location): Location.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Location, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Location; + static deserializeBinaryFromReader(message: Location, reader: jspb.BinaryReader): Location; + } + + export namespace Location { + export type AsObject = { + pathList: Array, + spanList: Array, + leadingComments?: string, + trailingComments?: string, + leadingDetachedCommentsList: Array, + } + } + +} + +export class GeneratedCodeInfo extends jspb.Message { + clearAnnotationList(): void; + getAnnotationList(): Array; + setAnnotationList(value: Array): GeneratedCodeInfo; + addAnnotation(value?: GeneratedCodeInfo.Annotation, index?: number): GeneratedCodeInfo.Annotation; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GeneratedCodeInfo.AsObject; + static toObject(includeInstance: boolean, msg: GeneratedCodeInfo): GeneratedCodeInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GeneratedCodeInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GeneratedCodeInfo; + static deserializeBinaryFromReader(message: GeneratedCodeInfo, reader: jspb.BinaryReader): GeneratedCodeInfo; +} + +export namespace GeneratedCodeInfo { + export type AsObject = { + annotationList: Array, + } + + + export class Annotation extends jspb.Message { + clearPathList(): void; + getPathList(): Array; + setPathList(value: Array): Annotation; + addPath(value: number, index?: number): number; + + hasSourceFile(): boolean; + clearSourceFile(): void; + getSourceFile(): string | undefined; + setSourceFile(value: string): Annotation; + + hasBegin(): boolean; + clearBegin(): void; + getBegin(): number | undefined; + setBegin(value: number): Annotation; + + hasEnd(): boolean; + clearEnd(): void; + getEnd(): number | undefined; + setEnd(value: number): Annotation; + + hasSemantic(): boolean; + clearSemantic(): void; + getSemantic(): GeneratedCodeInfo.Annotation.Semantic | undefined; + setSemantic(value: GeneratedCodeInfo.Annotation.Semantic): Annotation; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Annotation.AsObject; + static toObject(includeInstance: boolean, msg: Annotation): Annotation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Annotation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Annotation; + static deserializeBinaryFromReader(message: Annotation, reader: jspb.BinaryReader): Annotation; + } + + export namespace Annotation { + export type AsObject = { + pathList: Array, + sourceFile?: string, + begin?: number, + end?: number, + semantic?: GeneratedCodeInfo.Annotation.Semantic, + } + + export enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2, + } + + } + +} + +export enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, +} diff --git a/proto/google/protobuf/descriptor_pb.js b/proto/google/protobuf/descriptor_pb.js new file mode 100644 index 000000000..7420ed2f4 --- /dev/null +++ b/proto/google/protobuf/descriptor_pb.js @@ -0,0 +1,12774 @@ +// source: google/protobuf/descriptor.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +goog.exportSymbol('proto.google.protobuf.DescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.DescriptorProto.ExtensionRange', null, global); +goog.exportSymbol('proto.google.protobuf.DescriptorProto.ReservedRange', null, global); +goog.exportSymbol('proto.google.protobuf.Edition', null, global); +goog.exportSymbol('proto.google.protobuf.EnumDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.EnumDescriptorProto.EnumReservedRange', null, global); +goog.exportSymbol('proto.google.protobuf.EnumOptions', null, global); +goog.exportSymbol('proto.google.protobuf.EnumValueDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.EnumValueOptions', null, global); +goog.exportSymbol('proto.google.protobuf.ExtensionRangeOptions', null, global); +goog.exportSymbol('proto.google.protobuf.ExtensionRangeOptions.Declaration', null, global); +goog.exportSymbol('proto.google.protobuf.ExtensionRangeOptions.VerificationState', null, global); +goog.exportSymbol('proto.google.protobuf.FeatureSet', null, global); +goog.exportSymbol('proto.google.protobuf.FeatureSet.EnumType', null, global); +goog.exportSymbol('proto.google.protobuf.FeatureSet.FieldPresence', null, global); +goog.exportSymbol('proto.google.protobuf.FeatureSet.JsonFormat', null, global); +goog.exportSymbol('proto.google.protobuf.FeatureSet.MessageEncoding', null, global); +goog.exportSymbol('proto.google.protobuf.FeatureSet.RepeatedFieldEncoding', null, global); +goog.exportSymbol('proto.google.protobuf.FeatureSet.Utf8Validation', null, global); +goog.exportSymbol('proto.google.protobuf.FeatureSetDefaults', null, global); +goog.exportSymbol('proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault', null, global); +goog.exportSymbol('proto.google.protobuf.FieldDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.FieldDescriptorProto.Label', null, global); +goog.exportSymbol('proto.google.protobuf.FieldDescriptorProto.Type', null, global); +goog.exportSymbol('proto.google.protobuf.FieldOptions', null, global); +goog.exportSymbol('proto.google.protobuf.FieldOptions.CType', null, global); +goog.exportSymbol('proto.google.protobuf.FieldOptions.EditionDefault', null, global); +goog.exportSymbol('proto.google.protobuf.FieldOptions.JSType', null, global); +goog.exportSymbol('proto.google.protobuf.FieldOptions.OptionRetention', null, global); +goog.exportSymbol('proto.google.protobuf.FieldOptions.OptionTargetType', null, global); +goog.exportSymbol('proto.google.protobuf.FileDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.FileDescriptorSet', null, global); +goog.exportSymbol('proto.google.protobuf.FileOptions', null, global); +goog.exportSymbol('proto.google.protobuf.FileOptions.OptimizeMode', null, global); +goog.exportSymbol('proto.google.protobuf.GeneratedCodeInfo', null, global); +goog.exportSymbol('proto.google.protobuf.GeneratedCodeInfo.Annotation', null, global); +goog.exportSymbol('proto.google.protobuf.GeneratedCodeInfo.Annotation.Semantic', null, global); +goog.exportSymbol('proto.google.protobuf.MessageOptions', null, global); +goog.exportSymbol('proto.google.protobuf.MethodDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.MethodOptions', null, global); +goog.exportSymbol('proto.google.protobuf.MethodOptions.IdempotencyLevel', null, global); +goog.exportSymbol('proto.google.protobuf.OneofDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.OneofOptions', null, global); +goog.exportSymbol('proto.google.protobuf.ServiceDescriptorProto', null, global); +goog.exportSymbol('proto.google.protobuf.ServiceOptions', null, global); +goog.exportSymbol('proto.google.protobuf.SourceCodeInfo', null, global); +goog.exportSymbol('proto.google.protobuf.SourceCodeInfo.Location', null, global); +goog.exportSymbol('proto.google.protobuf.UninterpretedOption', null, global); +goog.exportSymbol('proto.google.protobuf.UninterpretedOption.NamePart', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FileDescriptorSet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FileDescriptorSet.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FileDescriptorSet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FileDescriptorSet.displayName = 'proto.google.protobuf.FileDescriptorSet'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FileDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FileDescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FileDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FileDescriptorProto.displayName = 'proto.google.protobuf.FileDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.DescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.DescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.DescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.DescriptorProto.displayName = 'proto.google.protobuf.DescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.DescriptorProto.ExtensionRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.DescriptorProto.ExtensionRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.DescriptorProto.ExtensionRange.displayName = 'proto.google.protobuf.DescriptorProto.ExtensionRange'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.DescriptorProto.ReservedRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.DescriptorProto.ReservedRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.DescriptorProto.ReservedRange.displayName = 'proto.google.protobuf.DescriptorProto.ReservedRange'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.ExtensionRangeOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.ExtensionRangeOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.ExtensionRangeOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.ExtensionRangeOptions.displayName = 'proto.google.protobuf.ExtensionRangeOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ExtensionRangeOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ExtensionRangeOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.ExtensionRangeOptions.Declaration, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.ExtensionRangeOptions.Declaration.displayName = 'proto.google.protobuf.ExtensionRangeOptions.Declaration'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FieldDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.FieldDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FieldDescriptorProto.displayName = 'proto.google.protobuf.FieldDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.OneofDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.OneofDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.OneofDescriptorProto.displayName = 'proto.google.protobuf.OneofDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.EnumDescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.EnumDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumDescriptorProto.displayName = 'proto.google.protobuf.EnumDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.EnumDescriptorProto.EnumReservedRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.displayName = 'proto.google.protobuf.EnumDescriptorProto.EnumReservedRange'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumValueDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.EnumValueDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumValueDescriptorProto.displayName = 'proto.google.protobuf.EnumValueDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.ServiceDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.ServiceDescriptorProto.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.ServiceDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.ServiceDescriptorProto.displayName = 'proto.google.protobuf.ServiceDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.MethodDescriptorProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.MethodDescriptorProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.MethodDescriptorProto.displayName = 'proto.google.protobuf.MethodDescriptorProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FileOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.FileOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FileOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FileOptions.displayName = 'proto.google.protobuf.FileOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FileOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FileOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.MessageOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.MessageOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.MessageOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.MessageOptions.displayName = 'proto.google.protobuf.MessageOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MessageOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MessageOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FieldOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.FieldOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FieldOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FieldOptions.displayName = 'proto.google.protobuf.FieldOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FieldOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FieldOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FieldOptions.EditionDefault = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.FieldOptions.EditionDefault, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FieldOptions.EditionDefault.displayName = 'proto.google.protobuf.FieldOptions.EditionDefault'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.OneofOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.OneofOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.OneofOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.OneofOptions.displayName = 'proto.google.protobuf.OneofOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.OneofOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.OneofOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.EnumOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.EnumOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumOptions.displayName = 'proto.google.protobuf.EnumOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.EnumValueOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.EnumValueOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.EnumValueOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.EnumValueOptions.displayName = 'proto.google.protobuf.EnumValueOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumValueOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.EnumValueOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.ServiceOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.ServiceOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.ServiceOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.ServiceOptions.displayName = 'proto.google.protobuf.ServiceOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ServiceOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.ServiceOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.MethodOptions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.google.protobuf.MethodOptions.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.MethodOptions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.MethodOptions.displayName = 'proto.google.protobuf.MethodOptions'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MethodOptions.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.MethodOptions.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.UninterpretedOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.UninterpretedOption.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.UninterpretedOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.UninterpretedOption.displayName = 'proto.google.protobuf.UninterpretedOption'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.UninterpretedOption.NamePart = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.UninterpretedOption.NamePart, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.UninterpretedOption.NamePart.displayName = 'proto.google.protobuf.UninterpretedOption.NamePart'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FeatureSet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 7, null, null); +}; +goog.inherits(proto.google.protobuf.FeatureSet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FeatureSet.displayName = 'proto.google.protobuf.FeatureSet'; +} + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FeatureSet.extensions = {}; + + +/** + * The extensions registered with this message class. This is a map of + * extension field number to fieldInfo object. + * + * For example: + * { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} } + * + * fieldName contains the JsCompiler renamed field name property so that it + * works in OPTIMIZED mode. + * + * @type {!Object} + */ +proto.google.protobuf.FeatureSet.extensionsBinary = {}; + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FeatureSetDefaults = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FeatureSetDefaults.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FeatureSetDefaults, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FeatureSetDefaults.displayName = 'proto.google.protobuf.FeatureSetDefaults'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.displayName = 'proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.SourceCodeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.SourceCodeInfo.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.SourceCodeInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.SourceCodeInfo.displayName = 'proto.google.protobuf.SourceCodeInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.SourceCodeInfo.Location = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.SourceCodeInfo.Location, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.SourceCodeInfo.Location.displayName = 'proto.google.protobuf.SourceCodeInfo.Location'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.GeneratedCodeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.GeneratedCodeInfo.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.GeneratedCodeInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.GeneratedCodeInfo.displayName = 'proto.google.protobuf.GeneratedCodeInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.GeneratedCodeInfo.Annotation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.GeneratedCodeInfo.Annotation.displayName = 'proto.google.protobuf.GeneratedCodeInfo.Annotation'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.FileDescriptorSet.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.FileDescriptorSet.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FileDescriptorSet.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.FileDescriptorSet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileDescriptorSet.toObject = function(includeInstance, msg) { + var f, obj = { +fileList: jspb.Message.toObjectList(msg.getFileList(), + proto.google.protobuf.FileDescriptorProto.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FileDescriptorSet} + */ +proto.google.protobuf.FileDescriptorSet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FileDescriptorSet; + return proto.google.protobuf.FileDescriptorSet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FileDescriptorSet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FileDescriptorSet} + */ +proto.google.protobuf.FileDescriptorSet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.protobuf.FileDescriptorProto; + reader.readMessage(value,proto.google.protobuf.FileDescriptorProto.deserializeBinaryFromReader); + msg.addFile(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FileDescriptorSet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FileDescriptorSet.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FileDescriptorSet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileDescriptorSet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFileList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.protobuf.FileDescriptorProto.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated FileDescriptorProto file = 1; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorSet.prototype.getFileList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FileDescriptorProto, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorSet} returns this +*/ +proto.google.protobuf.FileDescriptorSet.prototype.setFileList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.protobuf.FileDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} + */ +proto.google.protobuf.FileDescriptorSet.prototype.addFile = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.FileDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorSet} returns this + */ +proto.google.protobuf.FileDescriptorSet.prototype.clearFileList = function() { + return this.setFileList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.FileDescriptorProto.repeatedFields_ = [3,10,11,4,5,6,7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.FileDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FileDescriptorProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.FileDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { +name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +pb_package: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +dependencyList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, +publicDependencyList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, +weakDependencyList: (f = jspb.Message.getRepeatedField(msg, 11)) == null ? undefined : f, +messageTypeList: jspb.Message.toObjectList(msg.getMessageTypeList(), + proto.google.protobuf.DescriptorProto.toObject, includeInstance), +enumTypeList: jspb.Message.toObjectList(msg.getEnumTypeList(), + proto.google.protobuf.EnumDescriptorProto.toObject, includeInstance), +serviceList: jspb.Message.toObjectList(msg.getServiceList(), + proto.google.protobuf.ServiceDescriptorProto.toObject, includeInstance), +extensionList: jspb.Message.toObjectList(msg.getExtensionList(), + proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance), +options: (f = msg.getOptions()) && proto.google.protobuf.FileOptions.toObject(includeInstance, f), +sourceCodeInfo: (f = msg.getSourceCodeInfo()) && proto.google.protobuf.SourceCodeInfo.toObject(includeInstance, f), +syntax: (f = jspb.Message.getField(msg, 12)) == null ? undefined : f, +edition: (f = jspb.Message.getField(msg, 14)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FileDescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FileDescriptorProto; + return proto.google.protobuf.FileDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FileDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FileDescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPackage(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addDependency(value); + break; + case 10: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addPublicDependency(values[i]); + } + break; + case 11: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addWeakDependency(values[i]); + } + break; + case 4: + var value = new proto.google.protobuf.DescriptorProto; + reader.readMessage(value,proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader); + msg.addMessageType(value); + break; + case 5: + var value = new proto.google.protobuf.EnumDescriptorProto; + reader.readMessage(value,proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader); + msg.addEnumType(value); + break; + case 6: + var value = new proto.google.protobuf.ServiceDescriptorProto; + reader.readMessage(value,proto.google.protobuf.ServiceDescriptorProto.deserializeBinaryFromReader); + msg.addService(value); + break; + case 7: + var value = new proto.google.protobuf.FieldDescriptorProto; + reader.readMessage(value,proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader); + msg.addExtension$(value); + break; + case 8: + var value = new proto.google.protobuf.FileOptions; + reader.readMessage(value,proto.google.protobuf.FileOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 9: + var value = new proto.google.protobuf.SourceCodeInfo; + reader.readMessage(value,proto.google.protobuf.SourceCodeInfo.deserializeBinaryFromReader); + msg.setSourceCodeInfo(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setSyntax(value); + break; + case 14: + var value = /** @type {!proto.google.protobuf.Edition} */ (reader.readEnum()); + msg.setEdition(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FileDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FileDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = message.getDependencyList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getPublicDependencyList(); + if (f.length > 0) { + writer.writeRepeatedInt32( + 10, + f + ); + } + f = message.getWeakDependencyList(); + if (f.length > 0) { + writer.writeRepeatedInt32( + 11, + f + ); + } + f = message.getMessageTypeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.google.protobuf.DescriptorProto.serializeBinaryToWriter + ); + } + f = message.getEnumTypeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getServiceList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.google.protobuf.ServiceDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getExtensionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.google.protobuf.FileOptions.serializeBinaryToWriter + ); + } + f = message.getSourceCodeInfo(); + if (f != null) { + writer.writeMessage( + 9, + f, + proto.google.protobuf.SourceCodeInfo.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeString( + 12, + f + ); + } + f = /** @type {!proto.google.protobuf.Edition} */ (jspb.Message.getField(message, 14)); + if (f != null) { + writer.writeEnum( + 14, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.setName = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearName = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string package = 2; + * @return {string} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.setPackage = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearPackage = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileDescriptorProto.prototype.hasPackage = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated string dependency = 3; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getDependencyList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.setDependencyList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.addDependency = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearDependencyList = function() { + return this.setDependencyList([]); +}; + + +/** + * repeated int32 public_dependency = 10; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getPublicDependencyList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.setPublicDependencyList = function(value) { + return jspb.Message.setField(this, 10, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.addPublicDependency = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearPublicDependencyList = function() { + return this.setPublicDependencyList([]); +}; + + +/** + * repeated int32 weak_dependency = 11; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getWeakDependencyList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 11)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.setWeakDependencyList = function(value) { + return jspb.Message.setField(this, 11, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.addWeakDependency = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 11, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearWeakDependencyList = function() { + return this.setWeakDependencyList([]); +}; + + +/** + * repeated DescriptorProto message_type = 4; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getMessageTypeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.DescriptorProto, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ +proto.google.protobuf.FileDescriptorProto.prototype.setMessageTypeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.google.protobuf.DescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.DescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.prototype.addMessageType = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.google.protobuf.DescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearMessageTypeList = function() { + return this.setMessageTypeList([]); +}; + + +/** + * repeated EnumDescriptorProto enum_type = 5; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getEnumTypeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.EnumDescriptorProto, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ +proto.google.protobuf.FileDescriptorProto.prototype.setEnumTypeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.google.protobuf.EnumDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.EnumDescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.prototype.addEnumType = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.google.protobuf.EnumDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearEnumTypeList = function() { + return this.setEnumTypeList([]); +}; + + +/** + * repeated ServiceDescriptorProto service = 6; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getServiceList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.ServiceDescriptorProto, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ +proto.google.protobuf.FileDescriptorProto.prototype.setServiceList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.google.protobuf.ServiceDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.ServiceDescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.prototype.addService = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.google.protobuf.ServiceDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearServiceList = function() { + return this.setServiceList([]); +}; + + +/** + * repeated FieldDescriptorProto extension = 7; + * @return {!Array} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getExtensionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FieldDescriptorProto, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ +proto.google.protobuf.FileDescriptorProto.prototype.setExtensionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.google.protobuf.FieldDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FieldDescriptorProto} + */ +proto.google.protobuf.FileDescriptorProto.prototype.addExtension$ = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.google.protobuf.FieldDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearExtensionList = function() { + return this.setExtensionList([]); +}; + + +/** + * optional FileOptions options = 8; + * @return {?proto.google.protobuf.FileOptions} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.FileOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.FileOptions, 8)); +}; + + +/** + * @param {?proto.google.protobuf.FileOptions|undefined} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ +proto.google.protobuf.FileDescriptorProto.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional SourceCodeInfo source_code_info = 9; + * @return {?proto.google.protobuf.SourceCodeInfo} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getSourceCodeInfo = function() { + return /** @type{?proto.google.protobuf.SourceCodeInfo} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.SourceCodeInfo, 9)); +}; + + +/** + * @param {?proto.google.protobuf.SourceCodeInfo|undefined} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this +*/ +proto.google.protobuf.FileDescriptorProto.prototype.setSourceCodeInfo = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearSourceCodeInfo = function() { + return this.setSourceCodeInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileDescriptorProto.prototype.hasSourceCodeInfo = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string syntax = 12; + * @return {string} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getSyntax = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.setSyntax = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearSyntax = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileDescriptorProto.prototype.hasSyntax = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional Edition edition = 14; + * @return {!proto.google.protobuf.Edition} + */ +proto.google.protobuf.FileDescriptorProto.prototype.getEdition = function() { + return /** @type {!proto.google.protobuf.Edition} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +}; + + +/** + * @param {!proto.google.protobuf.Edition} value + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.setEdition = function(value) { + return jspb.Message.setField(this, 14, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileDescriptorProto} returns this + */ +proto.google.protobuf.FileDescriptorProto.prototype.clearEdition = function() { + return jspb.Message.setField(this, 14, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileDescriptorProto.prototype.hasEdition = function() { + return jspb.Message.getField(this, 14) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.DescriptorProto.repeatedFields_ = [2,6,3,4,5,8,9,10]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.DescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.DescriptorProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.DescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { +name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +fieldList: jspb.Message.toObjectList(msg.getFieldList(), + proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance), +extensionList: jspb.Message.toObjectList(msg.getExtensionList(), + proto.google.protobuf.FieldDescriptorProto.toObject, includeInstance), +nestedTypeList: jspb.Message.toObjectList(msg.getNestedTypeList(), + proto.google.protobuf.DescriptorProto.toObject, includeInstance), +enumTypeList: jspb.Message.toObjectList(msg.getEnumTypeList(), + proto.google.protobuf.EnumDescriptorProto.toObject, includeInstance), +extensionRangeList: jspb.Message.toObjectList(msg.getExtensionRangeList(), + proto.google.protobuf.DescriptorProto.ExtensionRange.toObject, includeInstance), +oneofDeclList: jspb.Message.toObjectList(msg.getOneofDeclList(), + proto.google.protobuf.OneofDescriptorProto.toObject, includeInstance), +options: (f = msg.getOptions()) && proto.google.protobuf.MessageOptions.toObject(includeInstance, f), +reservedRangeList: jspb.Message.toObjectList(msg.getReservedRangeList(), + proto.google.protobuf.DescriptorProto.ReservedRange.toObject, includeInstance), +reservedNameList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.DescriptorProto} + */ +proto.google.protobuf.DescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.DescriptorProto; + return proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.DescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.DescriptorProto} + */ +proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.google.protobuf.FieldDescriptorProto; + reader.readMessage(value,proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader); + msg.addField(value); + break; + case 6: + var value = new proto.google.protobuf.FieldDescriptorProto; + reader.readMessage(value,proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader); + msg.addExtension$(value); + break; + case 3: + var value = new proto.google.protobuf.DescriptorProto; + reader.readMessage(value,proto.google.protobuf.DescriptorProto.deserializeBinaryFromReader); + msg.addNestedType(value); + break; + case 4: + var value = new proto.google.protobuf.EnumDescriptorProto; + reader.readMessage(value,proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader); + msg.addEnumType(value); + break; + case 5: + var value = new proto.google.protobuf.DescriptorProto.ExtensionRange; + reader.readMessage(value,proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinaryFromReader); + msg.addExtensionRange(value); + break; + case 8: + var value = new proto.google.protobuf.OneofDescriptorProto; + reader.readMessage(value,proto.google.protobuf.OneofDescriptorProto.deserializeBinaryFromReader); + msg.addOneofDecl(value); + break; + case 7: + var value = new proto.google.protobuf.MessageOptions; + reader.readMessage(value,proto.google.protobuf.MessageOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 9: + var value = new proto.google.protobuf.DescriptorProto.ReservedRange; + reader.readMessage(value,proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinaryFromReader); + msg.addReservedRange(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.addReservedName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.DescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.DescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.DescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getFieldList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getExtensionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getNestedTypeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.google.protobuf.DescriptorProto.serializeBinaryToWriter + ); + } + f = message.getEnumTypeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getExtensionRangeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.google.protobuf.DescriptorProto.ExtensionRange.serializeBinaryToWriter + ); + } + f = message.getOneofDeclList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + proto.google.protobuf.OneofDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.google.protobuf.MessageOptions.serializeBinaryToWriter + ); + } + f = message.getReservedRangeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + proto.google.protobuf.DescriptorProto.ReservedRange.serializeBinaryToWriter + ); + } + f = message.getReservedNameList(); + if (f.length > 0) { + writer.writeRepeatedString( + 10, + f + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.DescriptorProto.ExtensionRange.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.toObject = function(includeInstance, msg) { + var f, obj = { +start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +options: (f = msg.getOptions()) && proto.google.protobuf.ExtensionRangeOptions.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.DescriptorProto.ExtensionRange; + return proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setStart(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setEnd(value); + break; + case 3: + var value = new proto.google.protobuf.ExtensionRangeOptions; + reader.readMessage(value,proto.google.protobuf.ExtensionRangeOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.DescriptorProto.ExtensionRange.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt32( + 2, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.protobuf.ExtensionRangeOptions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int32 start = 1; + * @return {number} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getStart = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setStart = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearStart = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasStart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 end = 2; + * @return {number} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getEnd = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setEnd = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearEnd = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasEnd = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ExtensionRangeOptions options = 3; + * @return {?proto.google.protobuf.ExtensionRangeOptions} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.ExtensionRangeOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.ExtensionRangeOptions, 3)); +}; + + +/** + * @param {?proto.google.protobuf.ExtensionRangeOptions|undefined} value + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this +*/ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} returns this + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.ExtensionRange.prototype.hasOptions = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.DescriptorProto.ReservedRange.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.DescriptorProto.ReservedRange} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.ReservedRange.toObject = function(includeInstance, msg) { + var f, obj = { +start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.DescriptorProto.ReservedRange; + return proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.DescriptorProto.ReservedRange} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setStart(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setEnd(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.DescriptorProto.ReservedRange.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.DescriptorProto.ReservedRange} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.DescriptorProto.ReservedRange.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional int32 start = 1; + * @return {number} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getStart = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setStart = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearStart = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.hasStart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 end = 2; + * @return {number} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.getEnd = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.setEnd = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} returns this + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.clearEnd = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.ReservedRange.prototype.hasEnd = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.DescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.setName = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearName = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated FieldDescriptorProto field = 2; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getFieldList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FieldDescriptorProto, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ +proto.google.protobuf.DescriptorProto.prototype.setFieldList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.FieldDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FieldDescriptorProto} + */ +proto.google.protobuf.DescriptorProto.prototype.addField = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.FieldDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearFieldList = function() { + return this.setFieldList([]); +}; + + +/** + * repeated FieldDescriptorProto extension = 6; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getExtensionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FieldDescriptorProto, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ +proto.google.protobuf.DescriptorProto.prototype.setExtensionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.google.protobuf.FieldDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FieldDescriptorProto} + */ +proto.google.protobuf.DescriptorProto.prototype.addExtension$ = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.google.protobuf.FieldDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearExtensionList = function() { + return this.setExtensionList([]); +}; + + +/** + * repeated DescriptorProto nested_type = 3; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getNestedTypeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.DescriptorProto, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ +proto.google.protobuf.DescriptorProto.prototype.setNestedTypeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.google.protobuf.DescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.DescriptorProto} + */ +proto.google.protobuf.DescriptorProto.prototype.addNestedType = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.DescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearNestedTypeList = function() { + return this.setNestedTypeList([]); +}; + + +/** + * repeated EnumDescriptorProto enum_type = 4; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getEnumTypeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.EnumDescriptorProto, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ +proto.google.protobuf.DescriptorProto.prototype.setEnumTypeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.google.protobuf.EnumDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.EnumDescriptorProto} + */ +proto.google.protobuf.DescriptorProto.prototype.addEnumType = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.google.protobuf.EnumDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearEnumTypeList = function() { + return this.setEnumTypeList([]); +}; + + +/** + * repeated ExtensionRange extension_range = 5; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getExtensionRangeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.DescriptorProto.ExtensionRange, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ +proto.google.protobuf.DescriptorProto.prototype.setExtensionRangeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.google.protobuf.DescriptorProto.ExtensionRange=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.DescriptorProto.ExtensionRange} + */ +proto.google.protobuf.DescriptorProto.prototype.addExtensionRange = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.google.protobuf.DescriptorProto.ExtensionRange, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearExtensionRangeList = function() { + return this.setExtensionRangeList([]); +}; + + +/** + * repeated OneofDescriptorProto oneof_decl = 8; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getOneofDeclList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.OneofDescriptorProto, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ +proto.google.protobuf.DescriptorProto.prototype.setOneofDeclList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.google.protobuf.OneofDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.OneofDescriptorProto} + */ +proto.google.protobuf.DescriptorProto.prototype.addOneofDecl = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.google.protobuf.OneofDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearOneofDeclList = function() { + return this.setOneofDeclList([]); +}; + + +/** + * optional MessageOptions options = 7; + * @return {?proto.google.protobuf.MessageOptions} + */ +proto.google.protobuf.DescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.MessageOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.MessageOptions, 7)); +}; + + +/** + * @param {?proto.google.protobuf.MessageOptions|undefined} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ +proto.google.protobuf.DescriptorProto.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.DescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * repeated ReservedRange reserved_range = 9; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getReservedRangeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.DescriptorProto.ReservedRange, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this +*/ +proto.google.protobuf.DescriptorProto.prototype.setReservedRangeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.google.protobuf.DescriptorProto.ReservedRange=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.DescriptorProto.ReservedRange} + */ +proto.google.protobuf.DescriptorProto.prototype.addReservedRange = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.google.protobuf.DescriptorProto.ReservedRange, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearReservedRangeList = function() { + return this.setReservedRangeList([]); +}; + + +/** + * repeated string reserved_name = 10; + * @return {!Array} + */ +proto.google.protobuf.DescriptorProto.prototype.getReservedNameList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.setReservedNameList = function(value) { + return jspb.Message.setField(this, 10, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.addReservedName = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.DescriptorProto} returns this + */ +proto.google.protobuf.DescriptorProto.prototype.clearReservedNameList = function() { + return this.setReservedNameList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.ExtensionRangeOptions.repeatedFields_ = [999,2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.ExtensionRangeOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.ExtensionRangeOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ExtensionRangeOptions.toObject = function(includeInstance, msg) { + var f, obj = { +uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance), +declarationList: jspb.Message.toObjectList(msg.getDeclarationList(), + proto.google.protobuf.ExtensionRangeOptions.Declaration.toObject, includeInstance), +features: (f = msg.getFeatures()) && proto.google.protobuf.FeatureSet.toObject(includeInstance, f), +verification: jspb.Message.getFieldWithDefault(msg, 3, 1) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.ExtensionRangeOptions.extensions, proto.google.protobuf.ExtensionRangeOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.ExtensionRangeOptions} + */ +proto.google.protobuf.ExtensionRangeOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.ExtensionRangeOptions; + return proto.google.protobuf.ExtensionRangeOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.ExtensionRangeOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.ExtensionRangeOptions} + */ +proto.google.protobuf.ExtensionRangeOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + case 2: + var value = new proto.google.protobuf.ExtensionRangeOptions.Declaration; + reader.readMessage(value,proto.google.protobuf.ExtensionRangeOptions.Declaration.deserializeBinaryFromReader); + msg.addDeclaration(value); + break; + case 50: + var value = new proto.google.protobuf.FeatureSet; + reader.readMessage(value,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader); + msg.setFeatures(value); + break; + case 3: + var value = /** @type {!proto.google.protobuf.ExtensionRangeOptions.VerificationState} */ (reader.readEnum()); + msg.setVerification(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.ExtensionRangeOptions.extensionsBinary, + proto.google.protobuf.ExtensionRangeOptions.prototype.getExtension, + proto.google.protobuf.ExtensionRangeOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.ExtensionRangeOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.ExtensionRangeOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ExtensionRangeOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + f = message.getDeclarationList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.protobuf.ExtensionRangeOptions.Declaration.serializeBinaryToWriter + ); + } + f = message.getFeatures(); + if (f != null) { + writer.writeMessage( + 50, + f, + proto.google.protobuf.FeatureSet.serializeBinaryToWriter + ); + } + f = /** @type {!proto.google.protobuf.ExtensionRangeOptions.VerificationState} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeEnum( + 3, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.ExtensionRangeOptions.extensionsBinary, proto.google.protobuf.ExtensionRangeOptions.prototype.getExtension); +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.ExtensionRangeOptions.VerificationState = { + DECLARATION: 0, + UNVERIFIED: 1 +}; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.ExtensionRangeOptions.Declaration.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.ExtensionRangeOptions.Declaration} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.toObject = function(includeInstance, msg) { + var f, obj = { +number: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +fullName: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +type: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +reserved: (f = jspb.Message.getBooleanField(msg, 5)) == null ? undefined : f, +repeated: (f = jspb.Message.getBooleanField(msg, 6)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.ExtensionRangeOptions.Declaration} + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.ExtensionRangeOptions.Declaration; + return proto.google.protobuf.ExtensionRangeOptions.Declaration.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.ExtensionRangeOptions.Declaration} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.ExtensionRangeOptions.Declaration} + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNumber(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFullName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReserved(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRepeated(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.ExtensionRangeOptions.Declaration.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.ExtensionRangeOptions.Declaration} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt32( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBool( + 5, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBool( + 6, + f + ); + } +}; + + +/** + * optional int32 number = 1; + * @return {number} + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.getNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.ExtensionRangeOptions.Declaration} returns this + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.setNumber = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.ExtensionRangeOptions.Declaration} returns this + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.clearNumber = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.hasNumber = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string full_name = 2; + * @return {string} + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.getFullName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.ExtensionRangeOptions.Declaration} returns this + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.setFullName = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.ExtensionRangeOptions.Declaration} returns this + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.clearFullName = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.hasFullName = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string type = 3; + * @return {string} + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.ExtensionRangeOptions.Declaration} returns this + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.setType = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.ExtensionRangeOptions.Declaration} returns this + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.clearType = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.hasType = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool reserved = 5; + * @return {boolean} + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.getReserved = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.ExtensionRangeOptions.Declaration} returns this + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.setReserved = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.ExtensionRangeOptions.Declaration} returns this + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.clearReserved = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.hasReserved = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bool repeated = 6; + * @return {boolean} + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.getRepeated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.ExtensionRangeOptions.Declaration} returns this + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.setRepeated = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.ExtensionRangeOptions.Declaration} returns this + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.clearRepeated = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.ExtensionRangeOptions.Declaration.prototype.hasRepeated = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this +*/ +proto.google.protobuf.ExtensionRangeOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + +/** + * repeated Declaration declaration = 2; + * @return {!Array} + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.getDeclarationList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.ExtensionRangeOptions.Declaration, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this +*/ +proto.google.protobuf.ExtensionRangeOptions.prototype.setDeclarationList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.ExtensionRangeOptions.Declaration=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.ExtensionRangeOptions.Declaration} + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.addDeclaration = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.ExtensionRangeOptions.Declaration, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.clearDeclarationList = function() { + return this.setDeclarationList([]); +}; + + +/** + * optional FeatureSet features = 50; + * @return {?proto.google.protobuf.FeatureSet} + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.getFeatures = function() { + return /** @type{?proto.google.protobuf.FeatureSet} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.FeatureSet, 50)); +}; + + +/** + * @param {?proto.google.protobuf.FeatureSet|undefined} value + * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this +*/ +proto.google.protobuf.ExtensionRangeOptions.prototype.setFeatures = function(value) { + return jspb.Message.setWrapperField(this, 50, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.clearFeatures = function() { + return this.setFeatures(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.hasFeatures = function() { + return jspb.Message.getField(this, 50) != null; +}; + + +/** + * optional VerificationState verification = 3; + * @return {!proto.google.protobuf.ExtensionRangeOptions.VerificationState} + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.getVerification = function() { + return /** @type {!proto.google.protobuf.ExtensionRangeOptions.VerificationState} */ (jspb.Message.getFieldWithDefault(this, 3, 1)); +}; + + +/** + * @param {!proto.google.protobuf.ExtensionRangeOptions.VerificationState} value + * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.setVerification = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.ExtensionRangeOptions} returns this + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.clearVerification = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.ExtensionRangeOptions.prototype.hasVerification = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FieldDescriptorProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.FieldDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { +name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +number: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +label: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +type: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +typeName: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f, +extendee: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +defaultValue: (f = jspb.Message.getField(msg, 7)) == null ? undefined : f, +oneofIndex: (f = jspb.Message.getField(msg, 9)) == null ? undefined : f, +jsonName: (f = jspb.Message.getField(msg, 10)) == null ? undefined : f, +options: (f = msg.getOptions()) && proto.google.protobuf.FieldOptions.toObject(includeInstance, f), +proto3Optional: (f = jspb.Message.getBooleanField(msg, 17)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FieldDescriptorProto} + */ +proto.google.protobuf.FieldDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FieldDescriptorProto; + return proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FieldDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FieldDescriptorProto} + */ +proto.google.protobuf.FieldDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNumber(value); + break; + case 4: + var value = /** @type {!proto.google.protobuf.FieldDescriptorProto.Label} */ (reader.readEnum()); + msg.setLabel(value); + break; + case 5: + var value = /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (reader.readEnum()); + msg.setType(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setTypeName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setExtendee(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setDefaultValue(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt32()); + msg.setOneofIndex(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setJsonName(value); + break; + case 8: + var value = new proto.google.protobuf.FieldOptions; + reader.readMessage(value,proto.google.protobuf.FieldOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 17: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProto3Optional(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FieldDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeInt32( + 3, + f + ); + } + f = /** @type {!proto.google.protobuf.FieldDescriptorProto.Label} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeEnum( + 4, + f + ); + } + f = /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeEnum( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeString( + 7, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeInt32( + 9, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeString( + 10, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.google.protobuf.FieldOptions.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 17)); + if (f != null) { + writer.writeBool( + 17, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.FieldDescriptorProto.Type = { + TYPE_DOUBLE: 1, + TYPE_FLOAT: 2, + TYPE_INT64: 3, + TYPE_UINT64: 4, + TYPE_INT32: 5, + TYPE_FIXED64: 6, + TYPE_FIXED32: 7, + TYPE_BOOL: 8, + TYPE_STRING: 9, + TYPE_GROUP: 10, + TYPE_MESSAGE: 11, + TYPE_BYTES: 12, + TYPE_UINT32: 13, + TYPE_ENUM: 14, + TYPE_SFIXED32: 15, + TYPE_SFIXED64: 16, + TYPE_SINT32: 17, + TYPE_SINT64: 18 +}; + +/** + * @enum {number} + */ +proto.google.protobuf.FieldDescriptorProto.Label = { + LABEL_OPTIONAL: 1, + LABEL_REPEATED: 3, + LABEL_REQUIRED: 2 +}; + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setName = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearName = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 number = 3; + * @return {number} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setNumber = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearNumber = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasNumber = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Label label = 4; + * @return {!proto.google.protobuf.FieldDescriptorProto.Label} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getLabel = function() { + return /** @type {!proto.google.protobuf.FieldDescriptorProto.Label} */ (jspb.Message.getFieldWithDefault(this, 4, 1)); +}; + + +/** + * @param {!proto.google.protobuf.FieldDescriptorProto.Label} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setLabel = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearLabel = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasLabel = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Type type = 5; + * @return {!proto.google.protobuf.FieldDescriptorProto.Type} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getType = function() { + return /** @type {!proto.google.protobuf.FieldDescriptorProto.Type} */ (jspb.Message.getFieldWithDefault(this, 5, 1)); +}; + + +/** + * @param {!proto.google.protobuf.FieldDescriptorProto.Type} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setType = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearType = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasType = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string type_name = 6; + * @return {string} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getTypeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setTypeName = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearTypeName = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasTypeName = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string extendee = 2; + * @return {string} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getExtendee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setExtendee = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearExtendee = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasExtendee = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string default_value = 7; + * @return {string} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getDefaultValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setDefaultValue = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearDefaultValue = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasDefaultValue = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional int32 oneof_index = 9; + * @return {number} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getOneofIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setOneofIndex = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearOneofIndex = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasOneofIndex = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string json_name = 10; + * @return {string} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getJsonName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setJsonName = function(value) { + return jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearJsonName = function() { + return jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasJsonName = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional FieldOptions options = 8; + * @return {?proto.google.protobuf.FieldOptions} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.FieldOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.FieldOptions, 8)); +}; + + +/** + * @param {?proto.google.protobuf.FieldOptions|undefined} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this +*/ +proto.google.protobuf.FieldDescriptorProto.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional bool proto3_optional = 17; + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.getProto3Optional = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.setProto3Optional = function(value) { + return jspb.Message.setField(this, 17, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldDescriptorProto} returns this + */ +proto.google.protobuf.FieldDescriptorProto.prototype.clearProto3Optional = function() { + return jspb.Message.setField(this, 17, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldDescriptorProto.prototype.hasProto3Optional = function() { + return jspb.Message.getField(this, 17) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.OneofDescriptorProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.OneofDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.OneofDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { +name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +options: (f = msg.getOptions()) && proto.google.protobuf.OneofOptions.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.OneofDescriptorProto} + */ +proto.google.protobuf.OneofDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.OneofDescriptorProto; + return proto.google.protobuf.OneofDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.OneofDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.OneofDescriptorProto} + */ +proto.google.protobuf.OneofDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.google.protobuf.OneofOptions; + reader.readMessage(value,proto.google.protobuf.OneofOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.OneofDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.OneofDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.OneofDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.protobuf.OneofOptions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this + */ +proto.google.protobuf.OneofDescriptorProto.prototype.setName = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this + */ +proto.google.protobuf.OneofDescriptorProto.prototype.clearName = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional OneofOptions options = 2; + * @return {?proto.google.protobuf.OneofOptions} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.OneofOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.OneofOptions, 2)); +}; + + +/** + * @param {?proto.google.protobuf.OneofOptions|undefined} value + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this +*/ +proto.google.protobuf.OneofDescriptorProto.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.OneofDescriptorProto} returns this + */ +proto.google.protobuf.OneofDescriptorProto.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.OneofDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.EnumDescriptorProto.repeatedFields_ = [2,4,5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.EnumDescriptorProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.EnumDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { +name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +valueList: jspb.Message.toObjectList(msg.getValueList(), + proto.google.protobuf.EnumValueDescriptorProto.toObject, includeInstance), +options: (f = msg.getOptions()) && proto.google.protobuf.EnumOptions.toObject(includeInstance, f), +reservedRangeList: jspb.Message.toObjectList(msg.getReservedRangeList(), + proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject, includeInstance), +reservedNameList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.EnumDescriptorProto} + */ +proto.google.protobuf.EnumDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.EnumDescriptorProto; + return proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.EnumDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.EnumDescriptorProto} + */ +proto.google.protobuf.EnumDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.google.protobuf.EnumValueDescriptorProto; + reader.readMessage(value,proto.google.protobuf.EnumValueDescriptorProto.deserializeBinaryFromReader); + msg.addValue(value); + break; + case 3: + var value = new proto.google.protobuf.EnumOptions; + reader.readMessage(value,proto.google.protobuf.EnumOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 4: + var value = new proto.google.protobuf.EnumDescriptorProto.EnumReservedRange; + reader.readMessage(value,proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinaryFromReader); + msg.addReservedRange(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addReservedName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.EnumDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getValueList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.protobuf.EnumValueDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.protobuf.EnumOptions.serializeBinaryToWriter + ); + } + f = message.getReservedRangeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.serializeBinaryToWriter + ); + } + f = message.getReservedNameList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject = function(includeInstance, msg) { + var f, obj = { +start: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +end: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.EnumDescriptorProto.EnumReservedRange; + return proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setStart(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setEnd(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeInt32( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional int32 start = 1; + * @return {number} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getStart = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setStart = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearStart = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.hasStart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 end = 2; + * @return {number} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.getEnd = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.setEnd = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} returns this + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.clearEnd = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumDescriptorProto.EnumReservedRange.prototype.hasEnd = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ +proto.google.protobuf.EnumDescriptorProto.prototype.setName = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ +proto.google.protobuf.EnumDescriptorProto.prototype.clearName = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated EnumValueDescriptorProto value = 2; + * @return {!Array} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.getValueList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.EnumValueDescriptorProto, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this +*/ +proto.google.protobuf.EnumDescriptorProto.prototype.setValueList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.EnumValueDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.EnumValueDescriptorProto} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.addValue = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.EnumValueDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ +proto.google.protobuf.EnumDescriptorProto.prototype.clearValueList = function() { + return this.setValueList([]); +}; + + +/** + * optional EnumOptions options = 3; + * @return {?proto.google.protobuf.EnumOptions} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.EnumOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.EnumOptions, 3)); +}; + + +/** + * @param {?proto.google.protobuf.EnumOptions|undefined} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this +*/ +proto.google.protobuf.EnumDescriptorProto.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ +proto.google.protobuf.EnumDescriptorProto.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated EnumReservedRange reserved_range = 4; + * @return {!Array} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.getReservedRangeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.EnumDescriptorProto.EnumReservedRange, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this +*/ +proto.google.protobuf.EnumDescriptorProto.prototype.setReservedRangeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.EnumDescriptorProto.EnumReservedRange} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.addReservedRange = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.google.protobuf.EnumDescriptorProto.EnumReservedRange, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ +proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedRangeList = function() { + return this.setReservedRangeList([]); +}; + + +/** + * repeated string reserved_name = 5; + * @return {!Array} + */ +proto.google.protobuf.EnumDescriptorProto.prototype.getReservedNameList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ +proto.google.protobuf.EnumDescriptorProto.prototype.setReservedNameList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ +proto.google.protobuf.EnumDescriptorProto.prototype.addReservedName = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumDescriptorProto} returns this + */ +proto.google.protobuf.EnumDescriptorProto.prototype.clearReservedNameList = function() { + return this.setReservedNameList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.EnumValueDescriptorProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.EnumValueDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumValueDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { +name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +number: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +options: (f = msg.getOptions()) && proto.google.protobuf.EnumValueOptions.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} + */ +proto.google.protobuf.EnumValueDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.EnumValueDescriptorProto; + return proto.google.protobuf.EnumValueDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.EnumValueDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} + */ +proto.google.protobuf.EnumValueDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNumber(value); + break; + case 3: + var value = new proto.google.protobuf.EnumValueOptions; + reader.readMessage(value,proto.google.protobuf.EnumValueOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.EnumValueDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.EnumValueDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumValueDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeInt32( + 2, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.setName = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.clearName = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int32 number = 2; + * @return {number} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.getNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.setNumber = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.clearNumber = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.hasNumber = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional EnumValueOptions options = 3; + * @return {?proto.google.protobuf.EnumValueOptions} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.EnumValueOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.EnumValueOptions, 3)); +}; + + +/** + * @param {?proto.google.protobuf.EnumValueOptions|undefined} value + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this +*/ +proto.google.protobuf.EnumValueDescriptorProto.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.EnumValueDescriptorProto} returns this + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumValueDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.ServiceDescriptorProto.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.ServiceDescriptorProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.ServiceDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ServiceDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { +name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +methodList: jspb.Message.toObjectList(msg.getMethodList(), + proto.google.protobuf.MethodDescriptorProto.toObject, includeInstance), +options: (f = msg.getOptions()) && proto.google.protobuf.ServiceOptions.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.ServiceDescriptorProto} + */ +proto.google.protobuf.ServiceDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.ServiceDescriptorProto; + return proto.google.protobuf.ServiceDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.ServiceDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.ServiceDescriptorProto} + */ +proto.google.protobuf.ServiceDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.google.protobuf.MethodDescriptorProto; + reader.readMessage(value,proto.google.protobuf.MethodDescriptorProto.deserializeBinaryFromReader); + msg.addMethod(value); + break; + case 3: + var value = new proto.google.protobuf.ServiceOptions; + reader.readMessage(value,proto.google.protobuf.ServiceOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.ServiceDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.ServiceDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ServiceDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getMethodList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.protobuf.MethodDescriptorProto.serializeBinaryToWriter + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.google.protobuf.ServiceOptions.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.setName = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.clearName = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated MethodDescriptorProto method = 2; + * @return {!Array} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.getMethodList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.MethodDescriptorProto, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this +*/ +proto.google.protobuf.ServiceDescriptorProto.prototype.setMethodList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.MethodDescriptorProto=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.MethodDescriptorProto} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.addMethod = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.MethodDescriptorProto, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.clearMethodList = function() { + return this.setMethodList([]); +}; + + +/** + * optional ServiceOptions options = 3; + * @return {?proto.google.protobuf.ServiceOptions} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.ServiceOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.ServiceOptions, 3)); +}; + + +/** + * @param {?proto.google.protobuf.ServiceOptions|undefined} value + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this +*/ +proto.google.protobuf.ServiceDescriptorProto.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.ServiceDescriptorProto} returns this + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.ServiceDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.MethodDescriptorProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.MethodDescriptorProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MethodDescriptorProto.toObject = function(includeInstance, msg) { + var f, obj = { +name: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +inputType: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +outputType: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +options: (f = msg.getOptions()) && proto.google.protobuf.MethodOptions.toObject(includeInstance, f), +clientStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), +serverStreaming: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.MethodDescriptorProto} + */ +proto.google.protobuf.MethodDescriptorProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.MethodDescriptorProto; + return proto.google.protobuf.MethodDescriptorProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.MethodDescriptorProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.MethodDescriptorProto} + */ +proto.google.protobuf.MethodDescriptorProto.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setInputType(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setOutputType(value); + break; + case 4: + var value = new proto.google.protobuf.MethodOptions; + reader.readMessage(value,proto.google.protobuf.MethodOptions.deserializeBinaryFromReader); + msg.setOptions(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setClientStreaming(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setServerStreaming(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.MethodDescriptorProto.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.MethodDescriptorProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MethodDescriptorProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = message.getOptions(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.google.protobuf.MethodOptions.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBool( + 5, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBool( + 6, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.setName = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearName = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasName = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string input_type = 2; + * @return {string} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getInputType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.setInputType = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearInputType = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasInputType = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string output_type = 3; + * @return {string} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getOutputType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.setOutputType = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearOutputType = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasOutputType = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional MethodOptions options = 4; + * @return {?proto.google.protobuf.MethodOptions} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getOptions = function() { + return /** @type{?proto.google.protobuf.MethodOptions} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.MethodOptions, 4)); +}; + + +/** + * @param {?proto.google.protobuf.MethodOptions|undefined} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this +*/ +proto.google.protobuf.MethodDescriptorProto.prototype.setOptions = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearOptions = function() { + return this.setOptions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasOptions = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bool client_streaming = 5; + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getClientStreaming = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.setClientStreaming = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearClientStreaming = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasClientStreaming = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bool server_streaming = 6; + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.getServerStreaming = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.setServerStreaming = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodDescriptorProto} returns this + */ +proto.google.protobuf.MethodDescriptorProto.prototype.clearServerStreaming = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodDescriptorProto.prototype.hasServerStreaming = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.FileOptions.repeatedFields_ = [999]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.FileOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FileOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.FileOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileOptions.toObject = function(includeInstance, msg) { + var f, obj = { +javaPackage: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +javaOuterClassname: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f, +javaMultipleFiles: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), +javaGenerateEqualsAndHash: (f = jspb.Message.getBooleanField(msg, 20)) == null ? undefined : f, +javaStringCheckUtf8: jspb.Message.getBooleanFieldWithDefault(msg, 27, false), +optimizeFor: jspb.Message.getFieldWithDefault(msg, 9, 1), +goPackage: (f = jspb.Message.getField(msg, 11)) == null ? undefined : f, +ccGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 16, false), +javaGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 17, false), +pyGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 18, false), +phpGenericServices: jspb.Message.getBooleanFieldWithDefault(msg, 42, false), +deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 23, false), +ccEnableArenas: jspb.Message.getBooleanFieldWithDefault(msg, 31, true), +objcClassPrefix: (f = jspb.Message.getField(msg, 36)) == null ? undefined : f, +csharpNamespace: (f = jspb.Message.getField(msg, 37)) == null ? undefined : f, +swiftPrefix: (f = jspb.Message.getField(msg, 39)) == null ? undefined : f, +phpClassPrefix: (f = jspb.Message.getField(msg, 40)) == null ? undefined : f, +phpNamespace: (f = jspb.Message.getField(msg, 41)) == null ? undefined : f, +phpMetadataNamespace: (f = jspb.Message.getField(msg, 44)) == null ? undefined : f, +rubyPackage: (f = jspb.Message.getField(msg, 45)) == null ? undefined : f, +features: (f = msg.getFeatures()) && proto.google.protobuf.FeatureSet.toObject(includeInstance, f), +uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.FileOptions.extensions, proto.google.protobuf.FileOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FileOptions} + */ +proto.google.protobuf.FileOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FileOptions; + return proto.google.protobuf.FileOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FileOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FileOptions} + */ +proto.google.protobuf.FileOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setJavaPackage(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setJavaOuterClassname(value); + break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setJavaMultipleFiles(value); + break; + case 20: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setJavaGenerateEqualsAndHash(value); + break; + case 27: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setJavaStringCheckUtf8(value); + break; + case 9: + var value = /** @type {!proto.google.protobuf.FileOptions.OptimizeMode} */ (reader.readEnum()); + msg.setOptimizeFor(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setGoPackage(value); + break; + case 16: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCcGenericServices(value); + break; + case 17: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setJavaGenericServices(value); + break; + case 18: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPyGenericServices(value); + break; + case 42: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPhpGenericServices(value); + break; + case 23: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 31: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCcEnableArenas(value); + break; + case 36: + var value = /** @type {string} */ (reader.readString()); + msg.setObjcClassPrefix(value); + break; + case 37: + var value = /** @type {string} */ (reader.readString()); + msg.setCsharpNamespace(value); + break; + case 39: + var value = /** @type {string} */ (reader.readString()); + msg.setSwiftPrefix(value); + break; + case 40: + var value = /** @type {string} */ (reader.readString()); + msg.setPhpClassPrefix(value); + break; + case 41: + var value = /** @type {string} */ (reader.readString()); + msg.setPhpNamespace(value); + break; + case 44: + var value = /** @type {string} */ (reader.readString()); + msg.setPhpMetadataNamespace(value); + break; + case 45: + var value = /** @type {string} */ (reader.readString()); + msg.setRubyPackage(value); + break; + case 50: + var value = new proto.google.protobuf.FeatureSet; + reader.readMessage(value,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader); + msg.setFeatures(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.FileOptions.extensionsBinary, + proto.google.protobuf.FileOptions.prototype.getExtension, + proto.google.protobuf.FileOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FileOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FileOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FileOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FileOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeBool( + 10, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 20)); + if (f != null) { + writer.writeBool( + 20, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 27)); + if (f != null) { + writer.writeBool( + 27, + f + ); + } + f = /** @type {!proto.google.protobuf.FileOptions.OptimizeMode} */ (jspb.Message.getField(message, 9)); + if (f != null) { + writer.writeEnum( + 9, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeString( + 11, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 16)); + if (f != null) { + writer.writeBool( + 16, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 17)); + if (f != null) { + writer.writeBool( + 17, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 18)); + if (f != null) { + writer.writeBool( + 18, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 42)); + if (f != null) { + writer.writeBool( + 42, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 23)); + if (f != null) { + writer.writeBool( + 23, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 31)); + if (f != null) { + writer.writeBool( + 31, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 36)); + if (f != null) { + writer.writeString( + 36, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 37)); + if (f != null) { + writer.writeString( + 37, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 39)); + if (f != null) { + writer.writeString( + 39, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 40)); + if (f != null) { + writer.writeString( + 40, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 41)); + if (f != null) { + writer.writeString( + 41, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 44)); + if (f != null) { + writer.writeString( + 44, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 45)); + if (f != null) { + writer.writeString( + 45, + f + ); + } + f = message.getFeatures(); + if (f != null) { + writer.writeMessage( + 50, + f, + proto.google.protobuf.FeatureSet.serializeBinaryToWriter + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.FileOptions.extensionsBinary, proto.google.protobuf.FileOptions.prototype.getExtension); +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.FileOptions.OptimizeMode = { + SPEED: 1, + CODE_SIZE: 2, + LITE_RUNTIME: 3 +}; + +/** + * optional string java_package = 1; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getJavaPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setJavaPackage = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearJavaPackage = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaPackage = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string java_outer_classname = 8; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getJavaOuterClassname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setJavaOuterClassname = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearJavaOuterClassname = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaOuterClassname = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional bool java_multiple_files = 10; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getJavaMultipleFiles = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setJavaMultipleFiles = function(value) { + return jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearJavaMultipleFiles = function() { + return jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaMultipleFiles = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional bool java_generate_equals_and_hash = 20; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getJavaGenerateEqualsAndHash = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 20, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setJavaGenerateEqualsAndHash = function(value) { + return jspb.Message.setField(this, 20, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearJavaGenerateEqualsAndHash = function() { + return jspb.Message.setField(this, 20, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaGenerateEqualsAndHash = function() { + return jspb.Message.getField(this, 20) != null; +}; + + +/** + * optional bool java_string_check_utf8 = 27; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getJavaStringCheckUtf8 = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 27, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setJavaStringCheckUtf8 = function(value) { + return jspb.Message.setField(this, 27, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearJavaStringCheckUtf8 = function() { + return jspb.Message.setField(this, 27, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaStringCheckUtf8 = function() { + return jspb.Message.getField(this, 27) != null; +}; + + +/** + * optional OptimizeMode optimize_for = 9; + * @return {!proto.google.protobuf.FileOptions.OptimizeMode} + */ +proto.google.protobuf.FileOptions.prototype.getOptimizeFor = function() { + return /** @type {!proto.google.protobuf.FileOptions.OptimizeMode} */ (jspb.Message.getFieldWithDefault(this, 9, 1)); +}; + + +/** + * @param {!proto.google.protobuf.FileOptions.OptimizeMode} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setOptimizeFor = function(value) { + return jspb.Message.setField(this, 9, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearOptimizeFor = function() { + return jspb.Message.setField(this, 9, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasOptimizeFor = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string go_package = 11; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getGoPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setGoPackage = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearGoPackage = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasGoPackage = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional bool cc_generic_services = 16; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getCcGenericServices = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 16, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setCcGenericServices = function(value) { + return jspb.Message.setField(this, 16, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearCcGenericServices = function() { + return jspb.Message.setField(this, 16, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasCcGenericServices = function() { + return jspb.Message.getField(this, 16) != null; +}; + + +/** + * optional bool java_generic_services = 17; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getJavaGenericServices = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 17, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setJavaGenericServices = function(value) { + return jspb.Message.setField(this, 17, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearJavaGenericServices = function() { + return jspb.Message.setField(this, 17, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasJavaGenericServices = function() { + return jspb.Message.getField(this, 17) != null; +}; + + +/** + * optional bool py_generic_services = 18; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getPyGenericServices = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 18, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setPyGenericServices = function(value) { + return jspb.Message.setField(this, 18, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearPyGenericServices = function() { + return jspb.Message.setField(this, 18, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasPyGenericServices = function() { + return jspb.Message.getField(this, 18) != null; +}; + + +/** + * optional bool php_generic_services = 42; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getPhpGenericServices = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 42, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setPhpGenericServices = function(value) { + return jspb.Message.setField(this, 42, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearPhpGenericServices = function() { + return jspb.Message.setField(this, 42, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasPhpGenericServices = function() { + return jspb.Message.getField(this, 42) != null; +}; + + +/** + * optional bool deprecated = 23; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 23, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setDeprecated = function(value) { + return jspb.Message.setField(this, 23, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearDeprecated = function() { + return jspb.Message.setField(this, 23, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 23) != null; +}; + + +/** + * optional bool cc_enable_arenas = 31; + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.getCcEnableArenas = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 31, true)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setCcEnableArenas = function(value) { + return jspb.Message.setField(this, 31, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearCcEnableArenas = function() { + return jspb.Message.setField(this, 31, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasCcEnableArenas = function() { + return jspb.Message.getField(this, 31) != null; +}; + + +/** + * optional string objc_class_prefix = 36; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getObjcClassPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 36, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setObjcClassPrefix = function(value) { + return jspb.Message.setField(this, 36, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearObjcClassPrefix = function() { + return jspb.Message.setField(this, 36, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasObjcClassPrefix = function() { + return jspb.Message.getField(this, 36) != null; +}; + + +/** + * optional string csharp_namespace = 37; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getCsharpNamespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 37, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setCsharpNamespace = function(value) { + return jspb.Message.setField(this, 37, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearCsharpNamespace = function() { + return jspb.Message.setField(this, 37, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasCsharpNamespace = function() { + return jspb.Message.getField(this, 37) != null; +}; + + +/** + * optional string swift_prefix = 39; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getSwiftPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 39, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setSwiftPrefix = function(value) { + return jspb.Message.setField(this, 39, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearSwiftPrefix = function() { + return jspb.Message.setField(this, 39, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasSwiftPrefix = function() { + return jspb.Message.getField(this, 39) != null; +}; + + +/** + * optional string php_class_prefix = 40; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getPhpClassPrefix = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 40, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setPhpClassPrefix = function(value) { + return jspb.Message.setField(this, 40, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearPhpClassPrefix = function() { + return jspb.Message.setField(this, 40, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasPhpClassPrefix = function() { + return jspb.Message.getField(this, 40) != null; +}; + + +/** + * optional string php_namespace = 41; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getPhpNamespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 41, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setPhpNamespace = function(value) { + return jspb.Message.setField(this, 41, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearPhpNamespace = function() { + return jspb.Message.setField(this, 41, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasPhpNamespace = function() { + return jspb.Message.getField(this, 41) != null; +}; + + +/** + * optional string php_metadata_namespace = 44; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getPhpMetadataNamespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 44, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setPhpMetadataNamespace = function(value) { + return jspb.Message.setField(this, 44, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearPhpMetadataNamespace = function() { + return jspb.Message.setField(this, 44, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasPhpMetadataNamespace = function() { + return jspb.Message.getField(this, 44) != null; +}; + + +/** + * optional string ruby_package = 45; + * @return {string} + */ +proto.google.protobuf.FileOptions.prototype.getRubyPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 45, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.setRubyPackage = function(value) { + return jspb.Message.setField(this, 45, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearRubyPackage = function() { + return jspb.Message.setField(this, 45, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasRubyPackage = function() { + return jspb.Message.getField(this, 45) != null; +}; + + +/** + * optional FeatureSet features = 50; + * @return {?proto.google.protobuf.FeatureSet} + */ +proto.google.protobuf.FileOptions.prototype.getFeatures = function() { + return /** @type{?proto.google.protobuf.FeatureSet} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.FeatureSet, 50)); +}; + + +/** + * @param {?proto.google.protobuf.FeatureSet|undefined} value + * @return {!proto.google.protobuf.FileOptions} returns this +*/ +proto.google.protobuf.FileOptions.prototype.setFeatures = function(value) { + return jspb.Message.setWrapperField(this, 50, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearFeatures = function() { + return this.setFeatures(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FileOptions.prototype.hasFeatures = function() { + return jspb.Message.getField(this, 50) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.FileOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FileOptions} returns this +*/ +proto.google.protobuf.FileOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.FileOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FileOptions} returns this + */ +proto.google.protobuf.FileOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.MessageOptions.repeatedFields_ = [999]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.MessageOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.MessageOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.MessageOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MessageOptions.toObject = function(includeInstance, msg) { + var f, obj = { +messageSetWireFormat: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), +noStandardDescriptorAccessor: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), +deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), +mapEntry: (f = jspb.Message.getBooleanField(msg, 7)) == null ? undefined : f, +deprecatedLegacyJsonFieldConflicts: (f = jspb.Message.getBooleanField(msg, 11)) == null ? undefined : f, +features: (f = msg.getFeatures()) && proto.google.protobuf.FeatureSet.toObject(includeInstance, f), +uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.MessageOptions.extensions, proto.google.protobuf.MessageOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.MessageOptions} + */ +proto.google.protobuf.MessageOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.MessageOptions; + return proto.google.protobuf.MessageOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.MessageOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.MessageOptions} + */ +proto.google.protobuf.MessageOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMessageSetWireFormat(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setNoStandardDescriptorAccessor(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMapEntry(value); + break; + case 11: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecatedLegacyJsonFieldConflicts(value); + break; + case 12: + var value = new proto.google.protobuf.FeatureSet; + reader.readMessage(value,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader); + msg.setFeatures(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.MessageOptions.extensionsBinary, + proto.google.protobuf.MessageOptions.prototype.getExtension, + proto.google.protobuf.MessageOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.MessageOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.MessageOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.MessageOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MessageOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBool( + 7, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 11)); + if (f != null) { + writer.writeBool( + 11, + f + ); + } + f = message.getFeatures(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.google.protobuf.FeatureSet.serializeBinaryToWriter + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.MessageOptions.extensionsBinary, proto.google.protobuf.MessageOptions.prototype.getExtension); +}; + + +/** + * optional bool message_set_wire_format = 1; + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.getMessageSetWireFormat = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.setMessageSetWireFormat = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.clearMessageSetWireFormat = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.hasMessageSetWireFormat = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool no_standard_descriptor_accessor = 2; + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.getNoStandardDescriptorAccessor = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.setNoStandardDescriptorAccessor = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.clearNoStandardDescriptorAccessor = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.hasNoStandardDescriptorAccessor = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool deprecated = 3; + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.setDeprecated = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.clearDeprecated = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool map_entry = 7; + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.getMapEntry = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.setMapEntry = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.clearMapEntry = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.hasMapEntry = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional bool deprecated_legacy_json_field_conflicts = 11; + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.getDeprecatedLegacyJsonFieldConflicts = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.setDeprecatedLegacyJsonFieldConflicts = function(value) { + return jspb.Message.setField(this, 11, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.clearDeprecatedLegacyJsonFieldConflicts = function() { + return jspb.Message.setField(this, 11, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.hasDeprecatedLegacyJsonFieldConflicts = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional FeatureSet features = 12; + * @return {?proto.google.protobuf.FeatureSet} + */ +proto.google.protobuf.MessageOptions.prototype.getFeatures = function() { + return /** @type{?proto.google.protobuf.FeatureSet} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.FeatureSet, 12)); +}; + + +/** + * @param {?proto.google.protobuf.FeatureSet|undefined} value + * @return {!proto.google.protobuf.MessageOptions} returns this +*/ +proto.google.protobuf.MessageOptions.prototype.setFeatures = function(value) { + return jspb.Message.setWrapperField(this, 12, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.clearFeatures = function() { + return this.setFeatures(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MessageOptions.prototype.hasFeatures = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.MessageOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.MessageOptions} returns this +*/ +proto.google.protobuf.MessageOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.MessageOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.MessageOptions} returns this + */ +proto.google.protobuf.MessageOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.FieldOptions.repeatedFields_ = [19,20,999]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.FieldOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FieldOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.FieldOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldOptions.toObject = function(includeInstance, msg) { + var f, obj = { +ctype: jspb.Message.getFieldWithDefault(msg, 1, 0), +packed: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f, +jstype: jspb.Message.getFieldWithDefault(msg, 6, 0), +lazy: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), +unverifiedLazy: jspb.Message.getBooleanFieldWithDefault(msg, 15, false), +deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), +weak: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), +debugRedact: jspb.Message.getBooleanFieldWithDefault(msg, 16, false), +retention: (f = jspb.Message.getField(msg, 17)) == null ? undefined : f, +targetsList: (f = jspb.Message.getRepeatedField(msg, 19)) == null ? undefined : f, +editionDefaultsList: jspb.Message.toObjectList(msg.getEditionDefaultsList(), + proto.google.protobuf.FieldOptions.EditionDefault.toObject, includeInstance), +features: (f = msg.getFeatures()) && proto.google.protobuf.FeatureSet.toObject(includeInstance, f), +uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.FieldOptions.extensions, proto.google.protobuf.FieldOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FieldOptions} + */ +proto.google.protobuf.FieldOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FieldOptions; + return proto.google.protobuf.FieldOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FieldOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FieldOptions} + */ +proto.google.protobuf.FieldOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.google.protobuf.FieldOptions.CType} */ (reader.readEnum()); + msg.setCtype(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPacked(value); + break; + case 6: + var value = /** @type {!proto.google.protobuf.FieldOptions.JSType} */ (reader.readEnum()); + msg.setJstype(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLazy(value); + break; + case 15: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUnverifiedLazy(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setWeak(value); + break; + case 16: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDebugRedact(value); + break; + case 17: + var value = /** @type {!proto.google.protobuf.FieldOptions.OptionRetention} */ (reader.readEnum()); + msg.setRetention(value); + break; + case 19: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addTargets(values[i]); + } + break; + case 20: + var value = new proto.google.protobuf.FieldOptions.EditionDefault; + reader.readMessage(value,proto.google.protobuf.FieldOptions.EditionDefault.deserializeBinaryFromReader); + msg.addEditionDefaults(value); + break; + case 21: + var value = new proto.google.protobuf.FeatureSet; + reader.readMessage(value,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader); + msg.setFeatures(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.FieldOptions.extensionsBinary, + proto.google.protobuf.FieldOptions.prototype.getExtension, + proto.google.protobuf.FieldOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FieldOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FieldOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FieldOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!proto.google.protobuf.FieldOptions.CType} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = /** @type {!proto.google.protobuf.FieldOptions.JSType} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeEnum( + 6, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeBool( + 5, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 15)); + if (f != null) { + writer.writeBool( + 15, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeBool( + 10, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 16)); + if (f != null) { + writer.writeBool( + 16, + f + ); + } + f = /** @type {!proto.google.protobuf.FieldOptions.OptionRetention} */ (jspb.Message.getField(message, 17)); + if (f != null) { + writer.writeEnum( + 17, + f + ); + } + f = message.getTargetsList(); + if (f.length > 0) { + writer.writeRepeatedEnum( + 19, + f + ); + } + f = message.getEditionDefaultsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 20, + f, + proto.google.protobuf.FieldOptions.EditionDefault.serializeBinaryToWriter + ); + } + f = message.getFeatures(); + if (f != null) { + writer.writeMessage( + 21, + f, + proto.google.protobuf.FeatureSet.serializeBinaryToWriter + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.FieldOptions.extensionsBinary, proto.google.protobuf.FieldOptions.prototype.getExtension); +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.FieldOptions.CType = { + STRING: 0, + CORD: 1, + STRING_PIECE: 2 +}; + +/** + * @enum {number} + */ +proto.google.protobuf.FieldOptions.JSType = { + JS_NORMAL: 0, + JS_STRING: 1, + JS_NUMBER: 2 +}; + +/** + * @enum {number} + */ +proto.google.protobuf.FieldOptions.OptionRetention = { + RETENTION_UNKNOWN: 0, + RETENTION_RUNTIME: 1, + RETENTION_SOURCE: 2 +}; + +/** + * @enum {number} + */ +proto.google.protobuf.FieldOptions.OptionTargetType = { + TARGET_TYPE_UNKNOWN: 0, + TARGET_TYPE_FILE: 1, + TARGET_TYPE_EXTENSION_RANGE: 2, + TARGET_TYPE_MESSAGE: 3, + TARGET_TYPE_FIELD: 4, + TARGET_TYPE_ONEOF: 5, + TARGET_TYPE_ENUM: 6, + TARGET_TYPE_ENUM_ENTRY: 7, + TARGET_TYPE_SERVICE: 8, + TARGET_TYPE_METHOD: 9 +}; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.FieldOptions.EditionDefault.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FieldOptions.EditionDefault.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.FieldOptions.EditionDefault} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldOptions.EditionDefault.toObject = function(includeInstance, msg) { + var f, obj = { +edition: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +value: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FieldOptions.EditionDefault} + */ +proto.google.protobuf.FieldOptions.EditionDefault.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FieldOptions.EditionDefault; + return proto.google.protobuf.FieldOptions.EditionDefault.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FieldOptions.EditionDefault} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FieldOptions.EditionDefault} + */ +proto.google.protobuf.FieldOptions.EditionDefault.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 3: + var value = /** @type {!proto.google.protobuf.Edition} */ (reader.readEnum()); + msg.setEdition(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FieldOptions.EditionDefault.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FieldOptions.EditionDefault.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FieldOptions.EditionDefault} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldOptions.EditionDefault.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!proto.google.protobuf.Edition} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeEnum( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional Edition edition = 3; + * @return {!proto.google.protobuf.Edition} + */ +proto.google.protobuf.FieldOptions.EditionDefault.prototype.getEdition = function() { + return /** @type {!proto.google.protobuf.Edition} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.google.protobuf.Edition} value + * @return {!proto.google.protobuf.FieldOptions.EditionDefault} returns this + */ +proto.google.protobuf.FieldOptions.EditionDefault.prototype.setEdition = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions.EditionDefault} returns this + */ +proto.google.protobuf.FieldOptions.EditionDefault.prototype.clearEdition = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.EditionDefault.prototype.hasEdition = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string value = 2; + * @return {string} + */ +proto.google.protobuf.FieldOptions.EditionDefault.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.FieldOptions.EditionDefault} returns this + */ +proto.google.protobuf.FieldOptions.EditionDefault.prototype.setValue = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions.EditionDefault} returns this + */ +proto.google.protobuf.FieldOptions.EditionDefault.prototype.clearValue = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.EditionDefault.prototype.hasValue = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional CType ctype = 1; + * @return {!proto.google.protobuf.FieldOptions.CType} + */ +proto.google.protobuf.FieldOptions.prototype.getCtype = function() { + return /** @type {!proto.google.protobuf.FieldOptions.CType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.google.protobuf.FieldOptions.CType} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.setCtype = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearCtype = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasCtype = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool packed = 2; + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.getPacked = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.setPacked = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearPacked = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasPacked = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional JSType jstype = 6; + * @return {!proto.google.protobuf.FieldOptions.JSType} + */ +proto.google.protobuf.FieldOptions.prototype.getJstype = function() { + return /** @type {!proto.google.protobuf.FieldOptions.JSType} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {!proto.google.protobuf.FieldOptions.JSType} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.setJstype = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearJstype = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasJstype = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bool lazy = 5; + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.getLazy = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.setLazy = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearLazy = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasLazy = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bool unverified_lazy = 15; + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.getUnverifiedLazy = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 15, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.setUnverifiedLazy = function(value) { + return jspb.Message.setField(this, 15, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearUnverifiedLazy = function() { + return jspb.Message.setField(this, 15, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasUnverifiedLazy = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional bool deprecated = 3; + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.setDeprecated = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearDeprecated = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool weak = 10; + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.getWeak = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.setWeak = function(value) { + return jspb.Message.setField(this, 10, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearWeak = function() { + return jspb.Message.setField(this, 10, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasWeak = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional bool debug_redact = 16; + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.getDebugRedact = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 16, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.setDebugRedact = function(value) { + return jspb.Message.setField(this, 16, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearDebugRedact = function() { + return jspb.Message.setField(this, 16, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasDebugRedact = function() { + return jspb.Message.getField(this, 16) != null; +}; + + +/** + * optional OptionRetention retention = 17; + * @return {!proto.google.protobuf.FieldOptions.OptionRetention} + */ +proto.google.protobuf.FieldOptions.prototype.getRetention = function() { + return /** @type {!proto.google.protobuf.FieldOptions.OptionRetention} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); +}; + + +/** + * @param {!proto.google.protobuf.FieldOptions.OptionRetention} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.setRetention = function(value) { + return jspb.Message.setField(this, 17, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearRetention = function() { + return jspb.Message.setField(this, 17, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasRetention = function() { + return jspb.Message.getField(this, 17) != null; +}; + + +/** + * repeated OptionTargetType targets = 19; + * @return {!Array} + */ +proto.google.protobuf.FieldOptions.prototype.getTargetsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 19)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.setTargetsList = function(value) { + return jspb.Message.setField(this, 19, value || []); +}; + + +/** + * @param {!proto.google.protobuf.FieldOptions.OptionTargetType} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.addTargets = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 19, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearTargetsList = function() { + return this.setTargetsList([]); +}; + + +/** + * repeated EditionDefault edition_defaults = 20; + * @return {!Array} + */ +proto.google.protobuf.FieldOptions.prototype.getEditionDefaultsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FieldOptions.EditionDefault, 20)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FieldOptions} returns this +*/ +proto.google.protobuf.FieldOptions.prototype.setEditionDefaultsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 20, value); +}; + + +/** + * @param {!proto.google.protobuf.FieldOptions.EditionDefault=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FieldOptions.EditionDefault} + */ +proto.google.protobuf.FieldOptions.prototype.addEditionDefaults = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 20, opt_value, proto.google.protobuf.FieldOptions.EditionDefault, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearEditionDefaultsList = function() { + return this.setEditionDefaultsList([]); +}; + + +/** + * optional FeatureSet features = 21; + * @return {?proto.google.protobuf.FeatureSet} + */ +proto.google.protobuf.FieldOptions.prototype.getFeatures = function() { + return /** @type{?proto.google.protobuf.FeatureSet} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.FeatureSet, 21)); +}; + + +/** + * @param {?proto.google.protobuf.FeatureSet|undefined} value + * @return {!proto.google.protobuf.FieldOptions} returns this +*/ +proto.google.protobuf.FieldOptions.prototype.setFeatures = function(value) { + return jspb.Message.setWrapperField(this, 21, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearFeatures = function() { + return this.setFeatures(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FieldOptions.prototype.hasFeatures = function() { + return jspb.Message.getField(this, 21) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.FieldOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FieldOptions} returns this +*/ +proto.google.protobuf.FieldOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.FieldOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FieldOptions} returns this + */ +proto.google.protobuf.FieldOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.OneofOptions.repeatedFields_ = [999]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.OneofOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.OneofOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.OneofOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.OneofOptions.toObject = function(includeInstance, msg) { + var f, obj = { +features: (f = msg.getFeatures()) && proto.google.protobuf.FeatureSet.toObject(includeInstance, f), +uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.OneofOptions.extensions, proto.google.protobuf.OneofOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.OneofOptions} + */ +proto.google.protobuf.OneofOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.OneofOptions; + return proto.google.protobuf.OneofOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.OneofOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.OneofOptions} + */ +proto.google.protobuf.OneofOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.protobuf.FeatureSet; + reader.readMessage(value,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader); + msg.setFeatures(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.OneofOptions.extensionsBinary, + proto.google.protobuf.OneofOptions.prototype.getExtension, + proto.google.protobuf.OneofOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.OneofOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.OneofOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.OneofOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.OneofOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeatures(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.google.protobuf.FeatureSet.serializeBinaryToWriter + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.OneofOptions.extensionsBinary, proto.google.protobuf.OneofOptions.prototype.getExtension); +}; + + +/** + * optional FeatureSet features = 1; + * @return {?proto.google.protobuf.FeatureSet} + */ +proto.google.protobuf.OneofOptions.prototype.getFeatures = function() { + return /** @type{?proto.google.protobuf.FeatureSet} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.FeatureSet, 1)); +}; + + +/** + * @param {?proto.google.protobuf.FeatureSet|undefined} value + * @return {!proto.google.protobuf.OneofOptions} returns this +*/ +proto.google.protobuf.OneofOptions.prototype.setFeatures = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.OneofOptions} returns this + */ +proto.google.protobuf.OneofOptions.prototype.clearFeatures = function() { + return this.setFeatures(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.OneofOptions.prototype.hasFeatures = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.OneofOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.OneofOptions} returns this +*/ +proto.google.protobuf.OneofOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.OneofOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.OneofOptions} returns this + */ +proto.google.protobuf.OneofOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.EnumOptions.repeatedFields_ = [999]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.EnumOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.EnumOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.EnumOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumOptions.toObject = function(includeInstance, msg) { + var f, obj = { +allowAlias: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f, +deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), +deprecatedLegacyJsonFieldConflicts: (f = jspb.Message.getBooleanField(msg, 6)) == null ? undefined : f, +features: (f = msg.getFeatures()) && proto.google.protobuf.FeatureSet.toObject(includeInstance, f), +uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.EnumOptions.extensions, proto.google.protobuf.EnumOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.EnumOptions} + */ +proto.google.protobuf.EnumOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.EnumOptions; + return proto.google.protobuf.EnumOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.EnumOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.EnumOptions} + */ +proto.google.protobuf.EnumOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAllowAlias(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecatedLegacyJsonFieldConflicts(value); + break; + case 7: + var value = new proto.google.protobuf.FeatureSet; + reader.readMessage(value,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader); + msg.setFeatures(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.EnumOptions.extensionsBinary, + proto.google.protobuf.EnumOptions.prototype.getExtension, + proto.google.protobuf.EnumOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.EnumOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.EnumOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.EnumOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBool( + 6, + f + ); + } + f = message.getFeatures(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.google.protobuf.FeatureSet.serializeBinaryToWriter + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.EnumOptions.extensionsBinary, proto.google.protobuf.EnumOptions.prototype.getExtension); +}; + + +/** + * optional bool allow_alias = 2; + * @return {boolean} + */ +proto.google.protobuf.EnumOptions.prototype.getAllowAlias = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.EnumOptions} returns this + */ +proto.google.protobuf.EnumOptions.prototype.setAllowAlias = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumOptions} returns this + */ +proto.google.protobuf.EnumOptions.prototype.clearAllowAlias = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumOptions.prototype.hasAllowAlias = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool deprecated = 3; + * @return {boolean} + */ +proto.google.protobuf.EnumOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.EnumOptions} returns this + */ +proto.google.protobuf.EnumOptions.prototype.setDeprecated = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumOptions} returns this + */ +proto.google.protobuf.EnumOptions.prototype.clearDeprecated = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool deprecated_legacy_json_field_conflicts = 6; + * @return {boolean} + */ +proto.google.protobuf.EnumOptions.prototype.getDeprecatedLegacyJsonFieldConflicts = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.EnumOptions} returns this + */ +proto.google.protobuf.EnumOptions.prototype.setDeprecatedLegacyJsonFieldConflicts = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumOptions} returns this + */ +proto.google.protobuf.EnumOptions.prototype.clearDeprecatedLegacyJsonFieldConflicts = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumOptions.prototype.hasDeprecatedLegacyJsonFieldConflicts = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional FeatureSet features = 7; + * @return {?proto.google.protobuf.FeatureSet} + */ +proto.google.protobuf.EnumOptions.prototype.getFeatures = function() { + return /** @type{?proto.google.protobuf.FeatureSet} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.FeatureSet, 7)); +}; + + +/** + * @param {?proto.google.protobuf.FeatureSet|undefined} value + * @return {!proto.google.protobuf.EnumOptions} returns this +*/ +proto.google.protobuf.EnumOptions.prototype.setFeatures = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.EnumOptions} returns this + */ +proto.google.protobuf.EnumOptions.prototype.clearFeatures = function() { + return this.setFeatures(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumOptions.prototype.hasFeatures = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.EnumOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumOptions} returns this +*/ +proto.google.protobuf.EnumOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.EnumOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumOptions} returns this + */ +proto.google.protobuf.EnumOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.EnumValueOptions.repeatedFields_ = [999]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.EnumValueOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.EnumValueOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.EnumValueOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumValueOptions.toObject = function(includeInstance, msg) { + var f, obj = { +deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), +features: (f = msg.getFeatures()) && proto.google.protobuf.FeatureSet.toObject(includeInstance, f), +debugRedact: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), +uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.EnumValueOptions.extensions, proto.google.protobuf.EnumValueOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.EnumValueOptions} + */ +proto.google.protobuf.EnumValueOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.EnumValueOptions; + return proto.google.protobuf.EnumValueOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.EnumValueOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.EnumValueOptions} + */ +proto.google.protobuf.EnumValueOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 2: + var value = new proto.google.protobuf.FeatureSet; + reader.readMessage(value,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader); + msg.setFeatures(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDebugRedact(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.EnumValueOptions.extensionsBinary, + proto.google.protobuf.EnumValueOptions.prototype.getExtension, + proto.google.protobuf.EnumValueOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.EnumValueOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.EnumValueOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.EnumValueOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( + 1, + f + ); + } + f = message.getFeatures(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.protobuf.FeatureSet.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBool( + 3, + f + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.EnumValueOptions.extensionsBinary, proto.google.protobuf.EnumValueOptions.prototype.getExtension); +}; + + +/** + * optional bool deprecated = 1; + * @return {boolean} + */ +proto.google.protobuf.EnumValueOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.EnumValueOptions} returns this + */ +proto.google.protobuf.EnumValueOptions.prototype.setDeprecated = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumValueOptions} returns this + */ +proto.google.protobuf.EnumValueOptions.prototype.clearDeprecated = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumValueOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional FeatureSet features = 2; + * @return {?proto.google.protobuf.FeatureSet} + */ +proto.google.protobuf.EnumValueOptions.prototype.getFeatures = function() { + return /** @type{?proto.google.protobuf.FeatureSet} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.FeatureSet, 2)); +}; + + +/** + * @param {?proto.google.protobuf.FeatureSet|undefined} value + * @return {!proto.google.protobuf.EnumValueOptions} returns this +*/ +proto.google.protobuf.EnumValueOptions.prototype.setFeatures = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.EnumValueOptions} returns this + */ +proto.google.protobuf.EnumValueOptions.prototype.clearFeatures = function() { + return this.setFeatures(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumValueOptions.prototype.hasFeatures = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool debug_redact = 3; + * @return {boolean} + */ +proto.google.protobuf.EnumValueOptions.prototype.getDebugRedact = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.EnumValueOptions} returns this + */ +proto.google.protobuf.EnumValueOptions.prototype.setDebugRedact = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.EnumValueOptions} returns this + */ +proto.google.protobuf.EnumValueOptions.prototype.clearDebugRedact = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.EnumValueOptions.prototype.hasDebugRedact = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.EnumValueOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.EnumValueOptions} returns this +*/ +proto.google.protobuf.EnumValueOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.EnumValueOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.EnumValueOptions} returns this + */ +proto.google.protobuf.EnumValueOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.ServiceOptions.repeatedFields_ = [999]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.ServiceOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.ServiceOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.ServiceOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ServiceOptions.toObject = function(includeInstance, msg) { + var f, obj = { +features: (f = msg.getFeatures()) && proto.google.protobuf.FeatureSet.toObject(includeInstance, f), +deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 33, false), +uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.ServiceOptions.extensions, proto.google.protobuf.ServiceOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.ServiceOptions} + */ +proto.google.protobuf.ServiceOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.ServiceOptions; + return proto.google.protobuf.ServiceOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.ServiceOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.ServiceOptions} + */ +proto.google.protobuf.ServiceOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 34: + var value = new proto.google.protobuf.FeatureSet; + reader.readMessage(value,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader); + msg.setFeatures(value); + break; + case 33: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.ServiceOptions.extensionsBinary, + proto.google.protobuf.ServiceOptions.prototype.getExtension, + proto.google.protobuf.ServiceOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.ServiceOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.ServiceOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.ServiceOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ServiceOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeatures(); + if (f != null) { + writer.writeMessage( + 34, + f, + proto.google.protobuf.FeatureSet.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 33)); + if (f != null) { + writer.writeBool( + 33, + f + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.ServiceOptions.extensionsBinary, proto.google.protobuf.ServiceOptions.prototype.getExtension); +}; + + +/** + * optional FeatureSet features = 34; + * @return {?proto.google.protobuf.FeatureSet} + */ +proto.google.protobuf.ServiceOptions.prototype.getFeatures = function() { + return /** @type{?proto.google.protobuf.FeatureSet} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.FeatureSet, 34)); +}; + + +/** + * @param {?proto.google.protobuf.FeatureSet|undefined} value + * @return {!proto.google.protobuf.ServiceOptions} returns this +*/ +proto.google.protobuf.ServiceOptions.prototype.setFeatures = function(value) { + return jspb.Message.setWrapperField(this, 34, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.ServiceOptions} returns this + */ +proto.google.protobuf.ServiceOptions.prototype.clearFeatures = function() { + return this.setFeatures(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.ServiceOptions.prototype.hasFeatures = function() { + return jspb.Message.getField(this, 34) != null; +}; + + +/** + * optional bool deprecated = 33; + * @return {boolean} + */ +proto.google.protobuf.ServiceOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 33, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.ServiceOptions} returns this + */ +proto.google.protobuf.ServiceOptions.prototype.setDeprecated = function(value) { + return jspb.Message.setField(this, 33, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.ServiceOptions} returns this + */ +proto.google.protobuf.ServiceOptions.prototype.clearDeprecated = function() { + return jspb.Message.setField(this, 33, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.ServiceOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 33) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.ServiceOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ServiceOptions} returns this +*/ +proto.google.protobuf.ServiceOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.ServiceOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ServiceOptions} returns this + */ +proto.google.protobuf.ServiceOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.MethodOptions.repeatedFields_ = [999]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.MethodOptions.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.MethodOptions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.MethodOptions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MethodOptions.toObject = function(includeInstance, msg) { + var f, obj = { +deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 33, false), +idempotencyLevel: jspb.Message.getFieldWithDefault(msg, 34, 0), +features: (f = msg.getFeatures()) && proto.google.protobuf.FeatureSet.toObject(includeInstance, f), +uninterpretedOptionList: jspb.Message.toObjectList(msg.getUninterpretedOptionList(), + proto.google.protobuf.UninterpretedOption.toObject, includeInstance) + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.MethodOptions.extensions, proto.google.protobuf.MethodOptions.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.MethodOptions} + */ +proto.google.protobuf.MethodOptions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.MethodOptions; + return proto.google.protobuf.MethodOptions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.MethodOptions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.MethodOptions} + */ +proto.google.protobuf.MethodOptions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 33: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 34: + var value = /** @type {!proto.google.protobuf.MethodOptions.IdempotencyLevel} */ (reader.readEnum()); + msg.setIdempotencyLevel(value); + break; + case 35: + var value = new proto.google.protobuf.FeatureSet; + reader.readMessage(value,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader); + msg.setFeatures(value); + break; + case 999: + var value = new proto.google.protobuf.UninterpretedOption; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader); + msg.addUninterpretedOption(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.MethodOptions.extensionsBinary, + proto.google.protobuf.MethodOptions.prototype.getExtension, + proto.google.protobuf.MethodOptions.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.MethodOptions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.MethodOptions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.MethodOptions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.MethodOptions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {boolean} */ (jspb.Message.getField(message, 33)); + if (f != null) { + writer.writeBool( + 33, + f + ); + } + f = /** @type {!proto.google.protobuf.MethodOptions.IdempotencyLevel} */ (jspb.Message.getField(message, 34)); + if (f != null) { + writer.writeEnum( + 34, + f + ); + } + f = message.getFeatures(); + if (f != null) { + writer.writeMessage( + 35, + f, + proto.google.protobuf.FeatureSet.serializeBinaryToWriter + ); + } + f = message.getUninterpretedOptionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 999, + f, + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.MethodOptions.extensionsBinary, proto.google.protobuf.MethodOptions.prototype.getExtension); +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.MethodOptions.IdempotencyLevel = { + IDEMPOTENCY_UNKNOWN: 0, + NO_SIDE_EFFECTS: 1, + IDEMPOTENT: 2 +}; + +/** + * optional bool deprecated = 33; + * @return {boolean} + */ +proto.google.protobuf.MethodOptions.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 33, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.MethodOptions} returns this + */ +proto.google.protobuf.MethodOptions.prototype.setDeprecated = function(value) { + return jspb.Message.setField(this, 33, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodOptions} returns this + */ +proto.google.protobuf.MethodOptions.prototype.clearDeprecated = function() { + return jspb.Message.setField(this, 33, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodOptions.prototype.hasDeprecated = function() { + return jspb.Message.getField(this, 33) != null; +}; + + +/** + * optional IdempotencyLevel idempotency_level = 34; + * @return {!proto.google.protobuf.MethodOptions.IdempotencyLevel} + */ +proto.google.protobuf.MethodOptions.prototype.getIdempotencyLevel = function() { + return /** @type {!proto.google.protobuf.MethodOptions.IdempotencyLevel} */ (jspb.Message.getFieldWithDefault(this, 34, 0)); +}; + + +/** + * @param {!proto.google.protobuf.MethodOptions.IdempotencyLevel} value + * @return {!proto.google.protobuf.MethodOptions} returns this + */ +proto.google.protobuf.MethodOptions.prototype.setIdempotencyLevel = function(value) { + return jspb.Message.setField(this, 34, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.MethodOptions} returns this + */ +proto.google.protobuf.MethodOptions.prototype.clearIdempotencyLevel = function() { + return jspb.Message.setField(this, 34, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodOptions.prototype.hasIdempotencyLevel = function() { + return jspb.Message.getField(this, 34) != null; +}; + + +/** + * optional FeatureSet features = 35; + * @return {?proto.google.protobuf.FeatureSet} + */ +proto.google.protobuf.MethodOptions.prototype.getFeatures = function() { + return /** @type{?proto.google.protobuf.FeatureSet} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.FeatureSet, 35)); +}; + + +/** + * @param {?proto.google.protobuf.FeatureSet|undefined} value + * @return {!proto.google.protobuf.MethodOptions} returns this +*/ +proto.google.protobuf.MethodOptions.prototype.setFeatures = function(value) { + return jspb.Message.setWrapperField(this, 35, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.MethodOptions} returns this + */ +proto.google.protobuf.MethodOptions.prototype.clearFeatures = function() { + return this.setFeatures(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.MethodOptions.prototype.hasFeatures = function() { + return jspb.Message.getField(this, 35) != null; +}; + + +/** + * repeated UninterpretedOption uninterpreted_option = 999; + * @return {!Array} + */ +proto.google.protobuf.MethodOptions.prototype.getUninterpretedOptionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption, 999)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.MethodOptions} returns this +*/ +proto.google.protobuf.MethodOptions.prototype.setUninterpretedOptionList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 999, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.MethodOptions.prototype.addUninterpretedOption = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 999, opt_value, proto.google.protobuf.UninterpretedOption, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.MethodOptions} returns this + */ +proto.google.protobuf.MethodOptions.prototype.clearUninterpretedOptionList = function() { + return this.setUninterpretedOptionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.UninterpretedOption.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.UninterpretedOption.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.UninterpretedOption.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.UninterpretedOption} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.UninterpretedOption.toObject = function(includeInstance, msg) { + var f, obj = { +nameList: jspb.Message.toObjectList(msg.getNameList(), + proto.google.protobuf.UninterpretedOption.NamePart.toObject, includeInstance), +identifierValue: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +positiveIntValue: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +negativeIntValue: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +doubleValue: (f = jspb.Message.getOptionalFloatingPointField(msg, 6)) == null ? undefined : f, +stringValue: msg.getStringValue_asB64(), +aggregateValue: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.UninterpretedOption.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.UninterpretedOption; + return proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.UninterpretedOption} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.UninterpretedOption} + */ +proto.google.protobuf.UninterpretedOption.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = new proto.google.protobuf.UninterpretedOption.NamePart; + reader.readMessage(value,proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinaryFromReader); + msg.addName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setIdentifierValue(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPositiveIntValue(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNegativeIntValue(value); + break; + case 6: + var value = /** @type {number} */ (reader.readDouble()); + msg.setDoubleValue(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStringValue(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setAggregateValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.UninterpretedOption.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.UninterpretedOption} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.UninterpretedOption.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNameList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.google.protobuf.UninterpretedOption.NamePart.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint64( + 4, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeInt64( + 5, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeDouble( + 6, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBytes( + 7, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeString( + 8, + f + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.UninterpretedOption.NamePart.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.UninterpretedOption.NamePart} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.UninterpretedOption.NamePart.toObject = function(includeInstance, msg) { + var f, obj = { +namePart: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +isExtension: (f = jspb.Message.getBooleanField(msg, 2)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} + */ +proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.UninterpretedOption.NamePart; + return proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.UninterpretedOption.NamePart} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} + */ +proto.google.protobuf.UninterpretedOption.NamePart.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setNamePart(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsExtension(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.UninterpretedOption.NamePart.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.UninterpretedOption.NamePart} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.UninterpretedOption.NamePart.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * required string name_part = 1; + * @return {string} + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.getNamePart = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.setNamePart = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearNamePart = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.hasNamePart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * required bool is_extension = 2; + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.getIsExtension = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.setIsExtension = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} returns this + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.clearIsExtension = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.NamePart.prototype.hasIsExtension = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated NamePart name = 2; + * @return {!Array} + */ +proto.google.protobuf.UninterpretedOption.prototype.getNameList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.UninterpretedOption.NamePart, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this +*/ +proto.google.protobuf.UninterpretedOption.prototype.setNameList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.UninterpretedOption.NamePart=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.UninterpretedOption.NamePart} + */ +proto.google.protobuf.UninterpretedOption.prototype.addName = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.UninterpretedOption.NamePart, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.clearNameList = function() { + return this.setNameList([]); +}; + + +/** + * optional string identifier_value = 3; + * @return {string} + */ +proto.google.protobuf.UninterpretedOption.prototype.getIdentifierValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.setIdentifierValue = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.clearIdentifierValue = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasIdentifierValue = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 positive_int_value = 4; + * @return {number} + */ +proto.google.protobuf.UninterpretedOption.prototype.getPositiveIntValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.setPositiveIntValue = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.clearPositiveIntValue = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasPositiveIntValue = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional int64 negative_int_value = 5; + * @return {number} + */ +proto.google.protobuf.UninterpretedOption.prototype.getNegativeIntValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.setNegativeIntValue = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.clearNegativeIntValue = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasNegativeIntValue = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional double double_value = 6; + * @return {number} + */ +proto.google.protobuf.UninterpretedOption.prototype.getDoubleValue = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.setDoubleValue = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.clearDoubleValue = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasDoubleValue = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes string_value = 7; + * @return {!(string|Uint8Array)} + */ +proto.google.protobuf.UninterpretedOption.prototype.getStringValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes string_value = 7; + * This is a type-conversion wrapper around `getStringValue()` + * @return {string} + */ +proto.google.protobuf.UninterpretedOption.prototype.getStringValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStringValue())); +}; + + +/** + * optional bytes string_value = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStringValue()` + * @return {!Uint8Array} + */ +proto.google.protobuf.UninterpretedOption.prototype.getStringValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStringValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.setStringValue = function(value) { + return jspb.Message.setField(this, 7, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.clearStringValue = function() { + return jspb.Message.setField(this, 7, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasStringValue = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional string aggregate_value = 8; + * @return {string} + */ +proto.google.protobuf.UninterpretedOption.prototype.getAggregateValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.setAggregateValue = function(value) { + return jspb.Message.setField(this, 8, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.UninterpretedOption} returns this + */ +proto.google.protobuf.UninterpretedOption.prototype.clearAggregateValue = function() { + return jspb.Message.setField(this, 8, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.UninterpretedOption.prototype.hasAggregateValue = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.FeatureSet.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FeatureSet.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.FeatureSet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FeatureSet.toObject = function(includeInstance, msg) { + var f, obj = { +fieldPresence: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +enumType: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +repeatedFieldEncoding: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +utf8Validation: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +messageEncoding: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f, +jsonFormat: (f = jspb.Message.getField(msg, 6)) == null ? undefined : f + }; + + jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj, + proto.google.protobuf.FeatureSet.extensions, proto.google.protobuf.FeatureSet.prototype.getExtension, + includeInstance); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FeatureSet} + */ +proto.google.protobuf.FeatureSet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FeatureSet; + return proto.google.protobuf.FeatureSet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FeatureSet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FeatureSet} + */ +proto.google.protobuf.FeatureSet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.google.protobuf.FeatureSet.FieldPresence} */ (reader.readEnum()); + msg.setFieldPresence(value); + break; + case 2: + var value = /** @type {!proto.google.protobuf.FeatureSet.EnumType} */ (reader.readEnum()); + msg.setEnumType(value); + break; + case 3: + var value = /** @type {!proto.google.protobuf.FeatureSet.RepeatedFieldEncoding} */ (reader.readEnum()); + msg.setRepeatedFieldEncoding(value); + break; + case 4: + var value = /** @type {!proto.google.protobuf.FeatureSet.Utf8Validation} */ (reader.readEnum()); + msg.setUtf8Validation(value); + break; + case 5: + var value = /** @type {!proto.google.protobuf.FeatureSet.MessageEncoding} */ (reader.readEnum()); + msg.setMessageEncoding(value); + break; + case 6: + var value = /** @type {!proto.google.protobuf.FeatureSet.JsonFormat} */ (reader.readEnum()); + msg.setJsonFormat(value); + break; + default: + jspb.Message.readBinaryExtension(msg, reader, + proto.google.protobuf.FeatureSet.extensionsBinary, + proto.google.protobuf.FeatureSet.prototype.getExtension, + proto.google.protobuf.FeatureSet.prototype.setExtension); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FeatureSet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FeatureSet.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FeatureSet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FeatureSet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!proto.google.protobuf.FeatureSet.FieldPresence} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {!proto.google.protobuf.FeatureSet.EnumType} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeEnum( + 2, + f + ); + } + f = /** @type {!proto.google.protobuf.FeatureSet.RepeatedFieldEncoding} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeEnum( + 3, + f + ); + } + f = /** @type {!proto.google.protobuf.FeatureSet.Utf8Validation} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeEnum( + 4, + f + ); + } + f = /** @type {!proto.google.protobuf.FeatureSet.MessageEncoding} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeEnum( + 5, + f + ); + } + f = /** @type {!proto.google.protobuf.FeatureSet.JsonFormat} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeEnum( + 6, + f + ); + } + jspb.Message.serializeBinaryExtensions(message, writer, + proto.google.protobuf.FeatureSet.extensionsBinary, proto.google.protobuf.FeatureSet.prototype.getExtension); +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.FeatureSet.FieldPresence = { + FIELD_PRESENCE_UNKNOWN: 0, + EXPLICIT: 1, + IMPLICIT: 2, + LEGACY_REQUIRED: 3 +}; + +/** + * @enum {number} + */ +proto.google.protobuf.FeatureSet.EnumType = { + ENUM_TYPE_UNKNOWN: 0, + OPEN: 1, + CLOSED: 2 +}; + +/** + * @enum {number} + */ +proto.google.protobuf.FeatureSet.RepeatedFieldEncoding = { + REPEATED_FIELD_ENCODING_UNKNOWN: 0, + PACKED: 1, + EXPANDED: 2 +}; + +/** + * @enum {number} + */ +proto.google.protobuf.FeatureSet.Utf8Validation = { + UTF8_VALIDATION_UNKNOWN: 0, + NONE: 1, + VERIFY: 2 +}; + +/** + * @enum {number} + */ +proto.google.protobuf.FeatureSet.MessageEncoding = { + MESSAGE_ENCODING_UNKNOWN: 0, + LENGTH_PREFIXED: 1, + DELIMITED: 2 +}; + +/** + * @enum {number} + */ +proto.google.protobuf.FeatureSet.JsonFormat = { + JSON_FORMAT_UNKNOWN: 0, + ALLOW: 1, + LEGACY_BEST_EFFORT: 2 +}; + +/** + * optional FieldPresence field_presence = 1; + * @return {!proto.google.protobuf.FeatureSet.FieldPresence} + */ +proto.google.protobuf.FeatureSet.prototype.getFieldPresence = function() { + return /** @type {!proto.google.protobuf.FeatureSet.FieldPresence} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.google.protobuf.FeatureSet.FieldPresence} value + * @return {!proto.google.protobuf.FeatureSet} returns this + */ +proto.google.protobuf.FeatureSet.prototype.setFieldPresence = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FeatureSet} returns this + */ +proto.google.protobuf.FeatureSet.prototype.clearFieldPresence = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FeatureSet.prototype.hasFieldPresence = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional EnumType enum_type = 2; + * @return {!proto.google.protobuf.FeatureSet.EnumType} + */ +proto.google.protobuf.FeatureSet.prototype.getEnumType = function() { + return /** @type {!proto.google.protobuf.FeatureSet.EnumType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.google.protobuf.FeatureSet.EnumType} value + * @return {!proto.google.protobuf.FeatureSet} returns this + */ +proto.google.protobuf.FeatureSet.prototype.setEnumType = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FeatureSet} returns this + */ +proto.google.protobuf.FeatureSet.prototype.clearEnumType = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FeatureSet.prototype.hasEnumType = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional RepeatedFieldEncoding repeated_field_encoding = 3; + * @return {!proto.google.protobuf.FeatureSet.RepeatedFieldEncoding} + */ +proto.google.protobuf.FeatureSet.prototype.getRepeatedFieldEncoding = function() { + return /** @type {!proto.google.protobuf.FeatureSet.RepeatedFieldEncoding} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.google.protobuf.FeatureSet.RepeatedFieldEncoding} value + * @return {!proto.google.protobuf.FeatureSet} returns this + */ +proto.google.protobuf.FeatureSet.prototype.setRepeatedFieldEncoding = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FeatureSet} returns this + */ +proto.google.protobuf.FeatureSet.prototype.clearRepeatedFieldEncoding = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FeatureSet.prototype.hasRepeatedFieldEncoding = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Utf8Validation utf8_validation = 4; + * @return {!proto.google.protobuf.FeatureSet.Utf8Validation} + */ +proto.google.protobuf.FeatureSet.prototype.getUtf8Validation = function() { + return /** @type {!proto.google.protobuf.FeatureSet.Utf8Validation} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.google.protobuf.FeatureSet.Utf8Validation} value + * @return {!proto.google.protobuf.FeatureSet} returns this + */ +proto.google.protobuf.FeatureSet.prototype.setUtf8Validation = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FeatureSet} returns this + */ +proto.google.protobuf.FeatureSet.prototype.clearUtf8Validation = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FeatureSet.prototype.hasUtf8Validation = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional MessageEncoding message_encoding = 5; + * @return {!proto.google.protobuf.FeatureSet.MessageEncoding} + */ +proto.google.protobuf.FeatureSet.prototype.getMessageEncoding = function() { + return /** @type {!proto.google.protobuf.FeatureSet.MessageEncoding} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.google.protobuf.FeatureSet.MessageEncoding} value + * @return {!proto.google.protobuf.FeatureSet} returns this + */ +proto.google.protobuf.FeatureSet.prototype.setMessageEncoding = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FeatureSet} returns this + */ +proto.google.protobuf.FeatureSet.prototype.clearMessageEncoding = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FeatureSet.prototype.hasMessageEncoding = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional JsonFormat json_format = 6; + * @return {!proto.google.protobuf.FeatureSet.JsonFormat} + */ +proto.google.protobuf.FeatureSet.prototype.getJsonFormat = function() { + return /** @type {!proto.google.protobuf.FeatureSet.JsonFormat} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {!proto.google.protobuf.FeatureSet.JsonFormat} value + * @return {!proto.google.protobuf.FeatureSet} returns this + */ +proto.google.protobuf.FeatureSet.prototype.setJsonFormat = function(value) { + return jspb.Message.setField(this, 6, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FeatureSet} returns this + */ +proto.google.protobuf.FeatureSet.prototype.clearJsonFormat = function() { + return jspb.Message.setField(this, 6, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FeatureSet.prototype.hasJsonFormat = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.FeatureSetDefaults.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.FeatureSetDefaults.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FeatureSetDefaults.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.FeatureSetDefaults} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FeatureSetDefaults.toObject = function(includeInstance, msg) { + var f, obj = { +defaultsList: jspb.Message.toObjectList(msg.getDefaultsList(), + proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject, includeInstance), +minimumEdition: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +maximumEdition: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FeatureSetDefaults} + */ +proto.google.protobuf.FeatureSetDefaults.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FeatureSetDefaults; + return proto.google.protobuf.FeatureSetDefaults.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FeatureSetDefaults} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FeatureSetDefaults} + */ +proto.google.protobuf.FeatureSetDefaults.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + reader.readMessage(value,proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.deserializeBinaryFromReader); + msg.addDefaults(value); + break; + case 4: + var value = /** @type {!proto.google.protobuf.Edition} */ (reader.readEnum()); + msg.setMinimumEdition(value); + break; + case 5: + var value = /** @type {!proto.google.protobuf.Edition} */ (reader.readEnum()); + msg.setMaximumEdition(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FeatureSetDefaults.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FeatureSetDefaults.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FeatureSetDefaults} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FeatureSetDefaults.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDefaultsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.serializeBinaryToWriter + ); + } + f = /** @type {!proto.google.protobuf.Edition} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeEnum( + 4, + f + ); + } + f = /** @type {!proto.google.protobuf.Edition} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeEnum( + 5, + f + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject = function(includeInstance, msg) { + var f, obj = { +edition: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +features: (f = msg.getFeatures()) && proto.google.protobuf.FeatureSet.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} + */ +proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + return proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} + */ +proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 3: + var value = /** @type {!proto.google.protobuf.Edition} */ (reader.readEnum()); + msg.setEdition(value); + break; + case 2: + var value = new proto.google.protobuf.FeatureSet; + reader.readMessage(value,proto.google.protobuf.FeatureSet.deserializeBinaryFromReader); + msg.setFeatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!proto.google.protobuf.Edition} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeEnum( + 3, + f + ); + } + f = message.getFeatures(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.google.protobuf.FeatureSet.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Edition edition = 3; + * @return {!proto.google.protobuf.Edition} + */ +proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.getEdition = function() { + return /** @type {!proto.google.protobuf.Edition} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.google.protobuf.Edition} value + * @return {!proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} returns this + */ +proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.setEdition = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} returns this + */ +proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.clearEdition = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.hasEdition = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional FeatureSet features = 2; + * @return {?proto.google.protobuf.FeatureSet} + */ +proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.getFeatures = function() { + return /** @type{?proto.google.protobuf.FeatureSet} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.FeatureSet, 2)); +}; + + +/** + * @param {?proto.google.protobuf.FeatureSet|undefined} value + * @return {!proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} returns this +*/ +proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.setFeatures = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} returns this + */ +proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.clearFeatures = function() { + return this.setFeatures(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.prototype.hasFeatures = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated FeatureSetEditionDefault defaults = 1; + * @return {!Array} + */ +proto.google.protobuf.FeatureSetDefaults.prototype.getDefaultsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FeatureSetDefaults} returns this +*/ +proto.google.protobuf.FeatureSetDefaults.prototype.setDefaultsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} + */ +proto.google.protobuf.FeatureSetDefaults.prototype.addDefaults = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FeatureSetDefaults} returns this + */ +proto.google.protobuf.FeatureSetDefaults.prototype.clearDefaultsList = function() { + return this.setDefaultsList([]); +}; + + +/** + * optional Edition minimum_edition = 4; + * @return {!proto.google.protobuf.Edition} + */ +proto.google.protobuf.FeatureSetDefaults.prototype.getMinimumEdition = function() { + return /** @type {!proto.google.protobuf.Edition} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.google.protobuf.Edition} value + * @return {!proto.google.protobuf.FeatureSetDefaults} returns this + */ +proto.google.protobuf.FeatureSetDefaults.prototype.setMinimumEdition = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FeatureSetDefaults} returns this + */ +proto.google.protobuf.FeatureSetDefaults.prototype.clearMinimumEdition = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FeatureSetDefaults.prototype.hasMinimumEdition = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Edition maximum_edition = 5; + * @return {!proto.google.protobuf.Edition} + */ +proto.google.protobuf.FeatureSetDefaults.prototype.getMaximumEdition = function() { + return /** @type {!proto.google.protobuf.Edition} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.google.protobuf.Edition} value + * @return {!proto.google.protobuf.FeatureSetDefaults} returns this + */ +proto.google.protobuf.FeatureSetDefaults.prototype.setMaximumEdition = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.FeatureSetDefaults} returns this + */ +proto.google.protobuf.FeatureSetDefaults.prototype.clearMaximumEdition = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.FeatureSetDefaults.prototype.hasMaximumEdition = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.SourceCodeInfo.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.SourceCodeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.SourceCodeInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.SourceCodeInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.SourceCodeInfo.toObject = function(includeInstance, msg) { + var f, obj = { +locationList: jspb.Message.toObjectList(msg.getLocationList(), + proto.google.protobuf.SourceCodeInfo.Location.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.SourceCodeInfo} + */ +proto.google.protobuf.SourceCodeInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.SourceCodeInfo; + return proto.google.protobuf.SourceCodeInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.SourceCodeInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.SourceCodeInfo} + */ +proto.google.protobuf.SourceCodeInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.protobuf.SourceCodeInfo.Location; + reader.readMessage(value,proto.google.protobuf.SourceCodeInfo.Location.deserializeBinaryFromReader); + msg.addLocation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.SourceCodeInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.SourceCodeInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.SourceCodeInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.SourceCodeInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLocationList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.protobuf.SourceCodeInfo.Location.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.SourceCodeInfo.Location.repeatedFields_ = [1,2,6]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.SourceCodeInfo.Location.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.SourceCodeInfo.Location} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.SourceCodeInfo.Location.toObject = function(includeInstance, msg) { + var f, obj = { +pathList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, +spanList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, +leadingComments: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +trailingComments: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +leadingDetachedCommentsList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} + */ +proto.google.protobuf.SourceCodeInfo.Location.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.SourceCodeInfo.Location; + return proto.google.protobuf.SourceCodeInfo.Location.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.SourceCodeInfo.Location} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} + */ +proto.google.protobuf.SourceCodeInfo.Location.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addPath(values[i]); + } + break; + case 2: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addSpan(values[i]); + } + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLeadingComments(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setTrailingComments(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.addLeadingDetachedComments(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.SourceCodeInfo.Location.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.SourceCodeInfo.Location} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.SourceCodeInfo.Location.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPathList(); + if (f.length > 0) { + writer.writePackedInt32( + 1, + f + ); + } + f = message.getSpanList(); + if (f.length > 0) { + writer.writePackedInt32( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } + f = message.getLeadingDetachedCommentsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 6, + f + ); + } +}; + + +/** + * repeated int32 path = 1; + * @return {!Array} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.getPathList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.setPathList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.addPath = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.clearPathList = function() { + return this.setPathList([]); +}; + + +/** + * repeated int32 span = 2; + * @return {!Array} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.getSpanList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.setSpanList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.addSpan = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.clearSpanList = function() { + return this.setSpanList([]); +}; + + +/** + * optional string leading_comments = 3; + * @return {string} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingComments = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingComments = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingComments = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.hasLeadingComments = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string trailing_comments = 4; + * @return {string} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.getTrailingComments = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.setTrailingComments = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.clearTrailingComments = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.hasTrailingComments = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * repeated string leading_detached_comments = 6; + * @return {!Array} + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.getLeadingDetachedCommentsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.setLeadingDetachedCommentsList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.addLeadingDetachedComments = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo.Location} returns this + */ +proto.google.protobuf.SourceCodeInfo.Location.prototype.clearLeadingDetachedCommentsList = function() { + return this.setLeadingDetachedCommentsList([]); +}; + + +/** + * repeated Location location = 1; + * @return {!Array} + */ +proto.google.protobuf.SourceCodeInfo.prototype.getLocationList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.SourceCodeInfo.Location, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.SourceCodeInfo} returns this +*/ +proto.google.protobuf.SourceCodeInfo.prototype.setLocationList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.protobuf.SourceCodeInfo.Location=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.SourceCodeInfo.Location} + */ +proto.google.protobuf.SourceCodeInfo.prototype.addLocation = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.SourceCodeInfo.Location, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.SourceCodeInfo} returns this + */ +proto.google.protobuf.SourceCodeInfo.prototype.clearLocationList = function() { + return this.setLocationList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.GeneratedCodeInfo.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.GeneratedCodeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.GeneratedCodeInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.GeneratedCodeInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.GeneratedCodeInfo.toObject = function(includeInstance, msg) { + var f, obj = { +annotationList: jspb.Message.toObjectList(msg.getAnnotationList(), + proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.GeneratedCodeInfo} + */ +proto.google.protobuf.GeneratedCodeInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.GeneratedCodeInfo; + return proto.google.protobuf.GeneratedCodeInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.GeneratedCodeInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.GeneratedCodeInfo} + */ +proto.google.protobuf.GeneratedCodeInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.protobuf.GeneratedCodeInfo.Annotation; + reader.readMessage(value,proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinaryFromReader); + msg.addAnnotation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.GeneratedCodeInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.GeneratedCodeInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.GeneratedCodeInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.GeneratedCodeInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAnnotationList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.protobuf.GeneratedCodeInfo.Annotation.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.toObject = function(includeInstance, msg) { + var f, obj = { +pathList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, +sourceFile: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f, +begin: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +end: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f, +semantic: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.GeneratedCodeInfo.Annotation; + return proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addPath(values[i]); + } + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSourceFile(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setBegin(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setEnd(value); + break; + case 5: + var value = /** @type {!proto.google.protobuf.GeneratedCodeInfo.Annotation.Semantic} */ (reader.readEnum()); + msg.setSemantic(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.GeneratedCodeInfo.Annotation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPathList(); + if (f.length > 0) { + writer.writePackedInt32( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeInt32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeInt32( + 4, + f + ); + } + f = /** @type {!proto.google.protobuf.GeneratedCodeInfo.Annotation.Semantic} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeEnum( + 5, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.Semantic = { + NONE: 0, + SET: 1, + ALIAS: 2 +}; + +/** + * repeated int32 path = 1; + * @return {!Array} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getPathList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setPathList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.addPath = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearPathList = function() { + return this.setPathList([]); +}; + + +/** + * optional string source_file = 2; + * @return {string} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getSourceFile = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setSourceFile = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearSourceFile = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.hasSourceFile = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int32 begin = 3; + * @return {number} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getBegin = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setBegin = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearBegin = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.hasBegin = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional int32 end = 4; + * @return {number} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getEnd = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setEnd = function(value) { + return jspb.Message.setField(this, 4, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearEnd = function() { + return jspb.Message.setField(this, 4, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.hasEnd = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Semantic semantic = 5; + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation.Semantic} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.getSemantic = function() { + return /** @type {!proto.google.protobuf.GeneratedCodeInfo.Annotation.Semantic} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation.Semantic} value + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.setSemantic = function(value) { + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.clearSemantic = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.GeneratedCodeInfo.Annotation.prototype.hasSemantic = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * repeated Annotation annotation = 1; + * @return {!Array} + */ +proto.google.protobuf.GeneratedCodeInfo.prototype.getAnnotationList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.GeneratedCodeInfo.Annotation, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.GeneratedCodeInfo} returns this +*/ +proto.google.protobuf.GeneratedCodeInfo.prototype.setAnnotationList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.protobuf.GeneratedCodeInfo.Annotation=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.GeneratedCodeInfo.Annotation} + */ +proto.google.protobuf.GeneratedCodeInfo.prototype.addAnnotation = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.GeneratedCodeInfo.Annotation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.GeneratedCodeInfo} returns this + */ +proto.google.protobuf.GeneratedCodeInfo.prototype.clearAnnotationList = function() { + return this.setAnnotationList([]); +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.Edition = { + EDITION_UNKNOWN: 0, + EDITION_PROTO2: 998, + EDITION_PROTO3: 999, + EDITION_2023: 1000, + EDITION_1_TEST_ONLY: 1, + EDITION_2_TEST_ONLY: 2, + EDITION_99997_TEST_ONLY: 99997, + EDITION_99998_TEST_ONLY: 99998, + EDITION_99999_TEST_ONLY: 99999 +}; + +goog.object.extend(exports, proto.google.protobuf); diff --git a/proto/google/protobuf/duration.pb.go b/proto/google/protobuf/duration.pb.go new file mode 100644 index 000000000..c0bbd77f6 --- /dev/null +++ b/proto/google/protobuf/duration.pb.go @@ -0,0 +1,367 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.1 +// protoc (unknown) +// source: google/protobuf/duration.proto + +// Package durationpb contains generated types for google/protobuf/duration.proto. +// +// The Duration message represents a signed span of time. +// +// # Conversion to a Go Duration +// +// The AsDuration method can be used to convert a Duration message to a +// standard Go time.Duration value: +// +// d := dur.AsDuration() +// ... // make use of d as a time.Duration +// +// Converting to a time.Duration is a common operation so that the extensive +// set of time-based operations provided by the time package can be leveraged. +// See https://golang.org/pkg/time for more information. +// +// The AsDuration method performs the conversion on a best-effort basis. +// Durations with denormal values (e.g., nanoseconds beyond -99999999 and +// +99999999, inclusive; or seconds and nanoseconds with opposite signs) +// are normalized during the conversion to a time.Duration. To manually check for +// invalid Duration per the documented limitations in duration.proto, +// additionally call the CheckValid method: +// +// if err := dur.CheckValid(); err != nil { +// ... // handle error +// } +// +// Note that the documented limitations in duration.proto does not protect a +// Duration from overflowing the representable range of a time.Duration in Go. +// The AsDuration method uses saturation arithmetic such that an overflow clamps +// the resulting value to the closest representable value (e.g., math.MaxInt64 +// for positive overflow and math.MinInt64 for negative overflow). +// +// # Conversion from a Go Duration +// +// The durationpb.New function can be used to construct a Duration message +// from a standard Go time.Duration value: +// +// dur := durationpb.New(d) +// ... // make use of d as a *durationpb.Duration +package durationpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + math "math" + reflect "reflect" + sync "sync" + time "time" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A Duration represents a signed, fixed-length span of time represented +// as a count of seconds and fractions of seconds at nanosecond +// resolution. It is independent of any calendar and concepts like "day" +// or "month". It is related to Timestamp in that the difference between +// two Timestamp values is a Duration and it can be added or subtracted +// from a Timestamp. Range is approximately +-10,000 years. +// +// # Examples +// +// Example 1: Compute Duration from two Timestamps in pseudo code. +// +// Timestamp start = ...; +// Timestamp end = ...; +// Duration duration = ...; +// +// duration.seconds = end.seconds - start.seconds; +// duration.nanos = end.nanos - start.nanos; +// +// if (duration.seconds < 0 && duration.nanos > 0) { +// duration.seconds += 1; +// duration.nanos -= 1000000000; +// } else if (duration.seconds > 0 && duration.nanos < 0) { +// duration.seconds -= 1; +// duration.nanos += 1000000000; +// } +// +// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. +// +// Timestamp start = ...; +// Duration duration = ...; +// Timestamp end = ...; +// +// end.seconds = start.seconds + duration.seconds; +// end.nanos = start.nanos + duration.nanos; +// +// if (end.nanos < 0) { +// end.seconds -= 1; +// end.nanos += 1000000000; +// } else if (end.nanos >= 1000000000) { +// end.seconds += 1; +// end.nanos -= 1000000000; +// } +// +// Example 3: Compute Duration from datetime.timedelta in Python. +// +// td = datetime.timedelta(days=3, minutes=10) +// duration = Duration() +// duration.FromTimedelta(td) +// +// # JSON Mapping +// +// In JSON format, the Duration type is encoded as a string rather than an +// object, where the string ends in the suffix "s" (indicating seconds) and +// is preceded by the number of seconds, with nanoseconds expressed as +// fractional seconds. For example, 3 seconds with 0 nanoseconds should be +// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should +// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 +// microsecond should be expressed in JSON format as "3.000001s". +type Duration struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Signed seconds of the span of time. Must be from -315,576,000,000 + // to +315,576,000,000 inclusive. Note: these bounds are computed from: + // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` + // Signed fractions of a second at nanosecond resolution of the span + // of time. Durations less than one second are represented with a 0 + // `seconds` field and a positive or negative `nanos` field. For durations + // of one second or more, a non-zero value for the `nanos` field must be + // of the same sign as the `seconds` field. Must be from -999,999,999 + // to +999,999,999 inclusive. + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// New constructs a new Duration from the provided time.Duration. +func New(d time.Duration) *Duration { + nanos := d.Nanoseconds() + secs := nanos / 1e9 + nanos -= secs * 1e9 + return &Duration{Seconds: int64(secs), Nanos: int32(nanos)} +} + +// AsDuration converts x to a time.Duration, +// returning the closest duration value in the event of overflow. +func (x *Duration) AsDuration() time.Duration { + secs := x.GetSeconds() + nanos := x.GetNanos() + d := time.Duration(secs) * time.Second + overflow := d/time.Second != time.Duration(secs) + d += time.Duration(nanos) * time.Nanosecond + overflow = overflow || (secs < 0 && nanos < 0 && d > 0) + overflow = overflow || (secs > 0 && nanos > 0 && d < 0) + if overflow { + switch { + case secs < 0: + return time.Duration(math.MinInt64) + case secs > 0: + return time.Duration(math.MaxInt64) + } + } + return d +} + +// IsValid reports whether the duration is valid. +// It is equivalent to CheckValid == nil. +func (x *Duration) IsValid() bool { + return x.check() == 0 +} + +// CheckValid returns an error if the duration is invalid. +// In particular, it checks whether the value is within the range of +// -10000 years to +10000 years inclusive. +// An error is reported for a nil Duration. +func (x *Duration) CheckValid() error { + switch x.check() { + case invalidNil: + return protoimpl.X.NewError("invalid nil Duration") + case invalidUnderflow: + return protoimpl.X.NewError("duration (%v) exceeds -10000 years", x) + case invalidOverflow: + return protoimpl.X.NewError("duration (%v) exceeds +10000 years", x) + case invalidNanosRange: + return protoimpl.X.NewError("duration (%v) has out-of-range nanos", x) + case invalidNanosSign: + return protoimpl.X.NewError("duration (%v) has seconds and nanos with different signs", x) + default: + return nil + } +} + +const ( + _ = iota + invalidNil + invalidUnderflow + invalidOverflow + invalidNanosRange + invalidNanosSign +) + +func (x *Duration) check() uint { + const absDuration = 315576000000 // 10000yr * 365.25day/yr * 24hr/day * 60min/hr * 60sec/min + secs := x.GetSeconds() + nanos := x.GetNanos() + switch { + case x == nil: + return invalidNil + case secs < -absDuration: + return invalidUnderflow + case secs > +absDuration: + return invalidOverflow + case nanos <= -1e9 || nanos >= +1e9: + return invalidNanosRange + case (secs > 0 && nanos < 0) || (secs < 0 && nanos > 0): + return invalidNanosSign + default: + return 0 + } +} + +func (x *Duration) Reset() { + *x = Duration{} + mi := &file_google_protobuf_duration_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Duration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Duration) ProtoMessage() {} + +func (x *Duration) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_duration_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Duration.ProtoReflect.Descriptor instead. +func (*Duration) Descriptor() ([]byte, []int) { + return file_google_protobuf_duration_proto_rawDescGZIP(), []int{0} +} + +func (x *Duration) GetSeconds() int64 { + if x != nil { + return x.Seconds + } + return 0 +} + +func (x *Duration) GetNanos() int32 { + if x != nil { + return x.Nanos + } + return 0 +} + +var File_google_protobuf_duration_proto protoreflect.FileDescriptor + +var file_google_protobuf_duration_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x22, 0x3a, 0x0a, 0x08, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, + 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6e, 0x6f, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x42, 0x83, 0x01, + 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x0d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, + 0x50, 0x42, 0xaa, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_protobuf_duration_proto_rawDescOnce sync.Once + file_google_protobuf_duration_proto_rawDescData = file_google_protobuf_duration_proto_rawDesc +) + +func file_google_protobuf_duration_proto_rawDescGZIP() []byte { + file_google_protobuf_duration_proto_rawDescOnce.Do(func() { + file_google_protobuf_duration_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_duration_proto_rawDescData) + }) + return file_google_protobuf_duration_proto_rawDescData +} + +var file_google_protobuf_duration_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_protobuf_duration_proto_goTypes = []any{ + (*Duration)(nil), // 0: google.protobuf.Duration +} +var file_google_protobuf_duration_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_protobuf_duration_proto_init() } +func file_google_protobuf_duration_proto_init() { + if File_google_protobuf_duration_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_protobuf_duration_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_protobuf_duration_proto_goTypes, + DependencyIndexes: file_google_protobuf_duration_proto_depIdxs, + MessageInfos: file_google_protobuf_duration_proto_msgTypes, + }.Build() + File_google_protobuf_duration_proto = out.File + file_google_protobuf_duration_proto_rawDesc = nil + file_google_protobuf_duration_proto_goTypes = nil + file_google_protobuf_duration_proto_depIdxs = nil +} diff --git a/proto/google/protobuf/duration_grpc_pb.js b/proto/google/protobuf/duration_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/google/protobuf/duration_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/google/protobuf/duration_pb.d.ts b/proto/google/protobuf/duration_pb.d.ts new file mode 100644 index 000000000..7bf35b84c --- /dev/null +++ b/proto/google/protobuf/duration_pb.d.ts @@ -0,0 +1,30 @@ +// package: google.protobuf +// file: google/protobuf/duration.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Duration extends jspb.Message { + getSeconds(): number; + setSeconds(value: number): Duration; + getNanos(): number; + setNanos(value: number): Duration; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Duration.AsObject; + static toObject(includeInstance: boolean, msg: Duration): Duration.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Duration, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Duration; + static deserializeBinaryFromReader(message: Duration, reader: jspb.BinaryReader): Duration; +} + +export namespace Duration { + export type AsObject = { + seconds: number, + nanos: number, + } +} diff --git a/proto/google/protobuf/duration_pb.js b/proto/google/protobuf/duration_pb.js new file mode 100644 index 000000000..7a267d6ea --- /dev/null +++ b/proto/google/protobuf/duration_pb.js @@ -0,0 +1,206 @@ +// source: google/protobuf/duration.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +goog.exportSymbol('proto.google.protobuf.Duration', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.Duration = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.Duration, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.Duration.displayName = 'proto.google.protobuf.Duration'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.Duration.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.Duration.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.Duration} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Duration.toObject = function(includeInstance, msg) { + var f, obj = { +seconds: jspb.Message.getFieldWithDefault(msg, 1, 0), +nanos: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.Duration} + */ +proto.google.protobuf.Duration.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.Duration; + return proto.google.protobuf.Duration.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.Duration} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.Duration} + */ +proto.google.protobuf.Duration.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSeconds(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNanos(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.Duration.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.Duration.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.Duration} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Duration.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSeconds(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getNanos(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional int64 seconds = 1; + * @return {number} + */ +proto.google.protobuf.Duration.prototype.getSeconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.Duration} returns this + */ +proto.google.protobuf.Duration.prototype.setSeconds = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 nanos = 2; + * @return {number} + */ +proto.google.protobuf.Duration.prototype.getNanos = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.Duration} returns this + */ +proto.google.protobuf.Duration.prototype.setNanos = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.protobuf); diff --git a/proto/google/protobuf/field_mask.pb.go b/proto/google/protobuf/field_mask.pb.go new file mode 100644 index 000000000..90d4d3305 --- /dev/null +++ b/proto/google/protobuf/field_mask.pb.go @@ -0,0 +1,581 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.1 +// protoc (unknown) +// source: google/protobuf/field_mask.proto + +// Package fieldmaskpb contains generated types for google/protobuf/field_mask.proto. +// +// The FieldMask message represents a set of symbolic field paths. +// The paths are specific to some target message type, +// which is not stored within the FieldMask message itself. +// +// # Constructing a FieldMask +// +// The New function is used construct a FieldMask: +// +// var messageType *descriptorpb.DescriptorProto +// fm, err := fieldmaskpb.New(messageType, "field.name", "field.number") +// if err != nil { +// ... // handle error +// } +// ... // make use of fm +// +// The "field.name" and "field.number" paths are valid paths according to the +// google.protobuf.DescriptorProto message. Use of a path that does not correlate +// to valid fields reachable from DescriptorProto would result in an error. +// +// Once a FieldMask message has been constructed, +// the Append method can be used to insert additional paths to the path set: +// +// var messageType *descriptorpb.DescriptorProto +// if err := fm.Append(messageType, "options"); err != nil { +// ... // handle error +// } +// +// # Type checking a FieldMask +// +// In order to verify that a FieldMask represents a set of fields that are +// reachable from some target message type, use the IsValid method: +// +// var messageType *descriptorpb.DescriptorProto +// if fm.IsValid(messageType) { +// ... // make use of fm +// } +// +// IsValid needs to be passed the target message type as an input since the +// FieldMask message itself does not store the message type that the set of paths +// are for. +package fieldmaskpb + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sort "sort" + strings "strings" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// `FieldMask` represents a set of symbolic field paths, for example: +// +// paths: "f.a" +// paths: "f.b.d" +// +// Here `f` represents a field in some root message, `a` and `b` +// fields in the message found in `f`, and `d` a field found in the +// message in `f.b`. +// +// Field masks are used to specify a subset of fields that should be +// returned by a get operation or modified by an update operation. +// Field masks also have a custom JSON encoding (see below). +// +// # Field Masks in Projections +// +// When used in the context of a projection, a response message or +// sub-message is filtered by the API to only contain those fields as +// specified in the mask. For example, if the mask in the previous +// example is applied to a response message as follows: +// +// f { +// a : 22 +// b { +// d : 1 +// x : 2 +// } +// y : 13 +// } +// z: 8 +// +// The result will not contain specific values for fields x,y and z +// (their value will be set to the default, and omitted in proto text +// output): +// +// f { +// a : 22 +// b { +// d : 1 +// } +// } +// +// A repeated field is not allowed except at the last position of a +// paths string. +// +// If a FieldMask object is not present in a get operation, the +// operation applies to all fields (as if a FieldMask of all fields +// had been specified). +// +// Note that a field mask does not necessarily apply to the +// top-level response message. In case of a REST get operation, the +// field mask applies directly to the response, but in case of a REST +// list operation, the mask instead applies to each individual message +// in the returned resource list. In case of a REST custom method, +// other definitions may be used. Where the mask applies will be +// clearly documented together with its declaration in the API. In +// any case, the effect on the returned resource/resources is required +// behavior for APIs. +// +// # Field Masks in Update Operations +// +// A field mask in update operations specifies which fields of the +// targeted resource are going to be updated. The API is required +// to only change the values of the fields as specified in the mask +// and leave the others untouched. If a resource is passed in to +// describe the updated values, the API ignores the values of all +// fields not covered by the mask. +// +// If a repeated field is specified for an update operation, new values will +// be appended to the existing repeated field in the target resource. Note that +// a repeated field is only allowed in the last position of a `paths` string. +// +// If a sub-message is specified in the last position of the field mask for an +// update operation, then new value will be merged into the existing sub-message +// in the target resource. +// +// For example, given the target message: +// +// f { +// b { +// d: 1 +// x: 2 +// } +// c: [1] +// } +// +// And an update message: +// +// f { +// b { +// d: 10 +// } +// c: [2] +// } +// +// then if the field mask is: +// +// paths: ["f.b", "f.c"] +// +// then the result will be: +// +// f { +// b { +// d: 10 +// x: 2 +// } +// c: [1, 2] +// } +// +// An implementation may provide options to override this default behavior for +// repeated and message fields. +// +// In order to reset a field's value to the default, the field must +// be in the mask and set to the default value in the provided resource. +// Hence, in order to reset all fields of a resource, provide a default +// instance of the resource and set all fields in the mask, or do +// not provide a mask as described below. +// +// If a field mask is not present on update, the operation applies to +// all fields (as if a field mask of all fields has been specified). +// Note that in the presence of schema evolution, this may mean that +// fields the client does not know and has therefore not filled into +// the request will be reset to their default. If this is unwanted +// behavior, a specific service may require a client to always specify +// a field mask, producing an error if not. +// +// As with get operations, the location of the resource which +// describes the updated values in the request message depends on the +// operation kind. In any case, the effect of the field mask is +// required to be honored by the API. +// +// ## Considerations for HTTP REST +// +// The HTTP kind of an update operation which uses a field mask must +// be set to PATCH instead of PUT in order to satisfy HTTP semantics +// (PUT must only be used for full updates). +// +// # JSON Encoding of Field Masks +// +// In JSON, a field mask is encoded as a single string where paths are +// separated by a comma. Fields name in each path are converted +// to/from lower-camel naming conventions. +// +// As an example, consider the following message declarations: +// +// message Profile { +// User user = 1; +// Photo photo = 2; +// } +// message User { +// string display_name = 1; +// string address = 2; +// } +// +// In proto a field mask for `Profile` may look as such: +// +// mask { +// paths: "user.display_name" +// paths: "photo" +// } +// +// In JSON, the same mask is represented as below: +// +// { +// mask: "user.displayName,photo" +// } +// +// # Field Masks and Oneof Fields +// +// Field masks treat fields in oneofs just as regular fields. Consider the +// following message: +// +// message SampleMessage { +// oneof test_oneof { +// string name = 4; +// SubMessage sub_message = 9; +// } +// } +// +// The field mask can be: +// +// mask { +// paths: "name" +// } +// +// Or: +// +// mask { +// paths: "sub_message" +// } +// +// Note that oneof type names ("test_oneof" in this case) cannot be used in +// paths. +// +// ## Field Mask Verification +// +// The implementation of any API method which has a FieldMask type field in the +// request should verify the included field paths, and return an +// `INVALID_ARGUMENT` error if any path is unmappable. +type FieldMask struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The set of field mask paths. + Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// New constructs a field mask from a list of paths and verifies that +// each one is valid according to the specified message type. +func New(m proto.Message, paths ...string) (*FieldMask, error) { + x := new(FieldMask) + return x, x.Append(m, paths...) +} + +// Union returns the union of all the paths in the input field masks. +func Union(mx *FieldMask, my *FieldMask, ms ...*FieldMask) *FieldMask { + var out []string + out = append(out, mx.GetPaths()...) + out = append(out, my.GetPaths()...) + for _, m := range ms { + out = append(out, m.GetPaths()...) + } + return &FieldMask{Paths: normalizePaths(out)} +} + +// Intersect returns the intersection of all the paths in the input field masks. +func Intersect(mx *FieldMask, my *FieldMask, ms ...*FieldMask) *FieldMask { + var ss1, ss2 []string // reused buffers for performance + intersect := func(out, in []string) []string { + ss1 = normalizePaths(append(ss1[:0], in...)) + ss2 = normalizePaths(append(ss2[:0], out...)) + out = out[:0] + for i1, i2 := 0, 0; i1 < len(ss1) && i2 < len(ss2); { + switch s1, s2 := ss1[i1], ss2[i2]; { + case hasPathPrefix(s1, s2): + out = append(out, s1) + i1++ + case hasPathPrefix(s2, s1): + out = append(out, s2) + i2++ + case lessPath(s1, s2): + i1++ + case lessPath(s2, s1): + i2++ + } + } + return out + } + + out := Union(mx, my, ms...).GetPaths() + out = intersect(out, mx.GetPaths()) + out = intersect(out, my.GetPaths()) + for _, m := range ms { + out = intersect(out, m.GetPaths()) + } + return &FieldMask{Paths: normalizePaths(out)} +} + +// IsValid reports whether all the paths are syntactically valid and +// refer to known fields in the specified message type. +// It reports false for a nil FieldMask. +func (x *FieldMask) IsValid(m proto.Message) bool { + paths := x.GetPaths() + return x != nil && numValidPaths(m, paths) == len(paths) +} + +// Append appends a list of paths to the mask and verifies that each one +// is valid according to the specified message type. +// An invalid path is not appended and breaks insertion of subsequent paths. +func (x *FieldMask) Append(m proto.Message, paths ...string) error { + numValid := numValidPaths(m, paths) + x.Paths = append(x.Paths, paths[:numValid]...) + paths = paths[numValid:] + if len(paths) > 0 { + name := m.ProtoReflect().Descriptor().FullName() + return protoimpl.X.NewError("invalid path %q for message %q", paths[0], name) + } + return nil +} + +func numValidPaths(m proto.Message, paths []string) int { + md0 := m.ProtoReflect().Descriptor() + for i, path := range paths { + md := md0 + if !rangeFields(path, func(field string) bool { + // Search the field within the message. + if md == nil { + return false // not within a message + } + fd := md.Fields().ByName(protoreflect.Name(field)) + // The real field name of a group is the message name. + if fd == nil { + gd := md.Fields().ByName(protoreflect.Name(strings.ToLower(field))) + if gd != nil && gd.Kind() == protoreflect.GroupKind && string(gd.Message().Name()) == field { + fd = gd + } + } else if fd.Kind() == protoreflect.GroupKind && string(fd.Message().Name()) != field { + fd = nil + } + if fd == nil { + return false // message has does not have this field + } + + // Identify the next message to search within. + md = fd.Message() // may be nil + + // Repeated fields are only allowed at the last position. + if fd.IsList() || fd.IsMap() { + md = nil + } + + return true + }) { + return i + } + } + return len(paths) +} + +// Normalize converts the mask to its canonical form where all paths are sorted +// and redundant paths are removed. +func (x *FieldMask) Normalize() { + x.Paths = normalizePaths(x.Paths) +} + +func normalizePaths(paths []string) []string { + sort.Slice(paths, func(i, j int) bool { + return lessPath(paths[i], paths[j]) + }) + + // Elide any path that is a prefix match on the previous. + out := paths[:0] + for _, path := range paths { + if len(out) > 0 && hasPathPrefix(path, out[len(out)-1]) { + continue + } + out = append(out, path) + } + return out +} + +// hasPathPrefix is like strings.HasPrefix, but further checks for either +// an exact matche or that the prefix is delimited by a dot. +func hasPathPrefix(path, prefix string) bool { + return strings.HasPrefix(path, prefix) && (len(path) == len(prefix) || path[len(prefix)] == '.') +} + +// lessPath is a lexicographical comparison where dot is specially treated +// as the smallest symbol. +func lessPath(x, y string) bool { + for i := 0; i < len(x) && i < len(y); i++ { + if x[i] != y[i] { + return (x[i] - '.') < (y[i] - '.') + } + } + return len(x) < len(y) +} + +// rangeFields is like strings.Split(path, "."), but avoids allocations by +// iterating over each field in place and calling a iterator function. +func rangeFields(path string, f func(field string) bool) bool { + for { + var field string + if i := strings.IndexByte(path, '.'); i >= 0 { + field, path = path[:i], path[i:] + } else { + field, path = path, "" + } + + if !f(field) { + return false + } + + if len(path) == 0 { + return true + } + path = strings.TrimPrefix(path, ".") + } +} + +func (x *FieldMask) Reset() { + *x = FieldMask{} + mi := &file_google_protobuf_field_mask_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FieldMask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldMask) ProtoMessage() {} + +func (x *FieldMask) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_field_mask_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldMask.ProtoReflect.Descriptor instead. +func (*FieldMask) Descriptor() ([]byte, []int) { + return file_google_protobuf_field_mask_proto_rawDescGZIP(), []int{0} +} + +func (x *FieldMask) GetPaths() []string { + if x != nil { + return x.Paths + } + return nil +} + +var File_google_protobuf_field_mask_proto protoreflect.FileDescriptor + +var file_google_protobuf_field_mask_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x22, 0x21, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, + 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x42, 0x85, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x0e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, + 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x6d, 0x61, + 0x73, 0x6b, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1e, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_protobuf_field_mask_proto_rawDescOnce sync.Once + file_google_protobuf_field_mask_proto_rawDescData = file_google_protobuf_field_mask_proto_rawDesc +) + +func file_google_protobuf_field_mask_proto_rawDescGZIP() []byte { + file_google_protobuf_field_mask_proto_rawDescOnce.Do(func() { + file_google_protobuf_field_mask_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_field_mask_proto_rawDescData) + }) + return file_google_protobuf_field_mask_proto_rawDescData +} + +var file_google_protobuf_field_mask_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_protobuf_field_mask_proto_goTypes = []any{ + (*FieldMask)(nil), // 0: google.protobuf.FieldMask +} +var file_google_protobuf_field_mask_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_protobuf_field_mask_proto_init() } +func file_google_protobuf_field_mask_proto_init() { + if File_google_protobuf_field_mask_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_protobuf_field_mask_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_protobuf_field_mask_proto_goTypes, + DependencyIndexes: file_google_protobuf_field_mask_proto_depIdxs, + MessageInfos: file_google_protobuf_field_mask_proto_msgTypes, + }.Build() + File_google_protobuf_field_mask_proto = out.File + file_google_protobuf_field_mask_proto_rawDesc = nil + file_google_protobuf_field_mask_proto_goTypes = nil + file_google_protobuf_field_mask_proto_depIdxs = nil +} diff --git a/proto/google/protobuf/field_mask_grpc_pb.js b/proto/google/protobuf/field_mask_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/google/protobuf/field_mask_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/google/protobuf/field_mask_pb.d.ts b/proto/google/protobuf/field_mask_pb.d.ts new file mode 100644 index 000000000..6db6830ff --- /dev/null +++ b/proto/google/protobuf/field_mask_pb.d.ts @@ -0,0 +1,29 @@ +// package: google.protobuf +// file: google/protobuf/field_mask.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class FieldMask extends jspb.Message { + clearPathsList(): void; + getPathsList(): Array; + setPathsList(value: Array): FieldMask; + addPaths(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldMask.AsObject; + static toObject(includeInstance: boolean, msg: FieldMask): FieldMask.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldMask, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldMask; + static deserializeBinaryFromReader(message: FieldMask, reader: jspb.BinaryReader): FieldMask; +} + +export namespace FieldMask { + export type AsObject = { + pathsList: Array, + } +} diff --git a/proto/google/protobuf/field_mask_pb.js b/proto/google/protobuf/field_mask_pb.js new file mode 100644 index 000000000..f04c4113c --- /dev/null +++ b/proto/google/protobuf/field_mask_pb.js @@ -0,0 +1,202 @@ +// source: google/protobuf/field_mask.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +goog.exportSymbol('proto.google.protobuf.FieldMask', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.FieldMask = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.FieldMask.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.FieldMask, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.FieldMask.displayName = 'proto.google.protobuf.FieldMask'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.FieldMask.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.FieldMask.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.FieldMask.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.FieldMask} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldMask.toObject = function(includeInstance, msg) { + var f, obj = { +pathsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.FieldMask} + */ +proto.google.protobuf.FieldMask.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.FieldMask; + return proto.google.protobuf.FieldMask.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.FieldMask} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.FieldMask} + */ +proto.google.protobuf.FieldMask.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addPaths(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.FieldMask.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.FieldMask.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.FieldMask} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.FieldMask.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPathsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string paths = 1; + * @return {!Array} + */ +proto.google.protobuf.FieldMask.prototype.getPathsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.FieldMask} returns this + */ +proto.google.protobuf.FieldMask.prototype.setPathsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.google.protobuf.FieldMask} returns this + */ +proto.google.protobuf.FieldMask.prototype.addPaths = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.FieldMask} returns this + */ +proto.google.protobuf.FieldMask.prototype.clearPathsList = function() { + return this.setPathsList([]); +}; + + +goog.object.extend(exports, proto.google.protobuf); diff --git a/proto/google/protobuf/struct.pb.go b/proto/google/protobuf/struct.pb.go new file mode 100644 index 000000000..1ed16c563 --- /dev/null +++ b/proto/google/protobuf/struct.pb.go @@ -0,0 +1,801 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.1 +// protoc (unknown) +// source: google/protobuf/struct.proto + +// Package structpb contains generated types for google/protobuf/struct.proto. +// +// The messages (i.e., Value, Struct, and ListValue) defined in struct.proto are +// used to represent arbitrary JSON. The Value message represents a JSON value, +// the Struct message represents a JSON object, and the ListValue message +// represents a JSON array. See https://json.org for more information. +// +// The Value, Struct, and ListValue types have generated MarshalJSON and +// UnmarshalJSON methods such that they serialize JSON equivalent to what the +// messages themselves represent. Use of these types with the +// "google.golang.org/protobuf/encoding/protojson" package +// ensures that they will be serialized as their JSON equivalent. +// +// # Conversion to and from a Go interface +// +// The standard Go "encoding/json" package has functionality to serialize +// arbitrary types to a large degree. The Value.AsInterface, Struct.AsMap, and +// ListValue.AsSlice methods can convert the protobuf message representation into +// a form represented by any, map[string]any, and []any. +// This form can be used with other packages that operate on such data structures +// and also directly with the standard json package. +// +// In order to convert the any, map[string]any, and []any +// forms back as Value, Struct, and ListValue messages, use the NewStruct, +// NewList, and NewValue constructor functions. +// +// # Example usage +// +// Consider the following example JSON object: +// +// { +// "firstName": "John", +// "lastName": "Smith", +// "isAlive": true, +// "age": 27, +// "address": { +// "streetAddress": "21 2nd Street", +// "city": "New York", +// "state": "NY", +// "postalCode": "10021-3100" +// }, +// "phoneNumbers": [ +// { +// "type": "home", +// "number": "212 555-1234" +// }, +// { +// "type": "office", +// "number": "646 555-4567" +// } +// ], +// "children": [], +// "spouse": null +// } +// +// To construct a Value message representing the above JSON object: +// +// m, err := structpb.NewValue(map[string]any{ +// "firstName": "John", +// "lastName": "Smith", +// "isAlive": true, +// "age": 27, +// "address": map[string]any{ +// "streetAddress": "21 2nd Street", +// "city": "New York", +// "state": "NY", +// "postalCode": "10021-3100", +// }, +// "phoneNumbers": []any{ +// map[string]any{ +// "type": "home", +// "number": "212 555-1234", +// }, +// map[string]any{ +// "type": "office", +// "number": "646 555-4567", +// }, +// }, +// "children": []any{}, +// "spouse": nil, +// }) +// if err != nil { +// ... // handle error +// } +// ... // make use of m as a *structpb.Value +package structpb + +import ( + base64 "encoding/base64" + json "encoding/json" + protojson "google.golang.org/protobuf/encoding/protojson" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + math "math" + reflect "reflect" + sync "sync" + utf8 "unicode/utf8" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// `NullValue` is a singleton enumeration to represent the null value for the +// `Value` type union. +// +// The JSON representation for `NullValue` is JSON `null`. +type NullValue int32 + +const ( + // Null value. + NullValue_NULL_VALUE NullValue = 0 +) + +// Enum value maps for NullValue. +var ( + NullValue_name = map[int32]string{ + 0: "NULL_VALUE", + } + NullValue_value = map[string]int32{ + "NULL_VALUE": 0, + } +) + +func (x NullValue) Enum() *NullValue { + p := new(NullValue) + *p = x + return p +} + +func (x NullValue) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NullValue) Descriptor() protoreflect.EnumDescriptor { + return file_google_protobuf_struct_proto_enumTypes[0].Descriptor() +} + +func (NullValue) Type() protoreflect.EnumType { + return &file_google_protobuf_struct_proto_enumTypes[0] +} + +func (x NullValue) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NullValue.Descriptor instead. +func (NullValue) EnumDescriptor() ([]byte, []int) { + return file_google_protobuf_struct_proto_rawDescGZIP(), []int{0} +} + +// `Struct` represents a structured data value, consisting of fields +// which map to dynamically typed values. In some languages, `Struct` +// might be supported by a native representation. For example, in +// scripting languages like JS a struct is represented as an +// object. The details of that representation are described together +// with the proto support for the language. +// +// The JSON representation for `Struct` is JSON object. +type Struct struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Unordered map of dynamically typed values. + Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// NewStruct constructs a Struct from a general-purpose Go map. +// The map keys must be valid UTF-8. +// The map values are converted using NewValue. +func NewStruct(v map[string]any) (*Struct, error) { + x := &Struct{Fields: make(map[string]*Value, len(v))} + for k, v := range v { + if !utf8.ValidString(k) { + return nil, protoimpl.X.NewError("invalid UTF-8 in string: %q", k) + } + var err error + x.Fields[k], err = NewValue(v) + if err != nil { + return nil, err + } + } + return x, nil +} + +// AsMap converts x to a general-purpose Go map. +// The map values are converted by calling Value.AsInterface. +func (x *Struct) AsMap() map[string]any { + f := x.GetFields() + vs := make(map[string]any, len(f)) + for k, v := range f { + vs[k] = v.AsInterface() + } + return vs +} + +func (x *Struct) MarshalJSON() ([]byte, error) { + return protojson.Marshal(x) +} + +func (x *Struct) UnmarshalJSON(b []byte) error { + return protojson.Unmarshal(b, x) +} + +func (x *Struct) Reset() { + *x = Struct{} + mi := &file_google_protobuf_struct_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Struct) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Struct) ProtoMessage() {} + +func (x *Struct) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_struct_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Struct.ProtoReflect.Descriptor instead. +func (*Struct) Descriptor() ([]byte, []int) { + return file_google_protobuf_struct_proto_rawDescGZIP(), []int{0} +} + +func (x *Struct) GetFields() map[string]*Value { + if x != nil { + return x.Fields + } + return nil +} + +// `Value` represents a dynamically typed value which can be either +// null, a number, a string, a boolean, a recursive struct value, or a +// list of values. A producer of value is expected to set one of these +// variants. Absence of any variant indicates an error. +// +// The JSON representation for `Value` is JSON value. +type Value struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The kind of value. + // + // Types that are valid to be assigned to Kind: + // + // *Value_NullValue + // *Value_NumberValue + // *Value_StringValue + // *Value_BoolValue + // *Value_StructValue + // *Value_ListValue + Kind isValue_Kind `protobuf_oneof:"kind"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// NewValue constructs a Value from a general-purpose Go interface. +// +// ╔═══════════════════════════════════════╤════════════════════════════════════════════╗ +// ║ Go type │ Conversion ║ +// ╠═══════════════════════════════════════╪════════════════════════════════════════════╣ +// ║ nil │ stored as NullValue ║ +// ║ bool │ stored as BoolValue ║ +// ║ int, int8, int16, int32, int64 │ stored as NumberValue ║ +// ║ uint, uint8, uint16, uint32, uint64 │ stored as NumberValue ║ +// ║ float32, float64 │ stored as NumberValue ║ +// ║ json.Number │ stored as NumberValue ║ +// ║ string │ stored as StringValue; must be valid UTF-8 ║ +// ║ []byte │ stored as StringValue; base64-encoded ║ +// ║ map[string]any │ stored as StructValue ║ +// ║ []any │ stored as ListValue ║ +// ╚═══════════════════════════════════════╧════════════════════════════════════════════╝ +// +// When converting an int64 or uint64 to a NumberValue, numeric precision loss +// is possible since they are stored as a float64. +func NewValue(v any) (*Value, error) { + switch v := v.(type) { + case nil: + return NewNullValue(), nil + case bool: + return NewBoolValue(v), nil + case int: + return NewNumberValue(float64(v)), nil + case int8: + return NewNumberValue(float64(v)), nil + case int16: + return NewNumberValue(float64(v)), nil + case int32: + return NewNumberValue(float64(v)), nil + case int64: + return NewNumberValue(float64(v)), nil + case uint: + return NewNumberValue(float64(v)), nil + case uint8: + return NewNumberValue(float64(v)), nil + case uint16: + return NewNumberValue(float64(v)), nil + case uint32: + return NewNumberValue(float64(v)), nil + case uint64: + return NewNumberValue(float64(v)), nil + case float32: + return NewNumberValue(float64(v)), nil + case float64: + return NewNumberValue(float64(v)), nil + case json.Number: + n, err := v.Float64() + if err != nil { + return nil, protoimpl.X.NewError("invalid number format %q, expected a float64: %v", v, err) + } + return NewNumberValue(n), nil + case string: + if !utf8.ValidString(v) { + return nil, protoimpl.X.NewError("invalid UTF-8 in string: %q", v) + } + return NewStringValue(v), nil + case []byte: + s := base64.StdEncoding.EncodeToString(v) + return NewStringValue(s), nil + case map[string]any: + v2, err := NewStruct(v) + if err != nil { + return nil, err + } + return NewStructValue(v2), nil + case []any: + v2, err := NewList(v) + if err != nil { + return nil, err + } + return NewListValue(v2), nil + default: + return nil, protoimpl.X.NewError("invalid type: %T", v) + } +} + +// NewNullValue constructs a new null Value. +func NewNullValue() *Value { + return &Value{Kind: &Value_NullValue{NullValue: NullValue_NULL_VALUE}} +} + +// NewBoolValue constructs a new boolean Value. +func NewBoolValue(v bool) *Value { + return &Value{Kind: &Value_BoolValue{BoolValue: v}} +} + +// NewNumberValue constructs a new number Value. +func NewNumberValue(v float64) *Value { + return &Value{Kind: &Value_NumberValue{NumberValue: v}} +} + +// NewStringValue constructs a new string Value. +func NewStringValue(v string) *Value { + return &Value{Kind: &Value_StringValue{StringValue: v}} +} + +// NewStructValue constructs a new struct Value. +func NewStructValue(v *Struct) *Value { + return &Value{Kind: &Value_StructValue{StructValue: v}} +} + +// NewListValue constructs a new list Value. +func NewListValue(v *ListValue) *Value { + return &Value{Kind: &Value_ListValue{ListValue: v}} +} + +// AsInterface converts x to a general-purpose Go interface. +// +// Calling Value.MarshalJSON and "encoding/json".Marshal on this output produce +// semantically equivalent JSON (assuming no errors occur). +// +// Floating-point values (i.e., "NaN", "Infinity", and "-Infinity") are +// converted as strings to remain compatible with MarshalJSON. +func (x *Value) AsInterface() any { + switch v := x.GetKind().(type) { + case *Value_NumberValue: + if v != nil { + switch { + case math.IsNaN(v.NumberValue): + return "NaN" + case math.IsInf(v.NumberValue, +1): + return "Infinity" + case math.IsInf(v.NumberValue, -1): + return "-Infinity" + default: + return v.NumberValue + } + } + case *Value_StringValue: + if v != nil { + return v.StringValue + } + case *Value_BoolValue: + if v != nil { + return v.BoolValue + } + case *Value_StructValue: + if v != nil { + return v.StructValue.AsMap() + } + case *Value_ListValue: + if v != nil { + return v.ListValue.AsSlice() + } + } + return nil +} + +func (x *Value) MarshalJSON() ([]byte, error) { + return protojson.Marshal(x) +} + +func (x *Value) UnmarshalJSON(b []byte) error { + return protojson.Unmarshal(b, x) +} + +func (x *Value) Reset() { + *x = Value{} + mi := &file_google_protobuf_struct_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Value) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Value) ProtoMessage() {} + +func (x *Value) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_struct_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Value.ProtoReflect.Descriptor instead. +func (*Value) Descriptor() ([]byte, []int) { + return file_google_protobuf_struct_proto_rawDescGZIP(), []int{1} +} + +func (x *Value) GetKind() isValue_Kind { + if x != nil { + return x.Kind + } + return nil +} + +func (x *Value) GetNullValue() NullValue { + if x != nil { + if x, ok := x.Kind.(*Value_NullValue); ok { + return x.NullValue + } + } + return NullValue_NULL_VALUE +} + +func (x *Value) GetNumberValue() float64 { + if x != nil { + if x, ok := x.Kind.(*Value_NumberValue); ok { + return x.NumberValue + } + } + return 0 +} + +func (x *Value) GetStringValue() string { + if x != nil { + if x, ok := x.Kind.(*Value_StringValue); ok { + return x.StringValue + } + } + return "" +} + +func (x *Value) GetBoolValue() bool { + if x != nil { + if x, ok := x.Kind.(*Value_BoolValue); ok { + return x.BoolValue + } + } + return false +} + +func (x *Value) GetStructValue() *Struct { + if x != nil { + if x, ok := x.Kind.(*Value_StructValue); ok { + return x.StructValue + } + } + return nil +} + +func (x *Value) GetListValue() *ListValue { + if x != nil { + if x, ok := x.Kind.(*Value_ListValue); ok { + return x.ListValue + } + } + return nil +} + +type isValue_Kind interface { + isValue_Kind() +} + +type Value_NullValue struct { + // Represents a null value. + NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue,oneof"` +} + +type Value_NumberValue struct { + // Represents a double value. + NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,proto3,oneof"` +} + +type Value_StringValue struct { + // Represents a string value. + StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof"` +} + +type Value_BoolValue struct { + // Represents a boolean value. + BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"` +} + +type Value_StructValue struct { + // Represents a structured value. + StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,proto3,oneof"` +} + +type Value_ListValue struct { + // Represents a repeated `Value`. + ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,proto3,oneof"` +} + +func (*Value_NullValue) isValue_Kind() {} + +func (*Value_NumberValue) isValue_Kind() {} + +func (*Value_StringValue) isValue_Kind() {} + +func (*Value_BoolValue) isValue_Kind() {} + +func (*Value_StructValue) isValue_Kind() {} + +func (*Value_ListValue) isValue_Kind() {} + +// `ListValue` is a wrapper around a repeated field of values. +// +// The JSON representation for `ListValue` is JSON array. +type ListValue struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Repeated field of dynamically typed values. + Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// NewList constructs a ListValue from a general-purpose Go slice. +// The slice elements are converted using NewValue. +func NewList(v []any) (*ListValue, error) { + x := &ListValue{Values: make([]*Value, len(v))} + for i, v := range v { + var err error + x.Values[i], err = NewValue(v) + if err != nil { + return nil, err + } + } + return x, nil +} + +// AsSlice converts x to a general-purpose Go slice. +// The slice elements are converted by calling Value.AsInterface. +func (x *ListValue) AsSlice() []any { + vals := x.GetValues() + vs := make([]any, len(vals)) + for i, v := range vals { + vs[i] = v.AsInterface() + } + return vs +} + +func (x *ListValue) MarshalJSON() ([]byte, error) { + return protojson.Marshal(x) +} + +func (x *ListValue) UnmarshalJSON(b []byte) error { + return protojson.Unmarshal(b, x) +} + +func (x *ListValue) Reset() { + *x = ListValue{} + mi := &file_google_protobuf_struct_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListValue) ProtoMessage() {} + +func (x *ListValue) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_struct_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListValue.ProtoReflect.Descriptor instead. +func (*ListValue) Descriptor() ([]byte, []int) { + return file_google_protobuf_struct_proto_rawDescGZIP(), []int{2} +} + +func (x *ListValue) GetValues() []*Value { + if x != nil { + return x.Values + } + return nil +} + +var File_google_protobuf_struct_proto protoreflect.FileDescriptor + +var file_google_protobuf_struct_proto_rawDesc = []byte{ + 0x0a, 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, 0x12, 0x0f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, + 0x98, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x12, 0x3b, 0x0a, 0x06, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x51, 0x0a, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, + 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, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb2, 0x02, 0x0a, 0x05, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62, + 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3c, 0x0a, 0x0c, + 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 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, 0x48, 0x00, 0x52, 0x0b, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x6c, 0x69, + 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x69, + 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, + 0x3b, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, 0x0a, 0x06, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2a, 0x1b, 0x0a, 0x09, + 0x4e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x55, 0x4c, + 0x4c, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x00, 0x42, 0x7f, 0x0a, 0x13, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x42, 0x0b, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x70, 0x62, + 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, + 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_google_protobuf_struct_proto_rawDescOnce sync.Once + file_google_protobuf_struct_proto_rawDescData = file_google_protobuf_struct_proto_rawDesc +) + +func file_google_protobuf_struct_proto_rawDescGZIP() []byte { + file_google_protobuf_struct_proto_rawDescOnce.Do(func() { + file_google_protobuf_struct_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_struct_proto_rawDescData) + }) + return file_google_protobuf_struct_proto_rawDescData +} + +var file_google_protobuf_struct_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_protobuf_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_google_protobuf_struct_proto_goTypes = []any{ + (NullValue)(0), // 0: google.protobuf.NullValue + (*Struct)(nil), // 1: google.protobuf.Struct + (*Value)(nil), // 2: google.protobuf.Value + (*ListValue)(nil), // 3: google.protobuf.ListValue + nil, // 4: google.protobuf.Struct.FieldsEntry +} +var file_google_protobuf_struct_proto_depIdxs = []int32{ + 4, // 0: google.protobuf.Struct.fields:type_name -> google.protobuf.Struct.FieldsEntry + 0, // 1: google.protobuf.Value.null_value:type_name -> google.protobuf.NullValue + 1, // 2: google.protobuf.Value.struct_value:type_name -> google.protobuf.Struct + 3, // 3: google.protobuf.Value.list_value:type_name -> google.protobuf.ListValue + 2, // 4: google.protobuf.ListValue.values:type_name -> google.protobuf.Value + 2, // 5: google.protobuf.Struct.FieldsEntry.value:type_name -> google.protobuf.Value + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_google_protobuf_struct_proto_init() } +func file_google_protobuf_struct_proto_init() { + if File_google_protobuf_struct_proto != nil { + return + } + file_google_protobuf_struct_proto_msgTypes[1].OneofWrappers = []any{ + (*Value_NullValue)(nil), + (*Value_NumberValue)(nil), + (*Value_StringValue)(nil), + (*Value_BoolValue)(nil), + (*Value_StructValue)(nil), + (*Value_ListValue)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_protobuf_struct_proto_rawDesc, + NumEnums: 1, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_protobuf_struct_proto_goTypes, + DependencyIndexes: file_google_protobuf_struct_proto_depIdxs, + EnumInfos: file_google_protobuf_struct_proto_enumTypes, + MessageInfos: file_google_protobuf_struct_proto_msgTypes, + }.Build() + File_google_protobuf_struct_proto = out.File + file_google_protobuf_struct_proto_rawDesc = nil + file_google_protobuf_struct_proto_goTypes = nil + file_google_protobuf_struct_proto_depIdxs = nil +} diff --git a/proto/google/protobuf/struct_grpc_pb.js b/proto/google/protobuf/struct_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/google/protobuf/struct_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/google/protobuf/struct_pb.d.ts b/proto/google/protobuf/struct_pb.d.ts new file mode 100644 index 000000000..6d2e05612 --- /dev/null +++ b/proto/google/protobuf/struct_pb.d.ts @@ -0,0 +1,121 @@ +// package: google.protobuf +// file: google/protobuf/struct.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Struct extends jspb.Message { + + getFieldsMap(): jspb.Map; + clearFieldsMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Struct.AsObject; + static toObject(includeInstance: boolean, msg: Struct): Struct.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Struct, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Struct; + static deserializeBinaryFromReader(message: Struct, reader: jspb.BinaryReader): Struct; +} + +export namespace Struct { + export type AsObject = { + + fieldsMap: Array<[string, Value.AsObject]>, + } +} + +export class Value extends jspb.Message { + + hasNullValue(): boolean; + clearNullValue(): void; + getNullValue(): NullValue; + setNullValue(value: NullValue): Value; + + hasNumberValue(): boolean; + clearNumberValue(): void; + getNumberValue(): number; + setNumberValue(value: number): Value; + + hasStringValue(): boolean; + clearStringValue(): void; + getStringValue(): string; + setStringValue(value: string): Value; + + hasBoolValue(): boolean; + clearBoolValue(): void; + getBoolValue(): boolean; + setBoolValue(value: boolean): Value; + + hasStructValue(): boolean; + clearStructValue(): void; + getStructValue(): Struct | undefined; + setStructValue(value?: Struct): Value; + + hasListValue(): boolean; + clearListValue(): void; + getListValue(): ListValue | undefined; + setListValue(value?: ListValue): Value; + + getKindCase(): Value.KindCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Value.AsObject; + static toObject(includeInstance: boolean, msg: Value): Value.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Value, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Value; + static deserializeBinaryFromReader(message: Value, reader: jspb.BinaryReader): Value; +} + +export namespace Value { + export type AsObject = { + nullValue: NullValue, + numberValue: number, + stringValue: string, + boolValue: boolean, + structValue?: Struct.AsObject, + listValue?: ListValue.AsObject, + } + + export enum KindCase { + KIND_NOT_SET = 0, + NULL_VALUE = 1, + NUMBER_VALUE = 2, + STRING_VALUE = 3, + BOOL_VALUE = 4, + STRUCT_VALUE = 5, + LIST_VALUE = 6, + } + +} + +export class ListValue extends jspb.Message { + clearValuesList(): void; + getValuesList(): Array; + setValuesList(value: Array): ListValue; + addValues(value?: Value, index?: number): Value; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListValue.AsObject; + static toObject(includeInstance: boolean, msg: ListValue): ListValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListValue; + static deserializeBinaryFromReader(message: ListValue, reader: jspb.BinaryReader): ListValue; +} + +export namespace ListValue { + export type AsObject = { + valuesList: Array, + } +} + +export enum NullValue { + NULL_VALUE = 0, +} diff --git a/proto/google/protobuf/struct_pb.js b/proto/google/protobuf/struct_pb.js new file mode 100644 index 000000000..70c0f4158 --- /dev/null +++ b/proto/google/protobuf/struct_pb.js @@ -0,0 +1,955 @@ +// source: google/protobuf/struct.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +goog.exportSymbol('proto.google.protobuf.ListValue', null, global); +goog.exportSymbol('proto.google.protobuf.NullValue', null, global); +goog.exportSymbol('proto.google.protobuf.Struct', null, global); +goog.exportSymbol('proto.google.protobuf.Value', null, global); +goog.exportSymbol('proto.google.protobuf.Value.KindCase', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.Struct = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.Struct, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.Struct.displayName = 'proto.google.protobuf.Struct'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.Value = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.protobuf.Value.oneofGroups_); +}; +goog.inherits(proto.google.protobuf.Value, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.Value.displayName = 'proto.google.protobuf.Value'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.ListValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.ListValue.repeatedFields_, null); +}; +goog.inherits(proto.google.protobuf.ListValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.ListValue.displayName = 'proto.google.protobuf.ListValue'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.Struct.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.Struct.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.Struct} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Struct.toObject = function(includeInstance, msg) { + var f, obj = { +fieldsMap: (f = msg.getFieldsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.Struct} + */ +proto.google.protobuf.Struct.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.Struct; + return proto.google.protobuf.Struct.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.Struct} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.Struct} + */ +proto.google.protobuf.Struct.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getFieldsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.Struct.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.Struct.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.Struct} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Struct.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFieldsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } +}; + + +/** + * map fields = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.google.protobuf.Struct.prototype.getFieldsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.google.protobuf.Struct} returns this + */ +proto.google.protobuf.Struct.prototype.clearFieldsMap = function() { + this.getFieldsMap().clear(); + return this; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.google.protobuf.Value.oneofGroups_ = [[1,2,3,4,5,6]]; + +/** + * @enum {number} + */ +proto.google.protobuf.Value.KindCase = { + KIND_NOT_SET: 0, + NULL_VALUE: 1, + NUMBER_VALUE: 2, + STRING_VALUE: 3, + BOOL_VALUE: 4, + STRUCT_VALUE: 5, + LIST_VALUE: 6 +}; + +/** + * @return {proto.google.protobuf.Value.KindCase} + */ +proto.google.protobuf.Value.prototype.getKindCase = function() { + return /** @type {proto.google.protobuf.Value.KindCase} */(jspb.Message.computeOneofCase(this, proto.google.protobuf.Value.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.Value.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.Value.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.Value} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Value.toObject = function(includeInstance, msg) { + var f, obj = { +nullValue: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f, +numberValue: (f = jspb.Message.getOptionalFloatingPointField(msg, 2)) == null ? undefined : f, +stringValue: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f, +boolValue: (f = jspb.Message.getBooleanField(msg, 4)) == null ? undefined : f, +structValue: (f = msg.getStructValue()) && proto.google.protobuf.Struct.toObject(includeInstance, f), +listValue: (f = msg.getListValue()) && proto.google.protobuf.ListValue.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.Value} + */ +proto.google.protobuf.Value.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.Value; + return proto.google.protobuf.Value.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.Value} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.Value} + */ +proto.google.protobuf.Value.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.google.protobuf.NullValue} */ (reader.readEnum()); + msg.setNullValue(value); + break; + case 2: + var value = /** @type {number} */ (reader.readDouble()); + msg.setNumberValue(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setStringValue(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setBoolValue(value); + break; + case 5: + var value = new proto.google.protobuf.Struct; + reader.readMessage(value,proto.google.protobuf.Struct.deserializeBinaryFromReader); + msg.setStructValue(value); + break; + case 6: + var value = new proto.google.protobuf.ListValue; + reader.readMessage(value,proto.google.protobuf.ListValue.deserializeBinaryFromReader); + msg.setListValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.Value.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.Value.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.Value} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Value.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeDouble( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeBool( + 4, + f + ); + } + f = message.getStructValue(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.google.protobuf.Struct.serializeBinaryToWriter + ); + } + f = message.getListValue(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.google.protobuf.ListValue.serializeBinaryToWriter + ); + } +}; + + +/** + * optional NullValue null_value = 1; + * @return {!proto.google.protobuf.NullValue} + */ +proto.google.protobuf.Value.prototype.getNullValue = function() { + return /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.google.protobuf.NullValue} value + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.setNullValue = function(value) { + return jspb.Message.setOneofField(this, 1, proto.google.protobuf.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.clearNullValue = function() { + return jspb.Message.setOneofField(this, 1, proto.google.protobuf.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.Value.prototype.hasNullValue = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional double number_value = 2; + * @return {number} + */ +proto.google.protobuf.Value.prototype.getNumberValue = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.setNumberValue = function(value) { + return jspb.Message.setOneofField(this, 2, proto.google.protobuf.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.clearNumberValue = function() { + return jspb.Message.setOneofField(this, 2, proto.google.protobuf.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.Value.prototype.hasNumberValue = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string string_value = 3; + * @return {string} + */ +proto.google.protobuf.Value.prototype.getStringValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.setStringValue = function(value) { + return jspb.Message.setOneofField(this, 3, proto.google.protobuf.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.clearStringValue = function() { + return jspb.Message.setOneofField(this, 3, proto.google.protobuf.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.Value.prototype.hasStringValue = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool bool_value = 4; + * @return {boolean} + */ +proto.google.protobuf.Value.prototype.getBoolValue = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.setBoolValue = function(value) { + return jspb.Message.setOneofField(this, 4, proto.google.protobuf.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.clearBoolValue = function() { + return jspb.Message.setOneofField(this, 4, proto.google.protobuf.Value.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.Value.prototype.hasBoolValue = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional Struct struct_value = 5; + * @return {?proto.google.protobuf.Struct} + */ +proto.google.protobuf.Value.prototype.getStructValue = function() { + return /** @type{?proto.google.protobuf.Struct} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.Struct, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Struct|undefined} value + * @return {!proto.google.protobuf.Value} returns this +*/ +proto.google.protobuf.Value.prototype.setStructValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.google.protobuf.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.clearStructValue = function() { + return this.setStructValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.Value.prototype.hasStructValue = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional ListValue list_value = 6; + * @return {?proto.google.protobuf.ListValue} + */ +proto.google.protobuf.Value.prototype.getListValue = function() { + return /** @type{?proto.google.protobuf.ListValue} */ ( + jspb.Message.getWrapperField(this, proto.google.protobuf.ListValue, 6)); +}; + + +/** + * @param {?proto.google.protobuf.ListValue|undefined} value + * @return {!proto.google.protobuf.Value} returns this +*/ +proto.google.protobuf.Value.prototype.setListValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.google.protobuf.Value.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.protobuf.Value} returns this + */ +proto.google.protobuf.Value.prototype.clearListValue = function() { + return this.setListValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.protobuf.Value.prototype.hasListValue = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.protobuf.ListValue.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.ListValue.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.ListValue.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.ListValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ListValue.toObject = function(includeInstance, msg) { + var f, obj = { +valuesList: jspb.Message.toObjectList(msg.getValuesList(), + proto.google.protobuf.Value.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.ListValue} + */ +proto.google.protobuf.ListValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.ListValue; + return proto.google.protobuf.ListValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.ListValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.ListValue} + */ +proto.google.protobuf.ListValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.protobuf.Value; + reader.readMessage(value,proto.google.protobuf.Value.deserializeBinaryFromReader); + msg.addValues(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.ListValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.ListValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.ListValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.ListValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValuesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.protobuf.Value.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Value values = 1; + * @return {!Array} + */ +proto.google.protobuf.ListValue.prototype.getValuesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.protobuf.Value, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.protobuf.ListValue} returns this +*/ +proto.google.protobuf.ListValue.prototype.setValuesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.protobuf.Value=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Value} + */ +proto.google.protobuf.ListValue.prototype.addValues = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.Value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.protobuf.ListValue} returns this + */ +proto.google.protobuf.ListValue.prototype.clearValuesList = function() { + return this.setValuesList([]); +}; + + +/** + * @enum {number} + */ +proto.google.protobuf.NullValue = { + NULL_VALUE: 0 +}; + +goog.object.extend(exports, proto.google.protobuf); +/* This code will be inserted into generated code for + * google/protobuf/struct.proto. */ + +/** + * Typedef representing plain JavaScript values that can go into a + * Struct. + * @typedef {null|number|string|boolean|Array|Object} + */ +proto.google.protobuf.JavaScriptValue; + + +/** + * Converts this Value object to a plain JavaScript value. + * @return {?proto.google.protobuf.JavaScriptValue} a plain JavaScript + * value representing this Struct. + */ +proto.google.protobuf.Value.prototype.toJavaScript = function() { + var kindCase = proto.google.protobuf.Value.KindCase; + switch (this.getKindCase()) { + case kindCase.NULL_VALUE: + return null; + case kindCase.NUMBER_VALUE: + return this.getNumberValue(); + case kindCase.STRING_VALUE: + return this.getStringValue(); + case kindCase.BOOL_VALUE: + return this.getBoolValue(); + case kindCase.STRUCT_VALUE: + return this.getStructValue().toJavaScript(); + case kindCase.LIST_VALUE: + return this.getListValue().toJavaScript(); + default: + throw new Error('Unexpected struct type'); + } +}; + + +/** + * Converts this JavaScript value to a new Value proto. + * @param {!proto.google.protobuf.JavaScriptValue} value The value to + * convert. + * @return {!proto.google.protobuf.Value} The newly constructed value. + */ +proto.google.protobuf.Value.fromJavaScript = function(value) { + var ret = new proto.google.protobuf.Value(); + switch (goog.typeOf(value)) { + case 'string': + ret.setStringValue(/** @type {string} */ (value)); + break; + case 'number': + ret.setNumberValue(/** @type {number} */ (value)); + break; + case 'boolean': + ret.setBoolValue(/** @type {boolean} */ (value)); + break; + case 'null': + ret.setNullValue(proto.google.protobuf.NullValue.NULL_VALUE); + break; + case 'array': + ret.setListValue(proto.google.protobuf.ListValue.fromJavaScript( + /** @type{!Array} */ (value))); + break; + case 'object': + ret.setStructValue(proto.google.protobuf.Struct.fromJavaScript( + /** @type{!Object} */ (value))); + break; + default: + throw new Error('Unexpected struct type.'); + } + + return ret; +}; + + +/** + * Converts this ListValue object to a plain JavaScript array. + * @return {!Array} a plain JavaScript array representing this List. + */ +proto.google.protobuf.ListValue.prototype.toJavaScript = function() { + var ret = []; + var values = this.getValuesList(); + + for (var i = 0; i < values.length; i++) { + ret[i] = values[i].toJavaScript(); + } + + return ret; +}; + + +/** + * Constructs a ListValue protobuf from this plain JavaScript array. + * @param {!Array} array a plain JavaScript array + * @return {proto.google.protobuf.ListValue} a new ListValue object + */ +proto.google.protobuf.ListValue.fromJavaScript = function(array) { + var ret = new proto.google.protobuf.ListValue(); + + for (var i = 0; i < array.length; i++) { + ret.addValues(proto.google.protobuf.Value.fromJavaScript(array[i])); + } + + return ret; +}; + + +/** + * Converts this Struct object to a plain JavaScript object. + * @return {!Object} a plain + * JavaScript object representing this Struct. + */ +proto.google.protobuf.Struct.prototype.toJavaScript = function() { + var ret = {}; + + this.getFieldsMap().forEach(function(value, key) { + ret[key] = value.toJavaScript(); + }); + + return ret; +}; + + +/** + * Constructs a Struct protobuf from this plain JavaScript object. + * @param {!Object} obj a plain JavaScript object + * @return {proto.google.protobuf.Struct} a new Struct object + */ +proto.google.protobuf.Struct.fromJavaScript = function(obj) { + var ret = new proto.google.protobuf.Struct(); + var map = ret.getFieldsMap(); + + for (var property in obj) { + var val = obj[property]; + map.set(property, proto.google.protobuf.Value.fromJavaScript(val)); + } + + return ret; +}; diff --git a/proto/google/protobuf/timestamp.pb.go b/proto/google/protobuf/timestamp.pb.go new file mode 100644 index 000000000..23fe783e2 --- /dev/null +++ b/proto/google/protobuf/timestamp.pb.go @@ -0,0 +1,376 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.1 +// protoc (unknown) +// source: google/protobuf/timestamp.proto + +// Package timestamppb contains generated types for google/protobuf/timestamp.proto. +// +// The Timestamp message represents a timestamp, +// an instant in time since the Unix epoch (January 1st, 1970). +// +// # Conversion to a Go Time +// +// The AsTime method can be used to convert a Timestamp message to a +// standard Go time.Time value in UTC: +// +// t := ts.AsTime() +// ... // make use of t as a time.Time +// +// Converting to a time.Time is a common operation so that the extensive +// set of time-based operations provided by the time package can be leveraged. +// See https://golang.org/pkg/time for more information. +// +// The AsTime method performs the conversion on a best-effort basis. Timestamps +// with denormal values (e.g., nanoseconds beyond 0 and 99999999, inclusive) +// are normalized during the conversion to a time.Time. To manually check for +// invalid Timestamps per the documented limitations in timestamp.proto, +// additionally call the CheckValid method: +// +// if err := ts.CheckValid(); err != nil { +// ... // handle error +// } +// +// # Conversion from a Go Time +// +// The timestamppb.New function can be used to construct a Timestamp message +// from a standard Go time.Time value: +// +// ts := timestamppb.New(t) +// ... // make use of ts as a *timestamppb.Timestamp +// +// In order to construct a Timestamp representing the current time, use Now: +// +// ts := timestamppb.Now() +// ... // make use of ts as a *timestamppb.Timestamp +package timestamppb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + time "time" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A Timestamp represents a point in time independent of any time zone or local +// calendar, encoded as a count of seconds and fractions of seconds at +// nanosecond resolution. The count is relative to an epoch at UTC midnight on +// January 1, 1970, in the proleptic Gregorian calendar which extends the +// Gregorian calendar backwards to year one. +// +// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap +// second table is needed for interpretation, using a [24-hour linear +// smear](https://developers.google.com/time/smear). +// +// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By +// restricting to that range, we ensure that we can convert to and from [RFC +// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. +// +// # Examples +// +// Example 1: Compute Timestamp from POSIX `time()`. +// +// Timestamp timestamp; +// timestamp.set_seconds(time(NULL)); +// timestamp.set_nanos(0); +// +// Example 2: Compute Timestamp from POSIX `gettimeofday()`. +// +// struct timeval tv; +// gettimeofday(&tv, NULL); +// +// Timestamp timestamp; +// timestamp.set_seconds(tv.tv_sec); +// timestamp.set_nanos(tv.tv_usec * 1000); +// +// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. +// +// FILETIME ft; +// GetSystemTimeAsFileTime(&ft); +// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; +// +// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z +// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. +// Timestamp timestamp; +// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); +// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); +// +// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. +// +// long millis = System.currentTimeMillis(); +// +// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) +// .setNanos((int) ((millis % 1000) * 1000000)).build(); +// +// Example 5: Compute Timestamp from Java `Instant.now()`. +// +// Instant now = Instant.now(); +// +// Timestamp timestamp = +// Timestamp.newBuilder().setSeconds(now.getEpochSecond()) +// .setNanos(now.getNano()).build(); +// +// Example 6: Compute Timestamp from current time in Python. +// +// timestamp = Timestamp() +// timestamp.GetCurrentTime() +// +// # JSON Mapping +// +// In JSON format, the Timestamp type is encoded as a string in the +// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the +// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" +// where {year} is always expressed using four digits while {month}, {day}, +// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional +// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), +// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone +// is required. A proto3 JSON serializer should always use UTC (as indicated by +// "Z") when printing the Timestamp type and a proto3 JSON parser should be +// able to accept both UTC and other timezones (as indicated by an offset). +// +// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past +// 01:30 UTC on January 15, 2017. +// +// In JavaScript, one can convert a Date object to this format using the +// standard +// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) +// method. In Python, a standard `datetime.datetime` object can be converted +// to this format using +// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with +// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use +// the Joda Time's [`ISODateTimeFormat.dateTime()`]( +// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() +// ) to obtain a formatter capable of generating timestamps in this format. +type Timestamp struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// Now constructs a new Timestamp from the current time. +func Now() *Timestamp { + return New(time.Now()) +} + +// New constructs a new Timestamp from the provided time.Time. +func New(t time.Time) *Timestamp { + return &Timestamp{Seconds: int64(t.Unix()), Nanos: int32(t.Nanosecond())} +} + +// AsTime converts x to a time.Time. +func (x *Timestamp) AsTime() time.Time { + return time.Unix(int64(x.GetSeconds()), int64(x.GetNanos())).UTC() +} + +// IsValid reports whether the timestamp is valid. +// It is equivalent to CheckValid == nil. +func (x *Timestamp) IsValid() bool { + return x.check() == 0 +} + +// CheckValid returns an error if the timestamp is invalid. +// In particular, it checks whether the value represents a date that is +// in the range of 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. +// An error is reported for a nil Timestamp. +func (x *Timestamp) CheckValid() error { + switch x.check() { + case invalidNil: + return protoimpl.X.NewError("invalid nil Timestamp") + case invalidUnderflow: + return protoimpl.X.NewError("timestamp (%v) before 0001-01-01", x) + case invalidOverflow: + return protoimpl.X.NewError("timestamp (%v) after 9999-12-31", x) + case invalidNanos: + return protoimpl.X.NewError("timestamp (%v) has out-of-range nanos", x) + default: + return nil + } +} + +const ( + _ = iota + invalidNil + invalidUnderflow + invalidOverflow + invalidNanos +) + +func (x *Timestamp) check() uint { + const minTimestamp = -62135596800 // Seconds between 1970-01-01T00:00:00Z and 0001-01-01T00:00:00Z, inclusive + const maxTimestamp = +253402300799 // Seconds between 1970-01-01T00:00:00Z and 9999-12-31T23:59:59Z, inclusive + secs := x.GetSeconds() + nanos := x.GetNanos() + switch { + case x == nil: + return invalidNil + case secs < minTimestamp: + return invalidUnderflow + case secs > maxTimestamp: + return invalidOverflow + case nanos < 0 || nanos >= 1e9: + return invalidNanos + default: + return 0 + } +} + +func (x *Timestamp) Reset() { + *x = Timestamp{} + mi := &file_google_protobuf_timestamp_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Timestamp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Timestamp) ProtoMessage() {} + +func (x *Timestamp) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_timestamp_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Timestamp.ProtoReflect.Descriptor instead. +func (*Timestamp) Descriptor() ([]byte, []int) { + return file_google_protobuf_timestamp_proto_rawDescGZIP(), []int{0} +} + +func (x *Timestamp) GetSeconds() int64 { + if x != nil { + return x.Seconds + } + return 0 +} + +func (x *Timestamp) GetNanos() int32 { + if x != nil { + return x.Nanos + } + return 0 +} + +var File_google_protobuf_timestamp_proto protoreflect.FileDescriptor + +var file_google_protobuf_timestamp_proto_rawDesc = []byte{ + 0x0a, 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, 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x22, 0x3b, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6e, + 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x42, + 0x85, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x0e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, + 0x6e, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x70, 0x62, 0xf8, 0x01, 0x01, + 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, + 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_protobuf_timestamp_proto_rawDescOnce sync.Once + file_google_protobuf_timestamp_proto_rawDescData = file_google_protobuf_timestamp_proto_rawDesc +) + +func file_google_protobuf_timestamp_proto_rawDescGZIP() []byte { + file_google_protobuf_timestamp_proto_rawDescOnce.Do(func() { + file_google_protobuf_timestamp_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_timestamp_proto_rawDescData) + }) + return file_google_protobuf_timestamp_proto_rawDescData +} + +var file_google_protobuf_timestamp_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_protobuf_timestamp_proto_goTypes = []any{ + (*Timestamp)(nil), // 0: google.protobuf.Timestamp +} +var file_google_protobuf_timestamp_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_protobuf_timestamp_proto_init() } +func file_google_protobuf_timestamp_proto_init() { + if File_google_protobuf_timestamp_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_protobuf_timestamp_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_protobuf_timestamp_proto_goTypes, + DependencyIndexes: file_google_protobuf_timestamp_proto_depIdxs, + MessageInfos: file_google_protobuf_timestamp_proto_msgTypes, + }.Build() + File_google_protobuf_timestamp_proto = out.File + file_google_protobuf_timestamp_proto_rawDesc = nil + file_google_protobuf_timestamp_proto_goTypes = nil + file_google_protobuf_timestamp_proto_depIdxs = nil +} diff --git a/proto/google/protobuf/timestamp_grpc_pb.js b/proto/google/protobuf/timestamp_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/google/protobuf/timestamp_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/google/protobuf/timestamp_pb.d.ts b/proto/google/protobuf/timestamp_pb.d.ts new file mode 100644 index 000000000..bfc4b376c --- /dev/null +++ b/proto/google/protobuf/timestamp_pb.d.ts @@ -0,0 +1,30 @@ +// package: google.protobuf +// file: google/protobuf/timestamp.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; + +export class Timestamp extends jspb.Message { + getSeconds(): number; + setSeconds(value: number): Timestamp; + getNanos(): number; + setNanos(value: number): Timestamp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Timestamp.AsObject; + static toObject(includeInstance: boolean, msg: Timestamp): Timestamp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Timestamp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Timestamp; + static deserializeBinaryFromReader(message: Timestamp, reader: jspb.BinaryReader): Timestamp; +} + +export namespace Timestamp { + export type AsObject = { + seconds: number, + nanos: number, + } +} diff --git a/proto/google/protobuf/timestamp_pb.js b/proto/google/protobuf/timestamp_pb.js new file mode 100644 index 000000000..aa8824dfd --- /dev/null +++ b/proto/google/protobuf/timestamp_pb.js @@ -0,0 +1,242 @@ +// source: google/protobuf/timestamp.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +goog.exportSymbol('proto.google.protobuf.Timestamp', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.protobuf.Timestamp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.Timestamp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.Timestamp.displayName = 'proto.google.protobuf.Timestamp'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.Timestamp.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.Timestamp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.Timestamp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Timestamp.toObject = function(includeInstance, msg) { + var f, obj = { +seconds: jspb.Message.getFieldWithDefault(msg, 1, 0), +nanos: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.google.protobuf.Timestamp} + */ +proto.google.protobuf.Timestamp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.Timestamp; + return proto.google.protobuf.Timestamp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.Timestamp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.Timestamp} + */ +proto.google.protobuf.Timestamp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSeconds(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNanos(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.protobuf.Timestamp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.Timestamp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.Timestamp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Timestamp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSeconds(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getNanos(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional int64 seconds = 1; + * @return {number} + */ +proto.google.protobuf.Timestamp.prototype.getSeconds = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.Timestamp} returns this + */ +proto.google.protobuf.Timestamp.prototype.setSeconds = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 nanos = 2; + * @return {number} + */ +proto.google.protobuf.Timestamp.prototype.getNanos = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.google.protobuf.Timestamp} returns this + */ +proto.google.protobuf.Timestamp.prototype.setNanos = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.protobuf); +/* This code will be inserted into generated code for + * google/protobuf/timestamp.proto. */ + +/** + * Returns a JavaScript 'Date' object corresponding to this Timestamp. + * @return {!Date} + */ +proto.google.protobuf.Timestamp.prototype.toDate = function() { + var seconds = this.getSeconds(); + var nanos = this.getNanos(); + + return new Date((seconds * 1000) + (nanos / 1000000)); +}; + + +/** + * Sets the value of this Timestamp object to be the given Date. + * @param {!Date} value The value to set. + */ +proto.google.protobuf.Timestamp.prototype.fromDate = function(value) { + this.setSeconds(Math.floor(value.getTime() / 1000)); + this.setNanos(value.getMilliseconds() * 1000000); +}; + + +/** + * Factory method that returns a Timestamp object with value equal to + * the given Date. + * @param {!Date} value The value to set. + * @return {!proto.google.protobuf.Timestamp} + */ +proto.google.protobuf.Timestamp.fromDate = function(value) { + var timestamp = new proto.google.protobuf.Timestamp(); + timestamp.fromDate(value); + return timestamp; +}; diff --git a/proto/protoc-gen-openapiv2/options/annotations.pb.go b/proto/protoc-gen-openapiv2/options/annotations.pb.go new file mode 100644 index 000000000..615c2dafa --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/annotations.pb.go @@ -0,0 +1,267 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.1 +// protoc (unknown) +// source: protoc-gen-openapiv2/options/annotations.proto + +package options + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var file_protoc_gen_openapiv2_options_annotations_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.FileOptions)(nil), + ExtensionType: (*Swagger)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger", + Tag: "bytes,1042,opt,name=openapiv2_swagger", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.MethodOptions)(nil), + ExtensionType: (*Operation)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation", + Tag: "bytes,1042,opt,name=openapiv2_operation", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*Schema)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema", + Tag: "bytes,1042,opt,name=openapiv2_schema", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.EnumOptions)(nil), + ExtensionType: (*EnumSchema)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum", + Tag: "bytes,1042,opt,name=openapiv2_enum", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtensionType: (*Tag)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag", + Tag: "bytes,1042,opt,name=openapiv2_tag", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*JSONSchema)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field", + Tag: "bytes,1042,opt,name=openapiv2_field", + Filename: "protoc-gen-openapiv2/options/annotations.proto", + }, +} + +// Extension fields to descriptorpb.FileOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Swagger openapiv2_swagger = 1042; + E_Openapiv2Swagger = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[0] +) + +// Extension fields to descriptorpb.MethodOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Operation openapiv2_operation = 1042; + E_Openapiv2Operation = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[1] +) + +// Extension fields to descriptorpb.MessageOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Schema openapiv2_schema = 1042; + E_Openapiv2Schema = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[2] +) + +// Extension fields to descriptorpb.EnumOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.EnumSchema openapiv2_enum = 1042; + E_Openapiv2Enum = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[3] +) + +// Extension fields to descriptorpb.ServiceOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.Tag openapiv2_tag = 1042; + E_Openapiv2Tag = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[4] +) + +// Extension fields to descriptorpb.FieldOptions. +var ( + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + // + // optional grpc.gateway.protoc_gen_openapiv2.options.JSONSchema openapiv2_field = 1042; + E_Openapiv2Field = &file_protoc_gen_openapiv2_options_annotations_proto_extTypes[5] +) + +var File_protoc_gen_openapiv2_options_annotations_proto protoreflect.FileDescriptor + +var file_protoc_gen_openapiv2_options_annotations_proto_rawDesc = []byte{ + 0x0a, 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, + 0x12, 0x29, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 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, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x7e, 0x0a, 0x11, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, + 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x52, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x3a, 0x86, 0x01, 0x0a, 0x13, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x12, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x7e, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x3a, 0x7b, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x45, 0x6e, 0x75, + 0x6d, 0x3a, 0x75, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x74, + 0x61, 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x54, 0x61, 0x67, 0x3a, 0x7e, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, + 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2f, 0x76, 0x32, 0x2f, 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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_protoc_gen_openapiv2_options_annotations_proto_goTypes = []any{ + (*descriptorpb.FileOptions)(nil), // 0: google.protobuf.FileOptions + (*descriptorpb.MethodOptions)(nil), // 1: google.protobuf.MethodOptions + (*descriptorpb.MessageOptions)(nil), // 2: google.protobuf.MessageOptions + (*descriptorpb.EnumOptions)(nil), // 3: google.protobuf.EnumOptions + (*descriptorpb.ServiceOptions)(nil), // 4: google.protobuf.ServiceOptions + (*descriptorpb.FieldOptions)(nil), // 5: google.protobuf.FieldOptions + (*Swagger)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Swagger + (*Operation)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Operation + (*Schema)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Schema + (*EnumSchema)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema + (*Tag)(nil), // 10: grpc.gateway.protoc_gen_openapiv2.options.Tag + (*JSONSchema)(nil), // 11: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema +} +var file_protoc_gen_openapiv2_options_annotations_proto_depIdxs = []int32{ + 0, // 0: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger:extendee -> google.protobuf.FileOptions + 1, // 1: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation:extendee -> google.protobuf.MethodOptions + 2, // 2: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema:extendee -> google.protobuf.MessageOptions + 3, // 3: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum:extendee -> google.protobuf.EnumOptions + 4, // 4: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag:extendee -> google.protobuf.ServiceOptions + 5, // 5: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field:extendee -> google.protobuf.FieldOptions + 6, // 6: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger + 7, // 7: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation + 8, // 8: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Schema + 9, // 9: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum:type_name -> grpc.gateway.protoc_gen_openapiv2.options.EnumSchema + 10, // 10: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Tag + 11, // 11: grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 6, // [6:12] is the sub-list for extension type_name + 0, // [0:6] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_protoc_gen_openapiv2_options_annotations_proto_init() } +func file_protoc_gen_openapiv2_options_annotations_proto_init() { + if File_protoc_gen_openapiv2_options_annotations_proto != nil { + return + } + file_protoc_gen_openapiv2_options_openapiv2_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_protoc_gen_openapiv2_options_annotations_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 6, + NumServices: 0, + }, + GoTypes: file_protoc_gen_openapiv2_options_annotations_proto_goTypes, + DependencyIndexes: file_protoc_gen_openapiv2_options_annotations_proto_depIdxs, + ExtensionInfos: file_protoc_gen_openapiv2_options_annotations_proto_extTypes, + }.Build() + File_protoc_gen_openapiv2_options_annotations_proto = out.File + file_protoc_gen_openapiv2_options_annotations_proto_rawDesc = nil + file_protoc_gen_openapiv2_options_annotations_proto_goTypes = nil + file_protoc_gen_openapiv2_options_annotations_proto_depIdxs = nil +} diff --git a/proto/protoc-gen-openapiv2/options/annotations_grpc_pb.js b/proto/protoc-gen-openapiv2/options/annotations_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/annotations_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/protoc-gen-openapiv2/options/annotations_pb.d.ts b/proto/protoc-gen-openapiv2/options/annotations_pb.d.ts new file mode 100644 index 000000000..06c127df4 --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/annotations_pb.d.ts @@ -0,0 +1,21 @@ +// package: grpc.gateway.protoc_gen_openapiv2.options +// file: protoc-gen-openapiv2/options/annotations.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb"; +import * as protoc_gen_openapiv2_options_openapiv2_pb from "../../protoc-gen-openapiv2/options/openapiv2_pb"; + +export const openapiv2Swagger: jspb.ExtensionFieldInfo; + +export const openapiv2Operation: jspb.ExtensionFieldInfo; + +export const openapiv2Schema: jspb.ExtensionFieldInfo; + +export const openapiv2Enum: jspb.ExtensionFieldInfo; + +export const openapiv2Tag: jspb.ExtensionFieldInfo; + +export const openapiv2Field: jspb.ExtensionFieldInfo; diff --git a/proto/protoc-gen-openapiv2/options/annotations_pb.js b/proto/protoc-gen-openapiv2/options/annotations_pb.js new file mode 100644 index 000000000..3d894bac1 --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/annotations_pb.js @@ -0,0 +1,184 @@ +// source: protoc-gen-openapiv2/options/annotations.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +var protoc$gen$openapiv2_options_openapiv2_pb = require('../../protoc-gen-openapiv2/options/openapiv2_pb.js'); +goog.object.extend(proto, protoc$gen$openapiv2_options_openapiv2_pb); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Enum', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Field', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Operation', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Schema', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Swagger', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Tag', null, global); + +/** + * A tuple of {field number, class constructor} for the extension + * field named `openapiv2Swagger`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Swagger = new jspb.ExtensionFieldInfo( + 1042, + {openapiv2Swagger: 0}, + protoc$gen$openapiv2_options_openapiv2_pb.Swagger, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + protoc$gen$openapiv2_options_openapiv2_pb.Swagger.toObject), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[1042] = new jspb.ExtensionFieldBinaryInfo( + proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Swagger, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + protoc$gen$openapiv2_options_openapiv2_pb.Swagger.serializeBinaryToWriter, + protoc$gen$openapiv2_options_openapiv2_pb.Swagger.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[1042] = proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Swagger; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `openapiv2Operation`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Operation = new jspb.ExtensionFieldInfo( + 1042, + {openapiv2Operation: 0}, + protoc$gen$openapiv2_options_openapiv2_pb.Operation, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + protoc$gen$openapiv2_options_openapiv2_pb.Operation.toObject), + 0); + +google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[1042] = new jspb.ExtensionFieldBinaryInfo( + proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Operation, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + protoc$gen$openapiv2_options_openapiv2_pb.Operation.serializeBinaryToWriter, + protoc$gen$openapiv2_options_openapiv2_pb.Operation.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MethodOptions.extensions[1042] = proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Operation; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `openapiv2Schema`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Schema = new jspb.ExtensionFieldInfo( + 1042, + {openapiv2Schema: 0}, + protoc$gen$openapiv2_options_openapiv2_pb.Schema, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + protoc$gen$openapiv2_options_openapiv2_pb.Schema.toObject), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[1042] = new jspb.ExtensionFieldBinaryInfo( + proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Schema, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + protoc$gen$openapiv2_options_openapiv2_pb.Schema.serializeBinaryToWriter, + protoc$gen$openapiv2_options_openapiv2_pb.Schema.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[1042] = proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Schema; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `openapiv2Enum`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Enum = new jspb.ExtensionFieldInfo( + 1042, + {openapiv2Enum: 0}, + protoc$gen$openapiv2_options_openapiv2_pb.EnumSchema, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + protoc$gen$openapiv2_options_openapiv2_pb.EnumSchema.toObject), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[1042] = new jspb.ExtensionFieldBinaryInfo( + proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Enum, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + protoc$gen$openapiv2_options_openapiv2_pb.EnumSchema.serializeBinaryToWriter, + protoc$gen$openapiv2_options_openapiv2_pb.EnumSchema.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumOptions.extensions[1042] = proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Enum; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `openapiv2Tag`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Tag = new jspb.ExtensionFieldInfo( + 1042, + {openapiv2Tag: 0}, + protoc$gen$openapiv2_options_openapiv2_pb.Tag, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + protoc$gen$openapiv2_options_openapiv2_pb.Tag.toObject), + 0); + +google_protobuf_descriptor_pb.ServiceOptions.extensionsBinary[1042] = new jspb.ExtensionFieldBinaryInfo( + proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Tag, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + protoc$gen$openapiv2_options_openapiv2_pb.Tag.serializeBinaryToWriter, + protoc$gen$openapiv2_options_openapiv2_pb.Tag.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.ServiceOptions.extensions[1042] = proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Tag; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `openapiv2Field`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Field = new jspb.ExtensionFieldInfo( + 1042, + {openapiv2Field: 0}, + protoc$gen$openapiv2_options_openapiv2_pb.JSONSchema, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + protoc$gen$openapiv2_options_openapiv2_pb.JSONSchema.toObject), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[1042] = new jspb.ExtensionFieldBinaryInfo( + proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Field, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + protoc$gen$openapiv2_options_openapiv2_pb.JSONSchema.serializeBinaryToWriter, + protoc$gen$openapiv2_options_openapiv2_pb.JSONSchema.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[1042] = proto.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Field; + +goog.object.extend(exports, proto.grpc.gateway.protoc_gen_openapiv2.options); diff --git a/proto/protoc-gen-openapiv2/options/openapiv2.pb.go b/proto/protoc-gen-openapiv2/options/openapiv2.pb.go new file mode 100644 index 000000000..b19f62849 --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/openapiv2.pb.go @@ -0,0 +1,3110 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.1 +// protoc (unknown) +// source: protoc-gen-openapiv2/options/openapiv2.proto + +package options + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Scheme describes the schemes supported by the OpenAPI Swagger +// and Operation objects. +type Scheme int32 + +const ( + Scheme_UNKNOWN Scheme = 0 + Scheme_HTTP Scheme = 1 + Scheme_HTTPS Scheme = 2 + Scheme_WS Scheme = 3 + Scheme_WSS Scheme = 4 +) + +// Enum value maps for Scheme. +var ( + Scheme_name = map[int32]string{ + 0: "UNKNOWN", + 1: "HTTP", + 2: "HTTPS", + 3: "WS", + 4: "WSS", + } + Scheme_value = map[string]int32{ + "UNKNOWN": 0, + "HTTP": 1, + "HTTPS": 2, + "WS": 3, + "WSS": 4, + } +) + +func (x Scheme) Enum() *Scheme { + p := new(Scheme) + *p = x + return p +} + +func (x Scheme) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Scheme) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[0].Descriptor() +} + +func (Scheme) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[0] +} + +func (x Scheme) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Scheme.Descriptor instead. +func (Scheme) EnumDescriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{0} +} + +// `Type` is a supported HTTP header type. +// See https://swagger.io/specification/v2/#parameterType. +type HeaderParameter_Type int32 + +const ( + HeaderParameter_UNKNOWN HeaderParameter_Type = 0 + HeaderParameter_STRING HeaderParameter_Type = 1 + HeaderParameter_NUMBER HeaderParameter_Type = 2 + HeaderParameter_INTEGER HeaderParameter_Type = 3 + HeaderParameter_BOOLEAN HeaderParameter_Type = 4 +) + +// Enum value maps for HeaderParameter_Type. +var ( + HeaderParameter_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "STRING", + 2: "NUMBER", + 3: "INTEGER", + 4: "BOOLEAN", + } + HeaderParameter_Type_value = map[string]int32{ + "UNKNOWN": 0, + "STRING": 1, + "NUMBER": 2, + "INTEGER": 3, + "BOOLEAN": 4, + } +) + +func (x HeaderParameter_Type) Enum() *HeaderParameter_Type { + p := new(HeaderParameter_Type) + *p = x + return p +} + +func (x HeaderParameter_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HeaderParameter_Type) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1].Descriptor() +} + +func (HeaderParameter_Type) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[1] +} + +func (x HeaderParameter_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HeaderParameter_Type.Descriptor instead. +func (HeaderParameter_Type) EnumDescriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{3, 0} +} + +type JSONSchema_JSONSchemaSimpleTypes int32 + +const ( + JSONSchema_UNKNOWN JSONSchema_JSONSchemaSimpleTypes = 0 + JSONSchema_ARRAY JSONSchema_JSONSchemaSimpleTypes = 1 + JSONSchema_BOOLEAN JSONSchema_JSONSchemaSimpleTypes = 2 + JSONSchema_INTEGER JSONSchema_JSONSchemaSimpleTypes = 3 + JSONSchema_NULL JSONSchema_JSONSchemaSimpleTypes = 4 + JSONSchema_NUMBER JSONSchema_JSONSchemaSimpleTypes = 5 + JSONSchema_OBJECT JSONSchema_JSONSchemaSimpleTypes = 6 + JSONSchema_STRING JSONSchema_JSONSchemaSimpleTypes = 7 +) + +// Enum value maps for JSONSchema_JSONSchemaSimpleTypes. +var ( + JSONSchema_JSONSchemaSimpleTypes_name = map[int32]string{ + 0: "UNKNOWN", + 1: "ARRAY", + 2: "BOOLEAN", + 3: "INTEGER", + 4: "NULL", + 5: "NUMBER", + 6: "OBJECT", + 7: "STRING", + } + JSONSchema_JSONSchemaSimpleTypes_value = map[string]int32{ + "UNKNOWN": 0, + "ARRAY": 1, + "BOOLEAN": 2, + "INTEGER": 3, + "NULL": 4, + "NUMBER": 5, + "OBJECT": 6, + "STRING": 7, + } +) + +func (x JSONSchema_JSONSchemaSimpleTypes) Enum() *JSONSchema_JSONSchemaSimpleTypes { + p := new(JSONSchema_JSONSchemaSimpleTypes) + *p = x + return p +} + +func (x JSONSchema_JSONSchemaSimpleTypes) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (JSONSchema_JSONSchemaSimpleTypes) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2].Descriptor() +} + +func (JSONSchema_JSONSchemaSimpleTypes) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[2] +} + +func (x JSONSchema_JSONSchemaSimpleTypes) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use JSONSchema_JSONSchemaSimpleTypes.Descriptor instead. +func (JSONSchema_JSONSchemaSimpleTypes) EnumDescriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12, 0} +} + +// The type of the security scheme. Valid values are "basic", +// "apiKey" or "oauth2". +type SecurityScheme_Type int32 + +const ( + SecurityScheme_TYPE_INVALID SecurityScheme_Type = 0 + SecurityScheme_TYPE_BASIC SecurityScheme_Type = 1 + SecurityScheme_TYPE_API_KEY SecurityScheme_Type = 2 + SecurityScheme_TYPE_OAUTH2 SecurityScheme_Type = 3 +) + +// Enum value maps for SecurityScheme_Type. +var ( + SecurityScheme_Type_name = map[int32]string{ + 0: "TYPE_INVALID", + 1: "TYPE_BASIC", + 2: "TYPE_API_KEY", + 3: "TYPE_OAUTH2", + } + SecurityScheme_Type_value = map[string]int32{ + "TYPE_INVALID": 0, + "TYPE_BASIC": 1, + "TYPE_API_KEY": 2, + "TYPE_OAUTH2": 3, + } +) + +func (x SecurityScheme_Type) Enum() *SecurityScheme_Type { + p := new(SecurityScheme_Type) + *p = x + return p +} + +func (x SecurityScheme_Type) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecurityScheme_Type) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3].Descriptor() +} + +func (SecurityScheme_Type) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[3] +} + +func (x SecurityScheme_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SecurityScheme_Type.Descriptor instead. +func (SecurityScheme_Type) EnumDescriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{15, 0} +} + +// The location of the API key. Valid values are "query" or "header". +type SecurityScheme_In int32 + +const ( + SecurityScheme_IN_INVALID SecurityScheme_In = 0 + SecurityScheme_IN_QUERY SecurityScheme_In = 1 + SecurityScheme_IN_HEADER SecurityScheme_In = 2 +) + +// Enum value maps for SecurityScheme_In. +var ( + SecurityScheme_In_name = map[int32]string{ + 0: "IN_INVALID", + 1: "IN_QUERY", + 2: "IN_HEADER", + } + SecurityScheme_In_value = map[string]int32{ + "IN_INVALID": 0, + "IN_QUERY": 1, + "IN_HEADER": 2, + } +) + +func (x SecurityScheme_In) Enum() *SecurityScheme_In { + p := new(SecurityScheme_In) + *p = x + return p +} + +func (x SecurityScheme_In) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecurityScheme_In) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4].Descriptor() +} + +func (SecurityScheme_In) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[4] +} + +func (x SecurityScheme_In) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SecurityScheme_In.Descriptor instead. +func (SecurityScheme_In) EnumDescriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{15, 1} +} + +// The flow used by the OAuth2 security scheme. Valid values are +// "implicit", "password", "application" or "accessCode". +type SecurityScheme_Flow int32 + +const ( + SecurityScheme_FLOW_INVALID SecurityScheme_Flow = 0 + SecurityScheme_FLOW_IMPLICIT SecurityScheme_Flow = 1 + SecurityScheme_FLOW_PASSWORD SecurityScheme_Flow = 2 + SecurityScheme_FLOW_APPLICATION SecurityScheme_Flow = 3 + SecurityScheme_FLOW_ACCESS_CODE SecurityScheme_Flow = 4 +) + +// Enum value maps for SecurityScheme_Flow. +var ( + SecurityScheme_Flow_name = map[int32]string{ + 0: "FLOW_INVALID", + 1: "FLOW_IMPLICIT", + 2: "FLOW_PASSWORD", + 3: "FLOW_APPLICATION", + 4: "FLOW_ACCESS_CODE", + } + SecurityScheme_Flow_value = map[string]int32{ + "FLOW_INVALID": 0, + "FLOW_IMPLICIT": 1, + "FLOW_PASSWORD": 2, + "FLOW_APPLICATION": 3, + "FLOW_ACCESS_CODE": 4, + } +) + +func (x SecurityScheme_Flow) Enum() *SecurityScheme_Flow { + p := new(SecurityScheme_Flow) + *p = x + return p +} + +func (x SecurityScheme_Flow) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SecurityScheme_Flow) Descriptor() protoreflect.EnumDescriptor { + return file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[5].Descriptor() +} + +func (SecurityScheme_Flow) Type() protoreflect.EnumType { + return &file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes[5] +} + +func (x SecurityScheme_Flow) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SecurityScheme_Flow.Descriptor instead. +func (SecurityScheme_Flow) EnumDescriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{15, 2} +} + +// `Swagger` is a representation of OpenAPI v2 specification's Swagger object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: ""; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; +// }; +// }; +// schemes: HTTPS; +// consumes: "application/json"; +// produces: "application/json"; +// }; +type Swagger struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Specifies the OpenAPI Specification version being used. It can be + // used by the OpenAPI UI and other clients to interpret the API listing. The + // value MUST be "2.0". + Swagger string `protobuf:"bytes,1,opt,name=swagger,proto3" json:"swagger,omitempty"` + // Provides metadata about the API. The metadata can be used by the + // clients if needed. + Info *Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` + // The host (name or ip) serving the API. This MUST be the host only and does + // not include the scheme nor sub-paths. It MAY include a port. If the host is + // not included, the host serving the documentation is to be used (including + // the port). The host does not support path templating. + Host string `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` + // The base path on which the API is served, which is relative to the host. If + // it is not included, the API is served directly under the host. The value + // MUST start with a leading slash (/). The basePath does not support path + // templating. + // Note that using `base_path` does not change the endpoint paths that are + // generated in the resulting OpenAPI file. If you wish to use `base_path` + // with relatively generated OpenAPI paths, the `base_path` prefix must be + // manually removed from your `google.api.http` paths and your code changed to + // serve the API from the `base_path`. + BasePath string `protobuf:"bytes,4,opt,name=base_path,json=basePath,proto3" json:"base_path,omitempty"` + // The transfer protocol of the API. Values MUST be from the list: "http", + // "https", "ws", "wss". If the schemes is not included, the default scheme to + // be used is the one used to access the OpenAPI definition itself. + Schemes []Scheme `protobuf:"varint,5,rep,packed,name=schemes,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.Scheme" json:"schemes,omitempty"` + // A list of MIME types the APIs can consume. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"` + // A list of MIME types the APIs can produce. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"` + // An object to hold responses that can be used across operations. This + // property does not define global responses for all operations. + Responses map[string]*Response `protobuf:"bytes,10,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Security scheme definitions that can be used across the specification. + SecurityDefinitions *SecurityDefinitions `protobuf:"bytes,11,opt,name=security_definitions,json=securityDefinitions,proto3" json:"security_definitions,omitempty"` + // A declaration of which security schemes are applied for the API as a whole. + // The list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). + // Individual operations can override this definition. + Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` + // A list of tags for API documentation control. Tags can be used for logical + // grouping of operations by resources or any other qualifier. + Tags []*Tag `protobuf:"bytes,13,rep,name=tags,proto3" json:"tags,omitempty"` + // Additional external documentation. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,14,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,15,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Swagger) Reset() { + *x = Swagger{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Swagger) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Swagger) ProtoMessage() {} + +func (x *Swagger) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Swagger.ProtoReflect.Descriptor instead. +func (*Swagger) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{0} +} + +func (x *Swagger) GetSwagger() string { + if x != nil { + return x.Swagger + } + return "" +} + +func (x *Swagger) GetInfo() *Info { + if x != nil { + return x.Info + } + return nil +} + +func (x *Swagger) GetHost() string { + if x != nil { + return x.Host + } + return "" +} + +func (x *Swagger) GetBasePath() string { + if x != nil { + return x.BasePath + } + return "" +} + +func (x *Swagger) GetSchemes() []Scheme { + if x != nil { + return x.Schemes + } + return nil +} + +func (x *Swagger) GetConsumes() []string { + if x != nil { + return x.Consumes + } + return nil +} + +func (x *Swagger) GetProduces() []string { + if x != nil { + return x.Produces + } + return nil +} + +func (x *Swagger) GetResponses() map[string]*Response { + if x != nil { + return x.Responses + } + return nil +} + +func (x *Swagger) GetSecurityDefinitions() *SecurityDefinitions { + if x != nil { + return x.SecurityDefinitions + } + return nil +} + +func (x *Swagger) GetSecurity() []*SecurityRequirement { + if x != nil { + return x.Security + } + return nil +} + +func (x *Swagger) GetTags() []*Tag { + if x != nil { + return x.Tags + } + return nil +} + +func (x *Swagger) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +func (x *Swagger) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `Operation` is a representation of OpenAPI v2 specification's Operation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject +// +// Example: +// +// service EchoService { +// rpc Echo(SimpleMessage) returns (SimpleMessage) { +// option (google.api.http) = { +// get: "/v1/example/echo/{id}" +// }; +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { +// summary: "Get a message."; +// operation_id: "getMessage"; +// tags: "echo"; +// responses: { +// key: "200" +// value: { +// description: "OK"; +// } +// } +// }; +// } +// } +type Operation struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A list of tags for API documentation control. Tags can be used for logical + // grouping of operations by resources or any other qualifier. + Tags []string `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"` + // A short summary of what the operation does. For maximum readability in the + // swagger-ui, this field SHOULD be less than 120 characters. + Summary string `protobuf:"bytes,2,opt,name=summary,proto3" json:"summary,omitempty"` + // A verbose explanation of the operation behavior. GFM syntax can be used for + // rich text representation. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Additional external documentation for this operation. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,4,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + // Unique string used to identify the operation. The id MUST be unique among + // all operations described in the API. Tools and libraries MAY use the + // operationId to uniquely identify an operation, therefore, it is recommended + // to follow common programming naming conventions. + OperationId string `protobuf:"bytes,5,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` + // A list of MIME types the operation can consume. This overrides the consumes + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + Consumes []string `protobuf:"bytes,6,rep,name=consumes,proto3" json:"consumes,omitempty"` + // A list of MIME types the operation can produce. This overrides the produces + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + Produces []string `protobuf:"bytes,7,rep,name=produces,proto3" json:"produces,omitempty"` + // The list of possible responses as they are returned from executing this + // operation. + Responses map[string]*Response `protobuf:"bytes,9,rep,name=responses,proto3" json:"responses,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // The transfer protocol for the operation. Values MUST be from the list: + // "http", "https", "ws", "wss". The value overrides the OpenAPI Object + // schemes definition. + Schemes []Scheme `protobuf:"varint,10,rep,packed,name=schemes,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.Scheme" json:"schemes,omitempty"` + // Declares this operation to be deprecated. Usage of the declared operation + // should be refrained. Default value is false. + Deprecated bool `protobuf:"varint,11,opt,name=deprecated,proto3" json:"deprecated,omitempty"` + // A declaration of which security schemes are applied for this operation. The + // list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). This + // definition overrides any declared top-level security. To remove a top-level + // security declaration, an empty array can be used. + Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security,proto3" json:"security,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,13,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Custom parameters such as HTTP request headers. + // See: https://swagger.io/docs/specification/2-0/describing-parameters/ + // and https://swagger.io/specification/v2/#parameter-object. + Parameters *Parameters `protobuf:"bytes,14,opt,name=parameters,proto3" json:"parameters,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Operation) Reset() { + *x = Operation{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Operation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Operation) ProtoMessage() {} + +func (x *Operation) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Operation.ProtoReflect.Descriptor instead. +func (*Operation) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{1} +} + +func (x *Operation) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +func (x *Operation) GetSummary() string { + if x != nil { + return x.Summary + } + return "" +} + +func (x *Operation) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Operation) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +func (x *Operation) GetOperationId() string { + if x != nil { + return x.OperationId + } + return "" +} + +func (x *Operation) GetConsumes() []string { + if x != nil { + return x.Consumes + } + return nil +} + +func (x *Operation) GetProduces() []string { + if x != nil { + return x.Produces + } + return nil +} + +func (x *Operation) GetResponses() map[string]*Response { + if x != nil { + return x.Responses + } + return nil +} + +func (x *Operation) GetSchemes() []Scheme { + if x != nil { + return x.Schemes + } + return nil +} + +func (x *Operation) GetDeprecated() bool { + if x != nil { + return x.Deprecated + } + return false +} + +func (x *Operation) GetSecurity() []*SecurityRequirement { + if x != nil { + return x.Security + } + return nil +} + +func (x *Operation) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +func (x *Operation) GetParameters() *Parameters { + if x != nil { + return x.Parameters + } + return nil +} + +// `Parameters` is a representation of OpenAPI v2 specification's parameters object. +// Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only +// allow header parameters to be set here since we do not want users specifying custom non-header +// parameters beyond those inferred from the Protobuf schema. +// See: https://swagger.io/specification/v2/#parameter-object +type Parameters struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `Headers` is one or more HTTP header parameter. + // See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters + Headers []*HeaderParameter `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Parameters) Reset() { + *x = Parameters{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Parameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Parameters) ProtoMessage() {} + +func (x *Parameters) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Parameters.ProtoReflect.Descriptor instead. +func (*Parameters) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{2} +} + +func (x *Parameters) GetHeaders() []*HeaderParameter { + if x != nil { + return x.Headers + } + return nil +} + +// `HeaderParameter` a HTTP header parameter. +// See: https://swagger.io/specification/v2/#parameter-object +type HeaderParameter struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `Name` is the header name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // `Description` is a short description of the header. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + // See: https://swagger.io/specification/v2/#parameterType. + Type HeaderParameter_Type `protobuf:"varint,3,opt,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter_Type" json:"type,omitempty"` + // `Format` The extending format for the previously mentioned type. + Format string `protobuf:"bytes,4,opt,name=format,proto3" json:"format,omitempty"` + // `Required` indicates if the header is optional + Required bool `protobuf:"varint,5,opt,name=required,proto3" json:"required,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HeaderParameter) Reset() { + *x = HeaderParameter{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HeaderParameter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeaderParameter) ProtoMessage() {} + +func (x *HeaderParameter) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeaderParameter.ProtoReflect.Descriptor instead. +func (*HeaderParameter) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{3} +} + +func (x *HeaderParameter) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *HeaderParameter) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *HeaderParameter) GetType() HeaderParameter_Type { + if x != nil { + return x.Type + } + return HeaderParameter_UNKNOWN +} + +func (x *HeaderParameter) GetFormat() string { + if x != nil { + return x.Format + } + return "" +} + +func (x *HeaderParameter) GetRequired() bool { + if x != nil { + return x.Required + } + return false +} + +// `Header` is a representation of OpenAPI v2 specification's Header object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject +type Header struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `Description` is a short description of the header. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + // `Format` The extending format for the previously mentioned type. + Format string `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"` + // `Default` Declares the value of the header that the server will use if none is provided. + // See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. + // Unlike JSON Schema this value MUST conform to the defined type for the header. + Default string `protobuf:"bytes,6,opt,name=default,proto3" json:"default,omitempty"` + // 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. + Pattern string `protobuf:"bytes,13,opt,name=pattern,proto3" json:"pattern,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Header) Reset() { + *x = Header{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Header) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Header) ProtoMessage() {} + +func (x *Header) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Header.ProtoReflect.Descriptor instead. +func (*Header) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{4} +} + +func (x *Header) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Header) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Header) GetFormat() string { + if x != nil { + return x.Format + } + return "" +} + +func (x *Header) GetDefault() string { + if x != nil { + return x.Default + } + return "" +} + +func (x *Header) GetPattern() string { + if x != nil { + return x.Pattern + } + return "" +} + +// `Response` is a representation of OpenAPI v2 specification's Response object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject +type Response struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `Description` is a short description of the response. + // GFM syntax can be used for rich text representation. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // `Schema` optionally defines the structure of the response. + // If `Schema` is not provided, it means there is no content to the response. + Schema *Schema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` + // `Headers` A list of headers that are sent with the response. + // `Header` name is expected to be a string in the canonical format of the MIME header key + // See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey + Headers map[string]*Header `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // `Examples` gives per-mimetype response examples. + // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object + Examples map[string]string `protobuf:"bytes,4,rep,name=examples,proto3" json:"examples,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,5,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Response) Reset() { + *x = Response{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Response) ProtoMessage() {} + +func (x *Response) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{5} +} + +func (x *Response) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Response) GetSchema() *Schema { + if x != nil { + return x.Schema + } + return nil +} + +func (x *Response) GetHeaders() map[string]*Header { + if x != nil { + return x.Headers + } + return nil +} + +func (x *Response) GetExamples() map[string]string { + if x != nil { + return x.Examples + } + return nil +} + +func (x *Response) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `Info` is a representation of OpenAPI v2 specification's Info object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: ""; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; +// }; +// }; +// ... +// }; +type Info struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The title of the application. + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // A short description of the application. GFM syntax can be used for rich + // text representation. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // The Terms of Service for the API. + TermsOfService string `protobuf:"bytes,3,opt,name=terms_of_service,json=termsOfService,proto3" json:"terms_of_service,omitempty"` + // The contact information for the exposed API. + Contact *Contact `protobuf:"bytes,4,opt,name=contact,proto3" json:"contact,omitempty"` + // The license information for the exposed API. + License *License `protobuf:"bytes,5,opt,name=license,proto3" json:"license,omitempty"` + // Provides the version of the application API (not to be confused + // with the specification version). + Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,7,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Info) Reset() { + *x = Info{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Info) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Info) ProtoMessage() {} + +func (x *Info) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Info.ProtoReflect.Descriptor instead. +func (*Info) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{6} +} + +func (x *Info) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *Info) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Info) GetTermsOfService() string { + if x != nil { + return x.TermsOfService + } + return "" +} + +func (x *Info) GetContact() *Contact { + if x != nil { + return x.Contact + } + return nil +} + +func (x *Info) GetLicense() *License { + if x != nil { + return x.License + } + return nil +} + +func (x *Info) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *Info) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `Contact` is a representation of OpenAPI v2 specification's Contact object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// ... +// }; +// ... +// }; +type Contact struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The identifying name of the contact person/organization. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The URL pointing to the contact information. MUST be in the format of a + // URL. + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + // The email address of the contact person/organization. MUST be in the format + // of an email address. + Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Contact) Reset() { + *x = Contact{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Contact) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Contact) ProtoMessage() {} + +func (x *Contact) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Contact.ProtoReflect.Descriptor instead. +func (*Contact) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{7} +} + +func (x *Contact) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Contact) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Contact) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +// `License` is a representation of OpenAPI v2 specification's License object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; +// }; +// ... +// }; +// ... +// }; +type License struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The license name used for the API. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A URL to the license used for the API. MUST be in the format of a URL. + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *License) Reset() { + *x = License{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *License) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*License) ProtoMessage() {} + +func (x *License) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use License.ProtoReflect.Descriptor instead. +func (*License) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{8} +} + +func (x *License) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *License) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +// `ExternalDocumentation` is a representation of OpenAPI v2 specification's +// ExternalDocumentation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// ... +// external_docs: { +// description: "More about gRPC-Gateway"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// } +// ... +// }; +type ExternalDocumentation struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A short description of the target documentation. GFM syntax can be used for + // rich text representation. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + // The URL for the target documentation. Value MUST be in the format + // of a URL. + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExternalDocumentation) Reset() { + *x = ExternalDocumentation{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExternalDocumentation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExternalDocumentation) ProtoMessage() {} + +func (x *ExternalDocumentation) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExternalDocumentation.ProtoReflect.Descriptor instead. +func (*ExternalDocumentation) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{9} +} + +func (x *ExternalDocumentation) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ExternalDocumentation) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +// `Schema` is a representation of OpenAPI v2 specification's Schema object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +type Schema struct { + state protoimpl.MessageState `protogen:"open.v1"` + JsonSchema *JSONSchema `protobuf:"bytes,1,opt,name=json_schema,json=jsonSchema,proto3" json:"json_schema,omitempty"` + // Adds support for polymorphism. The discriminator is the schema property + // name that is used to differentiate between other schema that inherit this + // schema. The property name used MUST be defined at this schema and it MUST + // be in the required property list. When used, the value MUST be the name of + // this schema or any schema that inherits it. + Discriminator string `protobuf:"bytes,2,opt,name=discriminator,proto3" json:"discriminator,omitempty"` + // Relevant only for Schema "properties" definitions. Declares the property as + // "read only". This means that it MAY be sent as part of a response but MUST + // NOT be sent as part of the request. Properties marked as readOnly being + // true SHOULD NOT be in the required list of the defined schema. Default + // value is false. + ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + // Additional external documentation for this schema. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,5,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + // A free-form property to include an example of an instance for this schema in JSON. + // This is copied verbatim to the output. + Example string `protobuf:"bytes,6,opt,name=example,proto3" json:"example,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Schema) Reset() { + *x = Schema{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Schema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Schema) ProtoMessage() {} + +func (x *Schema) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Schema.ProtoReflect.Descriptor instead. +func (*Schema) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{10} +} + +func (x *Schema) GetJsonSchema() *JSONSchema { + if x != nil { + return x.JsonSchema + } + return nil +} + +func (x *Schema) GetDiscriminator() string { + if x != nil { + return x.Discriminator + } + return "" +} + +func (x *Schema) GetReadOnly() bool { + if x != nil { + return x.ReadOnly + } + return false +} + +func (x *Schema) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +func (x *Schema) GetExample() string { + if x != nil { + return x.Example + } + return "" +} + +// `EnumSchema` is subset of fields from the OpenAPI v2 specification's Schema object. +// Only fields that are applicable to Enums are included +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum) = { +// ... +// title: "MyEnum"; +// description:"This is my nice enum"; +// example: "ZERO"; +// required: true; +// ... +// }; +type EnumSchema struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A short description of the schema. + Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` + Default string `protobuf:"bytes,2,opt,name=default,proto3" json:"default,omitempty"` + // The title of the schema. + Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` + Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"` + ReadOnly bool `protobuf:"varint,5,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + // Additional external documentation for this schema. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,6,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + Example string `protobuf:"bytes,7,opt,name=example,proto3" json:"example,omitempty"` + // Ref is used to define an external reference to include in the message. + // This could be a fully qualified proto message reference, and that type must + // be imported into the protofile. If no message is identified, the Ref will + // be used verbatim in the output. + // For example: + // + // `ref: ".google.protobuf.Timestamp"`. + Ref string `protobuf:"bytes,8,opt,name=ref,proto3" json:"ref,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,9,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnumSchema) Reset() { + *x = EnumSchema{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnumSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnumSchema) ProtoMessage() {} + +func (x *EnumSchema) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnumSchema.ProtoReflect.Descriptor instead. +func (*EnumSchema) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{11} +} + +func (x *EnumSchema) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *EnumSchema) GetDefault() string { + if x != nil { + return x.Default + } + return "" +} + +func (x *EnumSchema) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *EnumSchema) GetRequired() bool { + if x != nil { + return x.Required + } + return false +} + +func (x *EnumSchema) GetReadOnly() bool { + if x != nil { + return x.ReadOnly + } + return false +} + +func (x *EnumSchema) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +func (x *EnumSchema) GetExample() string { + if x != nil { + return x.Example + } + return "" +} + +func (x *EnumSchema) GetRef() string { + if x != nil { + return x.Ref + } + return "" +} + +func (x *EnumSchema) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `JSONSchema` represents properties from JSON Schema taken, and as used, in +// the OpenAPI v2 spec. +// +// This includes changes made by OpenAPI v2. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +// See also: https://cswr.github.io/JsonSchema/spec/basic_types/, +// https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json +// +// Example: +// +// message SimpleMessage { +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { +// json_schema: { +// title: "SimpleMessage" +// description: "A simple message." +// required: ["id"] +// } +// }; +// +// // Id represents the message identifier. +// string id = 1; [ +// (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { +// description: "The unique identifier of the simple message." +// }]; +// } +type JSONSchema struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Ref is used to define an external reference to include in the message. + // This could be a fully qualified proto message reference, and that type must + // be imported into the protofile. If no message is identified, the Ref will + // be used verbatim in the output. + // For example: + // + // `ref: ".google.protobuf.Timestamp"`. + Ref string `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"` + // The title of the schema. + Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"` + // A short description of the schema. + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + Default string `protobuf:"bytes,7,opt,name=default,proto3" json:"default,omitempty"` + ReadOnly bool `protobuf:"varint,8,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + // A free-form property to include a JSON example of this field. This is copied + // verbatim to the output swagger.json. Quotes must be escaped. + // This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + Example string `protobuf:"bytes,9,opt,name=example,proto3" json:"example,omitempty"` + MultipleOf float64 `protobuf:"fixed64,10,opt,name=multiple_of,json=multipleOf,proto3" json:"multiple_of,omitempty"` + // Maximum represents an inclusive upper limit for a numeric instance. The + // value of MUST be a number, + Maximum float64 `protobuf:"fixed64,11,opt,name=maximum,proto3" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum,proto3" json:"exclusive_maximum,omitempty"` + // minimum represents an inclusive lower limit for a numeric instance. The + // value of MUST be a number, + Minimum float64 `protobuf:"fixed64,13,opt,name=minimum,proto3" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum,proto3" json:"exclusive_minimum,omitempty"` + MaxLength uint64 `protobuf:"varint,15,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` + MinLength uint64 `protobuf:"varint,16,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,17,opt,name=pattern,proto3" json:"pattern,omitempty"` + MaxItems uint64 `protobuf:"varint,20,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"` + MinItems uint64 `protobuf:"varint,21,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,22,opt,name=unique_items,json=uniqueItems,proto3" json:"unique_items,omitempty"` + MaxProperties uint64 `protobuf:"varint,24,opt,name=max_properties,json=maxProperties,proto3" json:"max_properties,omitempty"` + MinProperties uint64 `protobuf:"varint,25,opt,name=min_properties,json=minProperties,proto3" json:"min_properties,omitempty"` + Required []string `protobuf:"bytes,26,rep,name=required,proto3" json:"required,omitempty"` + // Items in 'array' must be unique. + Array []string `protobuf:"bytes,34,rep,name=array,proto3" json:"array,omitempty"` + Type []JSONSchema_JSONSchemaSimpleTypes `protobuf:"varint,35,rep,packed,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.JSONSchema_JSONSchemaSimpleTypes" json:"type,omitempty"` + // `Format` + Format string `protobuf:"bytes,36,opt,name=format,proto3" json:"format,omitempty"` + // Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 + Enum []string `protobuf:"bytes,46,rep,name=enum,proto3" json:"enum,omitempty"` + // Additional field level properties used when generating the OpenAPI v2 file. + FieldConfiguration *JSONSchema_FieldConfiguration `protobuf:"bytes,1001,opt,name=field_configuration,json=fieldConfiguration,proto3" json:"field_configuration,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,48,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *JSONSchema) Reset() { + *x = JSONSchema{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *JSONSchema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JSONSchema) ProtoMessage() {} + +func (x *JSONSchema) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JSONSchema.ProtoReflect.Descriptor instead. +func (*JSONSchema) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12} +} + +func (x *JSONSchema) GetRef() string { + if x != nil { + return x.Ref + } + return "" +} + +func (x *JSONSchema) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *JSONSchema) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *JSONSchema) GetDefault() string { + if x != nil { + return x.Default + } + return "" +} + +func (x *JSONSchema) GetReadOnly() bool { + if x != nil { + return x.ReadOnly + } + return false +} + +func (x *JSONSchema) GetExample() string { + if x != nil { + return x.Example + } + return "" +} + +func (x *JSONSchema) GetMultipleOf() float64 { + if x != nil { + return x.MultipleOf + } + return 0 +} + +func (x *JSONSchema) GetMaximum() float64 { + if x != nil { + return x.Maximum + } + return 0 +} + +func (x *JSONSchema) GetExclusiveMaximum() bool { + if x != nil { + return x.ExclusiveMaximum + } + return false +} + +func (x *JSONSchema) GetMinimum() float64 { + if x != nil { + return x.Minimum + } + return 0 +} + +func (x *JSONSchema) GetExclusiveMinimum() bool { + if x != nil { + return x.ExclusiveMinimum + } + return false +} + +func (x *JSONSchema) GetMaxLength() uint64 { + if x != nil { + return x.MaxLength + } + return 0 +} + +func (x *JSONSchema) GetMinLength() uint64 { + if x != nil { + return x.MinLength + } + return 0 +} + +func (x *JSONSchema) GetPattern() string { + if x != nil { + return x.Pattern + } + return "" +} + +func (x *JSONSchema) GetMaxItems() uint64 { + if x != nil { + return x.MaxItems + } + return 0 +} + +func (x *JSONSchema) GetMinItems() uint64 { + if x != nil { + return x.MinItems + } + return 0 +} + +func (x *JSONSchema) GetUniqueItems() bool { + if x != nil { + return x.UniqueItems + } + return false +} + +func (x *JSONSchema) GetMaxProperties() uint64 { + if x != nil { + return x.MaxProperties + } + return 0 +} + +func (x *JSONSchema) GetMinProperties() uint64 { + if x != nil { + return x.MinProperties + } + return 0 +} + +func (x *JSONSchema) GetRequired() []string { + if x != nil { + return x.Required + } + return nil +} + +func (x *JSONSchema) GetArray() []string { + if x != nil { + return x.Array + } + return nil +} + +func (x *JSONSchema) GetType() []JSONSchema_JSONSchemaSimpleTypes { + if x != nil { + return x.Type + } + return nil +} + +func (x *JSONSchema) GetFormat() string { + if x != nil { + return x.Format + } + return "" +} + +func (x *JSONSchema) GetEnum() []string { + if x != nil { + return x.Enum + } + return nil +} + +func (x *JSONSchema) GetFieldConfiguration() *JSONSchema_FieldConfiguration { + if x != nil { + return x.FieldConfiguration + } + return nil +} + +func (x *JSONSchema) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `Tag` is a representation of OpenAPI v2 specification's Tag object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject +type Tag struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The name of the tag. Use it to allow override of the name of a + // global Tag object, then use that name to reference the tag throughout the + // OpenAPI file. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A short description for the tag. GFM syntax can be used for rich text + // representation. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Additional external documentation for this tag. + ExternalDocs *ExternalDocumentation `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs,proto3" json:"external_docs,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,4,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Tag) Reset() { + *x = Tag{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Tag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tag) ProtoMessage() {} + +func (x *Tag) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Tag.ProtoReflect.Descriptor instead. +func (*Tag) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{13} +} + +func (x *Tag) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Tag) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Tag) GetExternalDocs() *ExternalDocumentation { + if x != nil { + return x.ExternalDocs + } + return nil +} + +func (x *Tag) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `SecurityDefinitions` is a representation of OpenAPI v2 specification's +// Security Definitions object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject +// +// A declaration of the security schemes available to be used in the +// specification. This does not enforce the security schemes on the operations +// and only serves to provide the relevant details for each scheme. +type SecurityDefinitions struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A single security scheme definition, mapping a "name" to the scheme it + // defines. + Security map[string]*SecurityScheme `protobuf:"bytes,1,rep,name=security,proto3" json:"security,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SecurityDefinitions) Reset() { + *x = SecurityDefinitions{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SecurityDefinitions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityDefinitions) ProtoMessage() {} + +func (x *SecurityDefinitions) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SecurityDefinitions.ProtoReflect.Descriptor instead. +func (*SecurityDefinitions) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{14} +} + +func (x *SecurityDefinitions) GetSecurity() map[string]*SecurityScheme { + if x != nil { + return x.Security + } + return nil +} + +// `SecurityScheme` is a representation of OpenAPI v2 specification's +// Security Scheme object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject +// +// Allows the definition of a security scheme that can be used by the +// operations. Supported schemes are basic authentication, an API key (either as +// a header or as a query parameter) and OAuth2's common flows (implicit, +// password, application and access code). +type SecurityScheme struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The type of the security scheme. Valid values are "basic", + // "apiKey" or "oauth2". + Type SecurityScheme_Type `protobuf:"varint,1,opt,name=type,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_Type" json:"type,omitempty"` + // A short description for security scheme. + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // The name of the header or query parameter to be used. + // Valid for apiKey. + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + // The location of the API key. Valid values are "query" or + // "header". + // Valid for apiKey. + In SecurityScheme_In `protobuf:"varint,4,opt,name=in,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_In" json:"in,omitempty"` + // The flow used by the OAuth2 security scheme. Valid values are + // "implicit", "password", "application" or "accessCode". + // Valid for oauth2. + Flow SecurityScheme_Flow `protobuf:"varint,5,opt,name=flow,proto3,enum=grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme_Flow" json:"flow,omitempty"` + // The authorization URL to be used for this flow. This SHOULD be in + // the form of a URL. + // Valid for oauth2/implicit and oauth2/accessCode. + AuthorizationUrl string `protobuf:"bytes,6,opt,name=authorization_url,json=authorizationUrl,proto3" json:"authorization_url,omitempty"` + // The token URL to be used for this flow. This SHOULD be in the + // form of a URL. + // Valid for oauth2/password, oauth2/application and oauth2/accessCode. + TokenUrl string `protobuf:"bytes,7,opt,name=token_url,json=tokenUrl,proto3" json:"token_url,omitempty"` + // The available scopes for the OAuth2 security scheme. + // Valid for oauth2. + Scopes *Scopes `protobuf:"bytes,8,opt,name=scopes,proto3" json:"scopes,omitempty"` + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + Extensions map[string]*structpb.Value `protobuf:"bytes,9,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SecurityScheme) Reset() { + *x = SecurityScheme{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SecurityScheme) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityScheme) ProtoMessage() {} + +func (x *SecurityScheme) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SecurityScheme.ProtoReflect.Descriptor instead. +func (*SecurityScheme) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{15} +} + +func (x *SecurityScheme) GetType() SecurityScheme_Type { + if x != nil { + return x.Type + } + return SecurityScheme_TYPE_INVALID +} + +func (x *SecurityScheme) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *SecurityScheme) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SecurityScheme) GetIn() SecurityScheme_In { + if x != nil { + return x.In + } + return SecurityScheme_IN_INVALID +} + +func (x *SecurityScheme) GetFlow() SecurityScheme_Flow { + if x != nil { + return x.Flow + } + return SecurityScheme_FLOW_INVALID +} + +func (x *SecurityScheme) GetAuthorizationUrl() string { + if x != nil { + return x.AuthorizationUrl + } + return "" +} + +func (x *SecurityScheme) GetTokenUrl() string { + if x != nil { + return x.TokenUrl + } + return "" +} + +func (x *SecurityScheme) GetScopes() *Scopes { + if x != nil { + return x.Scopes + } + return nil +} + +func (x *SecurityScheme) GetExtensions() map[string]*structpb.Value { + if x != nil { + return x.Extensions + } + return nil +} + +// `SecurityRequirement` is a representation of OpenAPI v2 specification's +// Security Requirement object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject +// +// Lists the required security schemes to execute this operation. The object can +// have multiple security schemes declared in it which are all required (that +// is, there is a logical AND between the schemes). +// +// The name used for each property MUST correspond to a security scheme +// declared in the Security Definitions. +type SecurityRequirement struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Each name must correspond to a security scheme which is declared in + // the Security Definitions. If the security scheme is of type "oauth2", + // then the value is a list of scope names required for the execution. + // For other security scheme types, the array MUST be empty. + SecurityRequirement map[string]*SecurityRequirement_SecurityRequirementValue `protobuf:"bytes,1,rep,name=security_requirement,json=securityRequirement,proto3" json:"security_requirement,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SecurityRequirement) Reset() { + *x = SecurityRequirement{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SecurityRequirement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityRequirement) ProtoMessage() {} + +func (x *SecurityRequirement) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SecurityRequirement.ProtoReflect.Descriptor instead. +func (*SecurityRequirement) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{16} +} + +func (x *SecurityRequirement) GetSecurityRequirement() map[string]*SecurityRequirement_SecurityRequirementValue { + if x != nil { + return x.SecurityRequirement + } + return nil +} + +// `Scopes` is a representation of OpenAPI v2 specification's Scopes object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject +// +// Lists the available scopes for an OAuth2 security scheme. +type Scopes struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Maps between a name of a scope to a short description of it (as the value + // of the property). + Scope map[string]string `protobuf:"bytes,1,rep,name=scope,proto3" json:"scope,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Scopes) Reset() { + *x = Scopes{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Scopes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Scopes) ProtoMessage() {} + +func (x *Scopes) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Scopes.ProtoReflect.Descriptor instead. +func (*Scopes) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{17} +} + +func (x *Scopes) GetScope() map[string]string { + if x != nil { + return x.Scope + } + return nil +} + +// 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file. +// These properties are not defined by OpenAPIv2, but they are used to control the generation. +type JSONSchema_FieldConfiguration struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Alternative parameter name when used as path parameter. If set, this will + // be used as the complete parameter name when this field is used as a path + // parameter. Use this to avoid having auto generated path parameter names + // for overlapping paths. + PathParamName string `protobuf:"bytes,47,opt,name=path_param_name,json=pathParamName,proto3" json:"path_param_name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *JSONSchema_FieldConfiguration) Reset() { + *x = JSONSchema_FieldConfiguration{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *JSONSchema_FieldConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JSONSchema_FieldConfiguration) ProtoMessage() {} + +func (x *JSONSchema_FieldConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JSONSchema_FieldConfiguration.ProtoReflect.Descriptor instead. +func (*JSONSchema_FieldConfiguration) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{12, 0} +} + +func (x *JSONSchema_FieldConfiguration) GetPathParamName() string { + if x != nil { + return x.PathParamName + } + return "" +} + +// If the security scheme is of type "oauth2", then the value is a list of +// scope names required for the execution. For other security scheme types, +// the array MUST be empty. +type SecurityRequirement_SecurityRequirementValue struct { + state protoimpl.MessageState `protogen:"open.v1"` + Scope []string `protobuf:"bytes,1,rep,name=scope,proto3" json:"scope,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SecurityRequirement_SecurityRequirementValue) Reset() { + *x = SecurityRequirement_SecurityRequirementValue{} + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SecurityRequirement_SecurityRequirementValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SecurityRequirement_SecurityRequirementValue) ProtoMessage() {} + +func (x *SecurityRequirement_SecurityRequirementValue) ProtoReflect() protoreflect.Message { + mi := &file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SecurityRequirement_SecurityRequirementValue.ProtoReflect.Descriptor instead. +func (*SecurityRequirement_SecurityRequirementValue) Descriptor() ([]byte, []int) { + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP(), []int{16, 0} +} + +func (x *SecurityRequirement_SecurityRequirementValue) GetScope() []string { + if x != nil { + return x.Scope + } + return nil +} + +var File_protoc_gen_openapiv2_options_openapiv2_proto protoreflect.FileDescriptor + +var file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc = []byte{ + 0x0a, 0x2c, 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, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x22, 0xb3, 0x08, 0x0a, 0x07, 0x53, 0x77, 0x61, 0x67, + 0x67, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x12, 0x43, 0x0a, + 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, + 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x61, 0x73, 0x65, 0x50, + 0x61, 0x74, 0x68, 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, + 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x71, 0x0a, 0x14, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x08, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x65, 0x0a, 0x0d, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, + 0x6f, 0x63, 0x73, 0x12, 0x62, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 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, 0x49, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 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, + 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0xd6, 0x07, + 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a, 0x0d, 0x65, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, + 0x63, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, + 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x73, 0x12, 0x61, 0x0a, + 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, + 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, + 0x12, 0x4b, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x65, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x12, 0x1e, 0x0a, + 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x5a, 0x0a, + 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x64, 0x0a, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x55, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x71, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 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, 0x49, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, + 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 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, 0x2c, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x22, 0x62, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x54, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0xa3, 0x02, 0x0a, 0x0f, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x53, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x45, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0a, + 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, + 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, + 0x41, 0x4e, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, + 0x22, 0xd8, 0x01, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, + 0x61, 0x75, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x4a, 0x04, 0x08, + 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, + 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0a, 0x10, + 0x0b, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, + 0x0e, 0x10, 0x0f, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11, 0x4a, + 0x04, 0x08, 0x11, 0x10, 0x12, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0x9a, 0x05, 0x0a, 0x08, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x06, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x5a, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x5d, 0x0a, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, + 0x12, 0x63, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x6d, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 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, 0x47, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 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, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd6, 0x03, 0x0a, 0x04, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x65, 0x72, + 0x6d, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x4f, 0x66, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, + 0x74, 0x12, 0x4c, 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, + 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4c, + 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 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, + 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x45, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x22, 0x2f, 0x0a, 0x07, 0x4c, 0x69, 0x63, 0x65, + 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x4b, 0x0a, 0x15, 0x45, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0xaa, 0x02, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x12, 0x56, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0a, 0x6a, + 0x73, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x69, 0x73, + 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x64, 0x69, 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x65, 0x0a, 0x0d, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, + 0x6f, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4a, 0x04, 0x08, + 0x04, 0x10, 0x05, 0x22, 0xe8, 0x03, 0x0a, 0x0a, 0x45, 0x6e, 0x75, 0x6d, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x65, 0x0a, + 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x44, 0x6f, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, + 0x12, 0x65, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 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, 0x2c, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd7, + 0x0a, 0x0a, 0x0a, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x10, 0x0a, + 0x03, 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x18, + 0x0a, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4f, 0x66, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, + 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, + 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, + 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, + 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, + 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x78, + 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, + 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x6c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6d, 0x61, 0x78, + 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, + 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, + 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x14, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e, 0x69, + 0x71, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0e, + 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x18, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x69, 0x6e, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, + 0x22, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x61, 0x72, 0x72, 0x61, 0x79, 0x12, 0x5f, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x23, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x4b, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x69, 0x6d, 0x70, + 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x2e, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x7a, 0x0a, 0x13, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0xe9, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x12, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x30, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, + 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3c, 0x0a, 0x12, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x61, 0x74, + 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x55, 0x0a, 0x0f, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 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, + 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x77, 0x0a, 0x15, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, + 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x52, 0x52, 0x41, 0x59, + 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x02, 0x12, + 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, + 0x4e, 0x55, 0x4c, 0x4c, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, + 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x06, 0x12, 0x0a, + 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, + 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, + 0x10, 0x13, 0x4a, 0x04, 0x08, 0x13, 0x10, 0x14, 0x4a, 0x04, 0x08, 0x17, 0x10, 0x18, 0x4a, 0x04, + 0x08, 0x1b, 0x10, 0x1c, 0x4a, 0x04, 0x08, 0x1c, 0x10, 0x1d, 0x4a, 0x04, 0x08, 0x1d, 0x10, 0x1e, + 0x4a, 0x04, 0x08, 0x1e, 0x10, 0x22, 0x4a, 0x04, 0x08, 0x25, 0x10, 0x2a, 0x4a, 0x04, 0x08, 0x2a, + 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x2b, 0x10, 0x2e, 0x22, 0xd9, 0x02, 0x0a, 0x03, 0x54, 0x61, 0x67, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x5f, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, + 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x5e, 0x0a, + 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, + 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x54, 0x61, + 0x67, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, + 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 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, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf7, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x68, 0x0a, 0x08, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, + 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x73, 0x65, + 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x1a, 0x76, 0x0a, 0x0d, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4f, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, + 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, + 0x65, 0x6d, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xff, + 0x06, 0x0a, 0x0e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x65, 0x12, 0x52, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, + 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x02, 0x69, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x65, 0x2e, 0x49, 0x6e, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x52, 0x0a, 0x04, 0x66, 0x6c, 0x6f, + 0x77, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3e, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x65, 0x2e, 0x46, 0x6c, 0x6f, 0x77, 0x52, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x2b, 0x0a, + 0x11, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, + 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x49, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x73, 0x12, 0x69, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, + 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, + 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x55, 0x0a, + 0x0f, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 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, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0e, + 0x0a, 0x0a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x10, 0x01, 0x12, 0x10, + 0x0a, 0x0c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x50, 0x49, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x02, + 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x32, 0x10, + 0x03, 0x22, 0x31, 0x0a, 0x02, 0x49, 0x6e, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x5f, 0x49, 0x4e, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x5f, 0x51, 0x55, + 0x45, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x5f, 0x48, 0x45, 0x41, 0x44, + 0x45, 0x52, 0x10, 0x02, 0x22, 0x6a, 0x0a, 0x04, 0x46, 0x6c, 0x6f, 0x77, 0x12, 0x10, 0x0a, 0x0c, + 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x10, 0x00, 0x12, 0x11, + 0x0a, 0x0d, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, + 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, + 0x52, 0x44, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x41, 0x50, 0x50, + 0x4c, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x46, 0x4c, + 0x4f, 0x57, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x04, + 0x22, 0xf6, 0x02, 0x0a, 0x13, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x8a, 0x01, 0x0a, 0x14, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, + 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x13, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x30, 0x0a, 0x18, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x1a, 0x9f, 0x01, 0x0a, 0x18, 0x53, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x6d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, + 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, + 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x96, 0x01, 0x0a, 0x06, 0x53, 0x63, + 0x6f, 0x70, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x63, 0x6f, 0x70, + 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x2a, 0x3b, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x07, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, + 0x50, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x53, 0x10, 0x02, 0x12, 0x06, + 0x0a, 0x02, 0x57, 0x53, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x57, 0x53, 0x53, 0x10, 0x04, 0x42, + 0x48, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x72, + 0x70, 0x63, 0x2d, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x67, 0x72, 0x70, + 0x63, 0x2d, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x76, 0x32, 0x2f, 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, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescOnce sync.Once + file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData = file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc +) + +func file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescGZIP() []byte { + file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescOnce.Do(func() { + file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData = protoimpl.X.CompressGZIP(file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData) + }) + return file_protoc_gen_openapiv2_options_openapiv2_proto_rawDescData +} + +var file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes = make([]protoimpl.MessageInfo, 35) +var file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes = []any{ + (Scheme)(0), // 0: grpc.gateway.protoc_gen_openapiv2.options.Scheme + (HeaderParameter_Type)(0), // 1: grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type + (JSONSchema_JSONSchemaSimpleTypes)(0), // 2: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes + (SecurityScheme_Type)(0), // 3: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type + (SecurityScheme_In)(0), // 4: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In + (SecurityScheme_Flow)(0), // 5: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow + (*Swagger)(nil), // 6: grpc.gateway.protoc_gen_openapiv2.options.Swagger + (*Operation)(nil), // 7: grpc.gateway.protoc_gen_openapiv2.options.Operation + (*Parameters)(nil), // 8: grpc.gateway.protoc_gen_openapiv2.options.Parameters + (*HeaderParameter)(nil), // 9: grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter + (*Header)(nil), // 10: grpc.gateway.protoc_gen_openapiv2.options.Header + (*Response)(nil), // 11: grpc.gateway.protoc_gen_openapiv2.options.Response + (*Info)(nil), // 12: grpc.gateway.protoc_gen_openapiv2.options.Info + (*Contact)(nil), // 13: grpc.gateway.protoc_gen_openapiv2.options.Contact + (*License)(nil), // 14: grpc.gateway.protoc_gen_openapiv2.options.License + (*ExternalDocumentation)(nil), // 15: grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + (*Schema)(nil), // 16: grpc.gateway.protoc_gen_openapiv2.options.Schema + (*EnumSchema)(nil), // 17: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema + (*JSONSchema)(nil), // 18: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema + (*Tag)(nil), // 19: grpc.gateway.protoc_gen_openapiv2.options.Tag + (*SecurityDefinitions)(nil), // 20: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions + (*SecurityScheme)(nil), // 21: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme + (*SecurityRequirement)(nil), // 22: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement + (*Scopes)(nil), // 23: grpc.gateway.protoc_gen_openapiv2.options.Scopes + nil, // 24: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry + nil, // 25: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry + nil, // 26: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry + nil, // 27: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry + nil, // 28: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry + nil, // 29: grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry + nil, // 30: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry + nil, // 31: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry + nil, // 32: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.ExtensionsEntry + (*JSONSchema_FieldConfiguration)(nil), // 33: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration + nil, // 34: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.ExtensionsEntry + nil, // 35: grpc.gateway.protoc_gen_openapiv2.options.Tag.ExtensionsEntry + nil, // 36: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry + nil, // 37: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry + (*SecurityRequirement_SecurityRequirementValue)(nil), // 38: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue + nil, // 39: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry + nil, // 40: grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry + (*structpb.Value)(nil), // 41: google.protobuf.Value +} +var file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs = []int32{ + 12, // 0: grpc.gateway.protoc_gen_openapiv2.options.Swagger.info:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info + 0, // 1: grpc.gateway.protoc_gen_openapiv2.options.Swagger.schemes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scheme + 24, // 2: grpc.gateway.protoc_gen_openapiv2.options.Swagger.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry + 20, // 3: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security_definitions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions + 22, // 4: grpc.gateway.protoc_gen_openapiv2.options.Swagger.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement + 19, // 5: grpc.gateway.protoc_gen_openapiv2.options.Swagger.tags:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Tag + 15, // 6: grpc.gateway.protoc_gen_openapiv2.options.Swagger.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 25, // 7: grpc.gateway.protoc_gen_openapiv2.options.Swagger.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry + 15, // 8: grpc.gateway.protoc_gen_openapiv2.options.Operation.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 26, // 9: grpc.gateway.protoc_gen_openapiv2.options.Operation.responses:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry + 0, // 10: grpc.gateway.protoc_gen_openapiv2.options.Operation.schemes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scheme + 22, // 11: grpc.gateway.protoc_gen_openapiv2.options.Operation.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement + 27, // 12: grpc.gateway.protoc_gen_openapiv2.options.Operation.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry + 8, // 13: grpc.gateway.protoc_gen_openapiv2.options.Operation.parameters:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Parameters + 9, // 14: grpc.gateway.protoc_gen_openapiv2.options.Parameters.headers:type_name -> grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter + 1, // 15: grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type + 16, // 16: grpc.gateway.protoc_gen_openapiv2.options.Response.schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Schema + 28, // 17: grpc.gateway.protoc_gen_openapiv2.options.Response.headers:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry + 29, // 18: grpc.gateway.protoc_gen_openapiv2.options.Response.examples:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExamplesEntry + 30, // 19: grpc.gateway.protoc_gen_openapiv2.options.Response.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry + 13, // 20: grpc.gateway.protoc_gen_openapiv2.options.Info.contact:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Contact + 14, // 21: grpc.gateway.protoc_gen_openapiv2.options.Info.license:type_name -> grpc.gateway.protoc_gen_openapiv2.options.License + 31, // 22: grpc.gateway.protoc_gen_openapiv2.options.Info.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry + 18, // 23: grpc.gateway.protoc_gen_openapiv2.options.Schema.json_schema:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema + 15, // 24: grpc.gateway.protoc_gen_openapiv2.options.Schema.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 15, // 25: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 32, // 26: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.ExtensionsEntry + 2, // 27: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes + 33, // 28: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.field_configuration:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration + 34, // 29: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.ExtensionsEntry + 15, // 30: grpc.gateway.protoc_gen_openapiv2.options.Tag.external_docs:type_name -> grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation + 35, // 31: grpc.gateway.protoc_gen_openapiv2.options.Tag.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Tag.ExtensionsEntry + 36, // 32: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.security:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry + 3, // 33: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.type:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type + 4, // 34: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.in:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In + 5, // 35: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.flow:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow + 23, // 36: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.scopes:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes + 37, // 37: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.extensions:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry + 39, // 38: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.security_requirement:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry + 40, // 39: grpc.gateway.protoc_gen_openapiv2.options.Scopes.scope:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Scopes.ScopeEntry + 11, // 40: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response + 41, // 41: grpc.gateway.protoc_gen_openapiv2.options.Swagger.ExtensionsEntry.value:type_name -> google.protobuf.Value + 11, // 42: grpc.gateway.protoc_gen_openapiv2.options.Operation.ResponsesEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Response + 41, // 43: grpc.gateway.protoc_gen_openapiv2.options.Operation.ExtensionsEntry.value:type_name -> google.protobuf.Value + 10, // 44: grpc.gateway.protoc_gen_openapiv2.options.Response.HeadersEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.Header + 41, // 45: grpc.gateway.protoc_gen_openapiv2.options.Response.ExtensionsEntry.value:type_name -> google.protobuf.Value + 41, // 46: grpc.gateway.protoc_gen_openapiv2.options.Info.ExtensionsEntry.value:type_name -> google.protobuf.Value + 41, // 47: grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.ExtensionsEntry.value:type_name -> google.protobuf.Value + 41, // 48: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.ExtensionsEntry.value:type_name -> google.protobuf.Value + 41, // 49: grpc.gateway.protoc_gen_openapiv2.options.Tag.ExtensionsEntry.value:type_name -> google.protobuf.Value + 21, // 50: grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.SecurityEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme + 41, // 51: grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.ExtensionsEntry.value:type_name -> google.protobuf.Value + 38, // 52: grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementEntry.value:type_name -> grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue + 53, // [53:53] is the sub-list for method output_type + 53, // [53:53] is the sub-list for method input_type + 53, // [53:53] is the sub-list for extension type_name + 53, // [53:53] is the sub-list for extension extendee + 0, // [0:53] is the sub-list for field type_name +} + +func init() { file_protoc_gen_openapiv2_options_openapiv2_proto_init() } +func file_protoc_gen_openapiv2_options_openapiv2_proto_init() { + if File_protoc_gen_openapiv2_options_openapiv2_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc, + NumEnums: 6, + NumMessages: 35, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes, + DependencyIndexes: file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs, + EnumInfos: file_protoc_gen_openapiv2_options_openapiv2_proto_enumTypes, + MessageInfos: file_protoc_gen_openapiv2_options_openapiv2_proto_msgTypes, + }.Build() + File_protoc_gen_openapiv2_options_openapiv2_proto = out.File + file_protoc_gen_openapiv2_options_openapiv2_proto_rawDesc = nil + file_protoc_gen_openapiv2_options_openapiv2_proto_goTypes = nil + file_protoc_gen_openapiv2_options_openapiv2_proto_depIdxs = nil +} diff --git a/proto/protoc-gen-openapiv2/options/openapiv2_grpc_pb.js b/proto/protoc-gen-openapiv2/options/openapiv2_grpc_pb.js new file mode 100644 index 000000000..97b3a2461 --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/openapiv2_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/proto/protoc-gen-openapiv2/options/openapiv2_pb.d.ts b/proto/protoc-gen-openapiv2/options/openapiv2_pb.d.ts new file mode 100644 index 000000000..6adee56da --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/openapiv2_pb.d.ts @@ -0,0 +1,849 @@ +// package: grpc.gateway.protoc_gen_openapiv2.options +// file: protoc-gen-openapiv2/options/openapiv2.proto + +/* tslint:disable */ +/* eslint-disable */ + +import * as jspb from "google-protobuf"; +import * as google_protobuf_struct_pb from "google-protobuf/google/protobuf/struct_pb"; + +export class Swagger extends jspb.Message { + getSwagger(): string; + setSwagger(value: string): Swagger; + + hasInfo(): boolean; + clearInfo(): void; + getInfo(): Info | undefined; + setInfo(value?: Info): Swagger; + getHost(): string; + setHost(value: string): Swagger; + getBasePath(): string; + setBasePath(value: string): Swagger; + clearSchemesList(): void; + getSchemesList(): Array; + setSchemesList(value: Array): Swagger; + addSchemes(value: Scheme, index?: number): Scheme; + clearConsumesList(): void; + getConsumesList(): Array; + setConsumesList(value: Array): Swagger; + addConsumes(value: string, index?: number): string; + clearProducesList(): void; + getProducesList(): Array; + setProducesList(value: Array): Swagger; + addProduces(value: string, index?: number): string; + + getResponsesMap(): jspb.Map; + clearResponsesMap(): void; + + hasSecurityDefinitions(): boolean; + clearSecurityDefinitions(): void; + getSecurityDefinitions(): SecurityDefinitions | undefined; + setSecurityDefinitions(value?: SecurityDefinitions): Swagger; + clearSecurityList(): void; + getSecurityList(): Array; + setSecurityList(value: Array): Swagger; + addSecurity(value?: SecurityRequirement, index?: number): SecurityRequirement; + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): Swagger; + addTags(value?: Tag, index?: number): Tag; + + hasExternalDocs(): boolean; + clearExternalDocs(): void; + getExternalDocs(): ExternalDocumentation | undefined; + setExternalDocs(value?: ExternalDocumentation): Swagger; + + getExtensionsMap(): jspb.Map; + clearExtensionsMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Swagger.AsObject; + static toObject(includeInstance: boolean, msg: Swagger): Swagger.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Swagger, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Swagger; + static deserializeBinaryFromReader(message: Swagger, reader: jspb.BinaryReader): Swagger; +} + +export namespace Swagger { + export type AsObject = { + swagger: string, + info?: Info.AsObject, + host: string, + basePath: string, + schemesList: Array, + consumesList: Array, + producesList: Array, + + responsesMap: Array<[string, Response.AsObject]>, + securityDefinitions?: SecurityDefinitions.AsObject, + securityList: Array, + tagsList: Array, + externalDocs?: ExternalDocumentation.AsObject, + + extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, + } +} + +export class Operation extends jspb.Message { + clearTagsList(): void; + getTagsList(): Array; + setTagsList(value: Array): Operation; + addTags(value: string, index?: number): string; + getSummary(): string; + setSummary(value: string): Operation; + getDescription(): string; + setDescription(value: string): Operation; + + hasExternalDocs(): boolean; + clearExternalDocs(): void; + getExternalDocs(): ExternalDocumentation | undefined; + setExternalDocs(value?: ExternalDocumentation): Operation; + getOperationId(): string; + setOperationId(value: string): Operation; + clearConsumesList(): void; + getConsumesList(): Array; + setConsumesList(value: Array): Operation; + addConsumes(value: string, index?: number): string; + clearProducesList(): void; + getProducesList(): Array; + setProducesList(value: Array): Operation; + addProduces(value: string, index?: number): string; + + getResponsesMap(): jspb.Map; + clearResponsesMap(): void; + clearSchemesList(): void; + getSchemesList(): Array; + setSchemesList(value: Array): Operation; + addSchemes(value: Scheme, index?: number): Scheme; + getDeprecated(): boolean; + setDeprecated(value: boolean): Operation; + clearSecurityList(): void; + getSecurityList(): Array; + setSecurityList(value: Array): Operation; + addSecurity(value?: SecurityRequirement, index?: number): SecurityRequirement; + + getExtensionsMap(): jspb.Map; + clearExtensionsMap(): void; + + hasParameters(): boolean; + clearParameters(): void; + getParameters(): Parameters | undefined; + setParameters(value?: Parameters): Operation; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Operation.AsObject; + static toObject(includeInstance: boolean, msg: Operation): Operation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Operation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Operation; + static deserializeBinaryFromReader(message: Operation, reader: jspb.BinaryReader): Operation; +} + +export namespace Operation { + export type AsObject = { + tagsList: Array, + summary: string, + description: string, + externalDocs?: ExternalDocumentation.AsObject, + operationId: string, + consumesList: Array, + producesList: Array, + + responsesMap: Array<[string, Response.AsObject]>, + schemesList: Array, + deprecated: boolean, + securityList: Array, + + extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, + parameters?: Parameters.AsObject, + } +} + +export class Parameters extends jspb.Message { + clearHeadersList(): void; + getHeadersList(): Array; + setHeadersList(value: Array): Parameters; + addHeaders(value?: HeaderParameter, index?: number): HeaderParameter; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Parameters.AsObject; + static toObject(includeInstance: boolean, msg: Parameters): Parameters.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Parameters, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Parameters; + static deserializeBinaryFromReader(message: Parameters, reader: jspb.BinaryReader): Parameters; +} + +export namespace Parameters { + export type AsObject = { + headersList: Array, + } +} + +export class HeaderParameter extends jspb.Message { + getName(): string; + setName(value: string): HeaderParameter; + getDescription(): string; + setDescription(value: string): HeaderParameter; + getType(): HeaderParameter.Type; + setType(value: HeaderParameter.Type): HeaderParameter; + getFormat(): string; + setFormat(value: string): HeaderParameter; + getRequired(): boolean; + setRequired(value: boolean): HeaderParameter; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HeaderParameter.AsObject; + static toObject(includeInstance: boolean, msg: HeaderParameter): HeaderParameter.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HeaderParameter, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HeaderParameter; + static deserializeBinaryFromReader(message: HeaderParameter, reader: jspb.BinaryReader): HeaderParameter; +} + +export namespace HeaderParameter { + export type AsObject = { + name: string, + description: string, + type: HeaderParameter.Type, + format: string, + required: boolean, + } + + export enum Type { + UNKNOWN = 0, + STRING = 1, + NUMBER = 2, + INTEGER = 3, + BOOLEAN = 4, + } + +} + +export class Header extends jspb.Message { + getDescription(): string; + setDescription(value: string): Header; + getType(): string; + setType(value: string): Header; + getFormat(): string; + setFormat(value: string): Header; + getDefault(): string; + setDefault(value: string): Header; + getPattern(): string; + setPattern(value: string): Header; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Header.AsObject; + static toObject(includeInstance: boolean, msg: Header): Header.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Header, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Header; + static deserializeBinaryFromReader(message: Header, reader: jspb.BinaryReader): Header; +} + +export namespace Header { + export type AsObject = { + description: string, + type: string, + format: string, + pb_default: string, + pattern: string, + } +} + +export class Response extends jspb.Message { + getDescription(): string; + setDescription(value: string): Response; + + hasSchema(): boolean; + clearSchema(): void; + getSchema(): Schema | undefined; + setSchema(value?: Schema): Response; + + getHeadersMap(): jspb.Map; + clearHeadersMap(): void; + + getExamplesMap(): jspb.Map; + clearExamplesMap(): void; + + getExtensionsMap(): jspb.Map; + clearExtensionsMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Response.AsObject; + static toObject(includeInstance: boolean, msg: Response): Response.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Response, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Response; + static deserializeBinaryFromReader(message: Response, reader: jspb.BinaryReader): Response; +} + +export namespace Response { + export type AsObject = { + description: string, + schema?: Schema.AsObject, + + headersMap: Array<[string, Header.AsObject]>, + + examplesMap: Array<[string, string]>, + + extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, + } +} + +export class Info extends jspb.Message { + getTitle(): string; + setTitle(value: string): Info; + getDescription(): string; + setDescription(value: string): Info; + getTermsOfService(): string; + setTermsOfService(value: string): Info; + + hasContact(): boolean; + clearContact(): void; + getContact(): Contact | undefined; + setContact(value?: Contact): Info; + + hasLicense(): boolean; + clearLicense(): void; + getLicense(): License | undefined; + setLicense(value?: License): Info; + getVersion(): string; + setVersion(value: string): Info; + + getExtensionsMap(): jspb.Map; + clearExtensionsMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Info.AsObject; + static toObject(includeInstance: boolean, msg: Info): Info.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Info, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Info; + static deserializeBinaryFromReader(message: Info, reader: jspb.BinaryReader): Info; +} + +export namespace Info { + export type AsObject = { + title: string, + description: string, + termsOfService: string, + contact?: Contact.AsObject, + license?: License.AsObject, + version: string, + + extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, + } +} + +export class Contact extends jspb.Message { + getName(): string; + setName(value: string): Contact; + getUrl(): string; + setUrl(value: string): Contact; + getEmail(): string; + setEmail(value: string): Contact; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Contact.AsObject; + static toObject(includeInstance: boolean, msg: Contact): Contact.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Contact, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Contact; + static deserializeBinaryFromReader(message: Contact, reader: jspb.BinaryReader): Contact; +} + +export namespace Contact { + export type AsObject = { + name: string, + url: string, + email: string, + } +} + +export class License extends jspb.Message { + getName(): string; + setName(value: string): License; + getUrl(): string; + setUrl(value: string): License; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): License.AsObject; + static toObject(includeInstance: boolean, msg: License): License.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: License, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): License; + static deserializeBinaryFromReader(message: License, reader: jspb.BinaryReader): License; +} + +export namespace License { + export type AsObject = { + name: string, + url: string, + } +} + +export class ExternalDocumentation extends jspb.Message { + getDescription(): string; + setDescription(value: string): ExternalDocumentation; + getUrl(): string; + setUrl(value: string): ExternalDocumentation; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ExternalDocumentation.AsObject; + static toObject(includeInstance: boolean, msg: ExternalDocumentation): ExternalDocumentation.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ExternalDocumentation, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ExternalDocumentation; + static deserializeBinaryFromReader(message: ExternalDocumentation, reader: jspb.BinaryReader): ExternalDocumentation; +} + +export namespace ExternalDocumentation { + export type AsObject = { + description: string, + url: string, + } +} + +export class Schema extends jspb.Message { + + hasJsonSchema(): boolean; + clearJsonSchema(): void; + getJsonSchema(): JSONSchema | undefined; + setJsonSchema(value?: JSONSchema): Schema; + getDiscriminator(): string; + setDiscriminator(value: string): Schema; + getReadOnly(): boolean; + setReadOnly(value: boolean): Schema; + + hasExternalDocs(): boolean; + clearExternalDocs(): void; + getExternalDocs(): ExternalDocumentation | undefined; + setExternalDocs(value?: ExternalDocumentation): Schema; + getExample(): string; + setExample(value: string): Schema; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Schema.AsObject; + static toObject(includeInstance: boolean, msg: Schema): Schema.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Schema, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Schema; + static deserializeBinaryFromReader(message: Schema, reader: jspb.BinaryReader): Schema; +} + +export namespace Schema { + export type AsObject = { + jsonSchema?: JSONSchema.AsObject, + discriminator: string, + readOnly: boolean, + externalDocs?: ExternalDocumentation.AsObject, + example: string, + } +} + +export class EnumSchema extends jspb.Message { + getDescription(): string; + setDescription(value: string): EnumSchema; + getDefault(): string; + setDefault(value: string): EnumSchema; + getTitle(): string; + setTitle(value: string): EnumSchema; + getRequired(): boolean; + setRequired(value: boolean): EnumSchema; + getReadOnly(): boolean; + setReadOnly(value: boolean): EnumSchema; + + hasExternalDocs(): boolean; + clearExternalDocs(): void; + getExternalDocs(): ExternalDocumentation | undefined; + setExternalDocs(value?: ExternalDocumentation): EnumSchema; + getExample(): string; + setExample(value: string): EnumSchema; + getRef(): string; + setRef(value: string): EnumSchema; + + getExtensionsMap(): jspb.Map; + clearExtensionsMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EnumSchema.AsObject; + static toObject(includeInstance: boolean, msg: EnumSchema): EnumSchema.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EnumSchema, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EnumSchema; + static deserializeBinaryFromReader(message: EnumSchema, reader: jspb.BinaryReader): EnumSchema; +} + +export namespace EnumSchema { + export type AsObject = { + description: string, + pb_default: string, + title: string, + required: boolean, + readOnly: boolean, + externalDocs?: ExternalDocumentation.AsObject, + example: string, + ref: string, + + extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, + } +} + +export class JSONSchema extends jspb.Message { + getRef(): string; + setRef(value: string): JSONSchema; + getTitle(): string; + setTitle(value: string): JSONSchema; + getDescription(): string; + setDescription(value: string): JSONSchema; + getDefault(): string; + setDefault(value: string): JSONSchema; + getReadOnly(): boolean; + setReadOnly(value: boolean): JSONSchema; + getExample(): string; + setExample(value: string): JSONSchema; + getMultipleOf(): number; + setMultipleOf(value: number): JSONSchema; + getMaximum(): number; + setMaximum(value: number): JSONSchema; + getExclusiveMaximum(): boolean; + setExclusiveMaximum(value: boolean): JSONSchema; + getMinimum(): number; + setMinimum(value: number): JSONSchema; + getExclusiveMinimum(): boolean; + setExclusiveMinimum(value: boolean): JSONSchema; + getMaxLength(): number; + setMaxLength(value: number): JSONSchema; + getMinLength(): number; + setMinLength(value: number): JSONSchema; + getPattern(): string; + setPattern(value: string): JSONSchema; + getMaxItems(): number; + setMaxItems(value: number): JSONSchema; + getMinItems(): number; + setMinItems(value: number): JSONSchema; + getUniqueItems(): boolean; + setUniqueItems(value: boolean): JSONSchema; + getMaxProperties(): number; + setMaxProperties(value: number): JSONSchema; + getMinProperties(): number; + setMinProperties(value: number): JSONSchema; + clearRequiredList(): void; + getRequiredList(): Array; + setRequiredList(value: Array): JSONSchema; + addRequired(value: string, index?: number): string; + clearArrayList(): void; + getArrayList(): Array; + setArrayList(value: Array): JSONSchema; + addArray(value: string, index?: number): string; + clearTypeList(): void; + getTypeList(): Array; + setTypeList(value: Array): JSONSchema; + addType(value: JSONSchema.JSONSchemaSimpleTypes, index?: number): JSONSchema.JSONSchemaSimpleTypes; + getFormat(): string; + setFormat(value: string): JSONSchema; + clearEnumList(): void; + getEnumList(): Array; + setEnumList(value: Array): JSONSchema; + addEnum(value: string, index?: number): string; + + hasFieldConfiguration(): boolean; + clearFieldConfiguration(): void; + getFieldConfiguration(): JSONSchema.FieldConfiguration | undefined; + setFieldConfiguration(value?: JSONSchema.FieldConfiguration): JSONSchema; + + getExtensionsMap(): jspb.Map; + clearExtensionsMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): JSONSchema.AsObject; + static toObject(includeInstance: boolean, msg: JSONSchema): JSONSchema.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: JSONSchema, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): JSONSchema; + static deserializeBinaryFromReader(message: JSONSchema, reader: jspb.BinaryReader): JSONSchema; +} + +export namespace JSONSchema { + export type AsObject = { + ref: string, + title: string, + description: string, + pb_default: string, + readOnly: boolean, + example: string, + multipleOf: number, + maximum: number, + exclusiveMaximum: boolean, + minimum: number, + exclusiveMinimum: boolean, + maxLength: number, + minLength: number, + pattern: string, + maxItems: number, + minItems: number, + uniqueItems: boolean, + maxProperties: number, + minProperties: number, + requiredList: Array, + arrayList: Array, + typeList: Array, + format: string, + pb_enumList: Array, + fieldConfiguration?: JSONSchema.FieldConfiguration.AsObject, + + extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, + } + + + export class FieldConfiguration extends jspb.Message { + getPathParamName(): string; + setPathParamName(value: string): FieldConfiguration; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FieldConfiguration.AsObject; + static toObject(includeInstance: boolean, msg: FieldConfiguration): FieldConfiguration.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FieldConfiguration, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FieldConfiguration; + static deserializeBinaryFromReader(message: FieldConfiguration, reader: jspb.BinaryReader): FieldConfiguration; + } + + export namespace FieldConfiguration { + export type AsObject = { + pathParamName: string, + } + } + + + export enum JSONSchemaSimpleTypes { + UNKNOWN = 0, + ARRAY = 1, + BOOLEAN = 2, + INTEGER = 3, + NULL = 4, + NUMBER = 5, + OBJECT = 6, + STRING = 7, + } + +} + +export class Tag extends jspb.Message { + getName(): string; + setName(value: string): Tag; + getDescription(): string; + setDescription(value: string): Tag; + + hasExternalDocs(): boolean; + clearExternalDocs(): void; + getExternalDocs(): ExternalDocumentation | undefined; + setExternalDocs(value?: ExternalDocumentation): Tag; + + getExtensionsMap(): jspb.Map; + clearExtensionsMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Tag.AsObject; + static toObject(includeInstance: boolean, msg: Tag): Tag.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Tag, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Tag; + static deserializeBinaryFromReader(message: Tag, reader: jspb.BinaryReader): Tag; +} + +export namespace Tag { + export type AsObject = { + name: string, + description: string, + externalDocs?: ExternalDocumentation.AsObject, + + extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, + } +} + +export class SecurityDefinitions extends jspb.Message { + + getSecurityMap(): jspb.Map; + clearSecurityMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SecurityDefinitions.AsObject; + static toObject(includeInstance: boolean, msg: SecurityDefinitions): SecurityDefinitions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SecurityDefinitions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SecurityDefinitions; + static deserializeBinaryFromReader(message: SecurityDefinitions, reader: jspb.BinaryReader): SecurityDefinitions; +} + +export namespace SecurityDefinitions { + export type AsObject = { + + securityMap: Array<[string, SecurityScheme.AsObject]>, + } +} + +export class SecurityScheme extends jspb.Message { + getType(): SecurityScheme.Type; + setType(value: SecurityScheme.Type): SecurityScheme; + getDescription(): string; + setDescription(value: string): SecurityScheme; + getName(): string; + setName(value: string): SecurityScheme; + getIn(): SecurityScheme.In; + setIn(value: SecurityScheme.In): SecurityScheme; + getFlow(): SecurityScheme.Flow; + setFlow(value: SecurityScheme.Flow): SecurityScheme; + getAuthorizationUrl(): string; + setAuthorizationUrl(value: string): SecurityScheme; + getTokenUrl(): string; + setTokenUrl(value: string): SecurityScheme; + + hasScopes(): boolean; + clearScopes(): void; + getScopes(): Scopes | undefined; + setScopes(value?: Scopes): SecurityScheme; + + getExtensionsMap(): jspb.Map; + clearExtensionsMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SecurityScheme.AsObject; + static toObject(includeInstance: boolean, msg: SecurityScheme): SecurityScheme.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SecurityScheme, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SecurityScheme; + static deserializeBinaryFromReader(message: SecurityScheme, reader: jspb.BinaryReader): SecurityScheme; +} + +export namespace SecurityScheme { + export type AsObject = { + type: SecurityScheme.Type, + description: string, + name: string, + pb_in: SecurityScheme.In, + flow: SecurityScheme.Flow, + authorizationUrl: string, + tokenUrl: string, + scopes?: Scopes.AsObject, + + extensionsMap: Array<[string, google_protobuf_struct_pb.Value.AsObject]>, + } + + export enum Type { + TYPE_INVALID = 0, + TYPE_BASIC = 1, + TYPE_API_KEY = 2, + TYPE_OAUTH2 = 3, + } + + export enum In { + IN_INVALID = 0, + IN_QUERY = 1, + IN_HEADER = 2, + } + + export enum Flow { + FLOW_INVALID = 0, + FLOW_IMPLICIT = 1, + FLOW_PASSWORD = 2, + FLOW_APPLICATION = 3, + FLOW_ACCESS_CODE = 4, + } + +} + +export class SecurityRequirement extends jspb.Message { + + getSecurityRequirementMap(): jspb.Map; + clearSecurityRequirementMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SecurityRequirement.AsObject; + static toObject(includeInstance: boolean, msg: SecurityRequirement): SecurityRequirement.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SecurityRequirement, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SecurityRequirement; + static deserializeBinaryFromReader(message: SecurityRequirement, reader: jspb.BinaryReader): SecurityRequirement; +} + +export namespace SecurityRequirement { + export type AsObject = { + + securityRequirementMap: Array<[string, SecurityRequirement.SecurityRequirementValue.AsObject]>, + } + + + export class SecurityRequirementValue extends jspb.Message { + clearScopeList(): void; + getScopeList(): Array; + setScopeList(value: Array): SecurityRequirementValue; + addScope(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SecurityRequirementValue.AsObject; + static toObject(includeInstance: boolean, msg: SecurityRequirementValue): SecurityRequirementValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SecurityRequirementValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SecurityRequirementValue; + static deserializeBinaryFromReader(message: SecurityRequirementValue, reader: jspb.BinaryReader): SecurityRequirementValue; + } + + export namespace SecurityRequirementValue { + export type AsObject = { + scopeList: Array, + } + } + +} + +export class Scopes extends jspb.Message { + + getScopeMap(): jspb.Map; + clearScopeMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Scopes.AsObject; + static toObject(includeInstance: boolean, msg: Scopes): Scopes.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Scopes, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Scopes; + static deserializeBinaryFromReader(message: Scopes, reader: jspb.BinaryReader): Scopes; +} + +export namespace Scopes { + export type AsObject = { + + scopeMap: Array<[string, string]>, + } +} + +export enum Scheme { + UNKNOWN = 0, + HTTP = 1, + HTTPS = 2, + WS = 3, + WSS = 4, +} diff --git a/proto/protoc-gen-openapiv2/options/openapiv2_pb.js b/proto/protoc-gen-openapiv2/options/openapiv2_pb.js new file mode 100644 index 000000000..27ee33209 --- /dev/null +++ b/proto/protoc-gen-openapiv2/options/openapiv2_pb.js @@ -0,0 +1,6673 @@ +// source: protoc-gen-openapiv2/options/openapiv2.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); +goog.object.extend(proto, google_protobuf_struct_pb); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Contact', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Header', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Info', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.License', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Operation', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Response', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Schema', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Scheme', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger', null, global); +goog.exportSymbol('proto.grpc.gateway.protoc_gen_openapiv2.options.Tag', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.repeatedFields_, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.repeatedFields_, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Operation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Operation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.repeatedFields_, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Header, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Header.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Header'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Response, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Response.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Response'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Info, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Info.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Info'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Contact, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Contact'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.License, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.License.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.License'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Schema, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Schema'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.repeatedFields_, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Tag, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Tag'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.repeatedFields_, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.displayName = 'proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.repeatedFields_ = [5,6,7,12,13]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.toObject = function(includeInstance, msg) { + var f, obj = { +swagger: jspb.Message.getFieldWithDefault(msg, 1, ""), +info: (f = msg.getInfo()) && proto.grpc.gateway.protoc_gen_openapiv2.options.Info.toObject(includeInstance, f), +host: jspb.Message.getFieldWithDefault(msg, 3, ""), +basePath: jspb.Message.getFieldWithDefault(msg, 4, ""), +schemesList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, +consumesList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, +producesList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, +responsesMap: (f = msg.getResponsesMap()) ? f.toObject(includeInstance, proto.grpc.gateway.protoc_gen_openapiv2.options.Response.toObject) : [], +securityDefinitions: (f = msg.getSecurityDefinitions()) && proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.toObject(includeInstance, f), +securityList: jspb.Message.toObjectList(msg.getSecurityList(), + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.toObject, includeInstance), +tagsList: jspb.Message.toObjectList(msg.getTagsList(), + proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.toObject, includeInstance), +externalDocs: (f = msg.getExternalDocs()) && proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.toObject(includeInstance, f), +extensionsMap: (f = msg.getExtensionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSwagger(value); + break; + case 2: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.Info; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.Info.deserializeBinaryFromReader); + msg.setInfo(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setHost(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setBasePath(value); + break; + case 5: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addSchemes(values[i]); + } + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.addConsumes(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.addProduces(value); + break; + case 10: + var value = msg.getResponsesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.Response.deserializeBinaryFromReader, "", new proto.grpc.gateway.protoc_gen_openapiv2.options.Response()); + }); + break; + case 11: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.deserializeBinaryFromReader); + msg.setSecurityDefinitions(value); + break; + case 12: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.deserializeBinaryFromReader); + msg.addSecurity(value); + break; + case 13: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.Tag; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.deserializeBinaryFromReader); + msg.addTags(value); + break; + case 14: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.deserializeBinaryFromReader); + msg.setExternalDocs(value); + break; + case 15: + var value = msg.getExtensionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSwagger(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.Info.serializeBinaryToWriter + ); + } + f = message.getHost(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getBasePath(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getSchemesList(); + if (f.length > 0) { + writer.writePackedEnum( + 5, + f + ); + } + f = message.getConsumesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 6, + f + ); + } + f = message.getProducesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 7, + f + ); + } + f = message.getResponsesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(10, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.Response.serializeBinaryToWriter); + } + f = message.getSecurityDefinitions(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.serializeBinaryToWriter + ); + } + f = message.getSecurityList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 12, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.serializeBinaryToWriter + ); + } + f = message.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 13, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.serializeBinaryToWriter + ); + } + f = message.getExternalDocs(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.serializeBinaryToWriter + ); + } + f = message.getExtensionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(15, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } +}; + + +/** + * optional string swagger = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getSwagger = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setSwagger = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Info info = 2; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.Info} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getInfo = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.Info} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.Info, 2)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.Info|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearInfo = function() { + return this.setInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.hasInfo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string host = 3; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getHost = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setHost = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string base_path = 4; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getBasePath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setBasePath = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated Scheme schemes = 5; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getSchemesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setSchemesList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Scheme} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.addSchemes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearSchemesList = function() { + return this.setSchemesList([]); +}; + + +/** + * repeated string consumes = 6; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getConsumesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setConsumesList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.addConsumes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearConsumesList = function() { + return this.setConsumesList([]); +}; + + +/** + * repeated string produces = 7; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getProducesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setProducesList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.addProduces = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearProducesList = function() { + return this.setProducesList([]); +}; + + +/** + * map responses = 10; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getResponsesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 10, opt_noLazyCreate, + proto.grpc.gateway.protoc_gen_openapiv2.options.Response)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearResponsesMap = function() { + this.getResponsesMap().clear(); + return this; +}; + + +/** + * optional SecurityDefinitions security_definitions = 11; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getSecurityDefinitions = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions, 11)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setSecurityDefinitions = function(value) { + return jspb.Message.setWrapperField(this, 11, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearSecurityDefinitions = function() { + return this.setSecurityDefinitions(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.hasSecurityDefinitions = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * repeated SecurityRequirement security = 12; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getSecurityList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, 12)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setSecurityList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement=} opt_value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.addSecurity = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearSecurityList = function() { + return this.setSecurityList([]); +}; + + +/** + * repeated Tag tags = 13; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getTagsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.Tag, 13)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setTagsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 13, value); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag=} opt_value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.addTags = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.grpc.gateway.protoc_gen_openapiv2.options.Tag, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearTagsList = function() { + return this.setTagsList([]); +}; + + +/** + * optional ExternalDocumentation external_docs = 14; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getExternalDocs = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, 14)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setExternalDocs = function(value) { + return jspb.Message.setWrapperField(this, 14, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearExternalDocs = function() { + return this.setExternalDocs(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.hasExternalDocs = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * map extensions = 15; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getExtensionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 15, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearExtensionsMap = function() { + this.getExtensionsMap().clear(); + return this; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.repeatedFields_ = [1,6,7,10,12]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.toObject = function(includeInstance, msg) { + var f, obj = { +tagsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, +summary: jspb.Message.getFieldWithDefault(msg, 2, ""), +description: jspb.Message.getFieldWithDefault(msg, 3, ""), +externalDocs: (f = msg.getExternalDocs()) && proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.toObject(includeInstance, f), +operationId: jspb.Message.getFieldWithDefault(msg, 5, ""), +consumesList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, +producesList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f, +responsesMap: (f = msg.getResponsesMap()) ? f.toObject(includeInstance, proto.grpc.gateway.protoc_gen_openapiv2.options.Response.toObject) : [], +schemesList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, +deprecated: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), +securityList: jspb.Message.toObjectList(msg.getSecurityList(), + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.toObject, includeInstance), +extensionsMap: (f = msg.getExtensionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [], +parameters: (f = msg.getParameters()) && proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Operation; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addTags(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSummary(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 4: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.deserializeBinaryFromReader); + msg.setExternalDocs(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setOperationId(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.addConsumes(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.addProduces(value); + break; + case 9: + var value = msg.getResponsesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.Response.deserializeBinaryFromReader, "", new proto.grpc.gateway.protoc_gen_openapiv2.options.Response()); + }); + break; + case 10: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addSchemes(values[i]); + } + break; + case 11: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDeprecated(value); + break; + case 12: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.deserializeBinaryFromReader); + msg.addSecurity(value); + break; + case 13: + var value = msg.getExtensionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + case 14: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.deserializeBinaryFromReader); + msg.setParameters(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } + f = message.getSummary(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getExternalDocs(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.serializeBinaryToWriter + ); + } + f = message.getOperationId(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getConsumesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 6, + f + ); + } + f = message.getProducesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 7, + f + ); + } + f = message.getResponsesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.Response.serializeBinaryToWriter); + } + f = message.getSchemesList(); + if (f.length > 0) { + writer.writePackedEnum( + 10, + f + ); + } + f = message.getDeprecated(); + if (f) { + writer.writeBool( + 11, + f + ); + } + f = message.getSecurityList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 12, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.serializeBinaryToWriter + ); + } + f = message.getExtensionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(13, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } + f = message.getParameters(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated string tags = 1; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getTagsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setTagsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.addTags = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearTagsList = function() { + return this.setTagsList([]); +}; + + +/** + * optional string summary = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getSummary = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setSummary = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional ExternalDocumentation external_docs = 4; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getExternalDocs = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, 4)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setExternalDocs = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearExternalDocs = function() { + return this.setExternalDocs(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.hasExternalDocs = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string operation_id = 5; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getOperationId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setOperationId = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * repeated string consumes = 6; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getConsumesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setConsumesList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.addConsumes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearConsumesList = function() { + return this.setConsumesList([]); +}; + + +/** + * repeated string produces = 7; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getProducesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setProducesList = function(value) { + return jspb.Message.setField(this, 7, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.addProduces = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 7, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearProducesList = function() { + return this.setProducesList([]); +}; + + +/** + * map responses = 9; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getResponsesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 9, opt_noLazyCreate, + proto.grpc.gateway.protoc_gen_openapiv2.options.Response)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearResponsesMap = function() { + this.getResponsesMap().clear(); + return this; +}; + + +/** + * repeated Scheme schemes = 10; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getSchemesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setSchemesList = function(value) { + return jspb.Message.setField(this, 10, value || []); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Scheme} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.addSchemes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 10, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearSchemesList = function() { + return this.setSchemesList([]); +}; + + +/** + * optional bool deprecated = 11; + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getDeprecated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setDeprecated = function(value) { + return jspb.Message.setProto3BooleanField(this, 11, value); +}; + + +/** + * repeated SecurityRequirement security = 12; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getSecurityList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, 12)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setSecurityList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement=} opt_value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.addSecurity = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearSecurityList = function() { + return this.setSecurityList([]); +}; + + +/** + * map extensions = 13; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getExtensionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 13, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearExtensionsMap = function() { + this.getExtensionsMap().clear(); + return this; +}; + + +/** + * optional Parameters parameters = 14; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.getParameters = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters, 14)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.setParameters = function(value) { + return jspb.Message.setWrapperField(this, 14, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Operation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.clearParameters = function() { + return this.setParameters(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Operation.prototype.hasParameters = function() { + return jspb.Message.getField(this, 14) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.toObject = function(includeInstance, msg) { + var f, obj = { +headersList: jspb.Message.toObjectList(msg.getHeadersList(), + proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.deserializeBinaryFromReader); + msg.addHeaders(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeadersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated HeaderParameter headers = 1; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.prototype.getHeadersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.prototype.setHeadersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter=} opt_value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.prototype.addHeaders = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Parameters.prototype.clearHeadersList = function() { + return this.setHeadersList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.toObject = function(includeInstance, msg) { + var f, obj = { +name: jspb.Message.getFieldWithDefault(msg, 1, ""), +description: jspb.Message.getFieldWithDefault(msg, 2, ""), +type: jspb.Message.getFieldWithDefault(msg, 3, 0), +format: jspb.Message.getFieldWithDefault(msg, 4, ""), +required: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter; + return proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type} */ (reader.readEnum()); + msg.setType(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setFormat(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRequired(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getFormat(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRequired(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type = { + UNKNOWN: 0, + STRING: 1, + NUMBER: 2, + INTEGER: 3, + BOOLEAN: 4 +}; + +/** + * optional string name = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional Type type = 3; + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.getType = function() { + return /** @type {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional string format = 4; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.getFormat = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.setFormat = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional bool required = 5; + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.getRequired = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.prototype.setRequired = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Header.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.toObject = function(includeInstance, msg) { + var f, obj = { +description: jspb.Message.getFieldWithDefault(msg, 1, ""), +type: jspb.Message.getFieldWithDefault(msg, 2, ""), +format: jspb.Message.getFieldWithDefault(msg, 3, ""), +pb_default: jspb.Message.getFieldWithDefault(msg, 6, ""), +pattern: jspb.Message.getFieldWithDefault(msg, 13, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Header; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Header.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setFormat(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setDefault(value); + break; + case 13: + var value = /** @type {string} */ (reader.readString()); + msg.setPattern(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Header.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFormat(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDefault(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getPattern(); + if (f.length > 0) { + writer.writeString( + 13, + f + ); + } +}; + + +/** + * optional string description = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string type = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string format = 3; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.getFormat = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.setFormat = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string default = 6; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.getDefault = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.setDefault = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string pattern = 13; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.getPattern = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Header} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Header.prototype.setPattern = function(value) { + return jspb.Message.setProto3StringField(this, 13, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Response.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.toObject = function(includeInstance, msg) { + var f, obj = { +description: jspb.Message.getFieldWithDefault(msg, 1, ""), +schema: (f = msg.getSchema()) && proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.toObject(includeInstance, f), +headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, proto.grpc.gateway.protoc_gen_openapiv2.options.Header.toObject) : [], +examplesMap: (f = msg.getExamplesMap()) ? f.toObject(includeInstance, undefined) : [], +extensionsMap: (f = msg.getExtensionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Response; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Response.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 2: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.Schema; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.deserializeBinaryFromReader); + msg.setSchema(value); + break; + case 3: + var value = msg.getHeadersMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.Header.deserializeBinaryFromReader, "", new proto.grpc.gateway.protoc_gen_openapiv2.options.Header()); + }); + break; + case 4: + var value = msg.getExamplesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 5: + var value = msg.getExtensionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Response.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSchema(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.serializeBinaryToWriter + ); + } + f = message.getHeadersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.Header.serializeBinaryToWriter); + } + f = message.getExamplesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getExtensionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } +}; + + +/** + * optional string description = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Schema schema = 2; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.getSchema = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.Schema, 2)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.Schema|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.setSchema = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.clearSchema = function() { + return this.setSchema(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.hasSchema = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * map headers = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.getHeadersMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + proto.grpc.gateway.protoc_gen_openapiv2.options.Header)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.clearHeadersMap = function() { + this.getHeadersMap().clear(); + return this; +}; + + +/** + * map examples = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.getExamplesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.clearExamplesMap = function() { + this.getExamplesMap().clear(); + return this; +}; + + +/** + * map extensions = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.getExtensionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Response} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Response.prototype.clearExtensionsMap = function() { + this.getExtensionsMap().clear(); + return this; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Info.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.toObject = function(includeInstance, msg) { + var f, obj = { +title: jspb.Message.getFieldWithDefault(msg, 1, ""), +description: jspb.Message.getFieldWithDefault(msg, 2, ""), +termsOfService: jspb.Message.getFieldWithDefault(msg, 3, ""), +contact: (f = msg.getContact()) && proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.toObject(includeInstance, f), +license: (f = msg.getLicense()) && proto.grpc.gateway.protoc_gen_openapiv2.options.License.toObject(includeInstance, f), +version: jspb.Message.getFieldWithDefault(msg, 6, ""), +extensionsMap: (f = msg.getExtensionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Info; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Info.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTitle(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTermsOfService(value); + break; + case 4: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.Contact; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.deserializeBinaryFromReader); + msg.setContact(value); + break; + case 5: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.License; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.License.deserializeBinaryFromReader); + msg.setLicense(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 7: + var value = msg.getExtensionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Info.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTermsOfService(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getContact(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.serializeBinaryToWriter + ); + } + f = message.getLicense(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.License.serializeBinaryToWriter + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getExtensionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(7, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string terms_of_service = 3; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.getTermsOfService = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.setTermsOfService = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional Contact contact = 4; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.getContact = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.Contact, 4)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.Contact|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.setContact = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.clearContact = function() { + return this.setContact(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.hasContact = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional License license = 5; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.License} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.getLicense = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.License} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.License, 5)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.License|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.setLicense = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.clearLicense = function() { + return this.setLicense(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.hasLicense = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string version = 6; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * map extensions = 7; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.getExtensionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 7, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Info} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Info.prototype.clearExtensionsMap = function() { + this.getExtensionsMap().clear(); + return this; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.toObject = function(includeInstance, msg) { + var f, obj = { +name: jspb.Message.getFieldWithDefault(msg, 1, ""), +url: jspb.Message.getFieldWithDefault(msg, 2, ""), +email: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Contact; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setEmail(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getEmail(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string url = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string email = 3; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.prototype.getEmail = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Contact} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Contact.prototype.setEmail = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.License.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.License} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.toObject = function(includeInstance, msg) { + var f, obj = { +name: jspb.Message.getFieldWithDefault(msg, 1, ""), +url: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.License} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.License; + return proto.grpc.gateway.protoc_gen_openapiv2.options.License.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.License} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.License} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.License.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.License} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.License} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string url = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.License} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.License.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.toObject = function(includeInstance, msg) { + var f, obj = { +description: jspb.Message.getFieldWithDefault(msg, 1, ""), +url: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation; + return proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string description = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string url = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.toObject = function(includeInstance, msg) { + var f, obj = { +jsonSchema: (f = msg.getJsonSchema()) && proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.toObject(includeInstance, f), +discriminator: jspb.Message.getFieldWithDefault(msg, 2, ""), +readOnly: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), +externalDocs: (f = msg.getExternalDocs()) && proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.toObject(includeInstance, f), +example: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Schema; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.deserializeBinaryFromReader); + msg.setJsonSchema(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDiscriminator(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReadOnly(value); + break; + case 5: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.deserializeBinaryFromReader); + msg.setExternalDocs(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setExample(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getJsonSchema(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.serializeBinaryToWriter + ); + } + f = message.getDiscriminator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getReadOnly(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getExternalDocs(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.serializeBinaryToWriter + ); + } + f = message.getExample(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional JSONSchema json_schema = 1; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.getJsonSchema = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema, 1)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.setJsonSchema = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.clearJsonSchema = function() { + return this.setJsonSchema(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.hasJsonSchema = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string discriminator = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.getDiscriminator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.setDiscriminator = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool read_only = 3; + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.getReadOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.setReadOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional ExternalDocumentation external_docs = 5; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.getExternalDocs = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, 5)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.setExternalDocs = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.clearExternalDocs = function() { + return this.setExternalDocs(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.hasExternalDocs = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string example = 6; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.getExample = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Schema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Schema.prototype.setExample = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.toObject = function(includeInstance, msg) { + var f, obj = { +description: jspb.Message.getFieldWithDefault(msg, 1, ""), +pb_default: jspb.Message.getFieldWithDefault(msg, 2, ""), +title: jspb.Message.getFieldWithDefault(msg, 3, ""), +required: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), +readOnly: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), +externalDocs: (f = msg.getExternalDocs()) && proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.toObject(includeInstance, f), +example: jspb.Message.getFieldWithDefault(msg, 7, ""), +ref: jspb.Message.getFieldWithDefault(msg, 8, ""), +extensionsMap: (f = msg.getExtensionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema; + return proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDefault(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTitle(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRequired(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReadOnly(value); + break; + case 6: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.deserializeBinaryFromReader); + msg.setExternalDocs(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setExample(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setRef(value); + break; + case 9: + var value = msg.getExtensionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDefault(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getRequired(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getReadOnly(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getExternalDocs(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.serializeBinaryToWriter + ); + } + f = message.getExample(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getRef(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getExtensionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } +}; + + +/** + * optional string description = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string default = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.getDefault = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.setDefault = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string title = 3; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bool required = 4; + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.getRequired = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.setRequired = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional bool read_only = 5; + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.getReadOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.setReadOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional ExternalDocumentation external_docs = 6; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.getExternalDocs = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, 6)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.setExternalDocs = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.clearExternalDocs = function() { + return this.setExternalDocs(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.hasExternalDocs = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional string example = 7; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.getExample = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.setExample = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string ref = 8; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.getRef = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.setRef = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * map extensions = 9; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.getExtensionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 9, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.EnumSchema.prototype.clearExtensionsMap = function() { + this.getExtensionsMap().clear(); + return this; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.repeatedFields_ = [26,34,35,46]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.toObject = function(includeInstance, msg) { + var f, obj = { +ref: jspb.Message.getFieldWithDefault(msg, 3, ""), +title: jspb.Message.getFieldWithDefault(msg, 5, ""), +description: jspb.Message.getFieldWithDefault(msg, 6, ""), +pb_default: jspb.Message.getFieldWithDefault(msg, 7, ""), +readOnly: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), +example: jspb.Message.getFieldWithDefault(msg, 9, ""), +multipleOf: jspb.Message.getFloatingPointFieldWithDefault(msg, 10, 0.0), +maximum: jspb.Message.getFloatingPointFieldWithDefault(msg, 11, 0.0), +exclusiveMaximum: jspb.Message.getBooleanFieldWithDefault(msg, 12, false), +minimum: jspb.Message.getFloatingPointFieldWithDefault(msg, 13, 0.0), +exclusiveMinimum: jspb.Message.getBooleanFieldWithDefault(msg, 14, false), +maxLength: jspb.Message.getFieldWithDefault(msg, 15, 0), +minLength: jspb.Message.getFieldWithDefault(msg, 16, 0), +pattern: jspb.Message.getFieldWithDefault(msg, 17, ""), +maxItems: jspb.Message.getFieldWithDefault(msg, 20, 0), +minItems: jspb.Message.getFieldWithDefault(msg, 21, 0), +uniqueItems: jspb.Message.getBooleanFieldWithDefault(msg, 22, false), +maxProperties: jspb.Message.getFieldWithDefault(msg, 24, 0), +minProperties: jspb.Message.getFieldWithDefault(msg, 25, 0), +requiredList: (f = jspb.Message.getRepeatedField(msg, 26)) == null ? undefined : f, +arrayList: (f = jspb.Message.getRepeatedField(msg, 34)) == null ? undefined : f, +typeList: (f = jspb.Message.getRepeatedField(msg, 35)) == null ? undefined : f, +format: jspb.Message.getFieldWithDefault(msg, 36, ""), +enumList: (f = jspb.Message.getRepeatedField(msg, 46)) == null ? undefined : f, +fieldConfiguration: (f = msg.getFieldConfiguration()) && proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.toObject(includeInstance, f), +extensionsMap: (f = msg.getExtensionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema; + return proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRef(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setTitle(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setDefault(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReadOnly(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setExample(value); + break; + case 10: + var value = /** @type {number} */ (reader.readDouble()); + msg.setMultipleOf(value); + break; + case 11: + var value = /** @type {number} */ (reader.readDouble()); + msg.setMaximum(value); + break; + case 12: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setExclusiveMaximum(value); + break; + case 13: + var value = /** @type {number} */ (reader.readDouble()); + msg.setMinimum(value); + break; + case 14: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setExclusiveMinimum(value); + break; + case 15: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxLength(value); + break; + case 16: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinLength(value); + break; + case 17: + var value = /** @type {string} */ (reader.readString()); + msg.setPattern(value); + break; + case 20: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxItems(value); + break; + case 21: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinItems(value); + break; + case 22: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUniqueItems(value); + break; + case 24: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxProperties(value); + break; + case 25: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMinProperties(value); + break; + case 26: + var value = /** @type {string} */ (reader.readString()); + msg.addRequired(value); + break; + case 34: + var value = /** @type {string} */ (reader.readString()); + msg.addArray(value); + break; + case 35: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addType(values[i]); + } + break; + case 36: + var value = /** @type {string} */ (reader.readString()); + msg.setFormat(value); + break; + case 46: + var value = /** @type {string} */ (reader.readString()); + msg.addEnum(value); + break; + case 1001: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.deserializeBinaryFromReader); + msg.setFieldConfiguration(value); + break; + case 48: + var value = msg.getExtensionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRef(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getDefault(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getReadOnly(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getExample(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getMultipleOf(); + if (f !== 0.0) { + writer.writeDouble( + 10, + f + ); + } + f = message.getMaximum(); + if (f !== 0.0) { + writer.writeDouble( + 11, + f + ); + } + f = message.getExclusiveMaximum(); + if (f) { + writer.writeBool( + 12, + f + ); + } + f = message.getMinimum(); + if (f !== 0.0) { + writer.writeDouble( + 13, + f + ); + } + f = message.getExclusiveMinimum(); + if (f) { + writer.writeBool( + 14, + f + ); + } + f = message.getMaxLength(); + if (f !== 0) { + writer.writeUint64( + 15, + f + ); + } + f = message.getMinLength(); + if (f !== 0) { + writer.writeUint64( + 16, + f + ); + } + f = message.getPattern(); + if (f.length > 0) { + writer.writeString( + 17, + f + ); + } + f = message.getMaxItems(); + if (f !== 0) { + writer.writeUint64( + 20, + f + ); + } + f = message.getMinItems(); + if (f !== 0) { + writer.writeUint64( + 21, + f + ); + } + f = message.getUniqueItems(); + if (f) { + writer.writeBool( + 22, + f + ); + } + f = message.getMaxProperties(); + if (f !== 0) { + writer.writeUint64( + 24, + f + ); + } + f = message.getMinProperties(); + if (f !== 0) { + writer.writeUint64( + 25, + f + ); + } + f = message.getRequiredList(); + if (f.length > 0) { + writer.writeRepeatedString( + 26, + f + ); + } + f = message.getArrayList(); + if (f.length > 0) { + writer.writeRepeatedString( + 34, + f + ); + } + f = message.getTypeList(); + if (f.length > 0) { + writer.writePackedEnum( + 35, + f + ); + } + f = message.getFormat(); + if (f.length > 0) { + writer.writeString( + 36, + f + ); + } + f = message.getEnumList(); + if (f.length > 0) { + writer.writeRepeatedString( + 46, + f + ); + } + f = message.getFieldConfiguration(); + if (f != null) { + writer.writeMessage( + 1001, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.serializeBinaryToWriter + ); + } + f = message.getExtensionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(48, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } +}; + + +/** + * @enum {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes = { + UNKNOWN: 0, + ARRAY: 1, + BOOLEAN: 2, + INTEGER: 3, + NULL: 4, + NUMBER: 5, + OBJECT: 6, + STRING: 7 +}; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.toObject = function(includeInstance, msg) { + var f, obj = { +pathParamName: jspb.Message.getFieldWithDefault(msg, 47, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration; + return proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 47: + var value = /** @type {string} */ (reader.readString()); + msg.setPathParamName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPathParamName(); + if (f.length > 0) { + writer.writeString( + 47, + f + ); + } +}; + + +/** + * optional string path_param_name = 47; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.prototype.getPathParamName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 47, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration.prototype.setPathParamName = function(value) { + return jspb.Message.setProto3StringField(this, 47, value); +}; + + +/** + * optional string ref = 3; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getRef = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setRef = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string title = 5; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string description = 6; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string default = 7; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getDefault = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setDefault = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional bool read_only = 8; + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getReadOnly = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setReadOnly = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); +}; + + +/** + * optional string example = 9; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getExample = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setExample = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional double multiple_of = 10; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMultipleOf = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 10, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMultipleOf = function(value) { + return jspb.Message.setProto3FloatField(this, 10, value); +}; + + +/** + * optional double maximum = 11; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMaximum = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 11, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMaximum = function(value) { + return jspb.Message.setProto3FloatField(this, 11, value); +}; + + +/** + * optional bool exclusive_maximum = 12; + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getExclusiveMaximum = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 12, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setExclusiveMaximum = function(value) { + return jspb.Message.setProto3BooleanField(this, 12, value); +}; + + +/** + * optional double minimum = 13; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMinimum = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 13, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMinimum = function(value) { + return jspb.Message.setProto3FloatField(this, 13, value); +}; + + +/** + * optional bool exclusive_minimum = 14; + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getExclusiveMinimum = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setExclusiveMinimum = function(value) { + return jspb.Message.setProto3BooleanField(this, 14, value); +}; + + +/** + * optional uint64 max_length = 15; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMaxLength = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMaxLength = function(value) { + return jspb.Message.setProto3IntField(this, 15, value); +}; + + +/** + * optional uint64 min_length = 16; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMinLength = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMinLength = function(value) { + return jspb.Message.setProto3IntField(this, 16, value); +}; + + +/** + * optional string pattern = 17; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getPattern = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setPattern = function(value) { + return jspb.Message.setProto3StringField(this, 17, value); +}; + + +/** + * optional uint64 max_items = 20; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMaxItems = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMaxItems = function(value) { + return jspb.Message.setProto3IntField(this, 20, value); +}; + + +/** + * optional uint64 min_items = 21; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMinItems = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 21, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMinItems = function(value) { + return jspb.Message.setProto3IntField(this, 21, value); +}; + + +/** + * optional bool unique_items = 22; + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getUniqueItems = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 22, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setUniqueItems = function(value) { + return jspb.Message.setProto3BooleanField(this, 22, value); +}; + + +/** + * optional uint64 max_properties = 24; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMaxProperties = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 24, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMaxProperties = function(value) { + return jspb.Message.setProto3IntField(this, 24, value); +}; + + +/** + * optional uint64 min_properties = 25; + * @return {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getMinProperties = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 25, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setMinProperties = function(value) { + return jspb.Message.setProto3IntField(this, 25, value); +}; + + +/** + * repeated string required = 26; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getRequiredList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 26)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setRequiredList = function(value) { + return jspb.Message.setField(this, 26, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.addRequired = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 26, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.clearRequiredList = function() { + return this.setRequiredList([]); +}; + + +/** + * repeated string array = 34; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getArrayList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 34)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setArrayList = function(value) { + return jspb.Message.setField(this, 34, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.addArray = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 34, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.clearArrayList = function() { + return this.setArrayList([]); +}; + + +/** + * repeated JSONSchemaSimpleTypes type = 35; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getTypeList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 35)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setTypeList = function(value) { + return jspb.Message.setField(this, 35, value || []); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.addType = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 35, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.clearTypeList = function() { + return this.setTypeList([]); +}; + + +/** + * optional string format = 36; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getFormat = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 36, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setFormat = function(value) { + return jspb.Message.setProto3StringField(this, 36, value); +}; + + +/** + * repeated string enum = 46; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getEnumList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 46)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setEnumList = function(value) { + return jspb.Message.setField(this, 46, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.addEnum = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 46, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.clearEnumList = function() { + return this.setEnumList([]); +}; + + +/** + * optional FieldConfiguration field_configuration = 1001; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getFieldConfiguration = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration, 1001)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.FieldConfiguration|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.setFieldConfiguration = function(value) { + return jspb.Message.setWrapperField(this, 1001, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.clearFieldConfiguration = function() { + return this.setFieldConfiguration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.hasFieldConfiguration = function() { + return jspb.Message.getField(this, 1001) != null; +}; + + +/** + * map extensions = 48; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.getExtensionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 48, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.prototype.clearExtensionsMap = function() { + this.getExtensionsMap().clear(); + return this; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.toObject = function(includeInstance, msg) { + var f, obj = { +name: jspb.Message.getFieldWithDefault(msg, 1, ""), +description: jspb.Message.getFieldWithDefault(msg, 2, ""), +externalDocs: (f = msg.getExternalDocs()) && proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.toObject(includeInstance, f), +extensionsMap: (f = msg.getExtensionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Tag; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.deserializeBinaryFromReader); + msg.setExternalDocs(value); + break; + case 4: + var value = msg.getExtensionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getExternalDocs(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.serializeBinaryToWriter + ); + } + f = message.getExtensionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional ExternalDocumentation external_docs = 3; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.getExternalDocs = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation, 3)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.setExternalDocs = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.clearExternalDocs = function() { + return this.setExternalDocs(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.hasExternalDocs = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * map extensions = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.getExtensionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.clearExtensionsMap = function() { + this.getExtensionsMap().clear(); + return this; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.toObject = function(includeInstance, msg) { + var f, obj = { +securityMap: (f = msg.getSecurityMap()) ? f.toObject(includeInstance, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions; + return proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getSecurityMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.deserializeBinaryFromReader, "", new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSecurityMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.serializeBinaryToWriter); + } +}; + + +/** + * map security = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.prototype.getSecurityMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.prototype.clearSecurityMap = function() { + this.getSecurityMap().clear(); + return this; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.toObject = function(includeInstance, msg) { + var f, obj = { +type: jspb.Message.getFieldWithDefault(msg, 1, 0), +description: jspb.Message.getFieldWithDefault(msg, 2, ""), +name: jspb.Message.getFieldWithDefault(msg, 3, ""), +pb_in: jspb.Message.getFieldWithDefault(msg, 4, 0), +flow: jspb.Message.getFieldWithDefault(msg, 5, 0), +authorizationUrl: jspb.Message.getFieldWithDefault(msg, 6, ""), +tokenUrl: jspb.Message.getFieldWithDefault(msg, 7, ""), +scopes: (f = msg.getScopes()) && proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.toObject(includeInstance, f), +extensionsMap: (f = msg.getExtensionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme; + return proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 4: + var value = /** @type {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In} */ (reader.readEnum()); + msg.setIn(value); + break; + case 5: + var value = /** @type {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow} */ (reader.readEnum()); + msg.setFlow(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthorizationUrl(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setTokenUrl(value); + break; + case 8: + var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes; + reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.deserializeBinaryFromReader); + msg.setScopes(value); + break; + case 9: + var value = msg.getExtensionsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getIn(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getFlow(); + if (f !== 0.0) { + writer.writeEnum( + 5, + f + ); + } + f = message.getAuthorizationUrl(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getTokenUrl(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getScopes(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.serializeBinaryToWriter + ); + } + f = message.getExtensionsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(9, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); + } +}; + + +/** + * @enum {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type = { + TYPE_INVALID: 0, + TYPE_BASIC: 1, + TYPE_API_KEY: 2, + TYPE_OAUTH2: 3 +}; + +/** + * @enum {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In = { + IN_INVALID: 0, + IN_QUERY: 1, + IN_HEADER: 2 +}; + +/** + * @enum {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow = { + FLOW_INVALID: 0, + FLOW_IMPLICIT: 1, + FLOW_PASSWORD: 2, + FLOW_APPLICATION: 3, + FLOW_ACCESS_CODE: 4 +}; + +/** + * optional Type type = 1; + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getType = function() { + return /** @type {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Type} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string name = 3; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional In in = 4; + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getIn = function() { + return /** @type {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.In} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.setIn = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional Flow flow = 5; + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getFlow = function() { + return /** @type {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.Flow} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.setFlow = function(value) { + return jspb.Message.setProto3EnumField(this, 5, value); +}; + + +/** + * optional string authorization_url = 6; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getAuthorizationUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.setAuthorizationUrl = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string token_url = 7; + * @return {string} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getTokenUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.setTokenUrl = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional Scopes scopes = 8; + * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getScopes = function() { + return /** @type{?proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes} */ ( + jspb.Message.getWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes, 8)); +}; + + +/** + * @param {?proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes|undefined} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this +*/ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.setScopes = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.clearScopes = function() { + return this.setScopes(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.hasScopes = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * map extensions = 9; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.getExtensionsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 9, opt_noLazyCreate, + proto.google.protobuf.Value)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityScheme.prototype.clearExtensionsMap = function() { + this.getExtensionsMap().clear(); + return this; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.toObject = function(includeInstance, msg) { + var f, obj = { +securityRequirementMap: (f = msg.getSecurityRequirementMap()) ? f.toObject(includeInstance, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement; + return proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getSecurityRequirementMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.deserializeBinaryFromReader, "", new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSecurityRequirementMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.serializeBinaryToWriter); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.toObject = function(includeInstance, msg) { + var f, obj = { +scopeList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue; + return proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addScope(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getScopeList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string scope = 1; + * @return {!Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.prototype.getScopeList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.prototype.setScopeList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.prototype.addScope = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue.prototype.clearScopeList = function() { + return this.setScopeList([]); +}; + + +/** + * map security_requirement = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.prototype.getSecurityRequirementMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.SecurityRequirementValue)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.prototype.clearSecurityRequirementMap = function() { + this.getSecurityRequirementMap().clear(); + return this; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.toObject = function(includeInstance, msg) { + var f, obj = { +scopeMap: (f = msg.getScopeMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes; + return proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getScopeMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getScopeMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } +}; + + +/** + * map scope = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.prototype.getScopeMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes} returns this + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scopes.prototype.clearScopeMap = function() { + this.getScopeMap().clear(); + return this; +}; + + +/** + * @enum {number} + */ +proto.grpc.gateway.protoc_gen_openapiv2.options.Scheme = { + UNKNOWN: 0, + HTTP: 1, + HTTPS: 2, + WS: 3, + WSS: 4 +}; + +goog.object.extend(exports, proto.grpc.gateway.protoc_gen_openapiv2.options); From 0d48e860a8dc9e7af0063ed6b9ec518cf452b7f0 Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Wed, 8 Jan 2025 10:41:23 +0100 Subject: [PATCH 41/42] update benchmark --- internal/e2e/e2e_benchmark_test.go | 78 +++++++++++++++++++----------- 1 file changed, 50 insertions(+), 28 deletions(-) diff --git a/internal/e2e/e2e_benchmark_test.go b/internal/e2e/e2e_benchmark_test.go index 1cd7d8ecc..4a820d779 100644 --- a/internal/e2e/e2e_benchmark_test.go +++ b/internal/e2e/e2e_benchmark_test.go @@ -14,8 +14,7 @@ import ( ) func BenchmarkE2E(b *testing.B) { - - dsn := dbx.GetSqlite(b, dbx.SQLiteMemory) + dsn := dbx.GetSqlite(b, dbx.SQLiteFile) ctx, reg, namespaceTestMgr, getAddr := newInitializedReg(b, dsn, map[string]interface{}{"log.level": "panic"}) closeServer := startServer(ctx, b, reg) b.Cleanup(closeServer) @@ -35,41 +34,64 @@ func BenchmarkE2E(b *testing.B) { writeURL: "http://" + writeAddr, oplSyntaxURL: "http://" + oplAddr, }, - &sdkClient{ - readRemote: readAddr, - writeRemote: writeAddr, - syntaxRemote: oplAddr, - }, } { b.Run(fmt.Sprintf("client=%T", cl), func(b *testing.B) { n := &namespace.Namespace{Name: "test"} namespaceTestMgr.add(b, n) cl.waitUntilLive(b) - b.ResetTimer() - for i := 0; i < b.N; i++ { - tuple := &ketoapi.RelationTuple{ - Namespace: n.Name, - Object: fmt.Sprintf("object %d for client %T", i, cl), - Relation: "access", - SubjectID: pointerx.Ptr("client"), - } - cl.createTuple(b, tuple) - resp := cl.queryTuple(b, &ketoapi.RelationQuery{Namespace: &tuple.Namespace}) - require.Len(b, resp.RelationTuples, 1) - assert.Equal(b, tuple, resp.RelationTuples[0]) + b.Run("create, query, check, batchCheck, delete", func(b *testing.B) { + b.ResetTimer() + for i := 0; i < b.N; i++ { + tuple := &ketoapi.RelationTuple{ + Namespace: n.Name, + Object: fmt.Sprintf("object %d for client %T", i, cl), + Relation: "access", + SubjectID: pointerx.Ptr("client"), + } + cl.createTuple(b, tuple) + + resp := cl.queryTuple(b, &ketoapi.RelationQuery{Namespace: &tuple.Namespace}) + require.Len(b, resp.RelationTuples, 1) + assert.Equal(b, tuple, resp.RelationTuples[0]) - assert.True(b, cl.check(b, tuple)) - batchResult := cl.batchCheck(b, []*ketoapi.RelationTuple{tuple}) - require.Len(b, batchResult, 1) - assert.True(b, batchResult[0].allowed) - assert.Empty(b, batchResult[0].errorMessage) + assert.True(b, cl.check(b, tuple)) + batchResult := cl.batchCheck(b, []*ketoapi.RelationTuple{tuple}) + require.Len(b, batchResult, 1) + assert.True(b, batchResult[0].allowed) + assert.Empty(b, batchResult[0].errorMessage) - cl.deleteTuple(b, tuple) - resp = cl.queryTuple(b, &ketoapi.RelationQuery{Namespace: &tuple.Namespace}) - require.Len(b, resp.RelationTuples, 0) - } + cl.deleteTuple(b, tuple) + resp = cl.queryTuple(b, &ketoapi.RelationQuery{Namespace: &tuple.Namespace}) + require.Len(b, resp.RelationTuples, 0) + } + }) + + b.Run("check subject expand", func(b *testing.B) { + cl.createTuple(b, &ketoapi.RelationTuple{ + Namespace: n.Name, + Object: "obj", + Relation: "access", + SubjectSet: &ketoapi.SubjectSet{Namespace: n.Name, Object: "group", Relation: "member"}, + }) + cl.createTuple(b, &ketoapi.RelationTuple{ + Namespace: n.Name, + Object: "group", + Relation: "member", + SubjectID: pointerx.Ptr("user"), + }) + b.ResetTimer() + for i := 0; i < b.N; i++ { + + assert.True(b, cl.check(b, &ketoapi.RelationTuple{ + Namespace: n.Name, + Object: "obj", + Relation: "access", + SubjectID: pointerx.Ptr("user"), + })) + } + }) }) } From c5151cea8c773855549634db04bb019f7aac12b0 Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Wed, 8 Jan 2025 11:33:25 +0100 Subject: [PATCH 42/42] update benchmark files --- internal/e2e/benchmarks/compare.txt | 27 ++++++++++ internal/e2e/benchmarks/master.txt | 75 ++++++++++++++++------------ internal/e2e/benchmarks/vanguard.txt | 75 ++++++++++++++++------------ 3 files changed, 115 insertions(+), 62 deletions(-) create mode 100644 internal/e2e/benchmarks/compare.txt diff --git a/internal/e2e/benchmarks/compare.txt b/internal/e2e/benchmarks/compare.txt new file mode 100644 index 000000000..13c326749 --- /dev/null +++ b/internal/e2e/benchmarks/compare.txt @@ -0,0 +1,27 @@ +goos: darwin +goarch: arm64 +pkg: github.com/ory/keto/internal/e2e +cpu: Apple M1 Max + │ master.txt │ vanguard.txt │ + │ sec/op │ sec/op vs base │ +E2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 2.056m ± 65% 2.984m ± 9% +45.15% (p=0.035 n=10) +E2E/client=*e2e.grpcClient/check_subject_expand-10 375.7µ ± 20% 505.7µ ± 10% +34.60% (p=0.000 n=10) +E2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 2.277m ± 3% 3.422m ± 20% +50.26% (p=0.000 n=10) +E2E/client=*e2e.restClient/check_subject_expand-10 778.3µ ± 13% 1210.9µ ± 7% +55.59% (p=0.000 n=10) +geomean 1.082m 1.581m +46.19% + + │ master.txt │ vanguard.txt │ + │ B/op │ B/op vs base │ +E2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 229.2Ki ± 1% 472.3Ki ± 0% +106.06% (p=0.000 n=10) +E2E/client=*e2e.grpcClient/check_subject_expand-10 58.93Ki ± 14% 98.60Ki ± 8% +67.32% (p=0.000 n=10) +E2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 415.9Ki ± 0% 642.5Ki ± 0% +54.49% (p=0.000 n=10) +E2E/client=*e2e.restClient/check_subject_expand-10 156.9Ki ± 8% 218.5Ki ± 6% +39.30% (p=0.000 n=10) +geomean 172.3Ki 284.3Ki +65.04% + + │ master.txt │ vanguard.txt │ + │ allocs/op │ allocs/op vs base │ +E2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 4.392k ± 0% 7.656k ± 0% +74.32% (p=0.000 n=10) +E2E/client=*e2e.grpcClient/check_subject_expand-10 1.052k ± 16% 1.579k ± 10% +50.10% (p=0.000 n=10) +E2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 6.374k ± 0% 9.081k ± 0% +42.47% (p=0.000 n=10) +E2E/client=*e2e.restClient/check_subject_expand-10 2.464k ± 10% 3.194k ± 8% +29.63% (p=0.000 n=10) +geomean 2.919k 4.327k +48.26% diff --git a/internal/e2e/benchmarks/master.txt b/internal/e2e/benchmarks/master.txt index 44c7dc17d..6aea13e30 100644 --- a/internal/e2e/benchmarks/master.txt +++ b/internal/e2e/benchmarks/master.txt @@ -4,35 +4,48 @@ pkg: github.com/ory/keto/internal/e2e cpu: Apple M1 Max BenchmarkE2E BenchmarkE2E/client=*e2e.grpcClient -BenchmarkE2E/client=*e2e.grpcClient-10 4564 1104440 ns/op 236775 B/op 4391 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 5310 1092201 ns/op 235975 B/op 4391 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 5482 1087377 ns/op 235896 B/op 4391 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 5476 1094396 ns/op 236674 B/op 4391 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 5521 1084403 ns/op 236857 B/op 4391 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 5506 1095627 ns/op 236222 B/op 4391 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 5600 1091936 ns/op 236644 B/op 4391 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 5295 1083465 ns/op 236759 B/op 4391 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 5564 1105075 ns/op 236481 B/op 4391 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 5497 1098456 ns/op 236536 B/op 4391 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 3044 2036815 ns/op 234612 B/op 4392 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 3196 1943070 ns/op 235661 B/op 4392 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 3082 1900088 ns/op 235383 B/op 4392 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 2797 2075262 ns/op 234772 B/op 4392 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 2616 2682081 ns/op 234344 B/op 4392 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 2668 2792842 ns/op 234283 B/op 4392 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 1357 3826322 ns/op 232896 B/op 4391 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 1777 3397504 ns/op 232364 B/op 4391 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 2955 1988704 ns/op 235216 B/op 4392 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 3091 1973629 ns/op 235666 B/op 4392 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 22716 263188 ns/op 49361 B/op 832 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 21562 300689 ns/op 51676 B/op 882 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 20163 317833 ns/op 54198 B/op 931 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 19033 336917 ns/op 56482 B/op 979 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 17575 364134 ns/op 59226 B/op 1028 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 15829 387289 ns/op 61453 B/op 1076 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 15290 406263 ns/op 63686 B/op 1124 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 14593 434757 ns/op 66019 B/op 1172 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 13618 443224 ns/op 68948 B/op 1221 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 13591 446524 ns/op 71142 B/op 1269 allocs/op BenchmarkE2E/client=*e2e.restClient -BenchmarkE2E/client=*e2e.restClient-10 4258 1330755 ns/op 430027 B/op 6373 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 4344 1318404 ns/op 431899 B/op 6373 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 4521 1318580 ns/op 431214 B/op 6373 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 4512 1323070 ns/op 430685 B/op 6373 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 4540 1309875 ns/op 430866 B/op 6373 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 4365 1950813 ns/op 425921 B/op 6372 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 4498 1343969 ns/op 431727 B/op 6373 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 4554 1441481 ns/op 430379 B/op 6373 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 3850 1466625 ns/op 430242 B/op 6373 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 4338 1460786 ns/op 431157 B/op 6373 allocs/op -BenchmarkE2E/client=*e2e.sdkClient -BenchmarkE2E/client=*e2e.sdkClient-10 4872 1178648 ns/op 371673 B/op 5791 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 5332 1167297 ns/op 365657 B/op 5788 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 5552 1152516 ns/op 365785 B/op 5789 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 4893 1245479 ns/op 365327 B/op 5788 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 5403 1112319 ns/op 365618 B/op 5788 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 5179 1153303 ns/op 365799 B/op 5789 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 5348 1127748 ns/op 365601 B/op 5789 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 5160 1162725 ns/op 365590 B/op 5789 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 5289 1182892 ns/op 365424 B/op 5789 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 5000 1163976 ns/op 365654 B/op 5789 allocs/op \ No newline at end of file +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 2665 2473534 ns/op 425747 B/op 6374 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 2565 2259270 ns/op 426344 B/op 6374 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 2329 2265164 ns/op 425052 B/op 6373 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 2456 2286670 ns/op 426476 B/op 6374 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 2648 2243542 ns/op 425327 B/op 6373 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 2787 2326190 ns/op 426023 B/op 6374 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 2684 2245021 ns/op 425938 B/op 6374 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 2504 2325915 ns/op 424691 B/op 6373 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 2742 2268328 ns/op 425542 B/op 6374 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 2672 2336043 ns/op 426355 B/op 6374 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 9168 679619 ns/op 144122 B/op 2134 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 8559 671683 ns/op 147771 B/op 2208 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 8854 701163 ns/op 151576 B/op 2282 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 8439 752587 ns/op 155210 B/op 2355 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 7762 766527 ns/op 158637 B/op 2427 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 7164 789994 ns/op 162624 B/op 2501 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 7615 815807 ns/op 166210 B/op 2573 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 7392 826444 ns/op 169928 B/op 2645 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 7155 858229 ns/op 173347 B/op 2717 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 6865 884533 ns/op 176586 B/op 2789 allocs/op \ No newline at end of file diff --git a/internal/e2e/benchmarks/vanguard.txt b/internal/e2e/benchmarks/vanguard.txt index 0dc65bd96..9c368500a 100644 --- a/internal/e2e/benchmarks/vanguard.txt +++ b/internal/e2e/benchmarks/vanguard.txt @@ -4,35 +4,48 @@ pkg: github.com/ory/keto/internal/e2e cpu: Apple M1 Max BenchmarkE2E BenchmarkE2E/client=*e2e.grpcClient -BenchmarkE2E/client=*e2e.grpcClient-10 3063 1762968 ns/op 486098 B/op 7655 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 3392 1765246 ns/op 485333 B/op 7655 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 3440 1796983 ns/op 486591 B/op 7655 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 3369 1766199 ns/op 486478 B/op 7655 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 3310 1785052 ns/op 484908 B/op 7655 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 3417 1769167 ns/op 485589 B/op 7655 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 3138 1812099 ns/op 486188 B/op 7655 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 3325 1781891 ns/op 484732 B/op 7655 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 3058 1798362 ns/op 486371 B/op 7655 allocs/op -BenchmarkE2E/client=*e2e.grpcClient-10 3382 1784228 ns/op 485064 B/op 7655 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 2022 2864511 ns/op 482925 B/op 7656 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 2163 3047175 ns/op 482124 B/op 7655 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 2144 2713503 ns/op 482729 B/op 7656 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 2088 2915531 ns/op 483567 B/op 7656 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 2209 3223846 ns/op 483652 B/op 7656 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 2112 3087336 ns/op 484693 B/op 7657 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 2211 2921664 ns/op 483884 B/op 7656 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 1998 3160435 ns/op 483624 B/op 7656 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 1768 3118907 ns/op 483149 B/op 7656 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/create,_query,_check,_batchCheck,_delete-10 2253 2700217 ns/op 483647 B/op 7656 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 14596 452674 ns/op 90710 B/op 1377 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 13396 451294 ns/op 93116 B/op 1426 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 12903 460129 ns/op 95691 B/op 1476 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 12650 486503 ns/op 97952 B/op 1524 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 10000 500902 ns/op 100109 B/op 1561 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 10000 510484 ns/op 101817 B/op 1597 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 10000 514511 ns/op 103547 B/op 1633 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 10000 526722 ns/op 105300 B/op 1669 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 10000 540676 ns/op 106849 B/op 1705 allocs/op +BenchmarkE2E/client=*e2e.grpcClient/check_subject_expand-10 10000 555344 ns/op 109239 B/op 1742 allocs/op BenchmarkE2E/client=*e2e.restClient -BenchmarkE2E/client=*e2e.restClient-10 3180 2172578 ns/op 662315 B/op 9081 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 2624 2171165 ns/op 662733 B/op 9081 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 2336 2204380 ns/op 661935 B/op 9081 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 2796 2175026 ns/op 661497 B/op 9081 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 2811 2217507 ns/op 661061 B/op 9081 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 2552 2176063 ns/op 662318 B/op 9081 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 2556 2164480 ns/op 661061 B/op 9081 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 2610 2220574 ns/op 661613 B/op 9081 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 2780 2158031 ns/op 660738 B/op 9080 allocs/op -BenchmarkE2E/client=*e2e.restClient-10 2736 2514460 ns/op 660864 B/op 9081 allocs/op -BenchmarkE2E/client=*e2e.sdkClient -BenchmarkE2E/client=*e2e.sdkClient-10 3103 1935755 ns/op 575658 B/op 8178 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 3225 1887992 ns/op 566836 B/op 8173 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 3060 1875584 ns/op 567187 B/op 8173 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 3158 1920366 ns/op 566388 B/op 8173 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 3019 1883744 ns/op 566358 B/op 8173 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 3092 1895905 ns/op 567201 B/op 8173 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 3148 1934761 ns/op 566955 B/op 8173 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 2985 1887415 ns/op 566844 B/op 8173 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 3189 1904714 ns/op 566641 B/op 8173 allocs/op -BenchmarkE2E/client=*e2e.sdkClient-10 3141 1925372 ns/op 566988 B/op 8173 allocs/op \ No newline at end of file +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 1756 3474409 ns/op 658251 B/op 9081 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 1839 3162001 ns/op 658793 B/op 9081 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 1966 3096322 ns/op 657514 B/op 9081 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 2020 3104836 ns/op 657647 B/op 9081 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 1980 3173278 ns/op 658770 B/op 9081 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 1612 3644616 ns/op 655793 B/op 9080 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 1804 3370069 ns/op 658788 B/op 9082 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 1273 4091647 ns/op 656993 B/op 9081 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 1435 4382301 ns/op 658023 B/op 9081 allocs/op +BenchmarkE2E/client=*e2e.restClient/create,_query,_check,_batchCheck,_delete-10 1436 3837204 ns/op 657766 B/op 9081 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 5512 1167140 ns/op 206834 B/op 2865 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 4350 1297276 ns/op 210469 B/op 2939 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 5199 1230364 ns/op 215365 B/op 3013 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 4924 1315881 ns/op 218090 B/op 3085 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 4234 1221265 ns/op 221302 B/op 3157 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 5610 1140674 ns/op 226206 B/op 3231 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 5556 1135366 ns/op 229639 B/op 3303 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 4594 1161877 ns/op 232373 B/op 3375 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 5218 1200548 ns/op 235863 B/op 3447 allocs/op +BenchmarkE2E/client=*e2e.restClient/check_subject_expand-10 5124 1239005 ns/op 240276 B/op 3520 allocs/op \ No newline at end of file