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¶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.
+
+
+| 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_