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
permify/api/data_api.py
ADDED
|
@@ -0,0 +1,2033 @@
|
|
|
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.attribute_read_response import AttributeReadResponse
|
|
23
|
+
from permify.models.bundle_run_response import BundleRunResponse
|
|
24
|
+
from permify.models.data_delete_body import DataDeleteBody
|
|
25
|
+
from permify.models.data_delete_response import DataDeleteResponse
|
|
26
|
+
from permify.models.data_write_body import DataWriteBody
|
|
27
|
+
from permify.models.data_write_response import DataWriteResponse
|
|
28
|
+
from permify.models.delete_relationships_body import DeleteRelationshipsBody
|
|
29
|
+
from permify.models.read_attributes_body import ReadAttributesBody
|
|
30
|
+
from permify.models.read_relationships_body import ReadRelationshipsBody
|
|
31
|
+
from permify.models.relationship_delete_response import RelationshipDeleteResponse
|
|
32
|
+
from permify.models.relationship_read_response import RelationshipReadResponse
|
|
33
|
+
from permify.models.relationship_write_response import RelationshipWriteResponse
|
|
34
|
+
from permify.models.run_bundle_body import RunBundleBody
|
|
35
|
+
from permify.models.write_relationships_body import WriteRelationshipsBody
|
|
36
|
+
|
|
37
|
+
from permify.api_client import ApiClient, RequestSerialized
|
|
38
|
+
from permify.api_response import ApiResponse
|
|
39
|
+
from permify.rest import RESTResponseType
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class DataApi:
|
|
43
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
44
|
+
Ref: https://openapi-generator.tech
|
|
45
|
+
|
|
46
|
+
Do not edit the class manually.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
def __init__(self, api_client=None) -> None:
|
|
50
|
+
if api_client is None:
|
|
51
|
+
api_client = ApiClient.get_default()
|
|
52
|
+
self.api_client = api_client
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@validate_call
|
|
56
|
+
def bundle_run(
|
|
57
|
+
self,
|
|
58
|
+
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.")],
|
|
59
|
+
body: RunBundleBody,
|
|
60
|
+
_request_timeout: Union[
|
|
61
|
+
None,
|
|
62
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
63
|
+
Tuple[
|
|
64
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
65
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
66
|
+
]
|
|
67
|
+
] = None,
|
|
68
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
69
|
+
_content_type: Optional[StrictStr] = None,
|
|
70
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
71
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
72
|
+
) -> BundleRunResponse:
|
|
73
|
+
"""run bundle
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
: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)
|
|
77
|
+
:type tenant_id: str
|
|
78
|
+
:param body: (required)
|
|
79
|
+
:type body: RunBundleBody
|
|
80
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
81
|
+
number provided, it will be total request
|
|
82
|
+
timeout. It can also be a pair (tuple) of
|
|
83
|
+
(connection, read) timeouts.
|
|
84
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
85
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
86
|
+
request; this effectively ignores the
|
|
87
|
+
authentication in the spec for a single request.
|
|
88
|
+
:type _request_auth: dict, optional
|
|
89
|
+
:param _content_type: force content-type for the request.
|
|
90
|
+
:type _content_type: str, Optional
|
|
91
|
+
:param _headers: set to override the headers for a single
|
|
92
|
+
request; this effectively ignores the headers
|
|
93
|
+
in the spec for a single request.
|
|
94
|
+
:type _headers: dict, optional
|
|
95
|
+
:param _host_index: set to override the host_index for a single
|
|
96
|
+
request; this effectively ignores the host_index
|
|
97
|
+
in the spec for a single request.
|
|
98
|
+
:type _host_index: int, optional
|
|
99
|
+
:return: Returns the result object.
|
|
100
|
+
""" # noqa: E501
|
|
101
|
+
|
|
102
|
+
_param = self._bundle_run_serialize(
|
|
103
|
+
tenant_id=tenant_id,
|
|
104
|
+
body=body,
|
|
105
|
+
_request_auth=_request_auth,
|
|
106
|
+
_content_type=_content_type,
|
|
107
|
+
_headers=_headers,
|
|
108
|
+
_host_index=_host_index
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
112
|
+
'200': "BundleRunResponse",
|
|
113
|
+
}
|
|
114
|
+
response_data = self.api_client.call_api(
|
|
115
|
+
*_param,
|
|
116
|
+
_request_timeout=_request_timeout
|
|
117
|
+
)
|
|
118
|
+
response_data.read()
|
|
119
|
+
return self.api_client.response_deserialize(
|
|
120
|
+
response_data=response_data,
|
|
121
|
+
response_types_map=_response_types_map,
|
|
122
|
+
).data
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
@validate_call
|
|
126
|
+
def bundle_run_with_http_info(
|
|
127
|
+
self,
|
|
128
|
+
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.")],
|
|
129
|
+
body: RunBundleBody,
|
|
130
|
+
_request_timeout: Union[
|
|
131
|
+
None,
|
|
132
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
133
|
+
Tuple[
|
|
134
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
135
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
136
|
+
]
|
|
137
|
+
] = None,
|
|
138
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
139
|
+
_content_type: Optional[StrictStr] = None,
|
|
140
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
141
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
142
|
+
) -> ApiResponse[BundleRunResponse]:
|
|
143
|
+
"""run bundle
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
: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)
|
|
147
|
+
:type tenant_id: str
|
|
148
|
+
:param body: (required)
|
|
149
|
+
:type body: RunBundleBody
|
|
150
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
151
|
+
number provided, it will be total request
|
|
152
|
+
timeout. It can also be a pair (tuple) of
|
|
153
|
+
(connection, read) timeouts.
|
|
154
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
155
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
156
|
+
request; this effectively ignores the
|
|
157
|
+
authentication in the spec for a single request.
|
|
158
|
+
:type _request_auth: dict, optional
|
|
159
|
+
:param _content_type: force content-type for the request.
|
|
160
|
+
:type _content_type: str, Optional
|
|
161
|
+
:param _headers: set to override the headers for a single
|
|
162
|
+
request; this effectively ignores the headers
|
|
163
|
+
in the spec for a single request.
|
|
164
|
+
:type _headers: dict, optional
|
|
165
|
+
:param _host_index: set to override the host_index for a single
|
|
166
|
+
request; this effectively ignores the host_index
|
|
167
|
+
in the spec for a single request.
|
|
168
|
+
:type _host_index: int, optional
|
|
169
|
+
:return: Returns the result object.
|
|
170
|
+
""" # noqa: E501
|
|
171
|
+
|
|
172
|
+
_param = self._bundle_run_serialize(
|
|
173
|
+
tenant_id=tenant_id,
|
|
174
|
+
body=body,
|
|
175
|
+
_request_auth=_request_auth,
|
|
176
|
+
_content_type=_content_type,
|
|
177
|
+
_headers=_headers,
|
|
178
|
+
_host_index=_host_index
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
182
|
+
'200': "BundleRunResponse",
|
|
183
|
+
}
|
|
184
|
+
response_data = self.api_client.call_api(
|
|
185
|
+
*_param,
|
|
186
|
+
_request_timeout=_request_timeout
|
|
187
|
+
)
|
|
188
|
+
response_data.read()
|
|
189
|
+
return self.api_client.response_deserialize(
|
|
190
|
+
response_data=response_data,
|
|
191
|
+
response_types_map=_response_types_map,
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
@validate_call
|
|
196
|
+
def bundle_run_without_preload_content(
|
|
197
|
+
self,
|
|
198
|
+
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.")],
|
|
199
|
+
body: RunBundleBody,
|
|
200
|
+
_request_timeout: Union[
|
|
201
|
+
None,
|
|
202
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
203
|
+
Tuple[
|
|
204
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
205
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
206
|
+
]
|
|
207
|
+
] = None,
|
|
208
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
209
|
+
_content_type: Optional[StrictStr] = None,
|
|
210
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
211
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
212
|
+
) -> RESTResponseType:
|
|
213
|
+
"""run bundle
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
: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)
|
|
217
|
+
:type tenant_id: str
|
|
218
|
+
:param body: (required)
|
|
219
|
+
:type body: RunBundleBody
|
|
220
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
221
|
+
number provided, it will be total request
|
|
222
|
+
timeout. It can also be a pair (tuple) of
|
|
223
|
+
(connection, read) timeouts.
|
|
224
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
225
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
226
|
+
request; this effectively ignores the
|
|
227
|
+
authentication in the spec for a single request.
|
|
228
|
+
:type _request_auth: dict, optional
|
|
229
|
+
:param _content_type: force content-type for the request.
|
|
230
|
+
:type _content_type: str, Optional
|
|
231
|
+
:param _headers: set to override the headers for a single
|
|
232
|
+
request; this effectively ignores the headers
|
|
233
|
+
in the spec for a single request.
|
|
234
|
+
:type _headers: dict, optional
|
|
235
|
+
:param _host_index: set to override the host_index for a single
|
|
236
|
+
request; this effectively ignores the host_index
|
|
237
|
+
in the spec for a single request.
|
|
238
|
+
:type _host_index: int, optional
|
|
239
|
+
:return: Returns the result object.
|
|
240
|
+
""" # noqa: E501
|
|
241
|
+
|
|
242
|
+
_param = self._bundle_run_serialize(
|
|
243
|
+
tenant_id=tenant_id,
|
|
244
|
+
body=body,
|
|
245
|
+
_request_auth=_request_auth,
|
|
246
|
+
_content_type=_content_type,
|
|
247
|
+
_headers=_headers,
|
|
248
|
+
_host_index=_host_index
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
252
|
+
'200': "BundleRunResponse",
|
|
253
|
+
}
|
|
254
|
+
response_data = self.api_client.call_api(
|
|
255
|
+
*_param,
|
|
256
|
+
_request_timeout=_request_timeout
|
|
257
|
+
)
|
|
258
|
+
return response_data.response
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
def _bundle_run_serialize(
|
|
262
|
+
self,
|
|
263
|
+
tenant_id,
|
|
264
|
+
body,
|
|
265
|
+
_request_auth,
|
|
266
|
+
_content_type,
|
|
267
|
+
_headers,
|
|
268
|
+
_host_index,
|
|
269
|
+
) -> RequestSerialized:
|
|
270
|
+
|
|
271
|
+
_host = None
|
|
272
|
+
|
|
273
|
+
_collection_formats: Dict[str, str] = {
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
_path_params: Dict[str, str] = {}
|
|
277
|
+
_query_params: List[Tuple[str, str]] = []
|
|
278
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
279
|
+
_form_params: List[Tuple[str, str]] = []
|
|
280
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
281
|
+
_body_params: Optional[bytes] = None
|
|
282
|
+
|
|
283
|
+
# process the path parameters
|
|
284
|
+
if tenant_id is not None:
|
|
285
|
+
_path_params['tenant_id'] = tenant_id
|
|
286
|
+
# process the query parameters
|
|
287
|
+
# process the header parameters
|
|
288
|
+
# process the form parameters
|
|
289
|
+
# process the body parameter
|
|
290
|
+
if body is not None:
|
|
291
|
+
_body_params = body
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
# set the HTTP header `Accept`
|
|
295
|
+
if 'Accept' not in _header_params:
|
|
296
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
297
|
+
[
|
|
298
|
+
'application/json'
|
|
299
|
+
]
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
# set the HTTP header `Content-Type`
|
|
303
|
+
if _content_type:
|
|
304
|
+
_header_params['Content-Type'] = _content_type
|
|
305
|
+
else:
|
|
306
|
+
_default_content_type = (
|
|
307
|
+
self.api_client.select_header_content_type(
|
|
308
|
+
[
|
|
309
|
+
'application/json'
|
|
310
|
+
]
|
|
311
|
+
)
|
|
312
|
+
)
|
|
313
|
+
if _default_content_type is not None:
|
|
314
|
+
_header_params['Content-Type'] = _default_content_type
|
|
315
|
+
|
|
316
|
+
# authentication setting
|
|
317
|
+
_auth_settings: List[str] = [
|
|
318
|
+
]
|
|
319
|
+
|
|
320
|
+
return self.api_client.param_serialize(
|
|
321
|
+
method='POST',
|
|
322
|
+
resource_path='/v1/tenants/{tenant_id}/data/run-bundle',
|
|
323
|
+
path_params=_path_params,
|
|
324
|
+
query_params=_query_params,
|
|
325
|
+
header_params=_header_params,
|
|
326
|
+
body=_body_params,
|
|
327
|
+
post_params=_form_params,
|
|
328
|
+
files=_files,
|
|
329
|
+
auth_settings=_auth_settings,
|
|
330
|
+
collection_formats=_collection_formats,
|
|
331
|
+
_host=_host,
|
|
332
|
+
_request_auth=_request_auth
|
|
333
|
+
)
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
@validate_call
|
|
339
|
+
def data_attributes_read(
|
|
340
|
+
self,
|
|
341
|
+
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.")],
|
|
342
|
+
body: ReadAttributesBody,
|
|
343
|
+
_request_timeout: Union[
|
|
344
|
+
None,
|
|
345
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
346
|
+
Tuple[
|
|
347
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
348
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
349
|
+
]
|
|
350
|
+
] = None,
|
|
351
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
352
|
+
_content_type: Optional[StrictStr] = None,
|
|
353
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
354
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
355
|
+
) -> AttributeReadResponse:
|
|
356
|
+
"""read attributes
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
: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)
|
|
360
|
+
:type tenant_id: str
|
|
361
|
+
:param body: (required)
|
|
362
|
+
:type body: ReadAttributesBody
|
|
363
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
364
|
+
number provided, it will be total request
|
|
365
|
+
timeout. It can also be a pair (tuple) of
|
|
366
|
+
(connection, read) timeouts.
|
|
367
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
368
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
369
|
+
request; this effectively ignores the
|
|
370
|
+
authentication in the spec for a single request.
|
|
371
|
+
:type _request_auth: dict, optional
|
|
372
|
+
:param _content_type: force content-type for the request.
|
|
373
|
+
:type _content_type: str, Optional
|
|
374
|
+
:param _headers: set to override the headers for a single
|
|
375
|
+
request; this effectively ignores the headers
|
|
376
|
+
in the spec for a single request.
|
|
377
|
+
:type _headers: dict, optional
|
|
378
|
+
:param _host_index: set to override the host_index for a single
|
|
379
|
+
request; this effectively ignores the host_index
|
|
380
|
+
in the spec for a single request.
|
|
381
|
+
:type _host_index: int, optional
|
|
382
|
+
:return: Returns the result object.
|
|
383
|
+
""" # noqa: E501
|
|
384
|
+
|
|
385
|
+
_param = self._data_attributes_read_serialize(
|
|
386
|
+
tenant_id=tenant_id,
|
|
387
|
+
body=body,
|
|
388
|
+
_request_auth=_request_auth,
|
|
389
|
+
_content_type=_content_type,
|
|
390
|
+
_headers=_headers,
|
|
391
|
+
_host_index=_host_index
|
|
392
|
+
)
|
|
393
|
+
|
|
394
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
395
|
+
'200': "AttributeReadResponse",
|
|
396
|
+
}
|
|
397
|
+
response_data = self.api_client.call_api(
|
|
398
|
+
*_param,
|
|
399
|
+
_request_timeout=_request_timeout
|
|
400
|
+
)
|
|
401
|
+
response_data.read()
|
|
402
|
+
return self.api_client.response_deserialize(
|
|
403
|
+
response_data=response_data,
|
|
404
|
+
response_types_map=_response_types_map,
|
|
405
|
+
).data
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
@validate_call
|
|
409
|
+
def data_attributes_read_with_http_info(
|
|
410
|
+
self,
|
|
411
|
+
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.")],
|
|
412
|
+
body: ReadAttributesBody,
|
|
413
|
+
_request_timeout: Union[
|
|
414
|
+
None,
|
|
415
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
416
|
+
Tuple[
|
|
417
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
418
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
419
|
+
]
|
|
420
|
+
] = None,
|
|
421
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
422
|
+
_content_type: Optional[StrictStr] = None,
|
|
423
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
424
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
425
|
+
) -> ApiResponse[AttributeReadResponse]:
|
|
426
|
+
"""read attributes
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
: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)
|
|
430
|
+
:type tenant_id: str
|
|
431
|
+
:param body: (required)
|
|
432
|
+
:type body: ReadAttributesBody
|
|
433
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
434
|
+
number provided, it will be total request
|
|
435
|
+
timeout. It can also be a pair (tuple) of
|
|
436
|
+
(connection, read) timeouts.
|
|
437
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
438
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
439
|
+
request; this effectively ignores the
|
|
440
|
+
authentication in the spec for a single request.
|
|
441
|
+
:type _request_auth: dict, optional
|
|
442
|
+
:param _content_type: force content-type for the request.
|
|
443
|
+
:type _content_type: str, Optional
|
|
444
|
+
:param _headers: set to override the headers for a single
|
|
445
|
+
request; this effectively ignores the headers
|
|
446
|
+
in the spec for a single request.
|
|
447
|
+
:type _headers: dict, optional
|
|
448
|
+
:param _host_index: set to override the host_index for a single
|
|
449
|
+
request; this effectively ignores the host_index
|
|
450
|
+
in the spec for a single request.
|
|
451
|
+
:type _host_index: int, optional
|
|
452
|
+
:return: Returns the result object.
|
|
453
|
+
""" # noqa: E501
|
|
454
|
+
|
|
455
|
+
_param = self._data_attributes_read_serialize(
|
|
456
|
+
tenant_id=tenant_id,
|
|
457
|
+
body=body,
|
|
458
|
+
_request_auth=_request_auth,
|
|
459
|
+
_content_type=_content_type,
|
|
460
|
+
_headers=_headers,
|
|
461
|
+
_host_index=_host_index
|
|
462
|
+
)
|
|
463
|
+
|
|
464
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
465
|
+
'200': "AttributeReadResponse",
|
|
466
|
+
}
|
|
467
|
+
response_data = self.api_client.call_api(
|
|
468
|
+
*_param,
|
|
469
|
+
_request_timeout=_request_timeout
|
|
470
|
+
)
|
|
471
|
+
response_data.read()
|
|
472
|
+
return self.api_client.response_deserialize(
|
|
473
|
+
response_data=response_data,
|
|
474
|
+
response_types_map=_response_types_map,
|
|
475
|
+
)
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
@validate_call
|
|
479
|
+
def data_attributes_read_without_preload_content(
|
|
480
|
+
self,
|
|
481
|
+
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.")],
|
|
482
|
+
body: ReadAttributesBody,
|
|
483
|
+
_request_timeout: Union[
|
|
484
|
+
None,
|
|
485
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
486
|
+
Tuple[
|
|
487
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
488
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
489
|
+
]
|
|
490
|
+
] = None,
|
|
491
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
492
|
+
_content_type: Optional[StrictStr] = None,
|
|
493
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
494
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
495
|
+
) -> RESTResponseType:
|
|
496
|
+
"""read attributes
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
: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)
|
|
500
|
+
:type tenant_id: str
|
|
501
|
+
:param body: (required)
|
|
502
|
+
:type body: ReadAttributesBody
|
|
503
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
504
|
+
number provided, it will be total request
|
|
505
|
+
timeout. It can also be a pair (tuple) of
|
|
506
|
+
(connection, read) timeouts.
|
|
507
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
508
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
509
|
+
request; this effectively ignores the
|
|
510
|
+
authentication in the spec for a single request.
|
|
511
|
+
:type _request_auth: dict, optional
|
|
512
|
+
:param _content_type: force content-type for the request.
|
|
513
|
+
:type _content_type: str, Optional
|
|
514
|
+
:param _headers: set to override the headers for a single
|
|
515
|
+
request; this effectively ignores the headers
|
|
516
|
+
in the spec for a single request.
|
|
517
|
+
:type _headers: dict, optional
|
|
518
|
+
:param _host_index: set to override the host_index for a single
|
|
519
|
+
request; this effectively ignores the host_index
|
|
520
|
+
in the spec for a single request.
|
|
521
|
+
:type _host_index: int, optional
|
|
522
|
+
:return: Returns the result object.
|
|
523
|
+
""" # noqa: E501
|
|
524
|
+
|
|
525
|
+
_param = self._data_attributes_read_serialize(
|
|
526
|
+
tenant_id=tenant_id,
|
|
527
|
+
body=body,
|
|
528
|
+
_request_auth=_request_auth,
|
|
529
|
+
_content_type=_content_type,
|
|
530
|
+
_headers=_headers,
|
|
531
|
+
_host_index=_host_index
|
|
532
|
+
)
|
|
533
|
+
|
|
534
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
535
|
+
'200': "AttributeReadResponse",
|
|
536
|
+
}
|
|
537
|
+
response_data = self.api_client.call_api(
|
|
538
|
+
*_param,
|
|
539
|
+
_request_timeout=_request_timeout
|
|
540
|
+
)
|
|
541
|
+
return response_data.response
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
def _data_attributes_read_serialize(
|
|
545
|
+
self,
|
|
546
|
+
tenant_id,
|
|
547
|
+
body,
|
|
548
|
+
_request_auth,
|
|
549
|
+
_content_type,
|
|
550
|
+
_headers,
|
|
551
|
+
_host_index,
|
|
552
|
+
) -> RequestSerialized:
|
|
553
|
+
|
|
554
|
+
_host = None
|
|
555
|
+
|
|
556
|
+
_collection_formats: Dict[str, str] = {
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
_path_params: Dict[str, str] = {}
|
|
560
|
+
_query_params: List[Tuple[str, str]] = []
|
|
561
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
562
|
+
_form_params: List[Tuple[str, str]] = []
|
|
563
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
564
|
+
_body_params: Optional[bytes] = None
|
|
565
|
+
|
|
566
|
+
# process the path parameters
|
|
567
|
+
if tenant_id is not None:
|
|
568
|
+
_path_params['tenant_id'] = tenant_id
|
|
569
|
+
# process the query parameters
|
|
570
|
+
# process the header parameters
|
|
571
|
+
# process the form parameters
|
|
572
|
+
# process the body parameter
|
|
573
|
+
if body is not None:
|
|
574
|
+
_body_params = body
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
# set the HTTP header `Accept`
|
|
578
|
+
if 'Accept' not in _header_params:
|
|
579
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
580
|
+
[
|
|
581
|
+
'application/json'
|
|
582
|
+
]
|
|
583
|
+
)
|
|
584
|
+
|
|
585
|
+
# set the HTTP header `Content-Type`
|
|
586
|
+
if _content_type:
|
|
587
|
+
_header_params['Content-Type'] = _content_type
|
|
588
|
+
else:
|
|
589
|
+
_default_content_type = (
|
|
590
|
+
self.api_client.select_header_content_type(
|
|
591
|
+
[
|
|
592
|
+
'application/json'
|
|
593
|
+
]
|
|
594
|
+
)
|
|
595
|
+
)
|
|
596
|
+
if _default_content_type is not None:
|
|
597
|
+
_header_params['Content-Type'] = _default_content_type
|
|
598
|
+
|
|
599
|
+
# authentication setting
|
|
600
|
+
_auth_settings: List[str] = [
|
|
601
|
+
]
|
|
602
|
+
|
|
603
|
+
return self.api_client.param_serialize(
|
|
604
|
+
method='POST',
|
|
605
|
+
resource_path='/v1/tenants/{tenant_id}/data/attributes/read',
|
|
606
|
+
path_params=_path_params,
|
|
607
|
+
query_params=_query_params,
|
|
608
|
+
header_params=_header_params,
|
|
609
|
+
body=_body_params,
|
|
610
|
+
post_params=_form_params,
|
|
611
|
+
files=_files,
|
|
612
|
+
auth_settings=_auth_settings,
|
|
613
|
+
collection_formats=_collection_formats,
|
|
614
|
+
_host=_host,
|
|
615
|
+
_request_auth=_request_auth
|
|
616
|
+
)
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
@validate_call
|
|
622
|
+
def data_delete(
|
|
623
|
+
self,
|
|
624
|
+
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.")],
|
|
625
|
+
body: DataDeleteBody,
|
|
626
|
+
_request_timeout: Union[
|
|
627
|
+
None,
|
|
628
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
629
|
+
Tuple[
|
|
630
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
631
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
632
|
+
]
|
|
633
|
+
] = None,
|
|
634
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
635
|
+
_content_type: Optional[StrictStr] = None,
|
|
636
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
637
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
638
|
+
) -> DataDeleteResponse:
|
|
639
|
+
"""delete data
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
: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)
|
|
643
|
+
:type tenant_id: str
|
|
644
|
+
:param body: (required)
|
|
645
|
+
:type body: DataDeleteBody
|
|
646
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
647
|
+
number provided, it will be total request
|
|
648
|
+
timeout. It can also be a pair (tuple) of
|
|
649
|
+
(connection, read) timeouts.
|
|
650
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
651
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
652
|
+
request; this effectively ignores the
|
|
653
|
+
authentication in the spec for a single request.
|
|
654
|
+
:type _request_auth: dict, optional
|
|
655
|
+
:param _content_type: force content-type for the request.
|
|
656
|
+
:type _content_type: str, Optional
|
|
657
|
+
:param _headers: set to override the headers for a single
|
|
658
|
+
request; this effectively ignores the headers
|
|
659
|
+
in the spec for a single request.
|
|
660
|
+
:type _headers: dict, optional
|
|
661
|
+
:param _host_index: set to override the host_index for a single
|
|
662
|
+
request; this effectively ignores the host_index
|
|
663
|
+
in the spec for a single request.
|
|
664
|
+
:type _host_index: int, optional
|
|
665
|
+
:return: Returns the result object.
|
|
666
|
+
""" # noqa: E501
|
|
667
|
+
|
|
668
|
+
_param = self._data_delete_serialize(
|
|
669
|
+
tenant_id=tenant_id,
|
|
670
|
+
body=body,
|
|
671
|
+
_request_auth=_request_auth,
|
|
672
|
+
_content_type=_content_type,
|
|
673
|
+
_headers=_headers,
|
|
674
|
+
_host_index=_host_index
|
|
675
|
+
)
|
|
676
|
+
|
|
677
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
678
|
+
'200': "DataDeleteResponse",
|
|
679
|
+
}
|
|
680
|
+
response_data = self.api_client.call_api(
|
|
681
|
+
*_param,
|
|
682
|
+
_request_timeout=_request_timeout
|
|
683
|
+
)
|
|
684
|
+
response_data.read()
|
|
685
|
+
return self.api_client.response_deserialize(
|
|
686
|
+
response_data=response_data,
|
|
687
|
+
response_types_map=_response_types_map,
|
|
688
|
+
).data
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
@validate_call
|
|
692
|
+
def data_delete_with_http_info(
|
|
693
|
+
self,
|
|
694
|
+
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.")],
|
|
695
|
+
body: DataDeleteBody,
|
|
696
|
+
_request_timeout: Union[
|
|
697
|
+
None,
|
|
698
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
699
|
+
Tuple[
|
|
700
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
701
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
702
|
+
]
|
|
703
|
+
] = None,
|
|
704
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
705
|
+
_content_type: Optional[StrictStr] = None,
|
|
706
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
707
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
708
|
+
) -> ApiResponse[DataDeleteResponse]:
|
|
709
|
+
"""delete data
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
: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)
|
|
713
|
+
:type tenant_id: str
|
|
714
|
+
:param body: (required)
|
|
715
|
+
:type body: DataDeleteBody
|
|
716
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
717
|
+
number provided, it will be total request
|
|
718
|
+
timeout. It can also be a pair (tuple) of
|
|
719
|
+
(connection, read) timeouts.
|
|
720
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
721
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
722
|
+
request; this effectively ignores the
|
|
723
|
+
authentication in the spec for a single request.
|
|
724
|
+
:type _request_auth: dict, optional
|
|
725
|
+
:param _content_type: force content-type for the request.
|
|
726
|
+
:type _content_type: str, Optional
|
|
727
|
+
:param _headers: set to override the headers for a single
|
|
728
|
+
request; this effectively ignores the headers
|
|
729
|
+
in the spec for a single request.
|
|
730
|
+
:type _headers: dict, optional
|
|
731
|
+
:param _host_index: set to override the host_index for a single
|
|
732
|
+
request; this effectively ignores the host_index
|
|
733
|
+
in the spec for a single request.
|
|
734
|
+
:type _host_index: int, optional
|
|
735
|
+
:return: Returns the result object.
|
|
736
|
+
""" # noqa: E501
|
|
737
|
+
|
|
738
|
+
_param = self._data_delete_serialize(
|
|
739
|
+
tenant_id=tenant_id,
|
|
740
|
+
body=body,
|
|
741
|
+
_request_auth=_request_auth,
|
|
742
|
+
_content_type=_content_type,
|
|
743
|
+
_headers=_headers,
|
|
744
|
+
_host_index=_host_index
|
|
745
|
+
)
|
|
746
|
+
|
|
747
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
748
|
+
'200': "DataDeleteResponse",
|
|
749
|
+
}
|
|
750
|
+
response_data = self.api_client.call_api(
|
|
751
|
+
*_param,
|
|
752
|
+
_request_timeout=_request_timeout
|
|
753
|
+
)
|
|
754
|
+
response_data.read()
|
|
755
|
+
return self.api_client.response_deserialize(
|
|
756
|
+
response_data=response_data,
|
|
757
|
+
response_types_map=_response_types_map,
|
|
758
|
+
)
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
@validate_call
|
|
762
|
+
def data_delete_without_preload_content(
|
|
763
|
+
self,
|
|
764
|
+
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.")],
|
|
765
|
+
body: DataDeleteBody,
|
|
766
|
+
_request_timeout: Union[
|
|
767
|
+
None,
|
|
768
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
769
|
+
Tuple[
|
|
770
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
771
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
772
|
+
]
|
|
773
|
+
] = None,
|
|
774
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
775
|
+
_content_type: Optional[StrictStr] = None,
|
|
776
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
777
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
778
|
+
) -> RESTResponseType:
|
|
779
|
+
"""delete data
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
: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)
|
|
783
|
+
:type tenant_id: str
|
|
784
|
+
:param body: (required)
|
|
785
|
+
:type body: DataDeleteBody
|
|
786
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
787
|
+
number provided, it will be total request
|
|
788
|
+
timeout. It can also be a pair (tuple) of
|
|
789
|
+
(connection, read) timeouts.
|
|
790
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
791
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
792
|
+
request; this effectively ignores the
|
|
793
|
+
authentication in the spec for a single request.
|
|
794
|
+
:type _request_auth: dict, optional
|
|
795
|
+
:param _content_type: force content-type for the request.
|
|
796
|
+
:type _content_type: str, Optional
|
|
797
|
+
:param _headers: set to override the headers for a single
|
|
798
|
+
request; this effectively ignores the headers
|
|
799
|
+
in the spec for a single request.
|
|
800
|
+
:type _headers: dict, optional
|
|
801
|
+
:param _host_index: set to override the host_index for a single
|
|
802
|
+
request; this effectively ignores the host_index
|
|
803
|
+
in the spec for a single request.
|
|
804
|
+
:type _host_index: int, optional
|
|
805
|
+
:return: Returns the result object.
|
|
806
|
+
""" # noqa: E501
|
|
807
|
+
|
|
808
|
+
_param = self._data_delete_serialize(
|
|
809
|
+
tenant_id=tenant_id,
|
|
810
|
+
body=body,
|
|
811
|
+
_request_auth=_request_auth,
|
|
812
|
+
_content_type=_content_type,
|
|
813
|
+
_headers=_headers,
|
|
814
|
+
_host_index=_host_index
|
|
815
|
+
)
|
|
816
|
+
|
|
817
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
818
|
+
'200': "DataDeleteResponse",
|
|
819
|
+
}
|
|
820
|
+
response_data = self.api_client.call_api(
|
|
821
|
+
*_param,
|
|
822
|
+
_request_timeout=_request_timeout
|
|
823
|
+
)
|
|
824
|
+
return response_data.response
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
def _data_delete_serialize(
|
|
828
|
+
self,
|
|
829
|
+
tenant_id,
|
|
830
|
+
body,
|
|
831
|
+
_request_auth,
|
|
832
|
+
_content_type,
|
|
833
|
+
_headers,
|
|
834
|
+
_host_index,
|
|
835
|
+
) -> RequestSerialized:
|
|
836
|
+
|
|
837
|
+
_host = None
|
|
838
|
+
|
|
839
|
+
_collection_formats: Dict[str, str] = {
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
_path_params: Dict[str, str] = {}
|
|
843
|
+
_query_params: List[Tuple[str, str]] = []
|
|
844
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
845
|
+
_form_params: List[Tuple[str, str]] = []
|
|
846
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
847
|
+
_body_params: Optional[bytes] = None
|
|
848
|
+
|
|
849
|
+
# process the path parameters
|
|
850
|
+
if tenant_id is not None:
|
|
851
|
+
_path_params['tenant_id'] = tenant_id
|
|
852
|
+
# process the query parameters
|
|
853
|
+
# process the header parameters
|
|
854
|
+
# process the form parameters
|
|
855
|
+
# process the body parameter
|
|
856
|
+
if body is not None:
|
|
857
|
+
_body_params = body
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
# set the HTTP header `Accept`
|
|
861
|
+
if 'Accept' not in _header_params:
|
|
862
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
863
|
+
[
|
|
864
|
+
'application/json'
|
|
865
|
+
]
|
|
866
|
+
)
|
|
867
|
+
|
|
868
|
+
# set the HTTP header `Content-Type`
|
|
869
|
+
if _content_type:
|
|
870
|
+
_header_params['Content-Type'] = _content_type
|
|
871
|
+
else:
|
|
872
|
+
_default_content_type = (
|
|
873
|
+
self.api_client.select_header_content_type(
|
|
874
|
+
[
|
|
875
|
+
'application/json'
|
|
876
|
+
]
|
|
877
|
+
)
|
|
878
|
+
)
|
|
879
|
+
if _default_content_type is not None:
|
|
880
|
+
_header_params['Content-Type'] = _default_content_type
|
|
881
|
+
|
|
882
|
+
# authentication setting
|
|
883
|
+
_auth_settings: List[str] = [
|
|
884
|
+
]
|
|
885
|
+
|
|
886
|
+
return self.api_client.param_serialize(
|
|
887
|
+
method='POST',
|
|
888
|
+
resource_path='/v1/tenants/{tenant_id}/data/delete',
|
|
889
|
+
path_params=_path_params,
|
|
890
|
+
query_params=_query_params,
|
|
891
|
+
header_params=_header_params,
|
|
892
|
+
body=_body_params,
|
|
893
|
+
post_params=_form_params,
|
|
894
|
+
files=_files,
|
|
895
|
+
auth_settings=_auth_settings,
|
|
896
|
+
collection_formats=_collection_formats,
|
|
897
|
+
_host=_host,
|
|
898
|
+
_request_auth=_request_auth
|
|
899
|
+
)
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
@validate_call
|
|
905
|
+
def data_relationships_read(
|
|
906
|
+
self,
|
|
907
|
+
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.")],
|
|
908
|
+
body: ReadRelationshipsBody,
|
|
909
|
+
_request_timeout: Union[
|
|
910
|
+
None,
|
|
911
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
912
|
+
Tuple[
|
|
913
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
914
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
915
|
+
]
|
|
916
|
+
] = None,
|
|
917
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
918
|
+
_content_type: Optional[StrictStr] = None,
|
|
919
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
920
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
921
|
+
) -> RelationshipReadResponse:
|
|
922
|
+
"""read relationships
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
: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)
|
|
926
|
+
:type tenant_id: str
|
|
927
|
+
:param body: (required)
|
|
928
|
+
:type body: ReadRelationshipsBody
|
|
929
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
930
|
+
number provided, it will be total request
|
|
931
|
+
timeout. It can also be a pair (tuple) of
|
|
932
|
+
(connection, read) timeouts.
|
|
933
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
934
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
935
|
+
request; this effectively ignores the
|
|
936
|
+
authentication in the spec for a single request.
|
|
937
|
+
:type _request_auth: dict, optional
|
|
938
|
+
:param _content_type: force content-type for the request.
|
|
939
|
+
:type _content_type: str, Optional
|
|
940
|
+
:param _headers: set to override the headers for a single
|
|
941
|
+
request; this effectively ignores the headers
|
|
942
|
+
in the spec for a single request.
|
|
943
|
+
:type _headers: dict, optional
|
|
944
|
+
:param _host_index: set to override the host_index for a single
|
|
945
|
+
request; this effectively ignores the host_index
|
|
946
|
+
in the spec for a single request.
|
|
947
|
+
:type _host_index: int, optional
|
|
948
|
+
:return: Returns the result object.
|
|
949
|
+
""" # noqa: E501
|
|
950
|
+
|
|
951
|
+
_param = self._data_relationships_read_serialize(
|
|
952
|
+
tenant_id=tenant_id,
|
|
953
|
+
body=body,
|
|
954
|
+
_request_auth=_request_auth,
|
|
955
|
+
_content_type=_content_type,
|
|
956
|
+
_headers=_headers,
|
|
957
|
+
_host_index=_host_index
|
|
958
|
+
)
|
|
959
|
+
|
|
960
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
961
|
+
'200': "RelationshipReadResponse",
|
|
962
|
+
}
|
|
963
|
+
response_data = self.api_client.call_api(
|
|
964
|
+
*_param,
|
|
965
|
+
_request_timeout=_request_timeout
|
|
966
|
+
)
|
|
967
|
+
response_data.read()
|
|
968
|
+
return self.api_client.response_deserialize(
|
|
969
|
+
response_data=response_data,
|
|
970
|
+
response_types_map=_response_types_map,
|
|
971
|
+
).data
|
|
972
|
+
|
|
973
|
+
|
|
974
|
+
@validate_call
|
|
975
|
+
def data_relationships_read_with_http_info(
|
|
976
|
+
self,
|
|
977
|
+
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.")],
|
|
978
|
+
body: ReadRelationshipsBody,
|
|
979
|
+
_request_timeout: Union[
|
|
980
|
+
None,
|
|
981
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
982
|
+
Tuple[
|
|
983
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
984
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
985
|
+
]
|
|
986
|
+
] = None,
|
|
987
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
988
|
+
_content_type: Optional[StrictStr] = None,
|
|
989
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
990
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
991
|
+
) -> ApiResponse[RelationshipReadResponse]:
|
|
992
|
+
"""read relationships
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
: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)
|
|
996
|
+
:type tenant_id: str
|
|
997
|
+
:param body: (required)
|
|
998
|
+
:type body: ReadRelationshipsBody
|
|
999
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1000
|
+
number provided, it will be total request
|
|
1001
|
+
timeout. It can also be a pair (tuple) of
|
|
1002
|
+
(connection, read) timeouts.
|
|
1003
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1004
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1005
|
+
request; this effectively ignores the
|
|
1006
|
+
authentication in the spec for a single request.
|
|
1007
|
+
:type _request_auth: dict, optional
|
|
1008
|
+
:param _content_type: force content-type for the request.
|
|
1009
|
+
:type _content_type: str, Optional
|
|
1010
|
+
:param _headers: set to override the headers for a single
|
|
1011
|
+
request; this effectively ignores the headers
|
|
1012
|
+
in the spec for a single request.
|
|
1013
|
+
:type _headers: dict, optional
|
|
1014
|
+
:param _host_index: set to override the host_index for a single
|
|
1015
|
+
request; this effectively ignores the host_index
|
|
1016
|
+
in the spec for a single request.
|
|
1017
|
+
:type _host_index: int, optional
|
|
1018
|
+
:return: Returns the result object.
|
|
1019
|
+
""" # noqa: E501
|
|
1020
|
+
|
|
1021
|
+
_param = self._data_relationships_read_serialize(
|
|
1022
|
+
tenant_id=tenant_id,
|
|
1023
|
+
body=body,
|
|
1024
|
+
_request_auth=_request_auth,
|
|
1025
|
+
_content_type=_content_type,
|
|
1026
|
+
_headers=_headers,
|
|
1027
|
+
_host_index=_host_index
|
|
1028
|
+
)
|
|
1029
|
+
|
|
1030
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1031
|
+
'200': "RelationshipReadResponse",
|
|
1032
|
+
}
|
|
1033
|
+
response_data = self.api_client.call_api(
|
|
1034
|
+
*_param,
|
|
1035
|
+
_request_timeout=_request_timeout
|
|
1036
|
+
)
|
|
1037
|
+
response_data.read()
|
|
1038
|
+
return self.api_client.response_deserialize(
|
|
1039
|
+
response_data=response_data,
|
|
1040
|
+
response_types_map=_response_types_map,
|
|
1041
|
+
)
|
|
1042
|
+
|
|
1043
|
+
|
|
1044
|
+
@validate_call
|
|
1045
|
+
def data_relationships_read_without_preload_content(
|
|
1046
|
+
self,
|
|
1047
|
+
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.")],
|
|
1048
|
+
body: ReadRelationshipsBody,
|
|
1049
|
+
_request_timeout: Union[
|
|
1050
|
+
None,
|
|
1051
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1052
|
+
Tuple[
|
|
1053
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1054
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1055
|
+
]
|
|
1056
|
+
] = None,
|
|
1057
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1058
|
+
_content_type: Optional[StrictStr] = None,
|
|
1059
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1060
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1061
|
+
) -> RESTResponseType:
|
|
1062
|
+
"""read relationships
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
: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)
|
|
1066
|
+
:type tenant_id: str
|
|
1067
|
+
:param body: (required)
|
|
1068
|
+
:type body: ReadRelationshipsBody
|
|
1069
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1070
|
+
number provided, it will be total request
|
|
1071
|
+
timeout. It can also be a pair (tuple) of
|
|
1072
|
+
(connection, read) timeouts.
|
|
1073
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1074
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1075
|
+
request; this effectively ignores the
|
|
1076
|
+
authentication in the spec for a single request.
|
|
1077
|
+
:type _request_auth: dict, optional
|
|
1078
|
+
:param _content_type: force content-type for the request.
|
|
1079
|
+
:type _content_type: str, Optional
|
|
1080
|
+
:param _headers: set to override the headers for a single
|
|
1081
|
+
request; this effectively ignores the headers
|
|
1082
|
+
in the spec for a single request.
|
|
1083
|
+
:type _headers: dict, optional
|
|
1084
|
+
:param _host_index: set to override the host_index for a single
|
|
1085
|
+
request; this effectively ignores the host_index
|
|
1086
|
+
in the spec for a single request.
|
|
1087
|
+
:type _host_index: int, optional
|
|
1088
|
+
:return: Returns the result object.
|
|
1089
|
+
""" # noqa: E501
|
|
1090
|
+
|
|
1091
|
+
_param = self._data_relationships_read_serialize(
|
|
1092
|
+
tenant_id=tenant_id,
|
|
1093
|
+
body=body,
|
|
1094
|
+
_request_auth=_request_auth,
|
|
1095
|
+
_content_type=_content_type,
|
|
1096
|
+
_headers=_headers,
|
|
1097
|
+
_host_index=_host_index
|
|
1098
|
+
)
|
|
1099
|
+
|
|
1100
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1101
|
+
'200': "RelationshipReadResponse",
|
|
1102
|
+
}
|
|
1103
|
+
response_data = self.api_client.call_api(
|
|
1104
|
+
*_param,
|
|
1105
|
+
_request_timeout=_request_timeout
|
|
1106
|
+
)
|
|
1107
|
+
return response_data.response
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
def _data_relationships_read_serialize(
|
|
1111
|
+
self,
|
|
1112
|
+
tenant_id,
|
|
1113
|
+
body,
|
|
1114
|
+
_request_auth,
|
|
1115
|
+
_content_type,
|
|
1116
|
+
_headers,
|
|
1117
|
+
_host_index,
|
|
1118
|
+
) -> RequestSerialized:
|
|
1119
|
+
|
|
1120
|
+
_host = None
|
|
1121
|
+
|
|
1122
|
+
_collection_formats: Dict[str, str] = {
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
_path_params: Dict[str, str] = {}
|
|
1126
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1127
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1128
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1129
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
1130
|
+
_body_params: Optional[bytes] = None
|
|
1131
|
+
|
|
1132
|
+
# process the path parameters
|
|
1133
|
+
if tenant_id is not None:
|
|
1134
|
+
_path_params['tenant_id'] = tenant_id
|
|
1135
|
+
# process the query parameters
|
|
1136
|
+
# process the header parameters
|
|
1137
|
+
# process the form parameters
|
|
1138
|
+
# process the body parameter
|
|
1139
|
+
if body is not None:
|
|
1140
|
+
_body_params = body
|
|
1141
|
+
|
|
1142
|
+
|
|
1143
|
+
# set the HTTP header `Accept`
|
|
1144
|
+
if 'Accept' not in _header_params:
|
|
1145
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1146
|
+
[
|
|
1147
|
+
'application/json'
|
|
1148
|
+
]
|
|
1149
|
+
)
|
|
1150
|
+
|
|
1151
|
+
# set the HTTP header `Content-Type`
|
|
1152
|
+
if _content_type:
|
|
1153
|
+
_header_params['Content-Type'] = _content_type
|
|
1154
|
+
else:
|
|
1155
|
+
_default_content_type = (
|
|
1156
|
+
self.api_client.select_header_content_type(
|
|
1157
|
+
[
|
|
1158
|
+
'application/json'
|
|
1159
|
+
]
|
|
1160
|
+
)
|
|
1161
|
+
)
|
|
1162
|
+
if _default_content_type is not None:
|
|
1163
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1164
|
+
|
|
1165
|
+
# authentication setting
|
|
1166
|
+
_auth_settings: List[str] = [
|
|
1167
|
+
]
|
|
1168
|
+
|
|
1169
|
+
return self.api_client.param_serialize(
|
|
1170
|
+
method='POST',
|
|
1171
|
+
resource_path='/v1/tenants/{tenant_id}/data/relationships/read',
|
|
1172
|
+
path_params=_path_params,
|
|
1173
|
+
query_params=_query_params,
|
|
1174
|
+
header_params=_header_params,
|
|
1175
|
+
body=_body_params,
|
|
1176
|
+
post_params=_form_params,
|
|
1177
|
+
files=_files,
|
|
1178
|
+
auth_settings=_auth_settings,
|
|
1179
|
+
collection_formats=_collection_formats,
|
|
1180
|
+
_host=_host,
|
|
1181
|
+
_request_auth=_request_auth
|
|
1182
|
+
)
|
|
1183
|
+
|
|
1184
|
+
|
|
1185
|
+
|
|
1186
|
+
|
|
1187
|
+
@validate_call
|
|
1188
|
+
def data_write(
|
|
1189
|
+
self,
|
|
1190
|
+
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.")],
|
|
1191
|
+
body: DataWriteBody,
|
|
1192
|
+
_request_timeout: Union[
|
|
1193
|
+
None,
|
|
1194
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1195
|
+
Tuple[
|
|
1196
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1197
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1198
|
+
]
|
|
1199
|
+
] = None,
|
|
1200
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1201
|
+
_content_type: Optional[StrictStr] = None,
|
|
1202
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1203
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1204
|
+
) -> DataWriteResponse:
|
|
1205
|
+
"""write data
|
|
1206
|
+
|
|
1207
|
+
|
|
1208
|
+
: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)
|
|
1209
|
+
:type tenant_id: str
|
|
1210
|
+
:param body: (required)
|
|
1211
|
+
:type body: DataWriteBody
|
|
1212
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1213
|
+
number provided, it will be total request
|
|
1214
|
+
timeout. It can also be a pair (tuple) of
|
|
1215
|
+
(connection, read) timeouts.
|
|
1216
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1217
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1218
|
+
request; this effectively ignores the
|
|
1219
|
+
authentication in the spec for a single request.
|
|
1220
|
+
:type _request_auth: dict, optional
|
|
1221
|
+
:param _content_type: force content-type for the request.
|
|
1222
|
+
:type _content_type: str, Optional
|
|
1223
|
+
:param _headers: set to override the headers for a single
|
|
1224
|
+
request; this effectively ignores the headers
|
|
1225
|
+
in the spec for a single request.
|
|
1226
|
+
:type _headers: dict, optional
|
|
1227
|
+
:param _host_index: set to override the host_index for a single
|
|
1228
|
+
request; this effectively ignores the host_index
|
|
1229
|
+
in the spec for a single request.
|
|
1230
|
+
:type _host_index: int, optional
|
|
1231
|
+
:return: Returns the result object.
|
|
1232
|
+
""" # noqa: E501
|
|
1233
|
+
|
|
1234
|
+
_param = self._data_write_serialize(
|
|
1235
|
+
tenant_id=tenant_id,
|
|
1236
|
+
body=body,
|
|
1237
|
+
_request_auth=_request_auth,
|
|
1238
|
+
_content_type=_content_type,
|
|
1239
|
+
_headers=_headers,
|
|
1240
|
+
_host_index=_host_index
|
|
1241
|
+
)
|
|
1242
|
+
|
|
1243
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1244
|
+
'200': "DataWriteResponse",
|
|
1245
|
+
}
|
|
1246
|
+
response_data = self.api_client.call_api(
|
|
1247
|
+
*_param,
|
|
1248
|
+
_request_timeout=_request_timeout
|
|
1249
|
+
)
|
|
1250
|
+
response_data.read()
|
|
1251
|
+
return self.api_client.response_deserialize(
|
|
1252
|
+
response_data=response_data,
|
|
1253
|
+
response_types_map=_response_types_map,
|
|
1254
|
+
).data
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
@validate_call
|
|
1258
|
+
def data_write_with_http_info(
|
|
1259
|
+
self,
|
|
1260
|
+
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.")],
|
|
1261
|
+
body: DataWriteBody,
|
|
1262
|
+
_request_timeout: Union[
|
|
1263
|
+
None,
|
|
1264
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1265
|
+
Tuple[
|
|
1266
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1267
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1268
|
+
]
|
|
1269
|
+
] = None,
|
|
1270
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1271
|
+
_content_type: Optional[StrictStr] = None,
|
|
1272
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1273
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1274
|
+
) -> ApiResponse[DataWriteResponse]:
|
|
1275
|
+
"""write data
|
|
1276
|
+
|
|
1277
|
+
|
|
1278
|
+
: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)
|
|
1279
|
+
:type tenant_id: str
|
|
1280
|
+
:param body: (required)
|
|
1281
|
+
:type body: DataWriteBody
|
|
1282
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1283
|
+
number provided, it will be total request
|
|
1284
|
+
timeout. It can also be a pair (tuple) of
|
|
1285
|
+
(connection, read) timeouts.
|
|
1286
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1287
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1288
|
+
request; this effectively ignores the
|
|
1289
|
+
authentication in the spec for a single request.
|
|
1290
|
+
:type _request_auth: dict, optional
|
|
1291
|
+
:param _content_type: force content-type for the request.
|
|
1292
|
+
:type _content_type: str, Optional
|
|
1293
|
+
:param _headers: set to override the headers for a single
|
|
1294
|
+
request; this effectively ignores the headers
|
|
1295
|
+
in the spec for a single request.
|
|
1296
|
+
:type _headers: dict, optional
|
|
1297
|
+
:param _host_index: set to override the host_index for a single
|
|
1298
|
+
request; this effectively ignores the host_index
|
|
1299
|
+
in the spec for a single request.
|
|
1300
|
+
:type _host_index: int, optional
|
|
1301
|
+
:return: Returns the result object.
|
|
1302
|
+
""" # noqa: E501
|
|
1303
|
+
|
|
1304
|
+
_param = self._data_write_serialize(
|
|
1305
|
+
tenant_id=tenant_id,
|
|
1306
|
+
body=body,
|
|
1307
|
+
_request_auth=_request_auth,
|
|
1308
|
+
_content_type=_content_type,
|
|
1309
|
+
_headers=_headers,
|
|
1310
|
+
_host_index=_host_index
|
|
1311
|
+
)
|
|
1312
|
+
|
|
1313
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1314
|
+
'200': "DataWriteResponse",
|
|
1315
|
+
}
|
|
1316
|
+
response_data = self.api_client.call_api(
|
|
1317
|
+
*_param,
|
|
1318
|
+
_request_timeout=_request_timeout
|
|
1319
|
+
)
|
|
1320
|
+
response_data.read()
|
|
1321
|
+
return self.api_client.response_deserialize(
|
|
1322
|
+
response_data=response_data,
|
|
1323
|
+
response_types_map=_response_types_map,
|
|
1324
|
+
)
|
|
1325
|
+
|
|
1326
|
+
|
|
1327
|
+
@validate_call
|
|
1328
|
+
def data_write_without_preload_content(
|
|
1329
|
+
self,
|
|
1330
|
+
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.")],
|
|
1331
|
+
body: DataWriteBody,
|
|
1332
|
+
_request_timeout: Union[
|
|
1333
|
+
None,
|
|
1334
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1335
|
+
Tuple[
|
|
1336
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1337
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1338
|
+
]
|
|
1339
|
+
] = None,
|
|
1340
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1341
|
+
_content_type: Optional[StrictStr] = None,
|
|
1342
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1343
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1344
|
+
) -> RESTResponseType:
|
|
1345
|
+
"""write data
|
|
1346
|
+
|
|
1347
|
+
|
|
1348
|
+
: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)
|
|
1349
|
+
:type tenant_id: str
|
|
1350
|
+
:param body: (required)
|
|
1351
|
+
:type body: DataWriteBody
|
|
1352
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1353
|
+
number provided, it will be total request
|
|
1354
|
+
timeout. It can also be a pair (tuple) of
|
|
1355
|
+
(connection, read) timeouts.
|
|
1356
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1357
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1358
|
+
request; this effectively ignores the
|
|
1359
|
+
authentication in the spec for a single request.
|
|
1360
|
+
:type _request_auth: dict, optional
|
|
1361
|
+
:param _content_type: force content-type for the request.
|
|
1362
|
+
:type _content_type: str, Optional
|
|
1363
|
+
:param _headers: set to override the headers for a single
|
|
1364
|
+
request; this effectively ignores the headers
|
|
1365
|
+
in the spec for a single request.
|
|
1366
|
+
:type _headers: dict, optional
|
|
1367
|
+
:param _host_index: set to override the host_index for a single
|
|
1368
|
+
request; this effectively ignores the host_index
|
|
1369
|
+
in the spec for a single request.
|
|
1370
|
+
:type _host_index: int, optional
|
|
1371
|
+
:return: Returns the result object.
|
|
1372
|
+
""" # noqa: E501
|
|
1373
|
+
|
|
1374
|
+
_param = self._data_write_serialize(
|
|
1375
|
+
tenant_id=tenant_id,
|
|
1376
|
+
body=body,
|
|
1377
|
+
_request_auth=_request_auth,
|
|
1378
|
+
_content_type=_content_type,
|
|
1379
|
+
_headers=_headers,
|
|
1380
|
+
_host_index=_host_index
|
|
1381
|
+
)
|
|
1382
|
+
|
|
1383
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1384
|
+
'200': "DataWriteResponse",
|
|
1385
|
+
}
|
|
1386
|
+
response_data = self.api_client.call_api(
|
|
1387
|
+
*_param,
|
|
1388
|
+
_request_timeout=_request_timeout
|
|
1389
|
+
)
|
|
1390
|
+
return response_data.response
|
|
1391
|
+
|
|
1392
|
+
|
|
1393
|
+
def _data_write_serialize(
|
|
1394
|
+
self,
|
|
1395
|
+
tenant_id,
|
|
1396
|
+
body,
|
|
1397
|
+
_request_auth,
|
|
1398
|
+
_content_type,
|
|
1399
|
+
_headers,
|
|
1400
|
+
_host_index,
|
|
1401
|
+
) -> RequestSerialized:
|
|
1402
|
+
|
|
1403
|
+
_host = None
|
|
1404
|
+
|
|
1405
|
+
_collection_formats: Dict[str, str] = {
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
_path_params: Dict[str, str] = {}
|
|
1409
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1410
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1411
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1412
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
1413
|
+
_body_params: Optional[bytes] = None
|
|
1414
|
+
|
|
1415
|
+
# process the path parameters
|
|
1416
|
+
if tenant_id is not None:
|
|
1417
|
+
_path_params['tenant_id'] = tenant_id
|
|
1418
|
+
# process the query parameters
|
|
1419
|
+
# process the header parameters
|
|
1420
|
+
# process the form parameters
|
|
1421
|
+
# process the body parameter
|
|
1422
|
+
if body is not None:
|
|
1423
|
+
_body_params = body
|
|
1424
|
+
|
|
1425
|
+
|
|
1426
|
+
# set the HTTP header `Accept`
|
|
1427
|
+
if 'Accept' not in _header_params:
|
|
1428
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1429
|
+
[
|
|
1430
|
+
'application/json'
|
|
1431
|
+
]
|
|
1432
|
+
)
|
|
1433
|
+
|
|
1434
|
+
# set the HTTP header `Content-Type`
|
|
1435
|
+
if _content_type:
|
|
1436
|
+
_header_params['Content-Type'] = _content_type
|
|
1437
|
+
else:
|
|
1438
|
+
_default_content_type = (
|
|
1439
|
+
self.api_client.select_header_content_type(
|
|
1440
|
+
[
|
|
1441
|
+
'application/json'
|
|
1442
|
+
]
|
|
1443
|
+
)
|
|
1444
|
+
)
|
|
1445
|
+
if _default_content_type is not None:
|
|
1446
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1447
|
+
|
|
1448
|
+
# authentication setting
|
|
1449
|
+
_auth_settings: List[str] = [
|
|
1450
|
+
]
|
|
1451
|
+
|
|
1452
|
+
return self.api_client.param_serialize(
|
|
1453
|
+
method='POST',
|
|
1454
|
+
resource_path='/v1/tenants/{tenant_id}/data/write',
|
|
1455
|
+
path_params=_path_params,
|
|
1456
|
+
query_params=_query_params,
|
|
1457
|
+
header_params=_header_params,
|
|
1458
|
+
body=_body_params,
|
|
1459
|
+
post_params=_form_params,
|
|
1460
|
+
files=_files,
|
|
1461
|
+
auth_settings=_auth_settings,
|
|
1462
|
+
collection_formats=_collection_formats,
|
|
1463
|
+
_host=_host,
|
|
1464
|
+
_request_auth=_request_auth
|
|
1465
|
+
)
|
|
1466
|
+
|
|
1467
|
+
|
|
1468
|
+
|
|
1469
|
+
|
|
1470
|
+
@validate_call
|
|
1471
|
+
def relationships_delete(
|
|
1472
|
+
self,
|
|
1473
|
+
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.")],
|
|
1474
|
+
body: DeleteRelationshipsBody,
|
|
1475
|
+
_request_timeout: Union[
|
|
1476
|
+
None,
|
|
1477
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1478
|
+
Tuple[
|
|
1479
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1480
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1481
|
+
]
|
|
1482
|
+
] = None,
|
|
1483
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1484
|
+
_content_type: Optional[StrictStr] = None,
|
|
1485
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1486
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1487
|
+
) -> RelationshipDeleteResponse:
|
|
1488
|
+
"""delete relationships
|
|
1489
|
+
|
|
1490
|
+
|
|
1491
|
+
: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)
|
|
1492
|
+
:type tenant_id: str
|
|
1493
|
+
:param body: (required)
|
|
1494
|
+
:type body: DeleteRelationshipsBody
|
|
1495
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1496
|
+
number provided, it will be total request
|
|
1497
|
+
timeout. It can also be a pair (tuple) of
|
|
1498
|
+
(connection, read) timeouts.
|
|
1499
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1500
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1501
|
+
request; this effectively ignores the
|
|
1502
|
+
authentication in the spec for a single request.
|
|
1503
|
+
:type _request_auth: dict, optional
|
|
1504
|
+
:param _content_type: force content-type for the request.
|
|
1505
|
+
:type _content_type: str, Optional
|
|
1506
|
+
:param _headers: set to override the headers for a single
|
|
1507
|
+
request; this effectively ignores the headers
|
|
1508
|
+
in the spec for a single request.
|
|
1509
|
+
:type _headers: dict, optional
|
|
1510
|
+
:param _host_index: set to override the host_index for a single
|
|
1511
|
+
request; this effectively ignores the host_index
|
|
1512
|
+
in the spec for a single request.
|
|
1513
|
+
:type _host_index: int, optional
|
|
1514
|
+
:return: Returns the result object.
|
|
1515
|
+
""" # noqa: E501
|
|
1516
|
+
|
|
1517
|
+
_param = self._relationships_delete_serialize(
|
|
1518
|
+
tenant_id=tenant_id,
|
|
1519
|
+
body=body,
|
|
1520
|
+
_request_auth=_request_auth,
|
|
1521
|
+
_content_type=_content_type,
|
|
1522
|
+
_headers=_headers,
|
|
1523
|
+
_host_index=_host_index
|
|
1524
|
+
)
|
|
1525
|
+
|
|
1526
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1527
|
+
'200': "RelationshipDeleteResponse",
|
|
1528
|
+
}
|
|
1529
|
+
response_data = self.api_client.call_api(
|
|
1530
|
+
*_param,
|
|
1531
|
+
_request_timeout=_request_timeout
|
|
1532
|
+
)
|
|
1533
|
+
response_data.read()
|
|
1534
|
+
return self.api_client.response_deserialize(
|
|
1535
|
+
response_data=response_data,
|
|
1536
|
+
response_types_map=_response_types_map,
|
|
1537
|
+
).data
|
|
1538
|
+
|
|
1539
|
+
|
|
1540
|
+
@validate_call
|
|
1541
|
+
def relationships_delete_with_http_info(
|
|
1542
|
+
self,
|
|
1543
|
+
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.")],
|
|
1544
|
+
body: DeleteRelationshipsBody,
|
|
1545
|
+
_request_timeout: Union[
|
|
1546
|
+
None,
|
|
1547
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1548
|
+
Tuple[
|
|
1549
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1550
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1551
|
+
]
|
|
1552
|
+
] = None,
|
|
1553
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1554
|
+
_content_type: Optional[StrictStr] = None,
|
|
1555
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1556
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1557
|
+
) -> ApiResponse[RelationshipDeleteResponse]:
|
|
1558
|
+
"""delete relationships
|
|
1559
|
+
|
|
1560
|
+
|
|
1561
|
+
: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)
|
|
1562
|
+
:type tenant_id: str
|
|
1563
|
+
:param body: (required)
|
|
1564
|
+
:type body: DeleteRelationshipsBody
|
|
1565
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1566
|
+
number provided, it will be total request
|
|
1567
|
+
timeout. It can also be a pair (tuple) of
|
|
1568
|
+
(connection, read) timeouts.
|
|
1569
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1570
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1571
|
+
request; this effectively ignores the
|
|
1572
|
+
authentication in the spec for a single request.
|
|
1573
|
+
:type _request_auth: dict, optional
|
|
1574
|
+
:param _content_type: force content-type for the request.
|
|
1575
|
+
:type _content_type: str, Optional
|
|
1576
|
+
:param _headers: set to override the headers for a single
|
|
1577
|
+
request; this effectively ignores the headers
|
|
1578
|
+
in the spec for a single request.
|
|
1579
|
+
:type _headers: dict, optional
|
|
1580
|
+
:param _host_index: set to override the host_index for a single
|
|
1581
|
+
request; this effectively ignores the host_index
|
|
1582
|
+
in the spec for a single request.
|
|
1583
|
+
:type _host_index: int, optional
|
|
1584
|
+
:return: Returns the result object.
|
|
1585
|
+
""" # noqa: E501
|
|
1586
|
+
|
|
1587
|
+
_param = self._relationships_delete_serialize(
|
|
1588
|
+
tenant_id=tenant_id,
|
|
1589
|
+
body=body,
|
|
1590
|
+
_request_auth=_request_auth,
|
|
1591
|
+
_content_type=_content_type,
|
|
1592
|
+
_headers=_headers,
|
|
1593
|
+
_host_index=_host_index
|
|
1594
|
+
)
|
|
1595
|
+
|
|
1596
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1597
|
+
'200': "RelationshipDeleteResponse",
|
|
1598
|
+
}
|
|
1599
|
+
response_data = self.api_client.call_api(
|
|
1600
|
+
*_param,
|
|
1601
|
+
_request_timeout=_request_timeout
|
|
1602
|
+
)
|
|
1603
|
+
response_data.read()
|
|
1604
|
+
return self.api_client.response_deserialize(
|
|
1605
|
+
response_data=response_data,
|
|
1606
|
+
response_types_map=_response_types_map,
|
|
1607
|
+
)
|
|
1608
|
+
|
|
1609
|
+
|
|
1610
|
+
@validate_call
|
|
1611
|
+
def relationships_delete_without_preload_content(
|
|
1612
|
+
self,
|
|
1613
|
+
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.")],
|
|
1614
|
+
body: DeleteRelationshipsBody,
|
|
1615
|
+
_request_timeout: Union[
|
|
1616
|
+
None,
|
|
1617
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1618
|
+
Tuple[
|
|
1619
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1620
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1621
|
+
]
|
|
1622
|
+
] = None,
|
|
1623
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1624
|
+
_content_type: Optional[StrictStr] = None,
|
|
1625
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1626
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1627
|
+
) -> RESTResponseType:
|
|
1628
|
+
"""delete relationships
|
|
1629
|
+
|
|
1630
|
+
|
|
1631
|
+
: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)
|
|
1632
|
+
:type tenant_id: str
|
|
1633
|
+
:param body: (required)
|
|
1634
|
+
:type body: DeleteRelationshipsBody
|
|
1635
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1636
|
+
number provided, it will be total request
|
|
1637
|
+
timeout. It can also be a pair (tuple) of
|
|
1638
|
+
(connection, read) timeouts.
|
|
1639
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1640
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1641
|
+
request; this effectively ignores the
|
|
1642
|
+
authentication in the spec for a single request.
|
|
1643
|
+
:type _request_auth: dict, optional
|
|
1644
|
+
:param _content_type: force content-type for the request.
|
|
1645
|
+
:type _content_type: str, Optional
|
|
1646
|
+
:param _headers: set to override the headers for a single
|
|
1647
|
+
request; this effectively ignores the headers
|
|
1648
|
+
in the spec for a single request.
|
|
1649
|
+
:type _headers: dict, optional
|
|
1650
|
+
:param _host_index: set to override the host_index for a single
|
|
1651
|
+
request; this effectively ignores the host_index
|
|
1652
|
+
in the spec for a single request.
|
|
1653
|
+
:type _host_index: int, optional
|
|
1654
|
+
:return: Returns the result object.
|
|
1655
|
+
""" # noqa: E501
|
|
1656
|
+
|
|
1657
|
+
_param = self._relationships_delete_serialize(
|
|
1658
|
+
tenant_id=tenant_id,
|
|
1659
|
+
body=body,
|
|
1660
|
+
_request_auth=_request_auth,
|
|
1661
|
+
_content_type=_content_type,
|
|
1662
|
+
_headers=_headers,
|
|
1663
|
+
_host_index=_host_index
|
|
1664
|
+
)
|
|
1665
|
+
|
|
1666
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1667
|
+
'200': "RelationshipDeleteResponse",
|
|
1668
|
+
}
|
|
1669
|
+
response_data = self.api_client.call_api(
|
|
1670
|
+
*_param,
|
|
1671
|
+
_request_timeout=_request_timeout
|
|
1672
|
+
)
|
|
1673
|
+
return response_data.response
|
|
1674
|
+
|
|
1675
|
+
|
|
1676
|
+
def _relationships_delete_serialize(
|
|
1677
|
+
self,
|
|
1678
|
+
tenant_id,
|
|
1679
|
+
body,
|
|
1680
|
+
_request_auth,
|
|
1681
|
+
_content_type,
|
|
1682
|
+
_headers,
|
|
1683
|
+
_host_index,
|
|
1684
|
+
) -> RequestSerialized:
|
|
1685
|
+
|
|
1686
|
+
_host = None
|
|
1687
|
+
|
|
1688
|
+
_collection_formats: Dict[str, str] = {
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
_path_params: Dict[str, str] = {}
|
|
1692
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1693
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1694
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1695
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
1696
|
+
_body_params: Optional[bytes] = None
|
|
1697
|
+
|
|
1698
|
+
# process the path parameters
|
|
1699
|
+
if tenant_id is not None:
|
|
1700
|
+
_path_params['tenant_id'] = tenant_id
|
|
1701
|
+
# process the query parameters
|
|
1702
|
+
# process the header parameters
|
|
1703
|
+
# process the form parameters
|
|
1704
|
+
# process the body parameter
|
|
1705
|
+
if body is not None:
|
|
1706
|
+
_body_params = body
|
|
1707
|
+
|
|
1708
|
+
|
|
1709
|
+
# set the HTTP header `Accept`
|
|
1710
|
+
if 'Accept' not in _header_params:
|
|
1711
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1712
|
+
[
|
|
1713
|
+
'application/json'
|
|
1714
|
+
]
|
|
1715
|
+
)
|
|
1716
|
+
|
|
1717
|
+
# set the HTTP header `Content-Type`
|
|
1718
|
+
if _content_type:
|
|
1719
|
+
_header_params['Content-Type'] = _content_type
|
|
1720
|
+
else:
|
|
1721
|
+
_default_content_type = (
|
|
1722
|
+
self.api_client.select_header_content_type(
|
|
1723
|
+
[
|
|
1724
|
+
'application/json'
|
|
1725
|
+
]
|
|
1726
|
+
)
|
|
1727
|
+
)
|
|
1728
|
+
if _default_content_type is not None:
|
|
1729
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1730
|
+
|
|
1731
|
+
# authentication setting
|
|
1732
|
+
_auth_settings: List[str] = [
|
|
1733
|
+
]
|
|
1734
|
+
|
|
1735
|
+
return self.api_client.param_serialize(
|
|
1736
|
+
method='POST',
|
|
1737
|
+
resource_path='/v1/tenants/{tenant_id}/relationships/delete',
|
|
1738
|
+
path_params=_path_params,
|
|
1739
|
+
query_params=_query_params,
|
|
1740
|
+
header_params=_header_params,
|
|
1741
|
+
body=_body_params,
|
|
1742
|
+
post_params=_form_params,
|
|
1743
|
+
files=_files,
|
|
1744
|
+
auth_settings=_auth_settings,
|
|
1745
|
+
collection_formats=_collection_formats,
|
|
1746
|
+
_host=_host,
|
|
1747
|
+
_request_auth=_request_auth
|
|
1748
|
+
)
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
|
|
1752
|
+
|
|
1753
|
+
@validate_call
|
|
1754
|
+
def relationships_write(
|
|
1755
|
+
self,
|
|
1756
|
+
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.")],
|
|
1757
|
+
body: WriteRelationshipsBody,
|
|
1758
|
+
_request_timeout: Union[
|
|
1759
|
+
None,
|
|
1760
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1761
|
+
Tuple[
|
|
1762
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1763
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1764
|
+
]
|
|
1765
|
+
] = None,
|
|
1766
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1767
|
+
_content_type: Optional[StrictStr] = None,
|
|
1768
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1769
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1770
|
+
) -> RelationshipWriteResponse:
|
|
1771
|
+
"""write relationships
|
|
1772
|
+
|
|
1773
|
+
|
|
1774
|
+
: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)
|
|
1775
|
+
:type tenant_id: str
|
|
1776
|
+
:param body: (required)
|
|
1777
|
+
:type body: WriteRelationshipsBody
|
|
1778
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1779
|
+
number provided, it will be total request
|
|
1780
|
+
timeout. It can also be a pair (tuple) of
|
|
1781
|
+
(connection, read) timeouts.
|
|
1782
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1783
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1784
|
+
request; this effectively ignores the
|
|
1785
|
+
authentication in the spec for a single request.
|
|
1786
|
+
:type _request_auth: dict, optional
|
|
1787
|
+
:param _content_type: force content-type for the request.
|
|
1788
|
+
:type _content_type: str, Optional
|
|
1789
|
+
:param _headers: set to override the headers for a single
|
|
1790
|
+
request; this effectively ignores the headers
|
|
1791
|
+
in the spec for a single request.
|
|
1792
|
+
:type _headers: dict, optional
|
|
1793
|
+
:param _host_index: set to override the host_index for a single
|
|
1794
|
+
request; this effectively ignores the host_index
|
|
1795
|
+
in the spec for a single request.
|
|
1796
|
+
:type _host_index: int, optional
|
|
1797
|
+
:return: Returns the result object.
|
|
1798
|
+
""" # noqa: E501
|
|
1799
|
+
|
|
1800
|
+
_param = self._relationships_write_serialize(
|
|
1801
|
+
tenant_id=tenant_id,
|
|
1802
|
+
body=body,
|
|
1803
|
+
_request_auth=_request_auth,
|
|
1804
|
+
_content_type=_content_type,
|
|
1805
|
+
_headers=_headers,
|
|
1806
|
+
_host_index=_host_index
|
|
1807
|
+
)
|
|
1808
|
+
|
|
1809
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1810
|
+
'200': "RelationshipWriteResponse",
|
|
1811
|
+
}
|
|
1812
|
+
response_data = self.api_client.call_api(
|
|
1813
|
+
*_param,
|
|
1814
|
+
_request_timeout=_request_timeout
|
|
1815
|
+
)
|
|
1816
|
+
response_data.read()
|
|
1817
|
+
return self.api_client.response_deserialize(
|
|
1818
|
+
response_data=response_data,
|
|
1819
|
+
response_types_map=_response_types_map,
|
|
1820
|
+
).data
|
|
1821
|
+
|
|
1822
|
+
|
|
1823
|
+
@validate_call
|
|
1824
|
+
def relationships_write_with_http_info(
|
|
1825
|
+
self,
|
|
1826
|
+
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.")],
|
|
1827
|
+
body: WriteRelationshipsBody,
|
|
1828
|
+
_request_timeout: Union[
|
|
1829
|
+
None,
|
|
1830
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1831
|
+
Tuple[
|
|
1832
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1833
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1834
|
+
]
|
|
1835
|
+
] = None,
|
|
1836
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1837
|
+
_content_type: Optional[StrictStr] = None,
|
|
1838
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1839
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1840
|
+
) -> ApiResponse[RelationshipWriteResponse]:
|
|
1841
|
+
"""write relationships
|
|
1842
|
+
|
|
1843
|
+
|
|
1844
|
+
: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)
|
|
1845
|
+
:type tenant_id: str
|
|
1846
|
+
:param body: (required)
|
|
1847
|
+
:type body: WriteRelationshipsBody
|
|
1848
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1849
|
+
number provided, it will be total request
|
|
1850
|
+
timeout. It can also be a pair (tuple) of
|
|
1851
|
+
(connection, read) timeouts.
|
|
1852
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1853
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1854
|
+
request; this effectively ignores the
|
|
1855
|
+
authentication in the spec for a single request.
|
|
1856
|
+
:type _request_auth: dict, optional
|
|
1857
|
+
:param _content_type: force content-type for the request.
|
|
1858
|
+
:type _content_type: str, Optional
|
|
1859
|
+
:param _headers: set to override the headers for a single
|
|
1860
|
+
request; this effectively ignores the headers
|
|
1861
|
+
in the spec for a single request.
|
|
1862
|
+
:type _headers: dict, optional
|
|
1863
|
+
:param _host_index: set to override the host_index for a single
|
|
1864
|
+
request; this effectively ignores the host_index
|
|
1865
|
+
in the spec for a single request.
|
|
1866
|
+
:type _host_index: int, optional
|
|
1867
|
+
:return: Returns the result object.
|
|
1868
|
+
""" # noqa: E501
|
|
1869
|
+
|
|
1870
|
+
_param = self._relationships_write_serialize(
|
|
1871
|
+
tenant_id=tenant_id,
|
|
1872
|
+
body=body,
|
|
1873
|
+
_request_auth=_request_auth,
|
|
1874
|
+
_content_type=_content_type,
|
|
1875
|
+
_headers=_headers,
|
|
1876
|
+
_host_index=_host_index
|
|
1877
|
+
)
|
|
1878
|
+
|
|
1879
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1880
|
+
'200': "RelationshipWriteResponse",
|
|
1881
|
+
}
|
|
1882
|
+
response_data = self.api_client.call_api(
|
|
1883
|
+
*_param,
|
|
1884
|
+
_request_timeout=_request_timeout
|
|
1885
|
+
)
|
|
1886
|
+
response_data.read()
|
|
1887
|
+
return self.api_client.response_deserialize(
|
|
1888
|
+
response_data=response_data,
|
|
1889
|
+
response_types_map=_response_types_map,
|
|
1890
|
+
)
|
|
1891
|
+
|
|
1892
|
+
|
|
1893
|
+
@validate_call
|
|
1894
|
+
def relationships_write_without_preload_content(
|
|
1895
|
+
self,
|
|
1896
|
+
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.")],
|
|
1897
|
+
body: WriteRelationshipsBody,
|
|
1898
|
+
_request_timeout: Union[
|
|
1899
|
+
None,
|
|
1900
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1901
|
+
Tuple[
|
|
1902
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1903
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1904
|
+
]
|
|
1905
|
+
] = None,
|
|
1906
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1907
|
+
_content_type: Optional[StrictStr] = None,
|
|
1908
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1909
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1910
|
+
) -> RESTResponseType:
|
|
1911
|
+
"""write relationships
|
|
1912
|
+
|
|
1913
|
+
|
|
1914
|
+
: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)
|
|
1915
|
+
:type tenant_id: str
|
|
1916
|
+
:param body: (required)
|
|
1917
|
+
:type body: WriteRelationshipsBody
|
|
1918
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1919
|
+
number provided, it will be total request
|
|
1920
|
+
timeout. It can also be a pair (tuple) of
|
|
1921
|
+
(connection, read) timeouts.
|
|
1922
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1923
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1924
|
+
request; this effectively ignores the
|
|
1925
|
+
authentication in the spec for a single request.
|
|
1926
|
+
:type _request_auth: dict, optional
|
|
1927
|
+
:param _content_type: force content-type for the request.
|
|
1928
|
+
:type _content_type: str, Optional
|
|
1929
|
+
:param _headers: set to override the headers for a single
|
|
1930
|
+
request; this effectively ignores the headers
|
|
1931
|
+
in the spec for a single request.
|
|
1932
|
+
:type _headers: dict, optional
|
|
1933
|
+
:param _host_index: set to override the host_index for a single
|
|
1934
|
+
request; this effectively ignores the host_index
|
|
1935
|
+
in the spec for a single request.
|
|
1936
|
+
:type _host_index: int, optional
|
|
1937
|
+
:return: Returns the result object.
|
|
1938
|
+
""" # noqa: E501
|
|
1939
|
+
|
|
1940
|
+
_param = self._relationships_write_serialize(
|
|
1941
|
+
tenant_id=tenant_id,
|
|
1942
|
+
body=body,
|
|
1943
|
+
_request_auth=_request_auth,
|
|
1944
|
+
_content_type=_content_type,
|
|
1945
|
+
_headers=_headers,
|
|
1946
|
+
_host_index=_host_index
|
|
1947
|
+
)
|
|
1948
|
+
|
|
1949
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1950
|
+
'200': "RelationshipWriteResponse",
|
|
1951
|
+
}
|
|
1952
|
+
response_data = self.api_client.call_api(
|
|
1953
|
+
*_param,
|
|
1954
|
+
_request_timeout=_request_timeout
|
|
1955
|
+
)
|
|
1956
|
+
return response_data.response
|
|
1957
|
+
|
|
1958
|
+
|
|
1959
|
+
def _relationships_write_serialize(
|
|
1960
|
+
self,
|
|
1961
|
+
tenant_id,
|
|
1962
|
+
body,
|
|
1963
|
+
_request_auth,
|
|
1964
|
+
_content_type,
|
|
1965
|
+
_headers,
|
|
1966
|
+
_host_index,
|
|
1967
|
+
) -> RequestSerialized:
|
|
1968
|
+
|
|
1969
|
+
_host = None
|
|
1970
|
+
|
|
1971
|
+
_collection_formats: Dict[str, str] = {
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
_path_params: Dict[str, str] = {}
|
|
1975
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1976
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1977
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1978
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
|
1979
|
+
_body_params: Optional[bytes] = None
|
|
1980
|
+
|
|
1981
|
+
# process the path parameters
|
|
1982
|
+
if tenant_id is not None:
|
|
1983
|
+
_path_params['tenant_id'] = tenant_id
|
|
1984
|
+
# process the query parameters
|
|
1985
|
+
# process the header parameters
|
|
1986
|
+
# process the form parameters
|
|
1987
|
+
# process the body parameter
|
|
1988
|
+
if body is not None:
|
|
1989
|
+
_body_params = body
|
|
1990
|
+
|
|
1991
|
+
|
|
1992
|
+
# set the HTTP header `Accept`
|
|
1993
|
+
if 'Accept' not in _header_params:
|
|
1994
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1995
|
+
[
|
|
1996
|
+
'application/json'
|
|
1997
|
+
]
|
|
1998
|
+
)
|
|
1999
|
+
|
|
2000
|
+
# set the HTTP header `Content-Type`
|
|
2001
|
+
if _content_type:
|
|
2002
|
+
_header_params['Content-Type'] = _content_type
|
|
2003
|
+
else:
|
|
2004
|
+
_default_content_type = (
|
|
2005
|
+
self.api_client.select_header_content_type(
|
|
2006
|
+
[
|
|
2007
|
+
'application/json'
|
|
2008
|
+
]
|
|
2009
|
+
)
|
|
2010
|
+
)
|
|
2011
|
+
if _default_content_type is not None:
|
|
2012
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2013
|
+
|
|
2014
|
+
# authentication setting
|
|
2015
|
+
_auth_settings: List[str] = [
|
|
2016
|
+
]
|
|
2017
|
+
|
|
2018
|
+
return self.api_client.param_serialize(
|
|
2019
|
+
method='POST',
|
|
2020
|
+
resource_path='/v1/tenants/{tenant_id}/relationships/write',
|
|
2021
|
+
path_params=_path_params,
|
|
2022
|
+
query_params=_query_params,
|
|
2023
|
+
header_params=_header_params,
|
|
2024
|
+
body=_body_params,
|
|
2025
|
+
post_params=_form_params,
|
|
2026
|
+
files=_files,
|
|
2027
|
+
auth_settings=_auth_settings,
|
|
2028
|
+
collection_formats=_collection_formats,
|
|
2029
|
+
_host=_host,
|
|
2030
|
+
_request_auth=_request_auth
|
|
2031
|
+
)
|
|
2032
|
+
|
|
2033
|
+
|