otdf-python 0.1.10__py3-none-any.whl → 0.3.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. otdf_python/__init__.py +25 -0
  2. otdf_python/__main__.py +12 -0
  3. otdf_python/address_normalizer.py +84 -0
  4. otdf_python/aesgcm.py +55 -0
  5. otdf_python/assertion_config.py +84 -0
  6. otdf_python/asym_crypto.py +198 -0
  7. otdf_python/auth_headers.py +33 -0
  8. otdf_python/autoconfigure_utils.py +113 -0
  9. otdf_python/cli.py +569 -0
  10. otdf_python/collection_store.py +41 -0
  11. otdf_python/collection_store_impl.py +22 -0
  12. otdf_python/config.py +69 -0
  13. otdf_python/connect_client.py +0 -0
  14. otdf_python/constants.py +1 -0
  15. otdf_python/crypto_utils.py +78 -0
  16. otdf_python/dpop.py +81 -0
  17. otdf_python/ecc_constants.py +176 -0
  18. otdf_python/ecc_mode.py +83 -0
  19. otdf_python/ecdh.py +317 -0
  20. otdf_python/eckeypair.py +75 -0
  21. otdf_python/header.py +181 -0
  22. otdf_python/invalid_zip_exception.py +8 -0
  23. otdf_python/kas_client.py +709 -0
  24. otdf_python/kas_connect_rpc_client.py +213 -0
  25. otdf_python/kas_info.py +25 -0
  26. otdf_python/kas_key_cache.py +52 -0
  27. otdf_python/key_type.py +31 -0
  28. otdf_python/key_type_constants.py +43 -0
  29. otdf_python/manifest.py +215 -0
  30. otdf_python/nanotdf.py +863 -0
  31. otdf_python/nanotdf_ecdsa_struct.py +132 -0
  32. otdf_python/nanotdf_type.py +43 -0
  33. otdf_python/policy_binding_serializer.py +39 -0
  34. otdf_python/policy_info.py +55 -0
  35. otdf_python/policy_object.py +22 -0
  36. otdf_python/policy_stub.py +2 -0
  37. otdf_python/resource_locator.py +172 -0
  38. otdf_python/sdk.py +436 -0
  39. otdf_python/sdk_builder.py +416 -0
  40. otdf_python/sdk_exceptions.py +16 -0
  41. otdf_python/symmetric_and_payload_config.py +30 -0
  42. otdf_python/tdf.py +480 -0
  43. otdf_python/tdf_reader.py +153 -0
  44. otdf_python/tdf_writer.py +23 -0
  45. otdf_python/token_source.py +34 -0
  46. otdf_python/version.py +57 -0
  47. otdf_python/zip_reader.py +47 -0
  48. otdf_python/zip_writer.py +70 -0
  49. otdf_python-0.3.5.dist-info/METADATA +153 -0
  50. otdf_python-0.3.5.dist-info/RECORD +137 -0
  51. {otdf_python-0.1.10.dist-info → otdf_python-0.3.5.dist-info}/WHEEL +1 -2
  52. {otdf_python-0.1.10.dist-info → otdf_python-0.3.5.dist-info/licenses}/LICENSE +1 -1
  53. otdf_python_proto/__init__.py +37 -0
  54. otdf_python_proto/authorization/__init__.py +1 -0
  55. otdf_python_proto/authorization/authorization_pb2.py +80 -0
  56. otdf_python_proto/authorization/authorization_pb2.pyi +161 -0
  57. otdf_python_proto/authorization/authorization_pb2_connect.py +191 -0
  58. otdf_python_proto/authorization/v2/authorization_pb2.py +105 -0
  59. otdf_python_proto/authorization/v2/authorization_pb2.pyi +134 -0
  60. otdf_python_proto/authorization/v2/authorization_pb2_connect.py +233 -0
  61. otdf_python_proto/common/__init__.py +1 -0
  62. otdf_python_proto/common/common_pb2.py +52 -0
  63. otdf_python_proto/common/common_pb2.pyi +61 -0
  64. otdf_python_proto/entity/__init__.py +1 -0
  65. otdf_python_proto/entity/entity_pb2.py +47 -0
  66. otdf_python_proto/entity/entity_pb2.pyi +50 -0
  67. otdf_python_proto/entityresolution/__init__.py +1 -0
  68. otdf_python_proto/entityresolution/entity_resolution_pb2.py +57 -0
  69. otdf_python_proto/entityresolution/entity_resolution_pb2.pyi +55 -0
  70. otdf_python_proto/entityresolution/entity_resolution_pb2_connect.py +149 -0
  71. otdf_python_proto/entityresolution/v2/entity_resolution_pb2.py +55 -0
  72. otdf_python_proto/entityresolution/v2/entity_resolution_pb2.pyi +55 -0
  73. otdf_python_proto/entityresolution/v2/entity_resolution_pb2_connect.py +149 -0
  74. otdf_python_proto/kas/__init__.py +9 -0
  75. otdf_python_proto/kas/kas_pb2.py +103 -0
  76. otdf_python_proto/kas/kas_pb2.pyi +170 -0
  77. otdf_python_proto/kas/kas_pb2_connect.py +192 -0
  78. otdf_python_proto/legacy_grpc/__init__.py +1 -0
  79. otdf_python_proto/legacy_grpc/authorization/authorization_pb2_grpc.py +163 -0
  80. otdf_python_proto/legacy_grpc/authorization/v2/authorization_pb2_grpc.py +206 -0
  81. otdf_python_proto/legacy_grpc/common/common_pb2_grpc.py +4 -0
  82. otdf_python_proto/legacy_grpc/entity/entity_pb2_grpc.py +4 -0
  83. otdf_python_proto/legacy_grpc/entityresolution/entity_resolution_pb2_grpc.py +122 -0
  84. otdf_python_proto/legacy_grpc/entityresolution/v2/entity_resolution_pb2_grpc.py +120 -0
  85. otdf_python_proto/legacy_grpc/kas/kas_pb2_grpc.py +172 -0
  86. otdf_python_proto/legacy_grpc/logger/audit/test_pb2_grpc.py +4 -0
  87. otdf_python_proto/legacy_grpc/policy/actions/actions_pb2_grpc.py +249 -0
  88. otdf_python_proto/legacy_grpc/policy/attributes/attributes_pb2_grpc.py +873 -0
  89. otdf_python_proto/legacy_grpc/policy/kasregistry/key_access_server_registry_pb2_grpc.py +602 -0
  90. otdf_python_proto/legacy_grpc/policy/keymanagement/key_management_pb2_grpc.py +251 -0
  91. otdf_python_proto/legacy_grpc/policy/namespaces/namespaces_pb2_grpc.py +427 -0
  92. otdf_python_proto/legacy_grpc/policy/objects_pb2_grpc.py +4 -0
  93. otdf_python_proto/legacy_grpc/policy/registeredresources/registered_resources_pb2_grpc.py +524 -0
  94. otdf_python_proto/legacy_grpc/policy/resourcemapping/resource_mapping_pb2_grpc.py +516 -0
  95. otdf_python_proto/legacy_grpc/policy/selectors_pb2_grpc.py +4 -0
  96. otdf_python_proto/legacy_grpc/policy/subjectmapping/subject_mapping_pb2_grpc.py +551 -0
  97. otdf_python_proto/legacy_grpc/policy/unsafe/unsafe_pb2_grpc.py +485 -0
  98. otdf_python_proto/legacy_grpc/wellknownconfiguration/wellknown_configuration_pb2_grpc.py +77 -0
  99. otdf_python_proto/logger/__init__.py +1 -0
  100. otdf_python_proto/logger/audit/test_pb2.py +43 -0
  101. otdf_python_proto/logger/audit/test_pb2.pyi +45 -0
  102. otdf_python_proto/policy/__init__.py +1 -0
  103. otdf_python_proto/policy/actions/actions_pb2.py +75 -0
  104. otdf_python_proto/policy/actions/actions_pb2.pyi +87 -0
  105. otdf_python_proto/policy/actions/actions_pb2_connect.py +275 -0
  106. otdf_python_proto/policy/attributes/attributes_pb2.py +234 -0
  107. otdf_python_proto/policy/attributes/attributes_pb2.pyi +328 -0
  108. otdf_python_proto/policy/attributes/attributes_pb2_connect.py +863 -0
  109. otdf_python_proto/policy/kasregistry/key_access_server_registry_pb2.py +266 -0
  110. otdf_python_proto/policy/kasregistry/key_access_server_registry_pb2.pyi +450 -0
  111. otdf_python_proto/policy/kasregistry/key_access_server_registry_pb2_connect.py +611 -0
  112. otdf_python_proto/policy/keymanagement/key_management_pb2.py +79 -0
  113. otdf_python_proto/policy/keymanagement/key_management_pb2.pyi +87 -0
  114. otdf_python_proto/policy/keymanagement/key_management_pb2_connect.py +275 -0
  115. otdf_python_proto/policy/namespaces/namespaces_pb2.py +117 -0
  116. otdf_python_proto/policy/namespaces/namespaces_pb2.pyi +147 -0
  117. otdf_python_proto/policy/namespaces/namespaces_pb2_connect.py +443 -0
  118. otdf_python_proto/policy/objects_pb2.py +150 -0
  119. otdf_python_proto/policy/objects_pb2.pyi +464 -0
  120. otdf_python_proto/policy/registeredresources/registered_resources_pb2.py +139 -0
  121. otdf_python_proto/policy/registeredresources/registered_resources_pb2.pyi +196 -0
  122. otdf_python_proto/policy/registeredresources/registered_resources_pb2_connect.py +527 -0
  123. otdf_python_proto/policy/resourcemapping/resource_mapping_pb2.py +139 -0
  124. otdf_python_proto/policy/resourcemapping/resource_mapping_pb2.pyi +194 -0
  125. otdf_python_proto/policy/resourcemapping/resource_mapping_pb2_connect.py +527 -0
  126. otdf_python_proto/policy/selectors_pb2.py +57 -0
  127. otdf_python_proto/policy/selectors_pb2.pyi +90 -0
  128. otdf_python_proto/policy/subjectmapping/subject_mapping_pb2.py +127 -0
  129. otdf_python_proto/policy/subjectmapping/subject_mapping_pb2.pyi +189 -0
  130. otdf_python_proto/policy/subjectmapping/subject_mapping_pb2_connect.py +569 -0
  131. otdf_python_proto/policy/unsafe/unsafe_pb2.py +113 -0
  132. otdf_python_proto/policy/unsafe/unsafe_pb2.pyi +145 -0
  133. otdf_python_proto/policy/unsafe/unsafe_pb2_connect.py +485 -0
  134. otdf_python_proto/wellknownconfiguration/__init__.py +1 -0
  135. otdf_python_proto/wellknownconfiguration/wellknown_configuration_pb2.py +51 -0
  136. otdf_python_proto/wellknownconfiguration/wellknown_configuration_pb2.pyi +32 -0
  137. otdf_python_proto/wellknownconfiguration/wellknown_configuration_pb2_connect.py +107 -0
  138. otdf_python/_gotdf_python.cpython-312-darwin.so +0 -0
  139. otdf_python/build.py +0 -190
  140. otdf_python/go.py +0 -1478
  141. otdf_python/gotdf_python.py +0 -383
  142. otdf_python-0.1.10.dist-info/METADATA +0 -149
  143. otdf_python-0.1.10.dist-info/RECORD +0 -10
  144. otdf_python-0.1.10.dist-info/top_level.txt +0 -1
