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.
- otdf_python/autoconfigure_utils.py +0 -2
- otdf_python/collection_store.py +0 -1
- otdf_python/ecdh.py +0 -6
- otdf_python/kas_client.py +18 -0
- otdf_python/kas_connect_rpc_client.py +59 -19
- otdf_python/nanotdf.py +0 -8
- otdf_python/nanotdf_ecdsa_struct.py +0 -2
- otdf_python/nanotdf_type.py +1 -1
- otdf_python/sdk.py +2 -16
- otdf_python/sdk_builder.py +2 -6
- {otdf_python-0.4.1.dist-info → otdf_python-0.4.2.dist-info}/METADATA +3 -2
- {otdf_python-0.4.1.dist-info → otdf_python-0.4.2.dist-info}/RECORD +43 -34
- otdf_python_proto/__init__.py +2 -6
- otdf_python_proto/authorization/__init__.py +10 -0
- otdf_python_proto/authorization/authorization_connect.py +250 -0
- otdf_python_proto/authorization/v2/authorization_connect.py +315 -0
- otdf_python_proto/entityresolution/__init__.py +10 -0
- otdf_python_proto/entityresolution/entity_resolution_connect.py +185 -0
- otdf_python_proto/entityresolution/v2/entity_resolution_connect.py +185 -0
- otdf_python_proto/kas/__init__.py +2 -2
- otdf_python_proto/kas/kas_connect.py +259 -0
- otdf_python_proto/policy/actions/__init__.py +11 -0
- otdf_python_proto/policy/actions/actions_connect.py +380 -0
- otdf_python_proto/policy/attributes/__init__.py +11 -0
- otdf_python_proto/policy/attributes/attributes_connect.py +1310 -0
- otdf_python_proto/policy/kasregistry/__init__.py +11 -0
- otdf_python_proto/policy/kasregistry/key_access_server_registry_connect.py +912 -0
- otdf_python_proto/policy/keymanagement/__init__.py +11 -0
- otdf_python_proto/policy/keymanagement/key_management_connect.py +380 -0
- otdf_python_proto/policy/namespaces/__init__.py +11 -0
- otdf_python_proto/policy/namespaces/namespaces_connect.py +648 -0
- otdf_python_proto/policy/registeredresources/__init__.py +11 -0
- otdf_python_proto/policy/registeredresources/registered_resources_connect.py +770 -0
- otdf_python_proto/policy/resourcemapping/__init__.py +11 -0
- otdf_python_proto/policy/resourcemapping/resource_mapping_connect.py +790 -0
- otdf_python_proto/policy/subjectmapping/__init__.py +11 -0
- otdf_python_proto/policy/subjectmapping/subject_mapping_connect.py +851 -0
- otdf_python_proto/policy/unsafe/__init__.py +11 -0
- otdf_python_proto/policy/unsafe/unsafe_connect.py +705 -0
- otdf_python_proto/wellknownconfiguration/__init__.py +10 -0
- otdf_python_proto/wellknownconfiguration/wellknown_configuration_connect.py +124 -0
- otdf_python_proto/authorization/authorization_pb2_connect.py +0 -191
- otdf_python_proto/authorization/v2/authorization_pb2_connect.py +0 -233
- otdf_python_proto/entityresolution/entity_resolution_pb2_connect.py +0 -149
- otdf_python_proto/entityresolution/v2/entity_resolution_pb2_connect.py +0 -149
- otdf_python_proto/kas/kas_pb2_connect.py +0 -192
- otdf_python_proto/policy/actions/actions_pb2_connect.py +0 -275
- otdf_python_proto/policy/attributes/attributes_pb2_connect.py +0 -863
- otdf_python_proto/policy/kasregistry/key_access_server_registry_pb2_connect.py +0 -611
- otdf_python_proto/policy/keymanagement/key_management_pb2_connect.py +0 -275
- otdf_python_proto/policy/namespaces/namespaces_pb2_connect.py +0 -443
- otdf_python_proto/policy/registeredresources/registered_resources_pb2_connect.py +0 -527
- otdf_python_proto/policy/resourcemapping/resource_mapping_pb2_connect.py +0 -527
- otdf_python_proto/policy/subjectmapping/subject_mapping_pb2_connect.py +0 -569
- otdf_python_proto/policy/unsafe/unsafe_pb2_connect.py +0 -485
- otdf_python_proto/wellknownconfiguration/wellknown_configuration_pb2_connect.py +0 -107
- {otdf_python-0.4.1.dist-info → otdf_python-0.4.2.dist-info}/WHEEL +0 -0
- {otdf_python-0.4.1.dist-info → otdf_python-0.4.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,569 +0,0 @@
|
|
|
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 policy.subjectmapping.subject_mapping_pb2
|
|
36
|
-
|
|
37
|
-
class SubjectMappingServiceClient:
|
|
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_match_subject_mappings(
|
|
47
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.MatchSubjectMappingsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
48
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.MatchSubjectMappingsResponse]:
|
|
49
|
-
"""Low-level method to call MatchSubjectMappings, granting access to errors and metadata"""
|
|
50
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/MatchSubjectMappings"
|
|
51
|
-
return self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.MatchSubjectMappingsResponse,extra_headers, timeout_seconds)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
def match_subject_mappings(
|
|
55
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.MatchSubjectMappingsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
56
|
-
) -> policy.subjectmapping.subject_mapping_pb2.MatchSubjectMappingsResponse:
|
|
57
|
-
response = self.call_match_subject_mappings(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_list_subject_mappings(
|
|
67
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.ListSubjectMappingsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
68
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.ListSubjectMappingsResponse]:
|
|
69
|
-
"""Low-level method to call ListSubjectMappings, granting access to errors and metadata"""
|
|
70
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/ListSubjectMappings"
|
|
71
|
-
return self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.ListSubjectMappingsResponse,extra_headers, timeout_seconds)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
def list_subject_mappings(
|
|
75
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.ListSubjectMappingsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
76
|
-
) -> policy.subjectmapping.subject_mapping_pb2.ListSubjectMappingsResponse:
|
|
77
|
-
response = self.call_list_subject_mappings(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_subject_mapping(
|
|
87
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.GetSubjectMappingRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
88
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.GetSubjectMappingResponse]:
|
|
89
|
-
"""Low-level method to call GetSubjectMapping, granting access to errors and metadata"""
|
|
90
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/GetSubjectMapping"
|
|
91
|
-
return self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.GetSubjectMappingResponse,extra_headers, timeout_seconds)
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
def get_subject_mapping(
|
|
95
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.GetSubjectMappingRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
96
|
-
) -> policy.subjectmapping.subject_mapping_pb2.GetSubjectMappingResponse:
|
|
97
|
-
response = self.call_get_subject_mapping(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_create_subject_mapping(
|
|
107
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.CreateSubjectMappingRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
108
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.CreateSubjectMappingResponse]:
|
|
109
|
-
"""Low-level method to call CreateSubjectMapping, granting access to errors and metadata"""
|
|
110
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/CreateSubjectMapping"
|
|
111
|
-
return self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.CreateSubjectMappingResponse,extra_headers, timeout_seconds)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
def create_subject_mapping(
|
|
115
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.CreateSubjectMappingRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
116
|
-
) -> policy.subjectmapping.subject_mapping_pb2.CreateSubjectMappingResponse:
|
|
117
|
-
response = self.call_create_subject_mapping(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
|
-
def call_update_subject_mapping(
|
|
127
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.UpdateSubjectMappingRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
128
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.UpdateSubjectMappingResponse]:
|
|
129
|
-
"""Low-level method to call UpdateSubjectMapping, granting access to errors and metadata"""
|
|
130
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/UpdateSubjectMapping"
|
|
131
|
-
return self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.UpdateSubjectMappingResponse,extra_headers, timeout_seconds)
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
def update_subject_mapping(
|
|
135
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.UpdateSubjectMappingRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
136
|
-
) -> policy.subjectmapping.subject_mapping_pb2.UpdateSubjectMappingResponse:
|
|
137
|
-
response = self.call_update_subject_mapping(req, extra_headers, timeout_seconds)
|
|
138
|
-
err = response.error()
|
|
139
|
-
if err is not None:
|
|
140
|
-
raise err
|
|
141
|
-
msg = response.message()
|
|
142
|
-
if msg is None:
|
|
143
|
-
raise ConnectProtocolError('missing response message')
|
|
144
|
-
return msg
|
|
145
|
-
|
|
146
|
-
def call_delete_subject_mapping(
|
|
147
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.DeleteSubjectMappingRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
148
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.DeleteSubjectMappingResponse]:
|
|
149
|
-
"""Low-level method to call DeleteSubjectMapping, granting access to errors and metadata"""
|
|
150
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/DeleteSubjectMapping"
|
|
151
|
-
return self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.DeleteSubjectMappingResponse,extra_headers, timeout_seconds)
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
def delete_subject_mapping(
|
|
155
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.DeleteSubjectMappingRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
156
|
-
) -> policy.subjectmapping.subject_mapping_pb2.DeleteSubjectMappingResponse:
|
|
157
|
-
response = self.call_delete_subject_mapping(req, extra_headers, timeout_seconds)
|
|
158
|
-
err = response.error()
|
|
159
|
-
if err is not None:
|
|
160
|
-
raise err
|
|
161
|
-
msg = response.message()
|
|
162
|
-
if msg is None:
|
|
163
|
-
raise ConnectProtocolError('missing response message')
|
|
164
|
-
return msg
|
|
165
|
-
|
|
166
|
-
def call_list_subject_condition_sets(
|
|
167
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.ListSubjectConditionSetsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
168
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.ListSubjectConditionSetsResponse]:
|
|
169
|
-
"""Low-level method to call ListSubjectConditionSets, granting access to errors and metadata"""
|
|
170
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/ListSubjectConditionSets"
|
|
171
|
-
return self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.ListSubjectConditionSetsResponse,extra_headers, timeout_seconds)
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
def list_subject_condition_sets(
|
|
175
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.ListSubjectConditionSetsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
176
|
-
) -> policy.subjectmapping.subject_mapping_pb2.ListSubjectConditionSetsResponse:
|
|
177
|
-
response = self.call_list_subject_condition_sets(req, extra_headers, timeout_seconds)
|
|
178
|
-
err = response.error()
|
|
179
|
-
if err is not None:
|
|
180
|
-
raise err
|
|
181
|
-
msg = response.message()
|
|
182
|
-
if msg is None:
|
|
183
|
-
raise ConnectProtocolError('missing response message')
|
|
184
|
-
return msg
|
|
185
|
-
|
|
186
|
-
def call_get_subject_condition_set(
|
|
187
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.GetSubjectConditionSetRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
188
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.GetSubjectConditionSetResponse]:
|
|
189
|
-
"""Low-level method to call GetSubjectConditionSet, granting access to errors and metadata"""
|
|
190
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/GetSubjectConditionSet"
|
|
191
|
-
return self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.GetSubjectConditionSetResponse,extra_headers, timeout_seconds)
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
def get_subject_condition_set(
|
|
195
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.GetSubjectConditionSetRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
196
|
-
) -> policy.subjectmapping.subject_mapping_pb2.GetSubjectConditionSetResponse:
|
|
197
|
-
response = self.call_get_subject_condition_set(req, extra_headers, timeout_seconds)
|
|
198
|
-
err = response.error()
|
|
199
|
-
if err is not None:
|
|
200
|
-
raise err
|
|
201
|
-
msg = response.message()
|
|
202
|
-
if msg is None:
|
|
203
|
-
raise ConnectProtocolError('missing response message')
|
|
204
|
-
return msg
|
|
205
|
-
|
|
206
|
-
def call_create_subject_condition_set(
|
|
207
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.CreateSubjectConditionSetRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
208
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.CreateSubjectConditionSetResponse]:
|
|
209
|
-
"""Low-level method to call CreateSubjectConditionSet, granting access to errors and metadata"""
|
|
210
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/CreateSubjectConditionSet"
|
|
211
|
-
return self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.CreateSubjectConditionSetResponse,extra_headers, timeout_seconds)
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
def create_subject_condition_set(
|
|
215
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.CreateSubjectConditionSetRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
216
|
-
) -> policy.subjectmapping.subject_mapping_pb2.CreateSubjectConditionSetResponse:
|
|
217
|
-
response = self.call_create_subject_condition_set(req, extra_headers, timeout_seconds)
|
|
218
|
-
err = response.error()
|
|
219
|
-
if err is not None:
|
|
220
|
-
raise err
|
|
221
|
-
msg = response.message()
|
|
222
|
-
if msg is None:
|
|
223
|
-
raise ConnectProtocolError('missing response message')
|
|
224
|
-
return msg
|
|
225
|
-
|
|
226
|
-
def call_update_subject_condition_set(
|
|
227
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.UpdateSubjectConditionSetRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
228
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.UpdateSubjectConditionSetResponse]:
|
|
229
|
-
"""Low-level method to call UpdateSubjectConditionSet, granting access to errors and metadata"""
|
|
230
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/UpdateSubjectConditionSet"
|
|
231
|
-
return self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.UpdateSubjectConditionSetResponse,extra_headers, timeout_seconds)
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
def update_subject_condition_set(
|
|
235
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.UpdateSubjectConditionSetRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
236
|
-
) -> policy.subjectmapping.subject_mapping_pb2.UpdateSubjectConditionSetResponse:
|
|
237
|
-
response = self.call_update_subject_condition_set(req, extra_headers, timeout_seconds)
|
|
238
|
-
err = response.error()
|
|
239
|
-
if err is not None:
|
|
240
|
-
raise err
|
|
241
|
-
msg = response.message()
|
|
242
|
-
if msg is None:
|
|
243
|
-
raise ConnectProtocolError('missing response message')
|
|
244
|
-
return msg
|
|
245
|
-
|
|
246
|
-
def call_delete_subject_condition_set(
|
|
247
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.DeleteSubjectConditionSetRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
248
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.DeleteSubjectConditionSetResponse]:
|
|
249
|
-
"""Low-level method to call DeleteSubjectConditionSet, granting access to errors and metadata"""
|
|
250
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/DeleteSubjectConditionSet"
|
|
251
|
-
return self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.DeleteSubjectConditionSetResponse,extra_headers, timeout_seconds)
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
def delete_subject_condition_set(
|
|
255
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.DeleteSubjectConditionSetRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
256
|
-
) -> policy.subjectmapping.subject_mapping_pb2.DeleteSubjectConditionSetResponse:
|
|
257
|
-
response = self.call_delete_subject_condition_set(req, extra_headers, timeout_seconds)
|
|
258
|
-
err = response.error()
|
|
259
|
-
if err is not None:
|
|
260
|
-
raise err
|
|
261
|
-
msg = response.message()
|
|
262
|
-
if msg is None:
|
|
263
|
-
raise ConnectProtocolError('missing response message')
|
|
264
|
-
return msg
|
|
265
|
-
|
|
266
|
-
def call_delete_all_unmapped_subject_condition_sets(
|
|
267
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.DeleteAllUnmappedSubjectConditionSetsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
268
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.DeleteAllUnmappedSubjectConditionSetsResponse]:
|
|
269
|
-
"""Low-level method to call DeleteAllUnmappedSubjectConditionSets, granting access to errors and metadata"""
|
|
270
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/DeleteAllUnmappedSubjectConditionSets"
|
|
271
|
-
return self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.DeleteAllUnmappedSubjectConditionSetsResponse,extra_headers, timeout_seconds)
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
def delete_all_unmapped_subject_condition_sets(
|
|
275
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.DeleteAllUnmappedSubjectConditionSetsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
276
|
-
) -> policy.subjectmapping.subject_mapping_pb2.DeleteAllUnmappedSubjectConditionSetsResponse:
|
|
277
|
-
response = self.call_delete_all_unmapped_subject_condition_sets(req, extra_headers, timeout_seconds)
|
|
278
|
-
err = response.error()
|
|
279
|
-
if err is not None:
|
|
280
|
-
raise err
|
|
281
|
-
msg = response.message()
|
|
282
|
-
if msg is None:
|
|
283
|
-
raise ConnectProtocolError('missing response message')
|
|
284
|
-
return msg
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
class AsyncSubjectMappingServiceClient:
|
|
288
|
-
def __init__(
|
|
289
|
-
self,
|
|
290
|
-
base_url: str,
|
|
291
|
-
http_client: aiohttp.ClientSession,
|
|
292
|
-
protocol: ConnectProtocol = ConnectProtocol.CONNECT_PROTOBUF,
|
|
293
|
-
):
|
|
294
|
-
self.base_url = base_url
|
|
295
|
-
self._connect_client = AsyncConnectClient(http_client, protocol)
|
|
296
|
-
|
|
297
|
-
async def call_match_subject_mappings(
|
|
298
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.MatchSubjectMappingsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
299
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.MatchSubjectMappingsResponse]:
|
|
300
|
-
"""Low-level method to call MatchSubjectMappings, granting access to errors and metadata"""
|
|
301
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/MatchSubjectMappings"
|
|
302
|
-
return await self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.MatchSubjectMappingsResponse,extra_headers, timeout_seconds)
|
|
303
|
-
|
|
304
|
-
async def match_subject_mappings(
|
|
305
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.MatchSubjectMappingsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
306
|
-
) -> policy.subjectmapping.subject_mapping_pb2.MatchSubjectMappingsResponse:
|
|
307
|
-
response = await self.call_match_subject_mappings(req, extra_headers, timeout_seconds)
|
|
308
|
-
err = response.error()
|
|
309
|
-
if err is not None:
|
|
310
|
-
raise err
|
|
311
|
-
msg = response.message()
|
|
312
|
-
if msg is None:
|
|
313
|
-
raise ConnectProtocolError('missing response message')
|
|
314
|
-
return msg
|
|
315
|
-
|
|
316
|
-
async def call_list_subject_mappings(
|
|
317
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.ListSubjectMappingsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
318
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.ListSubjectMappingsResponse]:
|
|
319
|
-
"""Low-level method to call ListSubjectMappings, granting access to errors and metadata"""
|
|
320
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/ListSubjectMappings"
|
|
321
|
-
return await self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.ListSubjectMappingsResponse,extra_headers, timeout_seconds)
|
|
322
|
-
|
|
323
|
-
async def list_subject_mappings(
|
|
324
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.ListSubjectMappingsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
325
|
-
) -> policy.subjectmapping.subject_mapping_pb2.ListSubjectMappingsResponse:
|
|
326
|
-
response = await self.call_list_subject_mappings(req, extra_headers, timeout_seconds)
|
|
327
|
-
err = response.error()
|
|
328
|
-
if err is not None:
|
|
329
|
-
raise err
|
|
330
|
-
msg = response.message()
|
|
331
|
-
if msg is None:
|
|
332
|
-
raise ConnectProtocolError('missing response message')
|
|
333
|
-
return msg
|
|
334
|
-
|
|
335
|
-
async def call_get_subject_mapping(
|
|
336
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.GetSubjectMappingRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
337
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.GetSubjectMappingResponse]:
|
|
338
|
-
"""Low-level method to call GetSubjectMapping, granting access to errors and metadata"""
|
|
339
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/GetSubjectMapping"
|
|
340
|
-
return await self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.GetSubjectMappingResponse,extra_headers, timeout_seconds)
|
|
341
|
-
|
|
342
|
-
async def get_subject_mapping(
|
|
343
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.GetSubjectMappingRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
344
|
-
) -> policy.subjectmapping.subject_mapping_pb2.GetSubjectMappingResponse:
|
|
345
|
-
response = await self.call_get_subject_mapping(req, extra_headers, timeout_seconds)
|
|
346
|
-
err = response.error()
|
|
347
|
-
if err is not None:
|
|
348
|
-
raise err
|
|
349
|
-
msg = response.message()
|
|
350
|
-
if msg is None:
|
|
351
|
-
raise ConnectProtocolError('missing response message')
|
|
352
|
-
return msg
|
|
353
|
-
|
|
354
|
-
async def call_create_subject_mapping(
|
|
355
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.CreateSubjectMappingRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
356
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.CreateSubjectMappingResponse]:
|
|
357
|
-
"""Low-level method to call CreateSubjectMapping, granting access to errors and metadata"""
|
|
358
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/CreateSubjectMapping"
|
|
359
|
-
return await self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.CreateSubjectMappingResponse,extra_headers, timeout_seconds)
|
|
360
|
-
|
|
361
|
-
async def create_subject_mapping(
|
|
362
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.CreateSubjectMappingRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
363
|
-
) -> policy.subjectmapping.subject_mapping_pb2.CreateSubjectMappingResponse:
|
|
364
|
-
response = await self.call_create_subject_mapping(req, extra_headers, timeout_seconds)
|
|
365
|
-
err = response.error()
|
|
366
|
-
if err is not None:
|
|
367
|
-
raise err
|
|
368
|
-
msg = response.message()
|
|
369
|
-
if msg is None:
|
|
370
|
-
raise ConnectProtocolError('missing response message')
|
|
371
|
-
return msg
|
|
372
|
-
|
|
373
|
-
async def call_update_subject_mapping(
|
|
374
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.UpdateSubjectMappingRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
375
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.UpdateSubjectMappingResponse]:
|
|
376
|
-
"""Low-level method to call UpdateSubjectMapping, granting access to errors and metadata"""
|
|
377
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/UpdateSubjectMapping"
|
|
378
|
-
return await self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.UpdateSubjectMappingResponse,extra_headers, timeout_seconds)
|
|
379
|
-
|
|
380
|
-
async def update_subject_mapping(
|
|
381
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.UpdateSubjectMappingRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
382
|
-
) -> policy.subjectmapping.subject_mapping_pb2.UpdateSubjectMappingResponse:
|
|
383
|
-
response = await self.call_update_subject_mapping(req, extra_headers, timeout_seconds)
|
|
384
|
-
err = response.error()
|
|
385
|
-
if err is not None:
|
|
386
|
-
raise err
|
|
387
|
-
msg = response.message()
|
|
388
|
-
if msg is None:
|
|
389
|
-
raise ConnectProtocolError('missing response message')
|
|
390
|
-
return msg
|
|
391
|
-
|
|
392
|
-
async def call_delete_subject_mapping(
|
|
393
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.DeleteSubjectMappingRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
394
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.DeleteSubjectMappingResponse]:
|
|
395
|
-
"""Low-level method to call DeleteSubjectMapping, granting access to errors and metadata"""
|
|
396
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/DeleteSubjectMapping"
|
|
397
|
-
return await self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.DeleteSubjectMappingResponse,extra_headers, timeout_seconds)
|
|
398
|
-
|
|
399
|
-
async def delete_subject_mapping(
|
|
400
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.DeleteSubjectMappingRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
401
|
-
) -> policy.subjectmapping.subject_mapping_pb2.DeleteSubjectMappingResponse:
|
|
402
|
-
response = await self.call_delete_subject_mapping(req, extra_headers, timeout_seconds)
|
|
403
|
-
err = response.error()
|
|
404
|
-
if err is not None:
|
|
405
|
-
raise err
|
|
406
|
-
msg = response.message()
|
|
407
|
-
if msg is None:
|
|
408
|
-
raise ConnectProtocolError('missing response message')
|
|
409
|
-
return msg
|
|
410
|
-
|
|
411
|
-
async def call_list_subject_condition_sets(
|
|
412
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.ListSubjectConditionSetsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
413
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.ListSubjectConditionSetsResponse]:
|
|
414
|
-
"""Low-level method to call ListSubjectConditionSets, granting access to errors and metadata"""
|
|
415
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/ListSubjectConditionSets"
|
|
416
|
-
return await self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.ListSubjectConditionSetsResponse,extra_headers, timeout_seconds)
|
|
417
|
-
|
|
418
|
-
async def list_subject_condition_sets(
|
|
419
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.ListSubjectConditionSetsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
420
|
-
) -> policy.subjectmapping.subject_mapping_pb2.ListSubjectConditionSetsResponse:
|
|
421
|
-
response = await self.call_list_subject_condition_sets(req, extra_headers, timeout_seconds)
|
|
422
|
-
err = response.error()
|
|
423
|
-
if err is not None:
|
|
424
|
-
raise err
|
|
425
|
-
msg = response.message()
|
|
426
|
-
if msg is None:
|
|
427
|
-
raise ConnectProtocolError('missing response message')
|
|
428
|
-
return msg
|
|
429
|
-
|
|
430
|
-
async def call_get_subject_condition_set(
|
|
431
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.GetSubjectConditionSetRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
432
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.GetSubjectConditionSetResponse]:
|
|
433
|
-
"""Low-level method to call GetSubjectConditionSet, granting access to errors and metadata"""
|
|
434
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/GetSubjectConditionSet"
|
|
435
|
-
return await self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.GetSubjectConditionSetResponse,extra_headers, timeout_seconds)
|
|
436
|
-
|
|
437
|
-
async def get_subject_condition_set(
|
|
438
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.GetSubjectConditionSetRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
439
|
-
) -> policy.subjectmapping.subject_mapping_pb2.GetSubjectConditionSetResponse:
|
|
440
|
-
response = await self.call_get_subject_condition_set(req, extra_headers, timeout_seconds)
|
|
441
|
-
err = response.error()
|
|
442
|
-
if err is not None:
|
|
443
|
-
raise err
|
|
444
|
-
msg = response.message()
|
|
445
|
-
if msg is None:
|
|
446
|
-
raise ConnectProtocolError('missing response message')
|
|
447
|
-
return msg
|
|
448
|
-
|
|
449
|
-
async def call_create_subject_condition_set(
|
|
450
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.CreateSubjectConditionSetRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
451
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.CreateSubjectConditionSetResponse]:
|
|
452
|
-
"""Low-level method to call CreateSubjectConditionSet, granting access to errors and metadata"""
|
|
453
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/CreateSubjectConditionSet"
|
|
454
|
-
return await self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.CreateSubjectConditionSetResponse,extra_headers, timeout_seconds)
|
|
455
|
-
|
|
456
|
-
async def create_subject_condition_set(
|
|
457
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.CreateSubjectConditionSetRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
458
|
-
) -> policy.subjectmapping.subject_mapping_pb2.CreateSubjectConditionSetResponse:
|
|
459
|
-
response = await self.call_create_subject_condition_set(req, extra_headers, timeout_seconds)
|
|
460
|
-
err = response.error()
|
|
461
|
-
if err is not None:
|
|
462
|
-
raise err
|
|
463
|
-
msg = response.message()
|
|
464
|
-
if msg is None:
|
|
465
|
-
raise ConnectProtocolError('missing response message')
|
|
466
|
-
return msg
|
|
467
|
-
|
|
468
|
-
async def call_update_subject_condition_set(
|
|
469
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.UpdateSubjectConditionSetRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
470
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.UpdateSubjectConditionSetResponse]:
|
|
471
|
-
"""Low-level method to call UpdateSubjectConditionSet, granting access to errors and metadata"""
|
|
472
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/UpdateSubjectConditionSet"
|
|
473
|
-
return await self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.UpdateSubjectConditionSetResponse,extra_headers, timeout_seconds)
|
|
474
|
-
|
|
475
|
-
async def update_subject_condition_set(
|
|
476
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.UpdateSubjectConditionSetRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
477
|
-
) -> policy.subjectmapping.subject_mapping_pb2.UpdateSubjectConditionSetResponse:
|
|
478
|
-
response = await self.call_update_subject_condition_set(req, extra_headers, timeout_seconds)
|
|
479
|
-
err = response.error()
|
|
480
|
-
if err is not None:
|
|
481
|
-
raise err
|
|
482
|
-
msg = response.message()
|
|
483
|
-
if msg is None:
|
|
484
|
-
raise ConnectProtocolError('missing response message')
|
|
485
|
-
return msg
|
|
486
|
-
|
|
487
|
-
async def call_delete_subject_condition_set(
|
|
488
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.DeleteSubjectConditionSetRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
489
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.DeleteSubjectConditionSetResponse]:
|
|
490
|
-
"""Low-level method to call DeleteSubjectConditionSet, granting access to errors and metadata"""
|
|
491
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/DeleteSubjectConditionSet"
|
|
492
|
-
return await self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.DeleteSubjectConditionSetResponse,extra_headers, timeout_seconds)
|
|
493
|
-
|
|
494
|
-
async def delete_subject_condition_set(
|
|
495
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.DeleteSubjectConditionSetRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
496
|
-
) -> policy.subjectmapping.subject_mapping_pb2.DeleteSubjectConditionSetResponse:
|
|
497
|
-
response = await self.call_delete_subject_condition_set(req, extra_headers, timeout_seconds)
|
|
498
|
-
err = response.error()
|
|
499
|
-
if err is not None:
|
|
500
|
-
raise err
|
|
501
|
-
msg = response.message()
|
|
502
|
-
if msg is None:
|
|
503
|
-
raise ConnectProtocolError('missing response message')
|
|
504
|
-
return msg
|
|
505
|
-
|
|
506
|
-
async def call_delete_all_unmapped_subject_condition_sets(
|
|
507
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.DeleteAllUnmappedSubjectConditionSetsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
508
|
-
) -> UnaryOutput[policy.subjectmapping.subject_mapping_pb2.DeleteAllUnmappedSubjectConditionSetsResponse]:
|
|
509
|
-
"""Low-level method to call DeleteAllUnmappedSubjectConditionSets, granting access to errors and metadata"""
|
|
510
|
-
url = self.base_url + "/policy.subjectmapping.SubjectMappingService/DeleteAllUnmappedSubjectConditionSets"
|
|
511
|
-
return await self._connect_client.call_unary(url, req, policy.subjectmapping.subject_mapping_pb2.DeleteAllUnmappedSubjectConditionSetsResponse,extra_headers, timeout_seconds)
|
|
512
|
-
|
|
513
|
-
async def delete_all_unmapped_subject_condition_sets(
|
|
514
|
-
self, req: policy.subjectmapping.subject_mapping_pb2.DeleteAllUnmappedSubjectConditionSetsRequest,extra_headers: HeaderInput | None=None, timeout_seconds: float | None=None
|
|
515
|
-
) -> policy.subjectmapping.subject_mapping_pb2.DeleteAllUnmappedSubjectConditionSetsResponse:
|
|
516
|
-
response = await self.call_delete_all_unmapped_subject_condition_sets(req, extra_headers, timeout_seconds)
|
|
517
|
-
err = response.error()
|
|
518
|
-
if err is not None:
|
|
519
|
-
raise err
|
|
520
|
-
msg = response.message()
|
|
521
|
-
if msg is None:
|
|
522
|
-
raise ConnectProtocolError('missing response message')
|
|
523
|
-
return msg
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
@typing.runtime_checkable
|
|
527
|
-
class SubjectMappingServiceProtocol(typing.Protocol):
|
|
528
|
-
def match_subject_mappings(self, req: ClientRequest[policy.subjectmapping.subject_mapping_pb2.MatchSubjectMappingsRequest]) -> ServerResponse[policy.subjectmapping.subject_mapping_pb2.MatchSubjectMappingsResponse]:
|
|
529
|
-
...
|
|
530
|
-
def list_subject_mappings(self, req: ClientRequest[policy.subjectmapping.subject_mapping_pb2.ListSubjectMappingsRequest]) -> ServerResponse[policy.subjectmapping.subject_mapping_pb2.ListSubjectMappingsResponse]:
|
|
531
|
-
...
|
|
532
|
-
def get_subject_mapping(self, req: ClientRequest[policy.subjectmapping.subject_mapping_pb2.GetSubjectMappingRequest]) -> ServerResponse[policy.subjectmapping.subject_mapping_pb2.GetSubjectMappingResponse]:
|
|
533
|
-
...
|
|
534
|
-
def create_subject_mapping(self, req: ClientRequest[policy.subjectmapping.subject_mapping_pb2.CreateSubjectMappingRequest]) -> ServerResponse[policy.subjectmapping.subject_mapping_pb2.CreateSubjectMappingResponse]:
|
|
535
|
-
...
|
|
536
|
-
def update_subject_mapping(self, req: ClientRequest[policy.subjectmapping.subject_mapping_pb2.UpdateSubjectMappingRequest]) -> ServerResponse[policy.subjectmapping.subject_mapping_pb2.UpdateSubjectMappingResponse]:
|
|
537
|
-
...
|
|
538
|
-
def delete_subject_mapping(self, req: ClientRequest[policy.subjectmapping.subject_mapping_pb2.DeleteSubjectMappingRequest]) -> ServerResponse[policy.subjectmapping.subject_mapping_pb2.DeleteSubjectMappingResponse]:
|
|
539
|
-
...
|
|
540
|
-
def list_subject_condition_sets(self, req: ClientRequest[policy.subjectmapping.subject_mapping_pb2.ListSubjectConditionSetsRequest]) -> ServerResponse[policy.subjectmapping.subject_mapping_pb2.ListSubjectConditionSetsResponse]:
|
|
541
|
-
...
|
|
542
|
-
def get_subject_condition_set(self, req: ClientRequest[policy.subjectmapping.subject_mapping_pb2.GetSubjectConditionSetRequest]) -> ServerResponse[policy.subjectmapping.subject_mapping_pb2.GetSubjectConditionSetResponse]:
|
|
543
|
-
...
|
|
544
|
-
def create_subject_condition_set(self, req: ClientRequest[policy.subjectmapping.subject_mapping_pb2.CreateSubjectConditionSetRequest]) -> ServerResponse[policy.subjectmapping.subject_mapping_pb2.CreateSubjectConditionSetResponse]:
|
|
545
|
-
...
|
|
546
|
-
def update_subject_condition_set(self, req: ClientRequest[policy.subjectmapping.subject_mapping_pb2.UpdateSubjectConditionSetRequest]) -> ServerResponse[policy.subjectmapping.subject_mapping_pb2.UpdateSubjectConditionSetResponse]:
|
|
547
|
-
...
|
|
548
|
-
def delete_subject_condition_set(self, req: ClientRequest[policy.subjectmapping.subject_mapping_pb2.DeleteSubjectConditionSetRequest]) -> ServerResponse[policy.subjectmapping.subject_mapping_pb2.DeleteSubjectConditionSetResponse]:
|
|
549
|
-
...
|
|
550
|
-
def delete_all_unmapped_subject_condition_sets(self, req: ClientRequest[policy.subjectmapping.subject_mapping_pb2.DeleteAllUnmappedSubjectConditionSetsRequest]) -> ServerResponse[policy.subjectmapping.subject_mapping_pb2.DeleteAllUnmappedSubjectConditionSetsResponse]:
|
|
551
|
-
...
|
|
552
|
-
|
|
553
|
-
SUBJECT_MAPPING_SERVICE_PATH_PREFIX = "/policy.subjectmapping.SubjectMappingService"
|
|
554
|
-
|
|
555
|
-
def wsgi_subject_mapping_service(implementation: SubjectMappingServiceProtocol) -> WSGIApplication:
|
|
556
|
-
app = ConnectWSGI()
|
|
557
|
-
app.register_unary_rpc("/policy.subjectmapping.SubjectMappingService/MatchSubjectMappings", implementation.match_subject_mappings, policy.subjectmapping.subject_mapping_pb2.MatchSubjectMappingsRequest)
|
|
558
|
-
app.register_unary_rpc("/policy.subjectmapping.SubjectMappingService/ListSubjectMappings", implementation.list_subject_mappings, policy.subjectmapping.subject_mapping_pb2.ListSubjectMappingsRequest)
|
|
559
|
-
app.register_unary_rpc("/policy.subjectmapping.SubjectMappingService/GetSubjectMapping", implementation.get_subject_mapping, policy.subjectmapping.subject_mapping_pb2.GetSubjectMappingRequest)
|
|
560
|
-
app.register_unary_rpc("/policy.subjectmapping.SubjectMappingService/CreateSubjectMapping", implementation.create_subject_mapping, policy.subjectmapping.subject_mapping_pb2.CreateSubjectMappingRequest)
|
|
561
|
-
app.register_unary_rpc("/policy.subjectmapping.SubjectMappingService/UpdateSubjectMapping", implementation.update_subject_mapping, policy.subjectmapping.subject_mapping_pb2.UpdateSubjectMappingRequest)
|
|
562
|
-
app.register_unary_rpc("/policy.subjectmapping.SubjectMappingService/DeleteSubjectMapping", implementation.delete_subject_mapping, policy.subjectmapping.subject_mapping_pb2.DeleteSubjectMappingRequest)
|
|
563
|
-
app.register_unary_rpc("/policy.subjectmapping.SubjectMappingService/ListSubjectConditionSets", implementation.list_subject_condition_sets, policy.subjectmapping.subject_mapping_pb2.ListSubjectConditionSetsRequest)
|
|
564
|
-
app.register_unary_rpc("/policy.subjectmapping.SubjectMappingService/GetSubjectConditionSet", implementation.get_subject_condition_set, policy.subjectmapping.subject_mapping_pb2.GetSubjectConditionSetRequest)
|
|
565
|
-
app.register_unary_rpc("/policy.subjectmapping.SubjectMappingService/CreateSubjectConditionSet", implementation.create_subject_condition_set, policy.subjectmapping.subject_mapping_pb2.CreateSubjectConditionSetRequest)
|
|
566
|
-
app.register_unary_rpc("/policy.subjectmapping.SubjectMappingService/UpdateSubjectConditionSet", implementation.update_subject_condition_set, policy.subjectmapping.subject_mapping_pb2.UpdateSubjectConditionSetRequest)
|
|
567
|
-
app.register_unary_rpc("/policy.subjectmapping.SubjectMappingService/DeleteSubjectConditionSet", implementation.delete_subject_condition_set, policy.subjectmapping.subject_mapping_pb2.DeleteSubjectConditionSetRequest)
|
|
568
|
-
app.register_unary_rpc("/policy.subjectmapping.SubjectMappingService/DeleteAllUnmappedSubjectConditionSets", implementation.delete_all_unmapped_subject_condition_sets, policy.subjectmapping.subject_mapping_pb2.DeleteAllUnmappedSubjectConditionSetsRequest)
|
|
569
|
-
return app
|