otdf-python 0.4.1__py3-none-any.whl → 0.4.2__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 (58) hide show
  1. otdf_python/autoconfigure_utils.py +0 -2
  2. otdf_python/collection_store.py +0 -1
  3. otdf_python/ecdh.py +0 -6
  4. otdf_python/kas_client.py +18 -0
  5. otdf_python/kas_connect_rpc_client.py +59 -19
  6. otdf_python/nanotdf.py +0 -8
  7. otdf_python/nanotdf_ecdsa_struct.py +0 -2
  8. otdf_python/nanotdf_type.py +1 -1
  9. otdf_python/sdk.py +2 -16
  10. otdf_python/sdk_builder.py +2 -6
  11. {otdf_python-0.4.1.dist-info → otdf_python-0.4.2.dist-info}/METADATA +3 -2
  12. {otdf_python-0.4.1.dist-info → otdf_python-0.4.2.dist-info}/RECORD +43 -34
  13. otdf_python_proto/__init__.py +2 -6
  14. otdf_python_proto/authorization/__init__.py +10 -0
  15. otdf_python_proto/authorization/authorization_connect.py +250 -0
  16. otdf_python_proto/authorization/v2/authorization_connect.py +315 -0
  17. otdf_python_proto/entityresolution/__init__.py +10 -0
  18. otdf_python_proto/entityresolution/entity_resolution_connect.py +185 -0
  19. otdf_python_proto/entityresolution/v2/entity_resolution_connect.py +185 -0
  20. otdf_python_proto/kas/__init__.py +2 -2
  21. otdf_python_proto/kas/kas_connect.py +259 -0
  22. otdf_python_proto/policy/actions/__init__.py +11 -0
  23. otdf_python_proto/policy/actions/actions_connect.py +380 -0
  24. otdf_python_proto/policy/attributes/__init__.py +11 -0
  25. otdf_python_proto/policy/attributes/attributes_connect.py +1310 -0
  26. otdf_python_proto/policy/kasregistry/__init__.py +11 -0
  27. otdf_python_proto/policy/kasregistry/key_access_server_registry_connect.py +912 -0
  28. otdf_python_proto/policy/keymanagement/__init__.py +11 -0
  29. otdf_python_proto/policy/keymanagement/key_management_connect.py +380 -0
  30. otdf_python_proto/policy/namespaces/__init__.py +11 -0
  31. otdf_python_proto/policy/namespaces/namespaces_connect.py +648 -0
  32. otdf_python_proto/policy/registeredresources/__init__.py +11 -0
  33. otdf_python_proto/policy/registeredresources/registered_resources_connect.py +770 -0
  34. otdf_python_proto/policy/resourcemapping/__init__.py +11 -0
  35. otdf_python_proto/policy/resourcemapping/resource_mapping_connect.py +790 -0
  36. otdf_python_proto/policy/subjectmapping/__init__.py +11 -0
  37. otdf_python_proto/policy/subjectmapping/subject_mapping_connect.py +851 -0
  38. otdf_python_proto/policy/unsafe/__init__.py +11 -0
  39. otdf_python_proto/policy/unsafe/unsafe_connect.py +705 -0
  40. otdf_python_proto/wellknownconfiguration/__init__.py +10 -0
  41. otdf_python_proto/wellknownconfiguration/wellknown_configuration_connect.py +124 -0
  42. otdf_python_proto/authorization/authorization_pb2_connect.py +0 -191
  43. otdf_python_proto/authorization/v2/authorization_pb2_connect.py +0 -233
  44. otdf_python_proto/entityresolution/entity_resolution_pb2_connect.py +0 -149
  45. otdf_python_proto/entityresolution/v2/entity_resolution_pb2_connect.py +0 -149
  46. otdf_python_proto/kas/kas_pb2_connect.py +0 -192
  47. otdf_python_proto/policy/actions/actions_pb2_connect.py +0 -275
  48. otdf_python_proto/policy/attributes/attributes_pb2_connect.py +0 -863
  49. otdf_python_proto/policy/kasregistry/key_access_server_registry_pb2_connect.py +0 -611
  50. otdf_python_proto/policy/keymanagement/key_management_pb2_connect.py +0 -275
  51. otdf_python_proto/policy/namespaces/namespaces_pb2_connect.py +0 -443
  52. otdf_python_proto/policy/registeredresources/registered_resources_pb2_connect.py +0 -527
  53. otdf_python_proto/policy/resourcemapping/resource_mapping_pb2_connect.py +0 -527
  54. otdf_python_proto/policy/subjectmapping/subject_mapping_pb2_connect.py +0 -569
  55. otdf_python_proto/policy/unsafe/unsafe_pb2_connect.py +0 -485
  56. otdf_python_proto/wellknownconfiguration/wellknown_configuration_pb2_connect.py +0 -107
  57. {otdf_python-0.4.1.dist-info → otdf_python-0.4.2.dist-info}/WHEEL +0 -0
  58. {otdf_python-0.4.1.dist-info → otdf_python-0.4.2.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,851 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by https://github.com/connectrpc/connect-python. DO NOT EDIT!
3
+ # source: policy/subjectmapping/subject_mapping.proto
4
+
5
+ from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping
6
+ from typing import Protocol
7
+
8
+ from connectrpc.client import ConnectClient, ConnectClientSync
9
+ from connectrpc.code import Code
10
+ from connectrpc.errors import ConnectError
11
+ from connectrpc.interceptor import Interceptor, InterceptorSync
12
+ from connectrpc.method import IdempotencyLevel, MethodInfo
13
+ from connectrpc.request import Headers, RequestContext
14
+ from connectrpc.server import ConnectASGIApplication, ConnectWSGIApplication, Endpoint, EndpointSync
15
+ import policy.subjectmapping.subject_mapping_pb2 as policy_dot_subjectmapping_dot_subject__mapping__pb2
16
+
17
+
18
+ class SubjectMappingService(Protocol):
19
+ async def match_subject_mappings(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.MatchSubjectMappingsRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.MatchSubjectMappingsResponse:
20
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
21
+
22
+ async def list_subject_mappings(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectMappingsRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectMappingsResponse:
23
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
24
+
25
+ async def get_subject_mapping(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectMappingRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectMappingResponse:
26
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
27
+
28
+ async def create_subject_mapping(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectMappingRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectMappingResponse:
29
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
30
+
31
+ async def update_subject_mapping(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectMappingRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectMappingResponse:
32
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
33
+
34
+ async def delete_subject_mapping(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectMappingRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectMappingResponse:
35
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
36
+
37
+ async def list_subject_condition_sets(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectConditionSetsRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectConditionSetsResponse:
38
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
39
+
40
+ async def get_subject_condition_set(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectConditionSetRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectConditionSetResponse:
41
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
42
+
43
+ async def create_subject_condition_set(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectConditionSetRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectConditionSetResponse:
44
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
45
+
46
+ async def update_subject_condition_set(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectConditionSetRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectConditionSetResponse:
47
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
48
+
49
+ async def delete_subject_condition_set(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectConditionSetRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectConditionSetResponse:
50
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
51
+
52
+ async def delete_all_unmapped_subject_condition_sets(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteAllUnmappedSubjectConditionSetsRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteAllUnmappedSubjectConditionSetsResponse:
53
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
54
+
55
+
56
+ class SubjectMappingServiceASGIApplication(ConnectASGIApplication[SubjectMappingService]):
57
+ def __init__(self, service: SubjectMappingService | AsyncGenerator[SubjectMappingService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None) -> None:
58
+ super().__init__(
59
+ service=service,
60
+ endpoints=lambda svc: {
61
+ "/policy.subjectmapping.SubjectMappingService/MatchSubjectMappings": Endpoint.unary(
62
+ method=MethodInfo(
63
+ name="MatchSubjectMappings",
64
+ service_name="policy.subjectmapping.SubjectMappingService",
65
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.MatchSubjectMappingsRequest,
66
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.MatchSubjectMappingsResponse,
67
+ idempotency_level=IdempotencyLevel.UNKNOWN,
68
+ ),
69
+ function=svc.match_subject_mappings,
70
+ ),
71
+ "/policy.subjectmapping.SubjectMappingService/ListSubjectMappings": Endpoint.unary(
72
+ method=MethodInfo(
73
+ name="ListSubjectMappings",
74
+ service_name="policy.subjectmapping.SubjectMappingService",
75
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectMappingsRequest,
76
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectMappingsResponse,
77
+ idempotency_level=IdempotencyLevel.NO_SIDE_EFFECTS,
78
+ ),
79
+ function=svc.list_subject_mappings,
80
+ ),
81
+ "/policy.subjectmapping.SubjectMappingService/GetSubjectMapping": Endpoint.unary(
82
+ method=MethodInfo(
83
+ name="GetSubjectMapping",
84
+ service_name="policy.subjectmapping.SubjectMappingService",
85
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectMappingRequest,
86
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectMappingResponse,
87
+ idempotency_level=IdempotencyLevel.NO_SIDE_EFFECTS,
88
+ ),
89
+ function=svc.get_subject_mapping,
90
+ ),
91
+ "/policy.subjectmapping.SubjectMappingService/CreateSubjectMapping": Endpoint.unary(
92
+ method=MethodInfo(
93
+ name="CreateSubjectMapping",
94
+ service_name="policy.subjectmapping.SubjectMappingService",
95
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectMappingRequest,
96
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectMappingResponse,
97
+ idempotency_level=IdempotencyLevel.UNKNOWN,
98
+ ),
99
+ function=svc.create_subject_mapping,
100
+ ),
101
+ "/policy.subjectmapping.SubjectMappingService/UpdateSubjectMapping": Endpoint.unary(
102
+ method=MethodInfo(
103
+ name="UpdateSubjectMapping",
104
+ service_name="policy.subjectmapping.SubjectMappingService",
105
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectMappingRequest,
106
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectMappingResponse,
107
+ idempotency_level=IdempotencyLevel.UNKNOWN,
108
+ ),
109
+ function=svc.update_subject_mapping,
110
+ ),
111
+ "/policy.subjectmapping.SubjectMappingService/DeleteSubjectMapping": Endpoint.unary(
112
+ method=MethodInfo(
113
+ name="DeleteSubjectMapping",
114
+ service_name="policy.subjectmapping.SubjectMappingService",
115
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectMappingRequest,
116
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectMappingResponse,
117
+ idempotency_level=IdempotencyLevel.UNKNOWN,
118
+ ),
119
+ function=svc.delete_subject_mapping,
120
+ ),
121
+ "/policy.subjectmapping.SubjectMappingService/ListSubjectConditionSets": Endpoint.unary(
122
+ method=MethodInfo(
123
+ name="ListSubjectConditionSets",
124
+ service_name="policy.subjectmapping.SubjectMappingService",
125
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectConditionSetsRequest,
126
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectConditionSetsResponse,
127
+ idempotency_level=IdempotencyLevel.NO_SIDE_EFFECTS,
128
+ ),
129
+ function=svc.list_subject_condition_sets,
130
+ ),
131
+ "/policy.subjectmapping.SubjectMappingService/GetSubjectConditionSet": Endpoint.unary(
132
+ method=MethodInfo(
133
+ name="GetSubjectConditionSet",
134
+ service_name="policy.subjectmapping.SubjectMappingService",
135
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectConditionSetRequest,
136
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectConditionSetResponse,
137
+ idempotency_level=IdempotencyLevel.NO_SIDE_EFFECTS,
138
+ ),
139
+ function=svc.get_subject_condition_set,
140
+ ),
141
+ "/policy.subjectmapping.SubjectMappingService/CreateSubjectConditionSet": Endpoint.unary(
142
+ method=MethodInfo(
143
+ name="CreateSubjectConditionSet",
144
+ service_name="policy.subjectmapping.SubjectMappingService",
145
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectConditionSetRequest,
146
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectConditionSetResponse,
147
+ idempotency_level=IdempotencyLevel.UNKNOWN,
148
+ ),
149
+ function=svc.create_subject_condition_set,
150
+ ),
151
+ "/policy.subjectmapping.SubjectMappingService/UpdateSubjectConditionSet": Endpoint.unary(
152
+ method=MethodInfo(
153
+ name="UpdateSubjectConditionSet",
154
+ service_name="policy.subjectmapping.SubjectMappingService",
155
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectConditionSetRequest,
156
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectConditionSetResponse,
157
+ idempotency_level=IdempotencyLevel.UNKNOWN,
158
+ ),
159
+ function=svc.update_subject_condition_set,
160
+ ),
161
+ "/policy.subjectmapping.SubjectMappingService/DeleteSubjectConditionSet": Endpoint.unary(
162
+ method=MethodInfo(
163
+ name="DeleteSubjectConditionSet",
164
+ service_name="policy.subjectmapping.SubjectMappingService",
165
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectConditionSetRequest,
166
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectConditionSetResponse,
167
+ idempotency_level=IdempotencyLevel.UNKNOWN,
168
+ ),
169
+ function=svc.delete_subject_condition_set,
170
+ ),
171
+ "/policy.subjectmapping.SubjectMappingService/DeleteAllUnmappedSubjectConditionSets": Endpoint.unary(
172
+ method=MethodInfo(
173
+ name="DeleteAllUnmappedSubjectConditionSets",
174
+ service_name="policy.subjectmapping.SubjectMappingService",
175
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteAllUnmappedSubjectConditionSetsRequest,
176
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteAllUnmappedSubjectConditionSetsResponse,
177
+ idempotency_level=IdempotencyLevel.UNKNOWN,
178
+ ),
179
+ function=svc.delete_all_unmapped_subject_condition_sets,
180
+ ),
181
+ },
182
+ interceptors=interceptors,
183
+ read_max_bytes=read_max_bytes,
184
+ )
185
+
186
+ @property
187
+ def path(self) -> str:
188
+ """Returns the URL path to mount the application to when serving multiple applications."""
189
+ return "/policy.subjectmapping.SubjectMappingService"
190
+
191
+
192
+ class SubjectMappingServiceClient(ConnectClient):
193
+ async def match_subject_mappings(
194
+ self,
195
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.MatchSubjectMappingsRequest,
196
+ *,
197
+ headers: Headers | Mapping[str, str] | None = None,
198
+ timeout_ms: int | None = None,
199
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.MatchSubjectMappingsResponse:
200
+ return await self.execute_unary(
201
+ request=request,
202
+ method=MethodInfo(
203
+ name="MatchSubjectMappings",
204
+ service_name="policy.subjectmapping.SubjectMappingService",
205
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.MatchSubjectMappingsRequest,
206
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.MatchSubjectMappingsResponse,
207
+ idempotency_level=IdempotencyLevel.UNKNOWN,
208
+ ),
209
+ headers=headers,
210
+ timeout_ms=timeout_ms,
211
+ )
212
+
213
+ async def list_subject_mappings(
214
+ self,
215
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectMappingsRequest,
216
+ *,
217
+ headers: Headers | Mapping[str, str] | None = None,
218
+ timeout_ms: int | None = None,
219
+ use_get: bool = False,
220
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectMappingsResponse:
221
+ return await self.execute_unary(
222
+ request=request,
223
+ method=MethodInfo(
224
+ name="ListSubjectMappings",
225
+ service_name="policy.subjectmapping.SubjectMappingService",
226
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectMappingsRequest,
227
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectMappingsResponse,
228
+ idempotency_level=IdempotencyLevel.NO_SIDE_EFFECTS,
229
+ ),
230
+ headers=headers,
231
+ timeout_ms=timeout_ms,
232
+ use_get=use_get,
233
+ )
234
+
235
+ async def get_subject_mapping(
236
+ self,
237
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectMappingRequest,
238
+ *,
239
+ headers: Headers | Mapping[str, str] | None = None,
240
+ timeout_ms: int | None = None,
241
+ use_get: bool = False,
242
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectMappingResponse:
243
+ return await self.execute_unary(
244
+ request=request,
245
+ method=MethodInfo(
246
+ name="GetSubjectMapping",
247
+ service_name="policy.subjectmapping.SubjectMappingService",
248
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectMappingRequest,
249
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectMappingResponse,
250
+ idempotency_level=IdempotencyLevel.NO_SIDE_EFFECTS,
251
+ ),
252
+ headers=headers,
253
+ timeout_ms=timeout_ms,
254
+ use_get=use_get,
255
+ )
256
+
257
+ async def create_subject_mapping(
258
+ self,
259
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectMappingRequest,
260
+ *,
261
+ headers: Headers | Mapping[str, str] | None = None,
262
+ timeout_ms: int | None = None,
263
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectMappingResponse:
264
+ return await self.execute_unary(
265
+ request=request,
266
+ method=MethodInfo(
267
+ name="CreateSubjectMapping",
268
+ service_name="policy.subjectmapping.SubjectMappingService",
269
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectMappingRequest,
270
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectMappingResponse,
271
+ idempotency_level=IdempotencyLevel.UNKNOWN,
272
+ ),
273
+ headers=headers,
274
+ timeout_ms=timeout_ms,
275
+ )
276
+
277
+ async def update_subject_mapping(
278
+ self,
279
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectMappingRequest,
280
+ *,
281
+ headers: Headers | Mapping[str, str] | None = None,
282
+ timeout_ms: int | None = None,
283
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectMappingResponse:
284
+ return await self.execute_unary(
285
+ request=request,
286
+ method=MethodInfo(
287
+ name="UpdateSubjectMapping",
288
+ service_name="policy.subjectmapping.SubjectMappingService",
289
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectMappingRequest,
290
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectMappingResponse,
291
+ idempotency_level=IdempotencyLevel.UNKNOWN,
292
+ ),
293
+ headers=headers,
294
+ timeout_ms=timeout_ms,
295
+ )
296
+
297
+ async def delete_subject_mapping(
298
+ self,
299
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectMappingRequest,
300
+ *,
301
+ headers: Headers | Mapping[str, str] | None = None,
302
+ timeout_ms: int | None = None,
303
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectMappingResponse:
304
+ return await self.execute_unary(
305
+ request=request,
306
+ method=MethodInfo(
307
+ name="DeleteSubjectMapping",
308
+ service_name="policy.subjectmapping.SubjectMappingService",
309
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectMappingRequest,
310
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectMappingResponse,
311
+ idempotency_level=IdempotencyLevel.UNKNOWN,
312
+ ),
313
+ headers=headers,
314
+ timeout_ms=timeout_ms,
315
+ )
316
+
317
+ async def list_subject_condition_sets(
318
+ self,
319
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectConditionSetsRequest,
320
+ *,
321
+ headers: Headers | Mapping[str, str] | None = None,
322
+ timeout_ms: int | None = None,
323
+ use_get: bool = False,
324
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectConditionSetsResponse:
325
+ return await self.execute_unary(
326
+ request=request,
327
+ method=MethodInfo(
328
+ name="ListSubjectConditionSets",
329
+ service_name="policy.subjectmapping.SubjectMappingService",
330
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectConditionSetsRequest,
331
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectConditionSetsResponse,
332
+ idempotency_level=IdempotencyLevel.NO_SIDE_EFFECTS,
333
+ ),
334
+ headers=headers,
335
+ timeout_ms=timeout_ms,
336
+ use_get=use_get,
337
+ )
338
+
339
+ async def get_subject_condition_set(
340
+ self,
341
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectConditionSetRequest,
342
+ *,
343
+ headers: Headers | Mapping[str, str] | None = None,
344
+ timeout_ms: int | None = None,
345
+ use_get: bool = False,
346
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectConditionSetResponse:
347
+ return await self.execute_unary(
348
+ request=request,
349
+ method=MethodInfo(
350
+ name="GetSubjectConditionSet",
351
+ service_name="policy.subjectmapping.SubjectMappingService",
352
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectConditionSetRequest,
353
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectConditionSetResponse,
354
+ idempotency_level=IdempotencyLevel.NO_SIDE_EFFECTS,
355
+ ),
356
+ headers=headers,
357
+ timeout_ms=timeout_ms,
358
+ use_get=use_get,
359
+ )
360
+
361
+ async def create_subject_condition_set(
362
+ self,
363
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectConditionSetRequest,
364
+ *,
365
+ headers: Headers | Mapping[str, str] | None = None,
366
+ timeout_ms: int | None = None,
367
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectConditionSetResponse:
368
+ return await self.execute_unary(
369
+ request=request,
370
+ method=MethodInfo(
371
+ name="CreateSubjectConditionSet",
372
+ service_name="policy.subjectmapping.SubjectMappingService",
373
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectConditionSetRequest,
374
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectConditionSetResponse,
375
+ idempotency_level=IdempotencyLevel.UNKNOWN,
376
+ ),
377
+ headers=headers,
378
+ timeout_ms=timeout_ms,
379
+ )
380
+
381
+ async def update_subject_condition_set(
382
+ self,
383
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectConditionSetRequest,
384
+ *,
385
+ headers: Headers | Mapping[str, str] | None = None,
386
+ timeout_ms: int | None = None,
387
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectConditionSetResponse:
388
+ return await self.execute_unary(
389
+ request=request,
390
+ method=MethodInfo(
391
+ name="UpdateSubjectConditionSet",
392
+ service_name="policy.subjectmapping.SubjectMappingService",
393
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectConditionSetRequest,
394
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectConditionSetResponse,
395
+ idempotency_level=IdempotencyLevel.UNKNOWN,
396
+ ),
397
+ headers=headers,
398
+ timeout_ms=timeout_ms,
399
+ )
400
+
401
+ async def delete_subject_condition_set(
402
+ self,
403
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectConditionSetRequest,
404
+ *,
405
+ headers: Headers | Mapping[str, str] | None = None,
406
+ timeout_ms: int | None = None,
407
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectConditionSetResponse:
408
+ return await self.execute_unary(
409
+ request=request,
410
+ method=MethodInfo(
411
+ name="DeleteSubjectConditionSet",
412
+ service_name="policy.subjectmapping.SubjectMappingService",
413
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectConditionSetRequest,
414
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectConditionSetResponse,
415
+ idempotency_level=IdempotencyLevel.UNKNOWN,
416
+ ),
417
+ headers=headers,
418
+ timeout_ms=timeout_ms,
419
+ )
420
+
421
+ async def delete_all_unmapped_subject_condition_sets(
422
+ self,
423
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteAllUnmappedSubjectConditionSetsRequest,
424
+ *,
425
+ headers: Headers | Mapping[str, str] | None = None,
426
+ timeout_ms: int | None = None,
427
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteAllUnmappedSubjectConditionSetsResponse:
428
+ return await self.execute_unary(
429
+ request=request,
430
+ method=MethodInfo(
431
+ name="DeleteAllUnmappedSubjectConditionSets",
432
+ service_name="policy.subjectmapping.SubjectMappingService",
433
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteAllUnmappedSubjectConditionSetsRequest,
434
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteAllUnmappedSubjectConditionSetsResponse,
435
+ idempotency_level=IdempotencyLevel.UNKNOWN,
436
+ ),
437
+ headers=headers,
438
+ timeout_ms=timeout_ms,
439
+ )
440
+
441
+
442
+ class SubjectMappingServiceSync(Protocol):
443
+ def match_subject_mappings(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.MatchSubjectMappingsRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.MatchSubjectMappingsResponse:
444
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
445
+ def list_subject_mappings(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectMappingsRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectMappingsResponse:
446
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
447
+ def get_subject_mapping(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectMappingRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectMappingResponse:
448
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
449
+ def create_subject_mapping(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectMappingRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectMappingResponse:
450
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
451
+ def update_subject_mapping(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectMappingRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectMappingResponse:
452
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
453
+ def delete_subject_mapping(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectMappingRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectMappingResponse:
454
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
455
+ def list_subject_condition_sets(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectConditionSetsRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectConditionSetsResponse:
456
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
457
+ def get_subject_condition_set(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectConditionSetRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectConditionSetResponse:
458
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
459
+ def create_subject_condition_set(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectConditionSetRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectConditionSetResponse:
460
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
461
+ def update_subject_condition_set(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectConditionSetRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectConditionSetResponse:
462
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
463
+ def delete_subject_condition_set(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectConditionSetRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectConditionSetResponse:
464
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
465
+ def delete_all_unmapped_subject_condition_sets(self, request: policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteAllUnmappedSubjectConditionSetsRequest, ctx: RequestContext) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteAllUnmappedSubjectConditionSetsResponse:
466
+ raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
467
+
468
+
469
+ class SubjectMappingServiceWSGIApplication(ConnectWSGIApplication):
470
+ def __init__(self, service: SubjectMappingServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None) -> None:
471
+ super().__init__(
472
+ endpoints={
473
+ "/policy.subjectmapping.SubjectMappingService/MatchSubjectMappings": EndpointSync.unary(
474
+ method=MethodInfo(
475
+ name="MatchSubjectMappings",
476
+ service_name="policy.subjectmapping.SubjectMappingService",
477
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.MatchSubjectMappingsRequest,
478
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.MatchSubjectMappingsResponse,
479
+ idempotency_level=IdempotencyLevel.UNKNOWN,
480
+ ),
481
+ function=service.match_subject_mappings,
482
+ ),
483
+ "/policy.subjectmapping.SubjectMappingService/ListSubjectMappings": EndpointSync.unary(
484
+ method=MethodInfo(
485
+ name="ListSubjectMappings",
486
+ service_name="policy.subjectmapping.SubjectMappingService",
487
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectMappingsRequest,
488
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectMappingsResponse,
489
+ idempotency_level=IdempotencyLevel.NO_SIDE_EFFECTS,
490
+ ),
491
+ function=service.list_subject_mappings,
492
+ ),
493
+ "/policy.subjectmapping.SubjectMappingService/GetSubjectMapping": EndpointSync.unary(
494
+ method=MethodInfo(
495
+ name="GetSubjectMapping",
496
+ service_name="policy.subjectmapping.SubjectMappingService",
497
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectMappingRequest,
498
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectMappingResponse,
499
+ idempotency_level=IdempotencyLevel.NO_SIDE_EFFECTS,
500
+ ),
501
+ function=service.get_subject_mapping,
502
+ ),
503
+ "/policy.subjectmapping.SubjectMappingService/CreateSubjectMapping": EndpointSync.unary(
504
+ method=MethodInfo(
505
+ name="CreateSubjectMapping",
506
+ service_name="policy.subjectmapping.SubjectMappingService",
507
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectMappingRequest,
508
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectMappingResponse,
509
+ idempotency_level=IdempotencyLevel.UNKNOWN,
510
+ ),
511
+ function=service.create_subject_mapping,
512
+ ),
513
+ "/policy.subjectmapping.SubjectMappingService/UpdateSubjectMapping": EndpointSync.unary(
514
+ method=MethodInfo(
515
+ name="UpdateSubjectMapping",
516
+ service_name="policy.subjectmapping.SubjectMappingService",
517
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectMappingRequest,
518
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectMappingResponse,
519
+ idempotency_level=IdempotencyLevel.UNKNOWN,
520
+ ),
521
+ function=service.update_subject_mapping,
522
+ ),
523
+ "/policy.subjectmapping.SubjectMappingService/DeleteSubjectMapping": EndpointSync.unary(
524
+ method=MethodInfo(
525
+ name="DeleteSubjectMapping",
526
+ service_name="policy.subjectmapping.SubjectMappingService",
527
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectMappingRequest,
528
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectMappingResponse,
529
+ idempotency_level=IdempotencyLevel.UNKNOWN,
530
+ ),
531
+ function=service.delete_subject_mapping,
532
+ ),
533
+ "/policy.subjectmapping.SubjectMappingService/ListSubjectConditionSets": EndpointSync.unary(
534
+ method=MethodInfo(
535
+ name="ListSubjectConditionSets",
536
+ service_name="policy.subjectmapping.SubjectMappingService",
537
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectConditionSetsRequest,
538
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectConditionSetsResponse,
539
+ idempotency_level=IdempotencyLevel.NO_SIDE_EFFECTS,
540
+ ),
541
+ function=service.list_subject_condition_sets,
542
+ ),
543
+ "/policy.subjectmapping.SubjectMappingService/GetSubjectConditionSet": EndpointSync.unary(
544
+ method=MethodInfo(
545
+ name="GetSubjectConditionSet",
546
+ service_name="policy.subjectmapping.SubjectMappingService",
547
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectConditionSetRequest,
548
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectConditionSetResponse,
549
+ idempotency_level=IdempotencyLevel.NO_SIDE_EFFECTS,
550
+ ),
551
+ function=service.get_subject_condition_set,
552
+ ),
553
+ "/policy.subjectmapping.SubjectMappingService/CreateSubjectConditionSet": EndpointSync.unary(
554
+ method=MethodInfo(
555
+ name="CreateSubjectConditionSet",
556
+ service_name="policy.subjectmapping.SubjectMappingService",
557
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectConditionSetRequest,
558
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectConditionSetResponse,
559
+ idempotency_level=IdempotencyLevel.UNKNOWN,
560
+ ),
561
+ function=service.create_subject_condition_set,
562
+ ),
563
+ "/policy.subjectmapping.SubjectMappingService/UpdateSubjectConditionSet": EndpointSync.unary(
564
+ method=MethodInfo(
565
+ name="UpdateSubjectConditionSet",
566
+ service_name="policy.subjectmapping.SubjectMappingService",
567
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectConditionSetRequest,
568
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectConditionSetResponse,
569
+ idempotency_level=IdempotencyLevel.UNKNOWN,
570
+ ),
571
+ function=service.update_subject_condition_set,
572
+ ),
573
+ "/policy.subjectmapping.SubjectMappingService/DeleteSubjectConditionSet": EndpointSync.unary(
574
+ method=MethodInfo(
575
+ name="DeleteSubjectConditionSet",
576
+ service_name="policy.subjectmapping.SubjectMappingService",
577
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectConditionSetRequest,
578
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectConditionSetResponse,
579
+ idempotency_level=IdempotencyLevel.UNKNOWN,
580
+ ),
581
+ function=service.delete_subject_condition_set,
582
+ ),
583
+ "/policy.subjectmapping.SubjectMappingService/DeleteAllUnmappedSubjectConditionSets": EndpointSync.unary(
584
+ method=MethodInfo(
585
+ name="DeleteAllUnmappedSubjectConditionSets",
586
+ service_name="policy.subjectmapping.SubjectMappingService",
587
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteAllUnmappedSubjectConditionSetsRequest,
588
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteAllUnmappedSubjectConditionSetsResponse,
589
+ idempotency_level=IdempotencyLevel.UNKNOWN,
590
+ ),
591
+ function=service.delete_all_unmapped_subject_condition_sets,
592
+ ),
593
+ },
594
+ interceptors=interceptors,
595
+ read_max_bytes=read_max_bytes,
596
+ )
597
+
598
+ @property
599
+ def path(self) -> str:
600
+ """Returns the URL path to mount the application to when serving multiple applications."""
601
+ return "/policy.subjectmapping.SubjectMappingService"
602
+
603
+
604
+ class SubjectMappingServiceClientSync(ConnectClientSync):
605
+ def match_subject_mappings(
606
+ self,
607
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.MatchSubjectMappingsRequest,
608
+ *,
609
+ headers: Headers | Mapping[str, str] | None = None,
610
+ timeout_ms: int | None = None,
611
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.MatchSubjectMappingsResponse:
612
+ return self.execute_unary(
613
+ request=request,
614
+ method=MethodInfo(
615
+ name="MatchSubjectMappings",
616
+ service_name="policy.subjectmapping.SubjectMappingService",
617
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.MatchSubjectMappingsRequest,
618
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.MatchSubjectMappingsResponse,
619
+ idempotency_level=IdempotencyLevel.UNKNOWN,
620
+ ),
621
+ headers=headers,
622
+ timeout_ms=timeout_ms,
623
+ )
624
+
625
+ def list_subject_mappings(
626
+ self,
627
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectMappingsRequest,
628
+ *,
629
+ headers: Headers | Mapping[str, str] | None = None,
630
+ timeout_ms: int | None = None,
631
+ use_get: bool = False,
632
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectMappingsResponse:
633
+ return self.execute_unary(
634
+ request=request,
635
+ method=MethodInfo(
636
+ name="ListSubjectMappings",
637
+ service_name="policy.subjectmapping.SubjectMappingService",
638
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectMappingsRequest,
639
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectMappingsResponse,
640
+ idempotency_level=IdempotencyLevel.NO_SIDE_EFFECTS,
641
+ ),
642
+ headers=headers,
643
+ timeout_ms=timeout_ms,
644
+ use_get=use_get,
645
+ )
646
+
647
+ def get_subject_mapping(
648
+ self,
649
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectMappingRequest,
650
+ *,
651
+ headers: Headers | Mapping[str, str] | None = None,
652
+ timeout_ms: int | None = None,
653
+ use_get: bool = False,
654
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectMappingResponse:
655
+ return self.execute_unary(
656
+ request=request,
657
+ method=MethodInfo(
658
+ name="GetSubjectMapping",
659
+ service_name="policy.subjectmapping.SubjectMappingService",
660
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectMappingRequest,
661
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectMappingResponse,
662
+ idempotency_level=IdempotencyLevel.NO_SIDE_EFFECTS,
663
+ ),
664
+ headers=headers,
665
+ timeout_ms=timeout_ms,
666
+ use_get=use_get,
667
+ )
668
+
669
+ def create_subject_mapping(
670
+ self,
671
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectMappingRequest,
672
+ *,
673
+ headers: Headers | Mapping[str, str] | None = None,
674
+ timeout_ms: int | None = None,
675
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectMappingResponse:
676
+ return self.execute_unary(
677
+ request=request,
678
+ method=MethodInfo(
679
+ name="CreateSubjectMapping",
680
+ service_name="policy.subjectmapping.SubjectMappingService",
681
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectMappingRequest,
682
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectMappingResponse,
683
+ idempotency_level=IdempotencyLevel.UNKNOWN,
684
+ ),
685
+ headers=headers,
686
+ timeout_ms=timeout_ms,
687
+ )
688
+
689
+ def update_subject_mapping(
690
+ self,
691
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectMappingRequest,
692
+ *,
693
+ headers: Headers | Mapping[str, str] | None = None,
694
+ timeout_ms: int | None = None,
695
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectMappingResponse:
696
+ return self.execute_unary(
697
+ request=request,
698
+ method=MethodInfo(
699
+ name="UpdateSubjectMapping",
700
+ service_name="policy.subjectmapping.SubjectMappingService",
701
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectMappingRequest,
702
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectMappingResponse,
703
+ idempotency_level=IdempotencyLevel.UNKNOWN,
704
+ ),
705
+ headers=headers,
706
+ timeout_ms=timeout_ms,
707
+ )
708
+
709
+ def delete_subject_mapping(
710
+ self,
711
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectMappingRequest,
712
+ *,
713
+ headers: Headers | Mapping[str, str] | None = None,
714
+ timeout_ms: int | None = None,
715
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectMappingResponse:
716
+ return self.execute_unary(
717
+ request=request,
718
+ method=MethodInfo(
719
+ name="DeleteSubjectMapping",
720
+ service_name="policy.subjectmapping.SubjectMappingService",
721
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectMappingRequest,
722
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectMappingResponse,
723
+ idempotency_level=IdempotencyLevel.UNKNOWN,
724
+ ),
725
+ headers=headers,
726
+ timeout_ms=timeout_ms,
727
+ )
728
+
729
+ def list_subject_condition_sets(
730
+ self,
731
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectConditionSetsRequest,
732
+ *,
733
+ headers: Headers | Mapping[str, str] | None = None,
734
+ timeout_ms: int | None = None,
735
+ use_get: bool = False,
736
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectConditionSetsResponse:
737
+ return self.execute_unary(
738
+ request=request,
739
+ method=MethodInfo(
740
+ name="ListSubjectConditionSets",
741
+ service_name="policy.subjectmapping.SubjectMappingService",
742
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectConditionSetsRequest,
743
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.ListSubjectConditionSetsResponse,
744
+ idempotency_level=IdempotencyLevel.NO_SIDE_EFFECTS,
745
+ ),
746
+ headers=headers,
747
+ timeout_ms=timeout_ms,
748
+ use_get=use_get,
749
+ )
750
+
751
+ def get_subject_condition_set(
752
+ self,
753
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectConditionSetRequest,
754
+ *,
755
+ headers: Headers | Mapping[str, str] | None = None,
756
+ timeout_ms: int | None = None,
757
+ use_get: bool = False,
758
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectConditionSetResponse:
759
+ return self.execute_unary(
760
+ request=request,
761
+ method=MethodInfo(
762
+ name="GetSubjectConditionSet",
763
+ service_name="policy.subjectmapping.SubjectMappingService",
764
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectConditionSetRequest,
765
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.GetSubjectConditionSetResponse,
766
+ idempotency_level=IdempotencyLevel.NO_SIDE_EFFECTS,
767
+ ),
768
+ headers=headers,
769
+ timeout_ms=timeout_ms,
770
+ use_get=use_get,
771
+ )
772
+
773
+ def create_subject_condition_set(
774
+ self,
775
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectConditionSetRequest,
776
+ *,
777
+ headers: Headers | Mapping[str, str] | None = None,
778
+ timeout_ms: int | None = None,
779
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectConditionSetResponse:
780
+ return self.execute_unary(
781
+ request=request,
782
+ method=MethodInfo(
783
+ name="CreateSubjectConditionSet",
784
+ service_name="policy.subjectmapping.SubjectMappingService",
785
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectConditionSetRequest,
786
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.CreateSubjectConditionSetResponse,
787
+ idempotency_level=IdempotencyLevel.UNKNOWN,
788
+ ),
789
+ headers=headers,
790
+ timeout_ms=timeout_ms,
791
+ )
792
+
793
+ def update_subject_condition_set(
794
+ self,
795
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectConditionSetRequest,
796
+ *,
797
+ headers: Headers | Mapping[str, str] | None = None,
798
+ timeout_ms: int | None = None,
799
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectConditionSetResponse:
800
+ return self.execute_unary(
801
+ request=request,
802
+ method=MethodInfo(
803
+ name="UpdateSubjectConditionSet",
804
+ service_name="policy.subjectmapping.SubjectMappingService",
805
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectConditionSetRequest,
806
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.UpdateSubjectConditionSetResponse,
807
+ idempotency_level=IdempotencyLevel.UNKNOWN,
808
+ ),
809
+ headers=headers,
810
+ timeout_ms=timeout_ms,
811
+ )
812
+
813
+ def delete_subject_condition_set(
814
+ self,
815
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectConditionSetRequest,
816
+ *,
817
+ headers: Headers | Mapping[str, str] | None = None,
818
+ timeout_ms: int | None = None,
819
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectConditionSetResponse:
820
+ return self.execute_unary(
821
+ request=request,
822
+ method=MethodInfo(
823
+ name="DeleteSubjectConditionSet",
824
+ service_name="policy.subjectmapping.SubjectMappingService",
825
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectConditionSetRequest,
826
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteSubjectConditionSetResponse,
827
+ idempotency_level=IdempotencyLevel.UNKNOWN,
828
+ ),
829
+ headers=headers,
830
+ timeout_ms=timeout_ms,
831
+ )
832
+
833
+ def delete_all_unmapped_subject_condition_sets(
834
+ self,
835
+ request: policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteAllUnmappedSubjectConditionSetsRequest,
836
+ *,
837
+ headers: Headers | Mapping[str, str] | None = None,
838
+ timeout_ms: int | None = None,
839
+ ) -> policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteAllUnmappedSubjectConditionSetsResponse:
840
+ return self.execute_unary(
841
+ request=request,
842
+ method=MethodInfo(
843
+ name="DeleteAllUnmappedSubjectConditionSets",
844
+ service_name="policy.subjectmapping.SubjectMappingService",
845
+ input=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteAllUnmappedSubjectConditionSetsRequest,
846
+ output=policy_dot_subjectmapping_dot_subject__mapping__pb2.DeleteAllUnmappedSubjectConditionSetsResponse,
847
+ idempotency_level=IdempotencyLevel.UNKNOWN,
848
+ ),
849
+ headers=headers,
850
+ timeout_ms=timeout_ms,
851
+ )