@@ -0,0 +1,233 @@
1
+ # Generated Connect client code
2
+
3
+ from __future__ import annotations
4
+ from collections.abc import AsyncIterator
5
+ from collections.abc import Iterator
6
+ from collections.abc import Iterable
7
+ import aiohttp
8
+ import urllib3
9
+ import typing
10
+ import sys
11
+
12
+ from connectrpc.client_async import AsyncConnectClient
13
+ from connectrpc.client_sync import ConnectClient
14
+ from connectrpc.client_protocol import ConnectProtocol
15
+ from connectrpc.client_connect import ConnectProtocolError
16
+ from connectrpc.headers import HeaderInput
17
+ from connectrpc.server import ClientRequest
18
+ from connectrpc.server import ClientStream
19
+ from connectrpc.server import ServerResponse
20
+ from connectrpc.server import ServerStream
21
+ from connectrpc.server_sync import ConnectWSGI
22
+ from connectrpc.streams import StreamInput
23
+ from connectrpc.streams import AsyncStreamOutput
24
+ from connectrpc.streams import StreamOutput
25
+ from connectrpc.unary import UnaryOutput
26
+ from connectrpc.unary import ClientStreamingOutput
27
+
28
+ if typing.TYPE_CHECKING:
29
+ # wsgiref.types was added in Python 3.11.
30
+ if sys.version_info >= (3, 11):
31
+ from wsgiref.types import WSGIApplication
32
+ else:
33
+ from _typeshed.wsgi import WSGIApplication
34
+
35
+ import authorization.v2.authorization_pb2
36
+
37
+ class AuthorizationServiceClient:
38
+ def __init__(
39
+ self,
40
+ base_url: str,
41
+ http_client: urllib3.PoolManager | None = None,
42
+ protocol: ConnectProtocol = ConnectProtocol.CONNECT_PROTOBUF,
43
+ ):
44
+ self.base_url = base_url
45
+ self._connect_client = ConnectClient(http_client, protocol)
46
+ def call_get_decision(
47
+ self, req: authorization.v2.authorization_pb2.GetDecisionRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
48
+ ) -> UnaryOutput[authorization.v2.authorization_pb2.GetDecisionResponse]:
49
+ """Low-level method to call GetDecision, granting access to errors and metadata"""
50
+ url = self.base_url + "/authorization.v2.AuthorizationService/GetDecision"
51
+ return self._connect_client.call_unary(url, req, authorization.v2.authorization_pb2.GetDecisionResponse,extra_headers, timeout_seconds)
52
+
53
+
54
+ def get_decision(
55
+ self, req: authorization.v2.authorization_pb2.GetDecisionRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
56
+ ) -> authorization.v2.authorization_pb2.GetDecisionResponse:
57
+ response = self.call_get_decision(req, extra_headers, timeout_seconds)
58
+ err = response.error()
59
+ if err is not None:
60
+ raise err
61
+ msg = response.message()
62
+ if msg is None:
63
+ raise ConnectProtocolError('missing response message')
64
+ return msg
65
+
66
+ def call_get_decision_multi_resource(
67
+ self, req: authorization.v2.authorization_pb2.GetDecisionMultiResourceRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
68
+ ) -> UnaryOutput[authorization.v2.authorization_pb2.GetDecisionMultiResourceResponse]:
69
+ """Low-level method to call GetDecisionMultiResource, granting access to errors and metadata"""
70
+ url = self.base_url + "/authorization.v2.AuthorizationService/GetDecisionMultiResource"
71
+ return self._connect_client.call_unary(url, req, authorization.v2.authorization_pb2.GetDecisionMultiResourceResponse,extra_headers, timeout_seconds)
72
+
73
+
74
+ def get_decision_multi_resource(
75
+ self, req: authorization.v2.authorization_pb2.GetDecisionMultiResourceRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
76
+ ) -> authorization.v2.authorization_pb2.GetDecisionMultiResourceResponse:
77
+ response = self.call_get_decision_multi_resource(req, extra_headers, timeout_seconds)
78
+ err = response.error()
79
+ if err is not None:
80
+ raise err
81
+ msg = response.message()
82
+ if msg is None:
83
+ raise ConnectProtocolError('missing response message')
84
+ return msg
85
+
86
+ def call_get_decision_bulk(
87
+ self, req: authorization.v2.authorization_pb2.GetDecisionBulkRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
88
+ ) -> UnaryOutput[authorization.v2.authorization_pb2.GetDecisionBulkResponse]:
89
+ """Low-level method to call GetDecisionBulk, granting access to errors and metadata"""
90
+ url = self.base_url + "/authorization.v2.AuthorizationService/GetDecisionBulk"
91
+ return self._connect_client.call_unary(url, req, authorization.v2.authorization_pb2.GetDecisionBulkResponse,extra_headers, timeout_seconds)
92
+
93
+
94
+ def get_decision_bulk(
95
+ self, req: authorization.v2.authorization_pb2.GetDecisionBulkRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
96
+ ) -> authorization.v2.authorization_pb2.GetDecisionBulkResponse:
97
+ response = self.call_get_decision_bulk(req, extra_headers, timeout_seconds)
98
+ err = response.error()
99
+ if err is not None:
100
+ raise err
101
+ msg = response.message()
102
+ if msg is None:
103
+ raise ConnectProtocolError('missing response message')
104
+ return msg
105
+
106
+ def call_get_entitlements(
107
+ self, req: authorization.v2.authorization_pb2.GetEntitlementsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
108
+ ) -> UnaryOutput[authorization.v2.authorization_pb2.GetEntitlementsResponse]:
109
+ """Low-level method to call GetEntitlements, granting access to errors and metadata"""
110
+ url = self.base_url + "/authorization.v2.AuthorizationService/GetEntitlements"
111
+ return self._connect_client.call_unary(url, req, authorization.v2.authorization_pb2.GetEntitlementsResponse,extra_headers, timeout_seconds)
112
+
113
+
114
+ def get_entitlements(
115
+ self, req: authorization.v2.authorization_pb2.GetEntitlementsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
116
+ ) -> authorization.v2.authorization_pb2.GetEntitlementsResponse:
117
+ response = self.call_get_entitlements(req, extra_headers, timeout_seconds)
118
+ err = response.error()
119
+ if err is not None:
120
+ raise err
121
+ msg = response.message()
122
+ if msg is None:
123
+ raise ConnectProtocolError('missing response message')
124
+ return msg
125
+
126
+
127
+ class AsyncAuthorizationServiceClient:
128
+ def __init__(
129
+ self,
130
+ base_url: str,
131
+ http_client: aiohttp.ClientSession,
132
+ protocol: ConnectProtocol = ConnectProtocol.CONNECT_PROTOBUF,
133
+ ):
134
+ self.base_url = base_url
135
+ self._connect_client = AsyncConnectClient(http_client, protocol)
136
+
137
+ async def call_get_decision(
138
+ self, req: authorization.v2.authorization_pb2.GetDecisionRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
139
+ ) -> UnaryOutput[authorization.v2.authorization_pb2.GetDecisionResponse]:
140
+ """Low-level method to call GetDecision, granting access to errors and metadata"""
141
+ url = self.base_url + "/authorization.v2.AuthorizationService/GetDecision"
142
+ return await self._connect_client.call_unary(url, req, authorization.v2.authorization_pb2.GetDecisionResponse,extra_headers, timeout_seconds)
143
+
144
+ async def get_decision(
145
+ self, req: authorization.v2.authorization_pb2.GetDecisionRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
146
+ ) -> authorization.v2.authorization_pb2.GetDecisionResponse:
147
+ response = await self.call_get_decision(req, extra_headers, timeout_seconds)
148
+ err = response.error()
149
+ if err is not None:
150
+ raise err
151
+ msg = response.message()
152
+ if msg is None:
153
+ raise ConnectProtocolError('missing response message')
154
+ return msg
155
+
156
+ async def call_get_decision_multi_resource(
157
+ self, req: authorization.v2.authorization_pb2.GetDecisionMultiResourceRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
158
+ ) -> UnaryOutput[authorization.v2.authorization_pb2.GetDecisionMultiResourceResponse]:
159
+ """Low-level method to call GetDecisionMultiResource, granting access to errors and metadata"""
160
+ url = self.base_url + "/authorization.v2.AuthorizationService/GetDecisionMultiResource"
161
+ return await self._connect_client.call_unary(url, req, authorization.v2.authorization_pb2.GetDecisionMultiResourceResponse,extra_headers, timeout_seconds)
162
+
163
+ async def get_decision_multi_resource(
164
+ self, req: authorization.v2.authorization_pb2.GetDecisionMultiResourceRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
165
+ ) -> authorization.v2.authorization_pb2.GetDecisionMultiResourceResponse:
166
+ response = await self.call_get_decision_multi_resource(req, extra_headers, timeout_seconds)
167
+ err = response.error()
168
+ if err is not None:
169
+ raise err
170
+ msg = response.message()
171
+ if msg is None:
172
+ raise ConnectProtocolError('missing response message')
173
+ return msg
174
+
175
+ async def call_get_decision_bulk(
176
+ self, req: authorization.v2.authorization_pb2.GetDecisionBulkRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
177
+ ) -> UnaryOutput[authorization.v2.authorization_pb2.GetDecisionBulkResponse]:
178
+ """Low-level method to call GetDecisionBulk, granting access to errors and metadata"""
179
+ url = self.base_url + "/authorization.v2.AuthorizationService/GetDecisionBulk"
180
+ return await self._connect_client.call_unary(url, req, authorization.v2.authorization_pb2.GetDecisionBulkResponse,extra_headers, timeout_seconds)
181
+
182
+ async def get_decision_bulk(
183
+ self, req: authorization.v2.authorization_pb2.GetDecisionBulkRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
184
+ ) -> authorization.v2.authorization_pb2.GetDecisionBulkResponse:
185
+ response = await self.call_get_decision_bulk(req, extra_headers, timeout_seconds)
186
+ err = response.error()
187
+ if err is not None:
188
+ raise err
189
+ msg = response.message()
190
+ if msg is None:
191
+ raise ConnectProtocolError('missing response message')
192
+ return msg
193
+
194
+ async def call_get_entitlements(
195
+ self, req: authorization.v2.authorization_pb2.GetEntitlementsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
196
+ ) -> UnaryOutput[authorization.v2.authorization_pb2.GetEntitlementsResponse]:
197
+ """Low-level method to call GetEntitlements, granting access to errors and metadata"""
198
+ url = self.base_url + "/authorization.v2.AuthorizationService/GetEntitlements"
199
+ return await self._connect_client.call_unary(url, req, authorization.v2.authorization_pb2.GetEntitlementsResponse,extra_headers, timeout_seconds)
200
+
201
+ async def get_entitlements(
202
+ self, req: authorization.v2.authorization_pb2.GetEntitlementsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
203
+ ) -> authorization.v2.authorization_pb2.GetEntitlementsResponse:
204
+ response = await self.call_get_entitlements(req, extra_headers, timeout_seconds)
205
+ err = response.error()
206
+ if err is not None:
207
+ raise err
208
+ msg = response.message()
209
+ if msg is None:
210
+ raise ConnectProtocolError('missing response message')
211
+ return msg
212
+
213
+
214
+ @typing.runtime_checkable
215
+ class AuthorizationServiceProtocol(typing.Protocol):
216
+ def get_decision(self, req: ClientRequest[authorization.v2.authorization_pb2.GetDecisionRequest]) -> ServerResponse[authorization.v2.authorization_pb2.GetDecisionResponse]:
217
+ ...
218
+ def get_decision_multi_resource(self, req: ClientRequest[authorization.v2.authorization_pb2.GetDecisionMultiResourceRequest]) -> ServerResponse[authorization.v2.authorization_pb2.GetDecisionMultiResourceResponse]:
219
+ ...
220
+ def get_decision_bulk(self, req: ClientRequest[authorization.v2.authorization_pb2.GetDecisionBulkRequest]) -> ServerResponse[authorization.v2.authorization_pb2.GetDecisionBulkResponse]:
221
+ ...
222
+ def get_entitlements(self, req: ClientRequest[authorization.v2.authorization_pb2.GetEntitlementsRequest]) -> ServerResponse[authorization.v2.authorization_pb2.GetEntitlementsResponse]:
223
+ ...
224
+
225
+ AUTHORIZATION_SERVICE_PATH_PREFIX = "/authorization.v2.AuthorizationService"
226
+
227
+ def wsgi_authorization_service(implementation: AuthorizationServiceProtocol) -> WSGIApplication:
228
+ app = ConnectWSGI()
229
+ app.register_unary_rpc("/authorization.v2.AuthorizationService/GetDecision", implementation.get_decision, authorization.v2.authorization_pb2.GetDecisionRequest)
230
+ app.register_unary_rpc("/authorization.v2.AuthorizationService/GetDecisionMultiResource", implementation.get_decision_multi_resource, authorization.v2.authorization_pb2.GetDecisionMultiResourceRequest)
231
+ app.register_unary_rpc("/authorization.v2.AuthorizationService/GetDecisionBulk", implementation.get_decision_bulk, authorization.v2.authorization_pb2.GetDecisionBulkRequest)
232
+ app.register_unary_rpc("/authorization.v2.AuthorizationService/GetEntitlements", implementation.get_entitlements, authorization.v2.authorization_pb2.GetEntitlementsRequest)
233
+ return app
@@ -0,0 +1 @@
1
+ """common protobuf definitions."""
@@ -0,0 +1,52 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: common/common.proto
5
+ # Protobuf Python Version: 6.31.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 1,
17
+ '',
18
+ 'common/common.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
26
+
27
+
28
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x63ommon/common.proto\x12\x06\x63ommon\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf1\x01\n\x08Metadata\x12\x39\n\ncreated_at\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nupdated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tupdatedAt\x12\x34\n\x06labels\x18\x03 \x03(\x0b\x32\x1c.common.Metadata.LabelsEntryR\x06labels\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\x89\x01\n\x0fMetadataMutable\x12;\n\x06labels\x18\x03 \x03(\x0b\x32#.common.MetadataMutable.LabelsEntryR\x06labels\x1a\x39\n\x0bLabelsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01*}\n\x12MetadataUpdateEnum\x12$\n METADATA_UPDATE_ENUM_UNSPECIFIED\x10\x00\x12\x1f\n\x1bMETADATA_UPDATE_ENUM_EXTEND\x10\x01\x12 \n\x1cMETADATA_UPDATE_ENUM_REPLACE\x10\x02*\x8d\x01\n\x0f\x41\x63tiveStateEnum\x12!\n\x1d\x41\x43TIVE_STATE_ENUM_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x41\x43TIVE_STATE_ENUM_ACTIVE\x10\x01\x12\x1e\n\x1a\x41\x43TIVE_STATE_ENUM_INACTIVE\x10\x02\x12\x19\n\x15\x41\x43TIVE_STATE_ENUM_ANY\x10\x03\x42Q\n\ncom.commonB\x0b\x43ommonProtoP\x01\xa2\x02\x03\x43XX\xaa\x02\x06\x43ommon\xca\x02\x06\x43ommon\xe2\x02\x12\x43ommon\\GPBMetadata\xea\x02\x06\x43ommonb\x06proto3')
29
+
30
+ _globals = globals()
31
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
32
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'common.common_pb2', _globals)
33
+ if not _descriptor._USE_C_DESCRIPTORS:
34
+ _globals['DESCRIPTOR']._loaded_options = None
35
+ _globals['DESCRIPTOR']._serialized_options = b'\n\ncom.commonB\013CommonProtoP\001\242\002\003CXX\252\002\006Common\312\002\006Common\342\002\022Common\\GPBMetadata\352\002\006Common'
36
+ _globals['_METADATA_LABELSENTRY']._loaded_options = None
37
+ _globals['_METADATA_LABELSENTRY']._serialized_options = b'8\001'
38
+ _globals['_METADATAMUTABLE_LABELSENTRY']._loaded_options = None
39
+ _globals['_METADATAMUTABLE_LABELSENTRY']._serialized_options = b'8\001'
40
+ _globals['_METADATAUPDATEENUM']._serialized_start=448
41
+ _globals['_METADATAUPDATEENUM']._serialized_end=573
42
+ _globals['_ACTIVESTATEENUM']._serialized_start=576
43
+ _globals['_ACTIVESTATEENUM']._serialized_end=717
44
+ _globals['_METADATA']._serialized_start=65
45
+ _globals['_METADATA']._serialized_end=306
46
+ _globals['_METADATA_LABELSENTRY']._serialized_start=249
47
+ _globals['_METADATA_LABELSENTRY']._serialized_end=306
48
+ _globals['_METADATAMUTABLE']._serialized_start=309
49
+ _globals['_METADATAMUTABLE']._serialized_end=446
50
+ _globals['_METADATAMUTABLE_LABELSENTRY']._serialized_start=249
51
+ _globals['_METADATAMUTABLE_LABELSENTRY']._serialized_end=306
52
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,61 @@
1
+ import datetime
2
+
3
+ from google.protobuf import timestamp_pb2 as _timestamp_pb2
4
+ from google.protobuf.internal import containers as _containers
5
+ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import message as _message
8
+ from collections.abc import Mapping as _Mapping
9
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
10
+
11
+ DESCRIPTOR: _descriptor.FileDescriptor
12
+
13
+ class MetadataUpdateEnum(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
14
+ __slots__ = ()
15
+ METADATA_UPDATE_ENUM_UNSPECIFIED: _ClassVar[MetadataUpdateEnum]
16
+ METADATA_UPDATE_ENUM_EXTEND: _ClassVar[MetadataUpdateEnum]
17
+ METADATA_UPDATE_ENUM_REPLACE: _ClassVar[MetadataUpdateEnum]
18
+
19
+ class ActiveStateEnum(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
20
+ __slots__ = ()
21
+ ACTIVE_STATE_ENUM_UNSPECIFIED: _ClassVar[ActiveStateEnum]
22
+ ACTIVE_STATE_ENUM_ACTIVE: _ClassVar[ActiveStateEnum]
23
+ ACTIVE_STATE_ENUM_INACTIVE: _ClassVar[ActiveStateEnum]
24
+ ACTIVE_STATE_ENUM_ANY: _ClassVar[ActiveStateEnum]
25
+ METADATA_UPDATE_ENUM_UNSPECIFIED: MetadataUpdateEnum
26
+ METADATA_UPDATE_ENUM_EXTEND: MetadataUpdateEnum
27
+ METADATA_UPDATE_ENUM_REPLACE: MetadataUpdateEnum
28
+ ACTIVE_STATE_ENUM_UNSPECIFIED: ActiveStateEnum
29
+ ACTIVE_STATE_ENUM_ACTIVE: ActiveStateEnum
30
+ ACTIVE_STATE_ENUM_INACTIVE: ActiveStateEnum
31
+ ACTIVE_STATE_ENUM_ANY: ActiveStateEnum
32
+
33
+ class Metadata(_message.Message):
34
+ __slots__ = ("created_at", "updated_at", "labels")
35
+ class LabelsEntry(_message.Message):
36
+ __slots__ = ("key", "value")
37
+ KEY_FIELD_NUMBER: _ClassVar[int]
38
+ VALUE_FIELD_NUMBER: _ClassVar[int]
39
+ key: str
40
+ value: str
41
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
42
+ CREATED_AT_FIELD_NUMBER: _ClassVar[int]
43
+ UPDATED_AT_FIELD_NUMBER: _ClassVar[int]
44
+ LABELS_FIELD_NUMBER: _ClassVar[int]
45
+ created_at: _timestamp_pb2.Timestamp
46
+ updated_at: _timestamp_pb2.Timestamp
47
+ labels: _containers.ScalarMap[str, str]
48
+ def __init__(self, created_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., updated_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., labels: _Optional[_Mapping[str, str]] = ...) -> None: ...
49
+
50
+ class MetadataMutable(_message.Message):
51
+ __slots__ = ("labels",)
52
+ class LabelsEntry(_message.Message):
53
+ __slots__ = ("key", "value")
54
+ KEY_FIELD_NUMBER: _ClassVar[int]
55
+ VALUE_FIELD_NUMBER: _ClassVar[int]
56
+ key: str
57
+ value: str
58
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
59
+ LABELS_FIELD_NUMBER: _ClassVar[int]
60
+ labels: _containers.ScalarMap[str, str]
61
+ def __init__(self, labels: _Optional[_Mapping[str, str]] = ...) -> None: ...
@@ -0,0 +1 @@
1
+ """entity protobuf definitions."""
@@ -0,0 +1,47 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: entity/entity.proto
5
+ # Protobuf Python Version: 6.31.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 1,
17
+ '',
18
+ 'entity/entity.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
26
+ from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2
27
+
28
+
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x65ntity/entity.proto\x12\x06\x65ntity\x1a\x1b\x62uf/validate/validate.proto\x1a\x19google/protobuf/any.proto\"D\n\x05Token\x12!\n\x0c\x65phemeral_id\x18\x01 \x01(\tR\x0b\x65phemeralId\x12\x18\n\x03jwt\x18\x02 \x01(\tB\x06\xbaH\x03\xc8\x01\x01R\x03jwt\"\xda\x02\n\x06\x45ntity\x12!\n\x0c\x65phemeral_id\x18\x01 \x01(\tR\x0b\x65phemeralId\x12%\n\remail_address\x18\x02 \x01(\tH\x00R\x0c\x65mailAddress\x12\x1d\n\tuser_name\x18\x03 \x01(\tH\x00R\x08userName\x12.\n\x06\x63laims\x18\x04 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00R\x06\x63laims\x12\x1d\n\tclient_id\x18\x05 \x01(\tH\x00R\x08\x63lientId\x12\x33\n\x08\x63\x61tegory\x18\x0b \x01(\x0e\x32\x17.entity.Entity.CategoryR\x08\x63\x61tegory\"T\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43\x41TEGORY_SUBJECT\x10\x01\x12\x18\n\x14\x43\x41TEGORY_ENVIRONMENT\x10\x02\x42\r\n\x0b\x65ntity_type\"\\\n\x0b\x45ntityChain\x12!\n\x0c\x65phemeral_id\x18\x01 \x01(\tR\x0b\x65phemeralId\x12*\n\x08\x65ntities\x18\x02 \x03(\x0b\x32\x0e.entity.EntityR\x08\x65ntitiesBQ\n\ncom.entityB\x0b\x45ntityProtoP\x01\xa2\x02\x03\x45XX\xaa\x02\x06\x45ntity\xca\x02\x06\x45ntity\xe2\x02\x12\x45ntity\\GPBMetadata\xea\x02\x06\x45ntityb\x06proto3')
30
+
31
+ _globals = globals()
32
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
33
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'entity.entity_pb2', _globals)
34
+ if not _descriptor._USE_C_DESCRIPTORS:
35
+ _globals['DESCRIPTOR']._loaded_options = None
36
+ _globals['DESCRIPTOR']._serialized_options = b'\n\ncom.entityB\013EntityProtoP\001\242\002\003EXX\252\002\006Entity\312\002\006Entity\342\002\022Entity\\GPBMetadata\352\002\006Entity'
37
+ _globals['_TOKEN'].fields_by_name['jwt']._loaded_options = None
38
+ _globals['_TOKEN'].fields_by_name['jwt']._serialized_options = b'\272H\003\310\001\001'
39
+ _globals['_TOKEN']._serialized_start=87
40
+ _globals['_TOKEN']._serialized_end=155
41
+ _globals['_ENTITY']._serialized_start=158
42
+ _globals['_ENTITY']._serialized_end=504
43
+ _globals['_ENTITY_CATEGORY']._serialized_start=405
44
+ _globals['_ENTITY_CATEGORY']._serialized_end=489
45
+ _globals['_ENTITYCHAIN']._serialized_start=506
46
+ _globals['_ENTITYCHAIN']._serialized_end=598
47
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,50 @@
1
+ from buf.validate import validate_pb2 as _validate_pb2
2
+ from google.protobuf import any_pb2 as _any_pb2
3
+ from google.protobuf.internal import containers as _containers
4
+ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
5
+ from google.protobuf import descriptor as _descriptor
6
+ from google.protobuf import message as _message
7
+ from collections.abc import Iterable as _Iterable, Mapping as _Mapping
8
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
9
+
10
+ DESCRIPTOR: _descriptor.FileDescriptor
11
+
12
+ class Token(_message.Message):
13
+ __slots__ = ("ephemeral_id", "jwt")
14
+ EPHEMERAL_ID_FIELD_NUMBER: _ClassVar[int]
15
+ JWT_FIELD_NUMBER: _ClassVar[int]
16
+ ephemeral_id: str
17
+ jwt: str
18
+ def __init__(self, ephemeral_id: _Optional[str] = ..., jwt: _Optional[str] = ...) -> None: ...
19
+
20
+ class Entity(_message.Message):
21
+ __slots__ = ("ephemeral_id", "email_address", "user_name", "claims", "client_id", "category")
22
+ class Category(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
23
+ __slots__ = ()
24
+ CATEGORY_UNSPECIFIED: _ClassVar[Entity.Category]
25
+ CATEGORY_SUBJECT: _ClassVar[Entity.Category]
26
+ CATEGORY_ENVIRONMENT: _ClassVar[Entity.Category]
27
+ CATEGORY_UNSPECIFIED: Entity.Category
28
+ CATEGORY_SUBJECT: Entity.Category
29
+ CATEGORY_ENVIRONMENT: Entity.Category
30
+ EPHEMERAL_ID_FIELD_NUMBER: _ClassVar[int]
31
+ EMAIL_ADDRESS_FIELD_NUMBER: _ClassVar[int]
32
+ USER_NAME_FIELD_NUMBER: _ClassVar[int]
33
+ CLAIMS_FIELD_NUMBER: _ClassVar[int]
34
+ CLIENT_ID_FIELD_NUMBER: _ClassVar[int]
35
+ CATEGORY_FIELD_NUMBER: _ClassVar[int]
36
+ ephemeral_id: str
37
+ email_address: str
38
+ user_name: str
39
+ claims: _any_pb2.Any
40
+ client_id: str
41
+ category: Entity.Category
42
+ def __init__(self, ephemeral_id: _Optional[str] = ..., email_address: _Optional[str] = ..., user_name: _Optional[str] = ..., claims: _Optional[_Union[_any_pb2.Any, _Mapping]] = ..., client_id: _Optional[str] = ..., category: _Optional[_Union[Entity.Category, str]] = ...) -> None: ...
43
+
44
+ class EntityChain(_message.Message):
45
+ __slots__ = ("ephemeral_id", "entities")
46
+ EPHEMERAL_ID_FIELD_NUMBER: _ClassVar[int]
47
+ ENTITIES_FIELD_NUMBER: _ClassVar[int]
48
+ ephemeral_id: str
49
+ entities: _containers.RepeatedCompositeFieldContainer[Entity]
50
+ def __init__(self, ephemeral_id: _Optional[str] = ..., entities: _Optional[_Iterable[_Union[Entity, _Mapping]]] = ...) -> None: ...
@@ -0,0 +1 @@
1
+ """entityresolution protobuf definitions."""
@@ -0,0 +1,57 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: entityresolution/entity_resolution.proto
5
+ # Protobuf Python Version: 6.31.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 1,
17
+ '',
18
+ 'entityresolution/entity_resolution.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from authorization import authorization_pb2 as authorization_dot_authorization__pb2
26
+ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
27
+ from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2
28
+ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
29
+
30
+
31
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(entityresolution/entity_resolution.proto\x12\x10\x65ntityresolution\x1a!authorization/authorization.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x19google/protobuf/any.proto\x1a\x1cgoogle/api/annotations.proto\"K\n\x16ResolveEntitiesRequest\x12\x31\n\x08\x65ntities\x18\x01 \x03(\x0b\x32\x15.authorization.EntityR\x08\x65ntities\"{\n\x14\x45ntityRepresentation\x12\x42\n\x10\x61\x64\x64itional_props\x18\x01 \x03(\x0b\x32\x17.google.protobuf.StructR\x0f\x61\x64\x64itionalProps\x12\x1f\n\x0boriginal_id\x18\x02 \x01(\tR\noriginalId\"x\n\x17ResolveEntitiesResponse\x12]\n\x16\x65ntity_representations\x18\x01 \x03(\x0b\x32&.entityresolution.EntityRepresentationR\x15\x65ntityRepresentations\"\x8b\x01\n\x13\x45ntityNotFoundError\x12\x12\n\x04\x63ode\x18\x01 \x01(\x05R\x04\x63ode\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\x12.\n\x07\x64\x65tails\x18\x03 \x03(\x0b\x32\x14.google.protobuf.AnyR\x07\x64\x65tails\x12\x16\n\x06\x65ntity\x18\x04 \x01(\tR\x06\x65ntity\"O\n\x1f\x43reateEntityChainFromJwtRequest\x12,\n\x06tokens\x18\x01 \x03(\x0b\x32\x14.authorization.TokenR\x06tokens\"c\n CreateEntityChainFromJwtResponse\x12?\n\rentity_chains\x18\x01 \x03(\x0b\x32\x1a.authorization.EntityChainR\x0c\x65ntityChains2\xd6\x02\n\x17\x45ntityResolutionService\x12\x8c\x01\n\x0fResolveEntities\x12(.entityresolution.ResolveEntitiesRequest\x1a).entityresolution.ResolveEntitiesResponse\"$\x82\xd3\xe4\x93\x02\x1e\"\x19/entityresolution/resolve:\x01*\x12\xab\x01\n\x18\x43reateEntityChainFromJwt\x12\x31.entityresolution.CreateEntityChainFromJwtRequest\x1a\x32.entityresolution.CreateEntityChainFromJwtResponse\"(\x82\xd3\xe4\x93\x02\"\"\x1d/entityresolution/entitychain:\x01*B\x8d\x01\n\x14\x63om.entityresolutionB\x15\x45ntityResolutionProtoP\x01\xa2\x02\x03\x45XX\xaa\x02\x10\x45ntityresolution\xca\x02\x10\x45ntityresolution\xe2\x02\x1c\x45ntityresolution\\GPBMetadata\xea\x02\x10\x45ntityresolutionb\x06proto3')
32
+
33
+ _globals = globals()
34
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
35
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'entityresolution.entity_resolution_pb2', _globals)
36
+ if not _descriptor._USE_C_DESCRIPTORS:
37
+ _globals['DESCRIPTOR']._loaded_options = None
38
+ _globals['DESCRIPTOR']._serialized_options = b'\n\024com.entityresolutionB\025EntityResolutionProtoP\001\242\002\003EXX\252\002\020Entityresolution\312\002\020Entityresolution\342\002\034Entityresolution\\GPBMetadata\352\002\020Entityresolution'
39
+ _globals['_ENTITYRESOLUTIONSERVICE'].methods_by_name['ResolveEntities']._loaded_options = None
40
+ _globals['_ENTITYRESOLUTIONSERVICE'].methods_by_name['ResolveEntities']._serialized_options = b'\202\323\344\223\002\036\"\031/entityresolution/resolve:\001*'
41
+ _globals['_ENTITYRESOLUTIONSERVICE'].methods_by_name['CreateEntityChainFromJwt']._loaded_options = None
42
+ _globals['_ENTITYRESOLUTIONSERVICE'].methods_by_name['CreateEntityChainFromJwt']._serialized_options = b'\202\323\344\223\002\"\"\035/entityresolution/entitychain:\001*'
43
+ _globals['_RESOLVEENTITIESREQUEST']._serialized_start=184
44
+ _globals['_RESOLVEENTITIESREQUEST']._serialized_end=259
45
+ _globals['_ENTITYREPRESENTATION']._serialized_start=261
46
+ _globals['_ENTITYREPRESENTATION']._serialized_end=384
47
+ _globals['_RESOLVEENTITIESRESPONSE']._serialized_start=386
48
+ _globals['_RESOLVEENTITIESRESPONSE']._serialized_end=506
49
+ _globals['_ENTITYNOTFOUNDERROR']._serialized_start=509
50
+ _globals['_ENTITYNOTFOUNDERROR']._serialized_end=648
51
+ _globals['_CREATEENTITYCHAINFROMJWTREQUEST']._serialized_start=650
52
+ _globals['_CREATEENTITYCHAINFROMJWTREQUEST']._serialized_end=729
53
+ _globals['_CREATEENTITYCHAINFROMJWTRESPONSE']._serialized_start=731
54
+ _globals['_CREATEENTITYCHAINFROMJWTRESPONSE']._serialized_end=830
55
+ _globals['_ENTITYRESOLUTIONSERVICE']._serialized_start=833
56
+ _globals['_ENTITYRESOLUTIONSERVICE']._serialized_end=1175
57
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,55 @@
1
+ from authorization import authorization_pb2 as _authorization_pb2
2
+ from google.protobuf import struct_pb2 as _struct_pb2
3
+ from google.protobuf import any_pb2 as _any_pb2
4
+ from google.api import annotations_pb2 as _annotations_pb2
5
+ from google.protobuf.internal import containers as _containers
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import message as _message
8
+ from collections.abc import Iterable as _Iterable, Mapping as _Mapping
9
+ from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
10
+
11
+ DESCRIPTOR: _descriptor.FileDescriptor
12
+
13
+ class ResolveEntitiesRequest(_message.Message):
14
+ __slots__ = ("entities",)
15
+ ENTITIES_FIELD_NUMBER: _ClassVar[int]
16
+ entities: _containers.RepeatedCompositeFieldContainer[_authorization_pb2.Entity]
17
+ def __init__(self, entities: _Optional[_Iterable[_Union[_authorization_pb2.Entity, _Mapping]]] = ...) -> None: ...
18
+
19
+ class EntityRepresentation(_message.Message):
20
+ __slots__ = ("additional_props", "original_id")
21
+ ADDITIONAL_PROPS_FIELD_NUMBER: _ClassVar[int]
22
+ ORIGINAL_ID_FIELD_NUMBER: _ClassVar[int]
23
+ additional_props: _containers.RepeatedCompositeFieldContainer[_struct_pb2.Struct]
24
+ original_id: str
25
+ def __init__(self, additional_props: _Optional[_Iterable[_Union[_struct_pb2.Struct, _Mapping]]] = ..., original_id: _Optional[str] = ...) -> None: ...
26
+
27
+ class ResolveEntitiesResponse(_message.Message):
28
+ __slots__ = ("entity_representations",)
29
+ ENTITY_REPRESENTATIONS_FIELD_NUMBER: _ClassVar[int]
30
+ entity_representations: _containers.RepeatedCompositeFieldContainer[EntityRepresentation]
31
+ def __init__(self, entity_representations: _Optional[_Iterable[_Union[EntityRepresentation, _Mapping]]] = ...) -> None: ...
32
+
33
+ class EntityNotFoundError(_message.Message):
34
+ __slots__ = ("code", "message", "details", "entity")
35
+ CODE_FIELD_NUMBER: _ClassVar[int]
36
+ MESSAGE_FIELD_NUMBER: _ClassVar[int]
37
+ DETAILS_FIELD_NUMBER: _ClassVar[int]
38
+ ENTITY_FIELD_NUMBER: _ClassVar[int]
39
+ code: int
40
+ message: str
41
+ details: _containers.RepeatedCompositeFieldContainer[_any_pb2.Any]
42
+ entity: str
43
+ def __init__(self, code: _Optional[int] = ..., message: _Optional[str] = ..., details: _Optional[_Iterable[_Union[_any_pb2.Any, _Mapping]]] = ..., entity: _Optional[str] = ...) -> None: ...
44
+
45
+ class CreateEntityChainFromJwtRequest(_message.Message):
46
+ __slots__ = ("tokens",)
47
+ TOKENS_FIELD_NUMBER: _ClassVar[int]
48
+ tokens: _containers.RepeatedCompositeFieldContainer[_authorization_pb2.Token]
49
+ def __init__(self, tokens: _Optional[_Iterable[_Union[_authorization_pb2.Token, _Mapping]]] = ...) -> None: ...
50
+
51
+ class CreateEntityChainFromJwtResponse(_message.Message):
52
+ __slots__ = ("entity_chains",)
53
+ ENTITY_CHAINS_FIELD_NUMBER: _ClassVar[int]
54
+ entity_chains: _containers.RepeatedCompositeFieldContainer[_authorization_pb2.EntityChain]
55
+ def __init__(self, entity_chains: _Optional[_Iterable[_Union[_authorization_pb2.EntityChain, _Mapping]]] = ...) -> None: ...