permify 0.0.1__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.
- permify/__init__.py +166 -0
- permify/api/__init__.py +10 -0
- permify/api/bundle_api.py +893 -0
- permify/api/data_api.py +2033 -0
- permify/api/permission_api.py +1748 -0
- permify/api/schema_api.py +1178 -0
- permify/api/tenancy_api.py +834 -0
- permify/api/watch_api.py +323 -0
- permify/api_client.py +782 -0
- permify/api_response.py +21 -0
- permify/configuration.py +480 -0
- permify/exceptions.py +200 -0
- permify/models/__init__.py +144 -0
- permify/models/abstract_type.py +100 -0
- permify/models/any.py +101 -0
- permify/models/argument.py +98 -0
- permify/models/attribute.py +100 -0
- permify/models/attribute_definition.py +91 -0
- permify/models/attribute_filter.py +94 -0
- permify/models/attribute_read_request_metadata.py +88 -0
- permify/models/attribute_read_response.py +98 -0
- permify/models/attribute_type.py +44 -0
- permify/models/bundle_delete_body.py +88 -0
- permify/models/bundle_delete_response.py +88 -0
- permify/models/bundle_read_body.py +88 -0
- permify/models/bundle_read_response.py +92 -0
- permify/models/bundle_run_response.py +88 -0
- permify/models/bundle_write_body.py +96 -0
- permify/models/bundle_write_response.py +88 -0
- permify/models/check_body.py +122 -0
- permify/models/check_result.py +38 -0
- permify/models/checked_expr.py +130 -0
- permify/models/child.py +100 -0
- permify/models/comprehension.py +118 -0
- permify/models/computed_attribute.py +88 -0
- permify/models/computed_user_set.py +88 -0
- permify/models/constant.py +116 -0
- permify/models/context.py +108 -0
- permify/models/context_attribute.py +88 -0
- permify/models/create_list.py +100 -0
- permify/models/create_struct.py +100 -0
- permify/models/data_bundle.py +100 -0
- permify/models/data_change.py +101 -0
- permify/models/data_change_operation.py +38 -0
- permify/models/data_changes.py +98 -0
- permify/models/data_delete_body.py +98 -0
- permify/models/data_delete_response.py +88 -0
- permify/models/data_write_body.py +112 -0
- permify/models/data_write_request_metadata.py +88 -0
- permify/models/data_write_response.py +88 -0
- permify/models/delete_relationships_body.py +92 -0
- permify/models/entity.py +90 -0
- permify/models/entity_definition.py +136 -0
- permify/models/entity_definition_reference.py +39 -0
- permify/models/entity_filter.py +90 -0
- permify/models/entry.py +105 -0
- permify/models/expand_leaf.py +104 -0
- permify/models/expand_tree_node.py +101 -0
- permify/models/expand_tree_node_operation.py +39 -0
- permify/models/expr.py +132 -0
- permify/models/expr_call.py +105 -0
- permify/models/function_type.py +103 -0
- permify/models/ident.py +88 -0
- permify/models/leaf.py +110 -0
- permify/models/list_type.py +94 -0
- permify/models/lookup_entity_body.py +108 -0
- permify/models/lookup_entity_stream_body.py +108 -0
- permify/models/lookup_subject_body.py +112 -0
- permify/models/map_type.py +99 -0
- permify/models/partial_write_body.py +107 -0
- permify/models/partials.py +92 -0
- permify/models/permission_check_request_metadata.py +92 -0
- permify/models/permission_check_response.py +95 -0
- permify/models/permission_check_response_metadata.py +88 -0
- permify/models/permission_definition.py +94 -0
- permify/models/permission_expand_body.py +116 -0
- permify/models/permission_expand_request_metadata.py +90 -0
- permify/models/permission_expand_response.py +92 -0
- permify/models/permission_lookup_entity_request_metadata.py +92 -0
- permify/models/permission_lookup_entity_response.py +88 -0
- permify/models/permission_lookup_entity_stream_response.py +88 -0
- permify/models/permission_lookup_subject_request_metadata.py +92 -0
- permify/models/permission_lookup_subject_response.py +88 -0
- permify/models/permission_subject_permission_request_metadata.py +94 -0
- permify/models/permission_subject_permission_response.py +89 -0
- permify/models/primitive_type.py +42 -0
- permify/models/read_attributes_body.py +102 -0
- permify/models/read_relationships_body.py +102 -0
- permify/models/relation_definition.py +98 -0
- permify/models/relation_reference.py +90 -0
- permify/models/relationship_delete_response.py +88 -0
- permify/models/relationship_read_request_metadata.py +88 -0
- permify/models/relationship_read_response.py +98 -0
- permify/models/relationship_write_request_metadata.py +88 -0
- permify/models/relationship_write_response.py +88 -0
- permify/models/rewrite.py +101 -0
- permify/models/rewrite_operation.py +39 -0
- permify/models/rule_definition.py +97 -0
- permify/models/run_bundle_body.py +90 -0
- permify/models/schema_definition.py +119 -0
- permify/models/schema_definition_reference.py +38 -0
- permify/models/schema_list.py +90 -0
- permify/models/schema_list_body.py +90 -0
- permify/models/schema_list_response.py +100 -0
- permify/models/schema_partial_write_request_metadata.py +88 -0
- permify/models/schema_partial_write_response.py +88 -0
- permify/models/schema_read_body.py +92 -0
- permify/models/schema_read_request_metadata.py +88 -0
- permify/models/schema_read_response.py +92 -0
- permify/models/schema_write_body.py +88 -0
- permify/models/schema_write_response.py +88 -0
- permify/models/select.py +98 -0
- permify/models/source_info.py +109 -0
- permify/models/status.py +100 -0
- permify/models/stream_result_of_permission_lookup_entity_stream_response.py +98 -0
- permify/models/stream_result_of_watch_response.py +98 -0
- permify/models/subject.py +92 -0
- permify/models/subject_filter.py +92 -0
- permify/models/subject_permission_body.py +110 -0
- permify/models/subjects.py +96 -0
- permify/models/tenant.py +93 -0
- permify/models/tenant_create_request.py +90 -0
- permify/models/tenant_create_response.py +92 -0
- permify/models/tenant_delete_response.py +92 -0
- permify/models/tenant_list_request.py +90 -0
- permify/models/tenant_list_response.py +98 -0
- permify/models/tuple.py +100 -0
- permify/models/tuple_filter.py +100 -0
- permify/models/tuple_set.py +88 -0
- permify/models/tuple_to_user_set.py +98 -0
- permify/models/v1_call.py +98 -0
- permify/models/v1_expand.py +118 -0
- permify/models/v1_operation.py +94 -0
- permify/models/v1alpha1_reference.py +96 -0
- permify/models/v1alpha1_type.py +135 -0
- permify/models/values.py +101 -0
- permify/models/watch_body.py +88 -0
- permify/models/watch_response.py +92 -0
- permify/models/well_known_type.py +39 -0
- permify/models/write_relationships_body.py +102 -0
- permify/py.typed +0 -0
- permify/rest.py +258 -0
- permify-0.0.1.dist-info/LICENCE +201 -0
- permify-0.0.1.dist-info/METADATA +18 -0
- permify-0.0.1.dist-info/RECORD +147 -0
- permify-0.0.1.dist-info/WHEEL +5 -0
- permify-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,893 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Permify API
|
|
5
|
+
|
|
6
|
+
Permify is an open source authorization service for creating fine-grained and scalable authorization systems.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v0.9.9
|
|
9
|
+
Contact: hello@permify.co
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
import warnings
|
|
16
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
17
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
18
|
+
from typing_extensions import Annotated
|
|
19
|
+
|
|
20
|
+
from pydantic import Field, StrictStr
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from permify.models.bundle_delete_body import BundleDeleteBody
|
|
23
|
+
from permify.models.bundle_delete_response import BundleDeleteResponse
|
|
24
|
+
from permify.models.bundle_read_body import BundleReadBody
|
|
25
|
+
from permify.models.bundle_read_response import BundleReadResponse
|
|
26
|
+
from permify.models.bundle_write_body import BundleWriteBody
|
|
27
|
+
from permify.models.bundle_write_response import BundleWriteResponse
|
|
28
|
+
|
|
29
|
+
from permify.api_client import ApiClient, RequestSerialized
|
|
30
|
+
from permify.api_response import ApiResponse
|
|
31
|
+
from permify.rest import RESTResponseType
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class BundleApi:
|
|
35
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
36
|
+
Ref: https://openapi-generator.tech
|
|
37
|
+
|
|
38
|
+
Do not edit the class manually.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
def __init__(self, api_client=None) -> None:
|
|
42
|
+
if api_client is None:
|
|
43
|
+
api_client = ApiClient.get_default()
|
|
44
|
+
self.api_client = api_client
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@validate_call
|
|
48
|
+
def bundle_delete(
|
|
49
|
+
self,
|
|
50
|
+
tenant_id: Annotated[StrictStr, Field(description="Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.")],
|
|
51
|
+
body: BundleDeleteBody,
|
|
52
|
+
_request_timeout: Union[
|
|
53
|
+
None,
|
|
54
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
55
|
+
Tuple[
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
58
|
+
]
|
|
59
|
+
] = None,
|
|
60
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
61
|
+
_content_type: Optional[StrictStr] = None,
|
|
62
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
63
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
64
|
+
) -> BundleDeleteResponse:
|
|
65
|
+
"""delete bundle
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:param tenant_id: Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes. (required)
|
|
69
|
+
:type tenant_id: str
|
|
70
|
+
:param body: (required)
|
|
71
|
+
:type body: BundleDeleteBody
|
|
72
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
73
|
+
number provided, it will be total request
|
|
74
|
+
timeout. It can also be a pair (tuple) of
|
|
75
|
+
(connection, read) timeouts.
|
|
76
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
77
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
78
|
+
request; this effectively ignores the
|
|
79
|
+
authentication in the spec for a single request.
|
|
80
|
+
:type _request_auth: dict, optional
|
|
81
|
+
:param _content_type: force content-type for the request.
|
|
82
|
+
:type _content_type: str, Optional
|
|
83
|
+
:param _headers: set to override the headers for a single
|
|
84
|
+
request; this effectively ignores the headers
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _headers: dict, optional
|
|
87
|
+
:param _host_index: set to override the host_index for a single
|
|
88
|
+
request; this effectively ignores the host_index
|
|
89
|
+
in the spec for a single request.
|
|
90
|
+
:type _host_index: int, optional
|
|
91
|
+
:return: Returns the result object.
|
|
92
|
+
""" # noqa: E501
|
|
93
|
+
|
|
94
|
+
_param = self._bundle_delete_serialize(
|
|
95
|
+
tenant_id=tenant_id,
|
|
96
|
+
body=body,
|
|
97
|
+
_request_auth=_request_auth,
|
|
98
|
+
_content_type=_content_type,
|
|
99
|
+
_headers=_headers,
|
|
100
|
+
_host_index=_host_index
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
104
|
+
'200': "BundleDeleteResponse",
|
|
105
|
+
}
|
|
106
|
+
response_data = self.api_client.call_api(
|
|
107
|
+
*_param,
|
|
108
|
+
_request_timeout=_request_timeout
|
|
109
|
+
)
|
|
110
|
+
response_data.read()
|
|
111
|
+
return self.api_client.response_deserialize(
|
|
112
|
+
response_data=response_data,
|
|
113
|
+
response_types_map=_response_types_map,
|
|
114
|
+
).data
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@validate_call
|
|
118
|
+
def bundle_delete_with_http_info(
|
|
119
|
+
self,
|
|
120
|
+
tenant_id: Annotated[StrictStr, Field(description="Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.")],
|
|
121
|
+
body: BundleDeleteBody,
|
|
122
|
+
_request_timeout: Union[
|
|
123
|
+
None,
|
|
124
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
125
|
+
Tuple[
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
128
|
+
]
|
|
129
|
+
] = None,
|
|
130
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
131
|
+
_content_type: Optional[StrictStr] = None,
|
|
132
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
134
|
+
) -> ApiResponse[BundleDeleteResponse]:
|
|
135
|
+
"""delete bundle
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
:param tenant_id: Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes. (required)
|
|
139
|
+
:type tenant_id: str
|
|
140
|
+
:param body: (required)
|
|
141
|
+
:type body: BundleDeleteBody
|
|
142
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
143
|
+
number provided, it will be total request
|
|
144
|
+
timeout. It can also be a pair (tuple) of
|
|
145
|
+
(connection, read) timeouts.
|
|
146
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
147
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
148
|
+
request; this effectively ignores the
|
|
149
|
+
authentication in the spec for a single request.
|
|
150
|
+
:type _request_auth: dict, optional
|
|
151
|
+
:param _content_type: force content-type for the request.
|
|
152
|
+
:type _content_type: str, Optional
|
|
153
|
+
:param _headers: set to override the headers for a single
|
|
154
|
+
request; this effectively ignores the headers
|
|
155
|
+
in the spec for a single request.
|
|
156
|
+
:type _headers: dict, optional
|
|
157
|
+
:param _host_index: set to override the host_index for a single
|
|
158
|
+
request; this effectively ignores the host_index
|
|
159
|
+
in the spec for a single request.
|
|
160
|
+
:type _host_index: int, optional
|
|
161
|
+
:return: Returns the result object.
|
|
162
|
+
""" # noqa: E501
|
|
163
|
+
|
|
164
|
+
_param = self._bundle_delete_serialize(
|
|
165
|
+
tenant_id=tenant_id,
|
|
166
|
+
body=body,
|
|
167
|
+
_request_auth=_request_auth,
|
|
168
|
+
_content_type=_content_type,
|
|
169
|
+
_headers=_headers,
|
|
170
|
+
_host_index=_host_index
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
174
|
+
'200': "BundleDeleteResponse",
|
|
175
|
+
}
|
|
176
|
+
response_data = self.api_client.call_api(
|
|
177
|
+
*_param,
|
|
178
|
+
_request_timeout=_request_timeout
|
|
179
|
+
)
|
|
180
|
+
response_data.read()
|
|
181
|
+
return self.api_client.response_deserialize(
|
|
182
|
+
response_data=response_data,
|
|
183
|
+
response_types_map=_response_types_map,
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
@validate_call
|
|
188
|
+
def bundle_delete_without_preload_content(
|
|
189
|
+
self,
|
|
190
|
+
tenant_id: Annotated[StrictStr, Field(description="Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.")],
|
|
191
|
+
body: BundleDeleteBody,
|
|
192
|
+
_request_timeout: Union[
|
|
193
|
+
None,
|
|
194
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
195
|
+
Tuple[
|
|
196
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
197
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
198
|
+
]
|
|
199
|
+
] = None,
|
|
200
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
201
|
+
_content_type: Optional[StrictStr] = None,
|
|
202
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
203
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
204
|
+
) -> RESTResponseType:
|
|
205
|
+
"""delete bundle
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
:param tenant_id: Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes. (required)
|
|
209
|
+
:type tenant_id: str
|
|
210
|
+
:param body: (required)
|
|
211
|
+
:type body: BundleDeleteBody
|
|
212
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
213
|
+
number provided, it will be total request
|
|
214
|
+
timeout. It can also be a pair (tuple) of
|
|
215
|
+
(connection, read) timeouts.
|
|
216
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
217
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
218
|
+
request; this effectively ignores the
|
|
219
|
+
authentication in the spec for a single request.
|
|
220
|
+
:type _request_auth: dict, optional
|
|
221
|
+
:param _content_type: force content-type for the request.
|
|
222
|
+
:type _content_type: str, Optional
|
|
223
|
+
:param _headers: set to override the headers for a single
|
|
224
|
+
request; this effectively ignores the headers
|
|
225
|
+
in the spec for a single request.
|
|
226
|
+
:type _headers: dict, optional
|
|
227
|
+
:param _host_index: set to override the host_index for a single
|
|
228
|
+
request; this effectively ignores the host_index
|
|
229
|
+
in the spec for a single request.
|
|
230
|
+
:type _host_index: int, optional
|
|
231
|
+
:return: Returns the result object.
|
|
232
|
+
""" # noqa: E501
|
|
233
|
+
|
|
234
|
+
_param = self._bundle_delete_serialize(
|
|
235
|
+
tenant_id=tenant_id,
|
|
236
|
+
body=body,
|
|
237
|
+
_request_auth=_request_auth,
|
|
238
|
+
_content_type=_content_type,
|
|
239
|
+
_headers=_headers,
|
|
240
|
+
_host_index=_host_index
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
244
|
+
'200': "BundleDeleteResponse",
|
|
245
|
+
}
|
|
246
|
+
response_data = self.api_client.call_api(
|
|
247
|
+
*_param,
|
|
248
|
+
_request_timeout=_request_timeout
|
|
249
|
+
)
|
|
250
|
+
return response_data.response
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
def _bundle_delete_serialize(
|
|
254
|
+
self,
|
|
255
|
+
tenant_id,
|
|
256
|
+
body,
|
|
257
|
+
_request_auth,
|
|
258
|
+
_content_type,
|
|
259
|
+
_headers,
|
|
260
|
+
_host_index,
|
|
261
|
+
) -> RequestSerialized:
|
|
262
|
+
|
|
263
|
+
_host = None
|
|
264
|
+
|
|
265
|
+
_collection_formats: Dict[str, str] = {
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
_path_params: Dict[str, str] = {}
|
|
269
|
+
_query_params: List[Tuple[str, str]] = []
|
|
270
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
271
|
+
_form_params: List[Tuple[str, str]] = []
|
|
272
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
273
|
+
_body_params: Optional[bytes] = None
|
|
274
|
+
|
|
275
|
+
# process the path parameters
|
|
276
|
+
if tenant_id is not None:
|
|
277
|
+
_path_params['tenant_id'] = tenant_id
|
|
278
|
+
# process the query parameters
|
|
279
|
+
# process the header parameters
|
|
280
|
+
# process the form parameters
|
|
281
|
+
# process the body parameter
|
|
282
|
+
if body is not None:
|
|
283
|
+
_body_params = body
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
# set the HTTP header `Accept`
|
|
287
|
+
if 'Accept' not in _header_params:
|
|
288
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
289
|
+
[
|
|
290
|
+
'application/json'
|
|
291
|
+
]
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
# set the HTTP header `Content-Type`
|
|
295
|
+
if _content_type:
|
|
296
|
+
_header_params['Content-Type'] = _content_type
|
|
297
|
+
else:
|
|
298
|
+
_default_content_type = (
|
|
299
|
+
self.api_client.select_header_content_type(
|
|
300
|
+
[
|
|
301
|
+
'application/json'
|
|
302
|
+
]
|
|
303
|
+
)
|
|
304
|
+
)
|
|
305
|
+
if _default_content_type is not None:
|
|
306
|
+
_header_params['Content-Type'] = _default_content_type
|
|
307
|
+
|
|
308
|
+
# authentication setting
|
|
309
|
+
_auth_settings: List[str] = [
|
|
310
|
+
]
|
|
311
|
+
|
|
312
|
+
return self.api_client.param_serialize(
|
|
313
|
+
method='POST',
|
|
314
|
+
resource_path='/v1/tenants/{tenant_id}/bundle/delete',
|
|
315
|
+
path_params=_path_params,
|
|
316
|
+
query_params=_query_params,
|
|
317
|
+
header_params=_header_params,
|
|
318
|
+
body=_body_params,
|
|
319
|
+
post_params=_form_params,
|
|
320
|
+
files=_files,
|
|
321
|
+
auth_settings=_auth_settings,
|
|
322
|
+
collection_formats=_collection_formats,
|
|
323
|
+
_host=_host,
|
|
324
|
+
_request_auth=_request_auth
|
|
325
|
+
)
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
@validate_call
|
|
331
|
+
def bundle_read(
|
|
332
|
+
self,
|
|
333
|
+
tenant_id: Annotated[StrictStr, Field(description="Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.")],
|
|
334
|
+
body: BundleReadBody,
|
|
335
|
+
_request_timeout: Union[
|
|
336
|
+
None,
|
|
337
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
338
|
+
Tuple[
|
|
339
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
340
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
341
|
+
]
|
|
342
|
+
] = None,
|
|
343
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
344
|
+
_content_type: Optional[StrictStr] = None,
|
|
345
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
346
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
347
|
+
) -> BundleReadResponse:
|
|
348
|
+
"""read bundle
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
:param tenant_id: Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes. (required)
|
|
352
|
+
:type tenant_id: str
|
|
353
|
+
:param body: (required)
|
|
354
|
+
:type body: BundleReadBody
|
|
355
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
356
|
+
number provided, it will be total request
|
|
357
|
+
timeout. It can also be a pair (tuple) of
|
|
358
|
+
(connection, read) timeouts.
|
|
359
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
360
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
361
|
+
request; this effectively ignores the
|
|
362
|
+
authentication in the spec for a single request.
|
|
363
|
+
:type _request_auth: dict, optional
|
|
364
|
+
:param _content_type: force content-type for the request.
|
|
365
|
+
:type _content_type: str, Optional
|
|
366
|
+
:param _headers: set to override the headers for a single
|
|
367
|
+
request; this effectively ignores the headers
|
|
368
|
+
in the spec for a single request.
|
|
369
|
+
:type _headers: dict, optional
|
|
370
|
+
:param _host_index: set to override the host_index for a single
|
|
371
|
+
request; this effectively ignores the host_index
|
|
372
|
+
in the spec for a single request.
|
|
373
|
+
:type _host_index: int, optional
|
|
374
|
+
:return: Returns the result object.
|
|
375
|
+
""" # noqa: E501
|
|
376
|
+
|
|
377
|
+
_param = self._bundle_read_serialize(
|
|
378
|
+
tenant_id=tenant_id,
|
|
379
|
+
body=body,
|
|
380
|
+
_request_auth=_request_auth,
|
|
381
|
+
_content_type=_content_type,
|
|
382
|
+
_headers=_headers,
|
|
383
|
+
_host_index=_host_index
|
|
384
|
+
)
|
|
385
|
+
|
|
386
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
387
|
+
'200': "BundleReadResponse",
|
|
388
|
+
}
|
|
389
|
+
response_data = self.api_client.call_api(
|
|
390
|
+
*_param,
|
|
391
|
+
_request_timeout=_request_timeout
|
|
392
|
+
)
|
|
393
|
+
response_data.read()
|
|
394
|
+
return self.api_client.response_deserialize(
|
|
395
|
+
response_data=response_data,
|
|
396
|
+
response_types_map=_response_types_map,
|
|
397
|
+
).data
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
@validate_call
|
|
401
|
+
def bundle_read_with_http_info(
|
|
402
|
+
self,
|
|
403
|
+
tenant_id: Annotated[StrictStr, Field(description="Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.")],
|
|
404
|
+
body: BundleReadBody,
|
|
405
|
+
_request_timeout: Union[
|
|
406
|
+
None,
|
|
407
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
408
|
+
Tuple[
|
|
409
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
410
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
411
|
+
]
|
|
412
|
+
] = None,
|
|
413
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
414
|
+
_content_type: Optional[StrictStr] = None,
|
|
415
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
416
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
417
|
+
) -> ApiResponse[BundleReadResponse]:
|
|
418
|
+
"""read bundle
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
:param tenant_id: Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes. (required)
|
|
422
|
+
:type tenant_id: str
|
|
423
|
+
:param body: (required)
|
|
424
|
+
:type body: BundleReadBody
|
|
425
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
426
|
+
number provided, it will be total request
|
|
427
|
+
timeout. It can also be a pair (tuple) of
|
|
428
|
+
(connection, read) timeouts.
|
|
429
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
430
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
431
|
+
request; this effectively ignores the
|
|
432
|
+
authentication in the spec for a single request.
|
|
433
|
+
:type _request_auth: dict, optional
|
|
434
|
+
:param _content_type: force content-type for the request.
|
|
435
|
+
:type _content_type: str, Optional
|
|
436
|
+
:param _headers: set to override the headers for a single
|
|
437
|
+
request; this effectively ignores the headers
|
|
438
|
+
in the spec for a single request.
|
|
439
|
+
:type _headers: dict, optional
|
|
440
|
+
:param _host_index: set to override the host_index for a single
|
|
441
|
+
request; this effectively ignores the host_index
|
|
442
|
+
in the spec for a single request.
|
|
443
|
+
:type _host_index: int, optional
|
|
444
|
+
:return: Returns the result object.
|
|
445
|
+
""" # noqa: E501
|
|
446
|
+
|
|
447
|
+
_param = self._bundle_read_serialize(
|
|
448
|
+
tenant_id=tenant_id,
|
|
449
|
+
body=body,
|
|
450
|
+
_request_auth=_request_auth,
|
|
451
|
+
_content_type=_content_type,
|
|
452
|
+
_headers=_headers,
|
|
453
|
+
_host_index=_host_index
|
|
454
|
+
)
|
|
455
|
+
|
|
456
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
457
|
+
'200': "BundleReadResponse",
|
|
458
|
+
}
|
|
459
|
+
response_data = self.api_client.call_api(
|
|
460
|
+
*_param,
|
|
461
|
+
_request_timeout=_request_timeout
|
|
462
|
+
)
|
|
463
|
+
response_data.read()
|
|
464
|
+
return self.api_client.response_deserialize(
|
|
465
|
+
response_data=response_data,
|
|
466
|
+
response_types_map=_response_types_map,
|
|
467
|
+
)
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
@validate_call
|
|
471
|
+
def bundle_read_without_preload_content(
|
|
472
|
+
self,
|
|
473
|
+
tenant_id: Annotated[StrictStr, Field(description="Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.")],
|
|
474
|
+
body: BundleReadBody,
|
|
475
|
+
_request_timeout: Union[
|
|
476
|
+
None,
|
|
477
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
478
|
+
Tuple[
|
|
479
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
480
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
481
|
+
]
|
|
482
|
+
] = None,
|
|
483
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
484
|
+
_content_type: Optional[StrictStr] = None,
|
|
485
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
486
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
487
|
+
) -> RESTResponseType:
|
|
488
|
+
"""read bundle
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
:param tenant_id: Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes. (required)
|
|
492
|
+
:type tenant_id: str
|
|
493
|
+
:param body: (required)
|
|
494
|
+
:type body: BundleReadBody
|
|
495
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
496
|
+
number provided, it will be total request
|
|
497
|
+
timeout. It can also be a pair (tuple) of
|
|
498
|
+
(connection, read) timeouts.
|
|
499
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
500
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
501
|
+
request; this effectively ignores the
|
|
502
|
+
authentication in the spec for a single request.
|
|
503
|
+
:type _request_auth: dict, optional
|
|
504
|
+
:param _content_type: force content-type for the request.
|
|
505
|
+
:type _content_type: str, Optional
|
|
506
|
+
:param _headers: set to override the headers for a single
|
|
507
|
+
request; this effectively ignores the headers
|
|
508
|
+
in the spec for a single request.
|
|
509
|
+
:type _headers: dict, optional
|
|
510
|
+
:param _host_index: set to override the host_index for a single
|
|
511
|
+
request; this effectively ignores the host_index
|
|
512
|
+
in the spec for a single request.
|
|
513
|
+
:type _host_index: int, optional
|
|
514
|
+
:return: Returns the result object.
|
|
515
|
+
""" # noqa: E501
|
|
516
|
+
|
|
517
|
+
_param = self._bundle_read_serialize(
|
|
518
|
+
tenant_id=tenant_id,
|
|
519
|
+
body=body,
|
|
520
|
+
_request_auth=_request_auth,
|
|
521
|
+
_content_type=_content_type,
|
|
522
|
+
_headers=_headers,
|
|
523
|
+
_host_index=_host_index
|
|
524
|
+
)
|
|
525
|
+
|
|
526
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
527
|
+
'200': "BundleReadResponse",
|
|
528
|
+
}
|
|
529
|
+
response_data = self.api_client.call_api(
|
|
530
|
+
*_param,
|
|
531
|
+
_request_timeout=_request_timeout
|
|
532
|
+
)
|
|
533
|
+
return response_data.response
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
def _bundle_read_serialize(
|
|
537
|
+
self,
|
|
538
|
+
tenant_id,
|
|
539
|
+
body,
|
|
540
|
+
_request_auth,
|
|
541
|
+
_content_type,
|
|
542
|
+
_headers,
|
|
543
|
+
_host_index,
|
|
544
|
+
) -> RequestSerialized:
|
|
545
|
+
|
|
546
|
+
_host = None
|
|
547
|
+
|
|
548
|
+
_collection_formats: Dict[str, str] = {
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
_path_params: Dict[str, str] = {}
|
|
552
|
+
_query_params: List[Tuple[str, str]] = []
|
|
553
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
554
|
+
_form_params: List[Tuple[str, str]] = []
|
|
555
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
556
|
+
_body_params: Optional[bytes] = None
|
|
557
|
+
|
|
558
|
+
# process the path parameters
|
|
559
|
+
if tenant_id is not None:
|
|
560
|
+
_path_params['tenant_id'] = tenant_id
|
|
561
|
+
# process the query parameters
|
|
562
|
+
# process the header parameters
|
|
563
|
+
# process the form parameters
|
|
564
|
+
# process the body parameter
|
|
565
|
+
if body is not None:
|
|
566
|
+
_body_params = body
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
# set the HTTP header `Accept`
|
|
570
|
+
if 'Accept' not in _header_params:
|
|
571
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
572
|
+
[
|
|
573
|
+
'application/json'
|
|
574
|
+
]
|
|
575
|
+
)
|
|
576
|
+
|
|
577
|
+
# set the HTTP header `Content-Type`
|
|
578
|
+
if _content_type:
|
|
579
|
+
_header_params['Content-Type'] = _content_type
|
|
580
|
+
else:
|
|
581
|
+
_default_content_type = (
|
|
582
|
+
self.api_client.select_header_content_type(
|
|
583
|
+
[
|
|
584
|
+
'application/json'
|
|
585
|
+
]
|
|
586
|
+
)
|
|
587
|
+
)
|
|
588
|
+
if _default_content_type is not None:
|
|
589
|
+
_header_params['Content-Type'] = _default_content_type
|
|
590
|
+
|
|
591
|
+
# authentication setting
|
|
592
|
+
_auth_settings: List[str] = [
|
|
593
|
+
]
|
|
594
|
+
|
|
595
|
+
return self.api_client.param_serialize(
|
|
596
|
+
method='POST',
|
|
597
|
+
resource_path='/v1/tenants/{tenant_id}/bundle/read',
|
|
598
|
+
path_params=_path_params,
|
|
599
|
+
query_params=_query_params,
|
|
600
|
+
header_params=_header_params,
|
|
601
|
+
body=_body_params,
|
|
602
|
+
post_params=_form_params,
|
|
603
|
+
files=_files,
|
|
604
|
+
auth_settings=_auth_settings,
|
|
605
|
+
collection_formats=_collection_formats,
|
|
606
|
+
_host=_host,
|
|
607
|
+
_request_auth=_request_auth
|
|
608
|
+
)
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
@validate_call
|
|
614
|
+
def bundle_write(
|
|
615
|
+
self,
|
|
616
|
+
tenant_id: Annotated[StrictStr, Field(description="Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.")],
|
|
617
|
+
body: BundleWriteBody,
|
|
618
|
+
_request_timeout: Union[
|
|
619
|
+
None,
|
|
620
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
621
|
+
Tuple[
|
|
622
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
623
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
624
|
+
]
|
|
625
|
+
] = None,
|
|
626
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
627
|
+
_content_type: Optional[StrictStr] = None,
|
|
628
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
629
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
630
|
+
) -> BundleWriteResponse:
|
|
631
|
+
"""write bundle
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
:param tenant_id: Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes. (required)
|
|
635
|
+
:type tenant_id: str
|
|
636
|
+
:param body: (required)
|
|
637
|
+
:type body: BundleWriteBody
|
|
638
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
639
|
+
number provided, it will be total request
|
|
640
|
+
timeout. It can also be a pair (tuple) of
|
|
641
|
+
(connection, read) timeouts.
|
|
642
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
643
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
644
|
+
request; this effectively ignores the
|
|
645
|
+
authentication in the spec for a single request.
|
|
646
|
+
:type _request_auth: dict, optional
|
|
647
|
+
:param _content_type: force content-type for the request.
|
|
648
|
+
:type _content_type: str, Optional
|
|
649
|
+
:param _headers: set to override the headers for a single
|
|
650
|
+
request; this effectively ignores the headers
|
|
651
|
+
in the spec for a single request.
|
|
652
|
+
:type _headers: dict, optional
|
|
653
|
+
:param _host_index: set to override the host_index for a single
|
|
654
|
+
request; this effectively ignores the host_index
|
|
655
|
+
in the spec for a single request.
|
|
656
|
+
:type _host_index: int, optional
|
|
657
|
+
:return: Returns the result object.
|
|
658
|
+
""" # noqa: E501
|
|
659
|
+
|
|
660
|
+
_param = self._bundle_write_serialize(
|
|
661
|
+
tenant_id=tenant_id,
|
|
662
|
+
body=body,
|
|
663
|
+
_request_auth=_request_auth,
|
|
664
|
+
_content_type=_content_type,
|
|
665
|
+
_headers=_headers,
|
|
666
|
+
_host_index=_host_index
|
|
667
|
+
)
|
|
668
|
+
|
|
669
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
670
|
+
'200': "BundleWriteResponse",
|
|
671
|
+
}
|
|
672
|
+
response_data = self.api_client.call_api(
|
|
673
|
+
*_param,
|
|
674
|
+
_request_timeout=_request_timeout
|
|
675
|
+
)
|
|
676
|
+
response_data.read()
|
|
677
|
+
return self.api_client.response_deserialize(
|
|
678
|
+
response_data=response_data,
|
|
679
|
+
response_types_map=_response_types_map,
|
|
680
|
+
).data
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
@validate_call
|
|
684
|
+
def bundle_write_with_http_info(
|
|
685
|
+
self,
|
|
686
|
+
tenant_id: Annotated[StrictStr, Field(description="Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.")],
|
|
687
|
+
body: BundleWriteBody,
|
|
688
|
+
_request_timeout: Union[
|
|
689
|
+
None,
|
|
690
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
691
|
+
Tuple[
|
|
692
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
693
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
694
|
+
]
|
|
695
|
+
] = None,
|
|
696
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
697
|
+
_content_type: Optional[StrictStr] = None,
|
|
698
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
699
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
700
|
+
) -> ApiResponse[BundleWriteResponse]:
|
|
701
|
+
"""write bundle
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
:param tenant_id: Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes. (required)
|
|
705
|
+
:type tenant_id: str
|
|
706
|
+
:param body: (required)
|
|
707
|
+
:type body: BundleWriteBody
|
|
708
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
709
|
+
number provided, it will be total request
|
|
710
|
+
timeout. It can also be a pair (tuple) of
|
|
711
|
+
(connection, read) timeouts.
|
|
712
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
713
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
714
|
+
request; this effectively ignores the
|
|
715
|
+
authentication in the spec for a single request.
|
|
716
|
+
:type _request_auth: dict, optional
|
|
717
|
+
:param _content_type: force content-type for the request.
|
|
718
|
+
:type _content_type: str, Optional
|
|
719
|
+
:param _headers: set to override the headers for a single
|
|
720
|
+
request; this effectively ignores the headers
|
|
721
|
+
in the spec for a single request.
|
|
722
|
+
:type _headers: dict, optional
|
|
723
|
+
:param _host_index: set to override the host_index for a single
|
|
724
|
+
request; this effectively ignores the host_index
|
|
725
|
+
in the spec for a single request.
|
|
726
|
+
:type _host_index: int, optional
|
|
727
|
+
:return: Returns the result object.
|
|
728
|
+
""" # noqa: E501
|
|
729
|
+
|
|
730
|
+
_param = self._bundle_write_serialize(
|
|
731
|
+
tenant_id=tenant_id,
|
|
732
|
+
body=body,
|
|
733
|
+
_request_auth=_request_auth,
|
|
734
|
+
_content_type=_content_type,
|
|
735
|
+
_headers=_headers,
|
|
736
|
+
_host_index=_host_index
|
|
737
|
+
)
|
|
738
|
+
|
|
739
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
740
|
+
'200': "BundleWriteResponse",
|
|
741
|
+
}
|
|
742
|
+
response_data = self.api_client.call_api(
|
|
743
|
+
*_param,
|
|
744
|
+
_request_timeout=_request_timeout
|
|
745
|
+
)
|
|
746
|
+
response_data.read()
|
|
747
|
+
return self.api_client.response_deserialize(
|
|
748
|
+
response_data=response_data,
|
|
749
|
+
response_types_map=_response_types_map,
|
|
750
|
+
)
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
@validate_call
|
|
754
|
+
def bundle_write_without_preload_content(
|
|
755
|
+
self,
|
|
756
|
+
tenant_id: Annotated[StrictStr, Field(description="Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.")],
|
|
757
|
+
body: BundleWriteBody,
|
|
758
|
+
_request_timeout: Union[
|
|
759
|
+
None,
|
|
760
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
761
|
+
Tuple[
|
|
762
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
763
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
764
|
+
]
|
|
765
|
+
] = None,
|
|
766
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
767
|
+
_content_type: Optional[StrictStr] = None,
|
|
768
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
769
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
770
|
+
) -> RESTResponseType:
|
|
771
|
+
"""write bundle
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
:param tenant_id: Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes. (required)
|
|
775
|
+
:type tenant_id: str
|
|
776
|
+
:param body: (required)
|
|
777
|
+
:type body: BundleWriteBody
|
|
778
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
779
|
+
number provided, it will be total request
|
|
780
|
+
timeout. It can also be a pair (tuple) of
|
|
781
|
+
(connection, read) timeouts.
|
|
782
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
783
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
784
|
+
request; this effectively ignores the
|
|
785
|
+
authentication in the spec for a single request.
|
|
786
|
+
:type _request_auth: dict, optional
|
|
787
|
+
:param _content_type: force content-type for the request.
|
|
788
|
+
:type _content_type: str, Optional
|
|
789
|
+
:param _headers: set to override the headers for a single
|
|
790
|
+
request; this effectively ignores the headers
|
|
791
|
+
in the spec for a single request.
|
|
792
|
+
:type _headers: dict, optional
|
|
793
|
+
:param _host_index: set to override the host_index for a single
|
|
794
|
+
request; this effectively ignores the host_index
|
|
795
|
+
in the spec for a single request.
|
|
796
|
+
:type _host_index: int, optional
|
|
797
|
+
:return: Returns the result object.
|
|
798
|
+
""" # noqa: E501
|
|
799
|
+
|
|
800
|
+
_param = self._bundle_write_serialize(
|
|
801
|
+
tenant_id=tenant_id,
|
|
802
|
+
body=body,
|
|
803
|
+
_request_auth=_request_auth,
|
|
804
|
+
_content_type=_content_type,
|
|
805
|
+
_headers=_headers,
|
|
806
|
+
_host_index=_host_index
|
|
807
|
+
)
|
|
808
|
+
|
|
809
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
810
|
+
'200': "BundleWriteResponse",
|
|
811
|
+
}
|
|
812
|
+
response_data = self.api_client.call_api(
|
|
813
|
+
*_param,
|
|
814
|
+
_request_timeout=_request_timeout
|
|
815
|
+
)
|
|
816
|
+
return response_data.response
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
def _bundle_write_serialize(
|
|
820
|
+
self,
|
|
821
|
+
tenant_id,
|
|
822
|
+
body,
|
|
823
|
+
_request_auth,
|
|
824
|
+
_content_type,
|
|
825
|
+
_headers,
|
|
826
|
+
_host_index,
|
|
827
|
+
) -> RequestSerialized:
|
|
828
|
+
|
|
829
|
+
_host = None
|
|
830
|
+
|
|
831
|
+
_collection_formats: Dict[str, str] = {
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
_path_params: Dict[str, str] = {}
|
|
835
|
+
_query_params: List[Tuple[str, str]] = []
|
|
836
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
837
|
+
_form_params: List[Tuple[str, str]] = []
|
|
838
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
839
|
+
_body_params: Optional[bytes] = None
|
|
840
|
+
|
|
841
|
+
# process the path parameters
|
|
842
|
+
if tenant_id is not None:
|
|
843
|
+
_path_params['tenant_id'] = tenant_id
|
|
844
|
+
# process the query parameters
|
|
845
|
+
# process the header parameters
|
|
846
|
+
# process the form parameters
|
|
847
|
+
# process the body parameter
|
|
848
|
+
if body is not None:
|
|
849
|
+
_body_params = body
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
# set the HTTP header `Accept`
|
|
853
|
+
if 'Accept' not in _header_params:
|
|
854
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
855
|
+
[
|
|
856
|
+
'application/json'
|
|
857
|
+
]
|
|
858
|
+
)
|
|
859
|
+
|
|
860
|
+
# set the HTTP header `Content-Type`
|
|
861
|
+
if _content_type:
|
|
862
|
+
_header_params['Content-Type'] = _content_type
|
|
863
|
+
else:
|
|
864
|
+
_default_content_type = (
|
|
865
|
+
self.api_client.select_header_content_type(
|
|
866
|
+
[
|
|
867
|
+
'application/json'
|
|
868
|
+
]
|
|
869
|
+
)
|
|
870
|
+
)
|
|
871
|
+
if _default_content_type is not None:
|
|
872
|
+
_header_params['Content-Type'] = _default_content_type
|
|
873
|
+
|
|
874
|
+
# authentication setting
|
|
875
|
+
_auth_settings: List[str] = [
|
|
876
|
+
]
|
|
877
|
+
|
|
878
|
+
return self.api_client.param_serialize(
|
|
879
|
+
method='POST',
|
|
880
|
+
resource_path='/v1/tenants/{tenant_id}/bundle/write',
|
|
881
|
+
path_params=_path_params,
|
|
882
|
+
query_params=_query_params,
|
|
883
|
+
header_params=_header_params,
|
|
884
|
+
body=_body_params,
|
|
885
|
+
post_params=_form_params,
|
|
886
|
+
files=_files,
|
|
887
|
+
auth_settings=_auth_settings,
|
|
888
|
+
collection_formats=_collection_formats,
|
|
889
|
+
_host=_host,
|
|
890
|
+
_request_auth=_request_auth
|
|
891
|
+
)
|
|
892
|
+
|
|
893
|
+
|