hotdata 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.
- hotdata/__init__.py +300 -0
- hotdata/api/__init__.py +20 -0
- hotdata/api/connection_types_api.py +549 -0
- hotdata/api/connections_api.py +2213 -0
- hotdata/api/datasets_api.py +1711 -0
- hotdata/api/embedding_providers_api.py +1380 -0
- hotdata/api/indexes_api.py +977 -0
- hotdata/api/information_schema_api.py +390 -0
- hotdata/api/jobs_api.py +619 -0
- hotdata/api/query_api.py +320 -0
- hotdata/api/query_runs_api.py +615 -0
- hotdata/api/refresh_api.py +317 -0
- hotdata/api/results_api.py +581 -0
- hotdata/api/saved_queries_api.py +2003 -0
- hotdata/api/secrets_api.py +1380 -0
- hotdata/api/uploads_api.py +595 -0
- hotdata/api/workspace_context_api.py +828 -0
- hotdata/api/workspaces_api.py +602 -0
- hotdata/api_client.py +806 -0
- hotdata/api_response.py +21 -0
- hotdata/configuration.py +620 -0
- hotdata/exceptions.py +219 -0
- hotdata/models/__init__.py +125 -0
- hotdata/models/api_error_detail.py +90 -0
- hotdata/models/api_error_response.py +92 -0
- hotdata/models/async_query_response.py +99 -0
- hotdata/models/boolean_profile_detail.py +91 -0
- hotdata/models/categorical_profile_detail.py +96 -0
- hotdata/models/category_value_info.py +96 -0
- hotdata/models/column_definition.py +140 -0
- hotdata/models/column_info.py +92 -0
- hotdata/models/column_profile_detail.py +180 -0
- hotdata/models/column_profile_detail_one_of.py +105 -0
- hotdata/models/column_profile_detail_one_of1.py +102 -0
- hotdata/models/column_profile_detail_one_of2.py +101 -0
- hotdata/models/column_profile_detail_one_of3.py +99 -0
- hotdata/models/column_profile_detail_one_of4.py +100 -0
- hotdata/models/column_profile_info.py +108 -0
- hotdata/models/column_type_spec.py +117 -0
- hotdata/models/connection_health_response.py +100 -0
- hotdata/models/connection_info.py +92 -0
- hotdata/models/connection_refresh_result.py +117 -0
- hotdata/models/connection_schema_error.py +90 -0
- hotdata/models/connection_type_detail.py +104 -0
- hotdata/models/connection_type_summary.py +90 -0
- hotdata/models/create_connection_request.py +108 -0
- hotdata/models/create_connection_response.py +105 -0
- hotdata/models/create_dataset_request.py +101 -0
- hotdata/models/create_dataset_response.py +99 -0
- hotdata/models/create_embedding_provider_request.py +111 -0
- hotdata/models/create_embedding_provider_response.py +102 -0
- hotdata/models/create_index_request.py +130 -0
- hotdata/models/create_saved_query_request.py +104 -0
- hotdata/models/create_secret_request.py +90 -0
- hotdata/models/create_secret_response.py +93 -0
- hotdata/models/create_workspace201_response.py +93 -0
- hotdata/models/create_workspace_request.py +90 -0
- hotdata/models/create_workspace_response.py +94 -0
- hotdata/models/dataset_source.py +180 -0
- hotdata/models/dataset_source_one_of.py +109 -0
- hotdata/models/dataset_source_one_of1.py +91 -0
- hotdata/models/dataset_summary.py +108 -0
- hotdata/models/dataset_version_summary.py +95 -0
- hotdata/models/discovery_status.py +39 -0
- hotdata/models/embedding_provider_response.py +108 -0
- hotdata/models/error.py +88 -0
- hotdata/models/execute_saved_query_request.py +93 -0
- hotdata/models/get_connection_response.py +97 -0
- hotdata/models/get_dataset_response.py +120 -0
- hotdata/models/get_result_response.py +126 -0
- hotdata/models/get_secret_response.py +93 -0
- hotdata/models/get_workspace_context_response.py +92 -0
- hotdata/models/index_info_response.py +107 -0
- hotdata/models/index_status.py +38 -0
- hotdata/models/information_schema_response.py +110 -0
- hotdata/models/inline_data.py +92 -0
- hotdata/models/inline_dataset_source.py +92 -0
- hotdata/models/job_result.py +152 -0
- hotdata/models/job_status.py +41 -0
- hotdata/models/job_status_response.py +124 -0
- hotdata/models/job_type.py +40 -0
- hotdata/models/list_connection_types_response.py +96 -0
- hotdata/models/list_connections_response.py +96 -0
- hotdata/models/list_dataset_versions_response.py +107 -0
- hotdata/models/list_datasets_response.py +105 -0
- hotdata/models/list_embedding_providers_response.py +96 -0
- hotdata/models/list_indexes_response.py +96 -0
- hotdata/models/list_jobs_response.py +96 -0
- hotdata/models/list_query_runs_response.py +110 -0
- hotdata/models/list_results_response.py +105 -0
- hotdata/models/list_saved_queries_response.py +105 -0
- hotdata/models/list_saved_query_versions_response.py +107 -0
- hotdata/models/list_secrets_response.py +96 -0
- hotdata/models/list_uploads_response.py +96 -0
- hotdata/models/list_workspace_contexts_response.py +96 -0
- hotdata/models/list_workspaces200_response.py +97 -0
- hotdata/models/list_workspaces_response.py +98 -0
- hotdata/models/numeric_profile_detail.py +92 -0
- hotdata/models/query_request.py +98 -0
- hotdata/models/query_response.py +113 -0
- hotdata/models/query_run_info.py +176 -0
- hotdata/models/refresh_dataset_response.py +95 -0
- hotdata/models/refresh_request.py +120 -0
- hotdata/models/refresh_response.py +180 -0
- hotdata/models/refresh_warning.py +102 -0
- hotdata/models/result_info.py +100 -0
- hotdata/models/saved_query_dataset_source.py +95 -0
- hotdata/models/saved_query_detail.py +168 -0
- hotdata/models/saved_query_summary.py +101 -0
- hotdata/models/saved_query_version_info.py +158 -0
- hotdata/models/schema_refresh_result.py +107 -0
- hotdata/models/secret_metadata_response.py +93 -0
- hotdata/models/sql_query_dataset_source.py +102 -0
- hotdata/models/submit_job_response.py +93 -0
- hotdata/models/table_info.py +116 -0
- hotdata/models/table_profile_response.py +112 -0
- hotdata/models/table_refresh_error.py +92 -0
- hotdata/models/table_refresh_result.py +107 -0
- hotdata/models/temporal_profile_detail.py +90 -0
- hotdata/models/text_profile_detail.py +93 -0
- hotdata/models/update_dataset_request.py +107 -0
- hotdata/models/update_dataset_response.py +104 -0
- hotdata/models/update_embedding_provider_request.py +114 -0
- hotdata/models/update_embedding_provider_response.py +93 -0
- hotdata/models/update_saved_query_request.py +128 -0
- hotdata/models/update_secret_request.py +88 -0
- hotdata/models/update_secret_response.py +91 -0
- hotdata/models/upload_dataset_source.py +97 -0
- hotdata/models/upload_info.py +102 -0
- hotdata/models/upload_response.py +102 -0
- hotdata/models/upsert_workspace_context_request.py +90 -0
- hotdata/models/upsert_workspace_context_response.py +92 -0
- hotdata/models/url_dataset_source.py +97 -0
- hotdata/models/workspace_context_entry.py +93 -0
- hotdata/models/workspace_detail.py +94 -0
- hotdata/models/workspace_list_item.py +98 -0
- hotdata/py.typed +0 -0
- hotdata/rest.py +264 -0
- hotdata-0.0.1.dist-info/METADATA +93 -0
- hotdata-0.0.1.dist-info/RECORD +142 -0
- hotdata-0.0.1.dist-info/WHEEL +5 -0
- hotdata-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,828 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Hotdata API
|
|
3
|
+
|
|
4
|
+
Powerful data platform API for datasets, queries, and analytics.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: developers@hotdata.dev
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
""" # noqa: E501
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictStr
|
|
20
|
+
from typing_extensions import Annotated
|
|
21
|
+
from hotdata.models.get_workspace_context_response import GetWorkspaceContextResponse
|
|
22
|
+
from hotdata.models.list_workspace_contexts_response import ListWorkspaceContextsResponse
|
|
23
|
+
from hotdata.models.upsert_workspace_context_request import UpsertWorkspaceContextRequest
|
|
24
|
+
from hotdata.models.upsert_workspace_context_response import UpsertWorkspaceContextResponse
|
|
25
|
+
|
|
26
|
+
from hotdata.api_client import ApiClient, RequestSerialized
|
|
27
|
+
from hotdata.api_response import ApiResponse
|
|
28
|
+
from hotdata.rest import RESTResponseType
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class WorkspaceContextApi:
|
|
32
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
33
|
+
Ref: https://openapi-generator.tech
|
|
34
|
+
|
|
35
|
+
Do not edit the class manually.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
def __init__(self, api_client=None) -> None:
|
|
39
|
+
if api_client is None:
|
|
40
|
+
api_client = ApiClient.get_default()
|
|
41
|
+
self.api_client = api_client
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@validate_call
|
|
45
|
+
def get_workspace_context(
|
|
46
|
+
self,
|
|
47
|
+
name: Annotated[StrictStr, Field(description="Name of the context (unique within the catalog)")],
|
|
48
|
+
_request_timeout: Union[
|
|
49
|
+
None,
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Tuple[
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
54
|
+
]
|
|
55
|
+
] = None,
|
|
56
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_content_type: Optional[StrictStr] = None,
|
|
58
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
60
|
+
) -> GetWorkspaceContextResponse:
|
|
61
|
+
"""Get one workspace context
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
:param name: Name of the context (unique within the catalog) (required)
|
|
65
|
+
:type name: str
|
|
66
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
67
|
+
number provided, it will be total request
|
|
68
|
+
timeout. It can also be a pair (tuple) of
|
|
69
|
+
(connection, read) timeouts.
|
|
70
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
71
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
72
|
+
request; this effectively ignores the
|
|
73
|
+
authentication in the spec for a single request.
|
|
74
|
+
:type _request_auth: dict, optional
|
|
75
|
+
:param _content_type: force content-type for the request.
|
|
76
|
+
:type _content_type: str, Optional
|
|
77
|
+
:param _headers: set to override the headers for a single
|
|
78
|
+
request; this effectively ignores the headers
|
|
79
|
+
in the spec for a single request.
|
|
80
|
+
:type _headers: dict, optional
|
|
81
|
+
:param _host_index: set to override the host_index for a single
|
|
82
|
+
request; this effectively ignores the host_index
|
|
83
|
+
in the spec for a single request.
|
|
84
|
+
:type _host_index: int, optional
|
|
85
|
+
:return: Returns the result object.
|
|
86
|
+
""" # noqa: E501
|
|
87
|
+
|
|
88
|
+
_param = self._get_workspace_context_serialize(
|
|
89
|
+
name=name,
|
|
90
|
+
_request_auth=_request_auth,
|
|
91
|
+
_content_type=_content_type,
|
|
92
|
+
_headers=_headers,
|
|
93
|
+
_host_index=_host_index
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
97
|
+
'200': "GetWorkspaceContextResponse",
|
|
98
|
+
'400': "ApiErrorResponse",
|
|
99
|
+
'404': "ApiErrorResponse",
|
|
100
|
+
}
|
|
101
|
+
response_data = self.api_client.call_api(
|
|
102
|
+
*_param,
|
|
103
|
+
_request_timeout=_request_timeout
|
|
104
|
+
)
|
|
105
|
+
response_data.read()
|
|
106
|
+
return self.api_client.response_deserialize(
|
|
107
|
+
response_data=response_data,
|
|
108
|
+
response_types_map=_response_types_map,
|
|
109
|
+
).data
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
@validate_call
|
|
113
|
+
def get_workspace_context_with_http_info(
|
|
114
|
+
self,
|
|
115
|
+
name: Annotated[StrictStr, Field(description="Name of the context (unique within the catalog)")],
|
|
116
|
+
_request_timeout: Union[
|
|
117
|
+
None,
|
|
118
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
119
|
+
Tuple[
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
121
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
122
|
+
]
|
|
123
|
+
] = None,
|
|
124
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
125
|
+
_content_type: Optional[StrictStr] = None,
|
|
126
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
127
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
128
|
+
) -> ApiResponse[GetWorkspaceContextResponse]:
|
|
129
|
+
"""Get one workspace context
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
:param name: Name of the context (unique within the catalog) (required)
|
|
133
|
+
:type name: str
|
|
134
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
135
|
+
number provided, it will be total request
|
|
136
|
+
timeout. It can also be a pair (tuple) of
|
|
137
|
+
(connection, read) timeouts.
|
|
138
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
139
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
140
|
+
request; this effectively ignores the
|
|
141
|
+
authentication in the spec for a single request.
|
|
142
|
+
:type _request_auth: dict, optional
|
|
143
|
+
:param _content_type: force content-type for the request.
|
|
144
|
+
:type _content_type: str, Optional
|
|
145
|
+
:param _headers: set to override the headers for a single
|
|
146
|
+
request; this effectively ignores the headers
|
|
147
|
+
in the spec for a single request.
|
|
148
|
+
:type _headers: dict, optional
|
|
149
|
+
:param _host_index: set to override the host_index for a single
|
|
150
|
+
request; this effectively ignores the host_index
|
|
151
|
+
in the spec for a single request.
|
|
152
|
+
:type _host_index: int, optional
|
|
153
|
+
:return: Returns the result object.
|
|
154
|
+
""" # noqa: E501
|
|
155
|
+
|
|
156
|
+
_param = self._get_workspace_context_serialize(
|
|
157
|
+
name=name,
|
|
158
|
+
_request_auth=_request_auth,
|
|
159
|
+
_content_type=_content_type,
|
|
160
|
+
_headers=_headers,
|
|
161
|
+
_host_index=_host_index
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
165
|
+
'200': "GetWorkspaceContextResponse",
|
|
166
|
+
'400': "ApiErrorResponse",
|
|
167
|
+
'404': "ApiErrorResponse",
|
|
168
|
+
}
|
|
169
|
+
response_data = self.api_client.call_api(
|
|
170
|
+
*_param,
|
|
171
|
+
_request_timeout=_request_timeout
|
|
172
|
+
)
|
|
173
|
+
response_data.read()
|
|
174
|
+
return self.api_client.response_deserialize(
|
|
175
|
+
response_data=response_data,
|
|
176
|
+
response_types_map=_response_types_map,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
@validate_call
|
|
181
|
+
def get_workspace_context_without_preload_content(
|
|
182
|
+
self,
|
|
183
|
+
name: Annotated[StrictStr, Field(description="Name of the context (unique within the catalog)")],
|
|
184
|
+
_request_timeout: Union[
|
|
185
|
+
None,
|
|
186
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
187
|
+
Tuple[
|
|
188
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
189
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
190
|
+
]
|
|
191
|
+
] = None,
|
|
192
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
193
|
+
_content_type: Optional[StrictStr] = None,
|
|
194
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
195
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
196
|
+
) -> RESTResponseType:
|
|
197
|
+
"""Get one workspace context
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
:param name: Name of the context (unique within the catalog) (required)
|
|
201
|
+
:type name: str
|
|
202
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
203
|
+
number provided, it will be total request
|
|
204
|
+
timeout. It can also be a pair (tuple) of
|
|
205
|
+
(connection, read) timeouts.
|
|
206
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
207
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
208
|
+
request; this effectively ignores the
|
|
209
|
+
authentication in the spec for a single request.
|
|
210
|
+
:type _request_auth: dict, optional
|
|
211
|
+
:param _content_type: force content-type for the request.
|
|
212
|
+
:type _content_type: str, Optional
|
|
213
|
+
:param _headers: set to override the headers for a single
|
|
214
|
+
request; this effectively ignores the headers
|
|
215
|
+
in the spec for a single request.
|
|
216
|
+
:type _headers: dict, optional
|
|
217
|
+
:param _host_index: set to override the host_index for a single
|
|
218
|
+
request; this effectively ignores the host_index
|
|
219
|
+
in the spec for a single request.
|
|
220
|
+
:type _host_index: int, optional
|
|
221
|
+
:return: Returns the result object.
|
|
222
|
+
""" # noqa: E501
|
|
223
|
+
|
|
224
|
+
_param = self._get_workspace_context_serialize(
|
|
225
|
+
name=name,
|
|
226
|
+
_request_auth=_request_auth,
|
|
227
|
+
_content_type=_content_type,
|
|
228
|
+
_headers=_headers,
|
|
229
|
+
_host_index=_host_index
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
233
|
+
'200': "GetWorkspaceContextResponse",
|
|
234
|
+
'400': "ApiErrorResponse",
|
|
235
|
+
'404': "ApiErrorResponse",
|
|
236
|
+
}
|
|
237
|
+
response_data = self.api_client.call_api(
|
|
238
|
+
*_param,
|
|
239
|
+
_request_timeout=_request_timeout
|
|
240
|
+
)
|
|
241
|
+
return response_data.response
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
def _get_workspace_context_serialize(
|
|
245
|
+
self,
|
|
246
|
+
name,
|
|
247
|
+
_request_auth,
|
|
248
|
+
_content_type,
|
|
249
|
+
_headers,
|
|
250
|
+
_host_index,
|
|
251
|
+
) -> RequestSerialized:
|
|
252
|
+
|
|
253
|
+
_host = None
|
|
254
|
+
|
|
255
|
+
_collection_formats: Dict[str, str] = {
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
_path_params: Dict[str, str] = {}
|
|
259
|
+
_query_params: List[Tuple[str, str]] = []
|
|
260
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
261
|
+
_form_params: List[Tuple[str, str]] = []
|
|
262
|
+
_files: Dict[
|
|
263
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
264
|
+
] = {}
|
|
265
|
+
_body_params: Optional[bytes] = None
|
|
266
|
+
|
|
267
|
+
# process the path parameters
|
|
268
|
+
if name is not None:
|
|
269
|
+
_path_params['name'] = name
|
|
270
|
+
# process the query parameters
|
|
271
|
+
# process the header parameters
|
|
272
|
+
# process the form parameters
|
|
273
|
+
# process the body parameter
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
# set the HTTP header `Accept`
|
|
277
|
+
if 'Accept' not in _header_params:
|
|
278
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
279
|
+
[
|
|
280
|
+
'application/json'
|
|
281
|
+
]
|
|
282
|
+
)
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
# authentication setting
|
|
286
|
+
_auth_settings: List[str] = [
|
|
287
|
+
'BearerAuth'
|
|
288
|
+
]
|
|
289
|
+
|
|
290
|
+
return self.api_client.param_serialize(
|
|
291
|
+
method='GET',
|
|
292
|
+
resource_path='/v1/context/{name}',
|
|
293
|
+
path_params=_path_params,
|
|
294
|
+
query_params=_query_params,
|
|
295
|
+
header_params=_header_params,
|
|
296
|
+
body=_body_params,
|
|
297
|
+
post_params=_form_params,
|
|
298
|
+
files=_files,
|
|
299
|
+
auth_settings=_auth_settings,
|
|
300
|
+
collection_formats=_collection_formats,
|
|
301
|
+
_host=_host,
|
|
302
|
+
_request_auth=_request_auth
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
@validate_call
|
|
309
|
+
def list_workspace_contexts(
|
|
310
|
+
self,
|
|
311
|
+
_request_timeout: Union[
|
|
312
|
+
None,
|
|
313
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
314
|
+
Tuple[
|
|
315
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
316
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
317
|
+
]
|
|
318
|
+
] = None,
|
|
319
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
320
|
+
_content_type: Optional[StrictStr] = None,
|
|
321
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
322
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
323
|
+
) -> ListWorkspaceContextsResponse:
|
|
324
|
+
"""List workspace contexts
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
328
|
+
number provided, it will be total request
|
|
329
|
+
timeout. It can also be a pair (tuple) of
|
|
330
|
+
(connection, read) timeouts.
|
|
331
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
332
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
333
|
+
request; this effectively ignores the
|
|
334
|
+
authentication in the spec for a single request.
|
|
335
|
+
:type _request_auth: dict, optional
|
|
336
|
+
:param _content_type: force content-type for the request.
|
|
337
|
+
:type _content_type: str, Optional
|
|
338
|
+
:param _headers: set to override the headers for a single
|
|
339
|
+
request; this effectively ignores the headers
|
|
340
|
+
in the spec for a single request.
|
|
341
|
+
:type _headers: dict, optional
|
|
342
|
+
:param _host_index: set to override the host_index for a single
|
|
343
|
+
request; this effectively ignores the host_index
|
|
344
|
+
in the spec for a single request.
|
|
345
|
+
:type _host_index: int, optional
|
|
346
|
+
:return: Returns the result object.
|
|
347
|
+
""" # noqa: E501
|
|
348
|
+
|
|
349
|
+
_param = self._list_workspace_contexts_serialize(
|
|
350
|
+
_request_auth=_request_auth,
|
|
351
|
+
_content_type=_content_type,
|
|
352
|
+
_headers=_headers,
|
|
353
|
+
_host_index=_host_index
|
|
354
|
+
)
|
|
355
|
+
|
|
356
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
357
|
+
'200': "ListWorkspaceContextsResponse",
|
|
358
|
+
'400': "ApiErrorResponse",
|
|
359
|
+
}
|
|
360
|
+
response_data = self.api_client.call_api(
|
|
361
|
+
*_param,
|
|
362
|
+
_request_timeout=_request_timeout
|
|
363
|
+
)
|
|
364
|
+
response_data.read()
|
|
365
|
+
return self.api_client.response_deserialize(
|
|
366
|
+
response_data=response_data,
|
|
367
|
+
response_types_map=_response_types_map,
|
|
368
|
+
).data
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
@validate_call
|
|
372
|
+
def list_workspace_contexts_with_http_info(
|
|
373
|
+
self,
|
|
374
|
+
_request_timeout: Union[
|
|
375
|
+
None,
|
|
376
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
377
|
+
Tuple[
|
|
378
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
379
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
380
|
+
]
|
|
381
|
+
] = None,
|
|
382
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
383
|
+
_content_type: Optional[StrictStr] = None,
|
|
384
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
385
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
386
|
+
) -> ApiResponse[ListWorkspaceContextsResponse]:
|
|
387
|
+
"""List workspace contexts
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
391
|
+
number provided, it will be total request
|
|
392
|
+
timeout. It can also be a pair (tuple) of
|
|
393
|
+
(connection, read) timeouts.
|
|
394
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
395
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
396
|
+
request; this effectively ignores the
|
|
397
|
+
authentication in the spec for a single request.
|
|
398
|
+
:type _request_auth: dict, optional
|
|
399
|
+
:param _content_type: force content-type for the request.
|
|
400
|
+
:type _content_type: str, Optional
|
|
401
|
+
:param _headers: set to override the headers for a single
|
|
402
|
+
request; this effectively ignores the headers
|
|
403
|
+
in the spec for a single request.
|
|
404
|
+
:type _headers: dict, optional
|
|
405
|
+
:param _host_index: set to override the host_index for a single
|
|
406
|
+
request; this effectively ignores the host_index
|
|
407
|
+
in the spec for a single request.
|
|
408
|
+
:type _host_index: int, optional
|
|
409
|
+
:return: Returns the result object.
|
|
410
|
+
""" # noqa: E501
|
|
411
|
+
|
|
412
|
+
_param = self._list_workspace_contexts_serialize(
|
|
413
|
+
_request_auth=_request_auth,
|
|
414
|
+
_content_type=_content_type,
|
|
415
|
+
_headers=_headers,
|
|
416
|
+
_host_index=_host_index
|
|
417
|
+
)
|
|
418
|
+
|
|
419
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
420
|
+
'200': "ListWorkspaceContextsResponse",
|
|
421
|
+
'400': "ApiErrorResponse",
|
|
422
|
+
}
|
|
423
|
+
response_data = self.api_client.call_api(
|
|
424
|
+
*_param,
|
|
425
|
+
_request_timeout=_request_timeout
|
|
426
|
+
)
|
|
427
|
+
response_data.read()
|
|
428
|
+
return self.api_client.response_deserialize(
|
|
429
|
+
response_data=response_data,
|
|
430
|
+
response_types_map=_response_types_map,
|
|
431
|
+
)
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
@validate_call
|
|
435
|
+
def list_workspace_contexts_without_preload_content(
|
|
436
|
+
self,
|
|
437
|
+
_request_timeout: Union[
|
|
438
|
+
None,
|
|
439
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
440
|
+
Tuple[
|
|
441
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
442
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
443
|
+
]
|
|
444
|
+
] = None,
|
|
445
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
446
|
+
_content_type: Optional[StrictStr] = None,
|
|
447
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
448
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
449
|
+
) -> RESTResponseType:
|
|
450
|
+
"""List workspace contexts
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
454
|
+
number provided, it will be total request
|
|
455
|
+
timeout. It can also be a pair (tuple) of
|
|
456
|
+
(connection, read) timeouts.
|
|
457
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
458
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
459
|
+
request; this effectively ignores the
|
|
460
|
+
authentication in the spec for a single request.
|
|
461
|
+
:type _request_auth: dict, optional
|
|
462
|
+
:param _content_type: force content-type for the request.
|
|
463
|
+
:type _content_type: str, Optional
|
|
464
|
+
:param _headers: set to override the headers for a single
|
|
465
|
+
request; this effectively ignores the headers
|
|
466
|
+
in the spec for a single request.
|
|
467
|
+
:type _headers: dict, optional
|
|
468
|
+
:param _host_index: set to override the host_index for a single
|
|
469
|
+
request; this effectively ignores the host_index
|
|
470
|
+
in the spec for a single request.
|
|
471
|
+
:type _host_index: int, optional
|
|
472
|
+
:return: Returns the result object.
|
|
473
|
+
""" # noqa: E501
|
|
474
|
+
|
|
475
|
+
_param = self._list_workspace_contexts_serialize(
|
|
476
|
+
_request_auth=_request_auth,
|
|
477
|
+
_content_type=_content_type,
|
|
478
|
+
_headers=_headers,
|
|
479
|
+
_host_index=_host_index
|
|
480
|
+
)
|
|
481
|
+
|
|
482
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
483
|
+
'200': "ListWorkspaceContextsResponse",
|
|
484
|
+
'400': "ApiErrorResponse",
|
|
485
|
+
}
|
|
486
|
+
response_data = self.api_client.call_api(
|
|
487
|
+
*_param,
|
|
488
|
+
_request_timeout=_request_timeout
|
|
489
|
+
)
|
|
490
|
+
return response_data.response
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
def _list_workspace_contexts_serialize(
|
|
494
|
+
self,
|
|
495
|
+
_request_auth,
|
|
496
|
+
_content_type,
|
|
497
|
+
_headers,
|
|
498
|
+
_host_index,
|
|
499
|
+
) -> RequestSerialized:
|
|
500
|
+
|
|
501
|
+
_host = None
|
|
502
|
+
|
|
503
|
+
_collection_formats: Dict[str, str] = {
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
_path_params: Dict[str, str] = {}
|
|
507
|
+
_query_params: List[Tuple[str, str]] = []
|
|
508
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
509
|
+
_form_params: List[Tuple[str, str]] = []
|
|
510
|
+
_files: Dict[
|
|
511
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
512
|
+
] = {}
|
|
513
|
+
_body_params: Optional[bytes] = None
|
|
514
|
+
|
|
515
|
+
# process the path parameters
|
|
516
|
+
# process the query parameters
|
|
517
|
+
# process the header parameters
|
|
518
|
+
# process the form parameters
|
|
519
|
+
# process the body parameter
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
# set the HTTP header `Accept`
|
|
523
|
+
if 'Accept' not in _header_params:
|
|
524
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
525
|
+
[
|
|
526
|
+
'application/json'
|
|
527
|
+
]
|
|
528
|
+
)
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
# authentication setting
|
|
532
|
+
_auth_settings: List[str] = [
|
|
533
|
+
'BearerAuth'
|
|
534
|
+
]
|
|
535
|
+
|
|
536
|
+
return self.api_client.param_serialize(
|
|
537
|
+
method='GET',
|
|
538
|
+
resource_path='/v1/context',
|
|
539
|
+
path_params=_path_params,
|
|
540
|
+
query_params=_query_params,
|
|
541
|
+
header_params=_header_params,
|
|
542
|
+
body=_body_params,
|
|
543
|
+
post_params=_form_params,
|
|
544
|
+
files=_files,
|
|
545
|
+
auth_settings=_auth_settings,
|
|
546
|
+
collection_formats=_collection_formats,
|
|
547
|
+
_host=_host,
|
|
548
|
+
_request_auth=_request_auth
|
|
549
|
+
)
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
@validate_call
|
|
555
|
+
def upsert_workspace_context(
|
|
556
|
+
self,
|
|
557
|
+
upsert_workspace_context_request: UpsertWorkspaceContextRequest,
|
|
558
|
+
_request_timeout: Union[
|
|
559
|
+
None,
|
|
560
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
561
|
+
Tuple[
|
|
562
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
563
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
564
|
+
]
|
|
565
|
+
] = None,
|
|
566
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
567
|
+
_content_type: Optional[StrictStr] = None,
|
|
568
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
569
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
570
|
+
) -> UpsertWorkspaceContextResponse:
|
|
571
|
+
"""Create or update workspace context
|
|
572
|
+
|
|
573
|
+
Stores a named document (for example Markdown). Reuses the same name to replace content. Scoped to the deployment catalog like other metadata (connections, secrets, etc.).
|
|
574
|
+
|
|
575
|
+
:param upsert_workspace_context_request: (required)
|
|
576
|
+
:type upsert_workspace_context_request: UpsertWorkspaceContextRequest
|
|
577
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
578
|
+
number provided, it will be total request
|
|
579
|
+
timeout. It can also be a pair (tuple) of
|
|
580
|
+
(connection, read) timeouts.
|
|
581
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
582
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
583
|
+
request; this effectively ignores the
|
|
584
|
+
authentication in the spec for a single request.
|
|
585
|
+
:type _request_auth: dict, optional
|
|
586
|
+
:param _content_type: force content-type for the request.
|
|
587
|
+
:type _content_type: str, Optional
|
|
588
|
+
:param _headers: set to override the headers for a single
|
|
589
|
+
request; this effectively ignores the headers
|
|
590
|
+
in the spec for a single request.
|
|
591
|
+
:type _headers: dict, optional
|
|
592
|
+
:param _host_index: set to override the host_index for a single
|
|
593
|
+
request; this effectively ignores the host_index
|
|
594
|
+
in the spec for a single request.
|
|
595
|
+
:type _host_index: int, optional
|
|
596
|
+
:return: Returns the result object.
|
|
597
|
+
""" # noqa: E501
|
|
598
|
+
|
|
599
|
+
_param = self._upsert_workspace_context_serialize(
|
|
600
|
+
upsert_workspace_context_request=upsert_workspace_context_request,
|
|
601
|
+
_request_auth=_request_auth,
|
|
602
|
+
_content_type=_content_type,
|
|
603
|
+
_headers=_headers,
|
|
604
|
+
_host_index=_host_index
|
|
605
|
+
)
|
|
606
|
+
|
|
607
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
608
|
+
'200': "UpsertWorkspaceContextResponse",
|
|
609
|
+
'400': "ApiErrorResponse",
|
|
610
|
+
}
|
|
611
|
+
response_data = self.api_client.call_api(
|
|
612
|
+
*_param,
|
|
613
|
+
_request_timeout=_request_timeout
|
|
614
|
+
)
|
|
615
|
+
response_data.read()
|
|
616
|
+
return self.api_client.response_deserialize(
|
|
617
|
+
response_data=response_data,
|
|
618
|
+
response_types_map=_response_types_map,
|
|
619
|
+
).data
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
@validate_call
|
|
623
|
+
def upsert_workspace_context_with_http_info(
|
|
624
|
+
self,
|
|
625
|
+
upsert_workspace_context_request: UpsertWorkspaceContextRequest,
|
|
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
|
+
) -> ApiResponse[UpsertWorkspaceContextResponse]:
|
|
639
|
+
"""Create or update workspace context
|
|
640
|
+
|
|
641
|
+
Stores a named document (for example Markdown). Reuses the same name to replace content. Scoped to the deployment catalog like other metadata (connections, secrets, etc.).
|
|
642
|
+
|
|
643
|
+
:param upsert_workspace_context_request: (required)
|
|
644
|
+
:type upsert_workspace_context_request: UpsertWorkspaceContextRequest
|
|
645
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
646
|
+
number provided, it will be total request
|
|
647
|
+
timeout. It can also be a pair (tuple) of
|
|
648
|
+
(connection, read) timeouts.
|
|
649
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
650
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
651
|
+
request; this effectively ignores the
|
|
652
|
+
authentication in the spec for a single request.
|
|
653
|
+
:type _request_auth: dict, optional
|
|
654
|
+
:param _content_type: force content-type for the request.
|
|
655
|
+
:type _content_type: str, Optional
|
|
656
|
+
:param _headers: set to override the headers for a single
|
|
657
|
+
request; this effectively ignores the headers
|
|
658
|
+
in the spec for a single request.
|
|
659
|
+
:type _headers: dict, optional
|
|
660
|
+
:param _host_index: set to override the host_index for a single
|
|
661
|
+
request; this effectively ignores the host_index
|
|
662
|
+
in the spec for a single request.
|
|
663
|
+
:type _host_index: int, optional
|
|
664
|
+
:return: Returns the result object.
|
|
665
|
+
""" # noqa: E501
|
|
666
|
+
|
|
667
|
+
_param = self._upsert_workspace_context_serialize(
|
|
668
|
+
upsert_workspace_context_request=upsert_workspace_context_request,
|
|
669
|
+
_request_auth=_request_auth,
|
|
670
|
+
_content_type=_content_type,
|
|
671
|
+
_headers=_headers,
|
|
672
|
+
_host_index=_host_index
|
|
673
|
+
)
|
|
674
|
+
|
|
675
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
676
|
+
'200': "UpsertWorkspaceContextResponse",
|
|
677
|
+
'400': "ApiErrorResponse",
|
|
678
|
+
}
|
|
679
|
+
response_data = self.api_client.call_api(
|
|
680
|
+
*_param,
|
|
681
|
+
_request_timeout=_request_timeout
|
|
682
|
+
)
|
|
683
|
+
response_data.read()
|
|
684
|
+
return self.api_client.response_deserialize(
|
|
685
|
+
response_data=response_data,
|
|
686
|
+
response_types_map=_response_types_map,
|
|
687
|
+
)
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
@validate_call
|
|
691
|
+
def upsert_workspace_context_without_preload_content(
|
|
692
|
+
self,
|
|
693
|
+
upsert_workspace_context_request: UpsertWorkspaceContextRequest,
|
|
694
|
+
_request_timeout: Union[
|
|
695
|
+
None,
|
|
696
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
697
|
+
Tuple[
|
|
698
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
699
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
700
|
+
]
|
|
701
|
+
] = None,
|
|
702
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
703
|
+
_content_type: Optional[StrictStr] = None,
|
|
704
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
705
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
706
|
+
) -> RESTResponseType:
|
|
707
|
+
"""Create or update workspace context
|
|
708
|
+
|
|
709
|
+
Stores a named document (for example Markdown). Reuses the same name to replace content. Scoped to the deployment catalog like other metadata (connections, secrets, etc.).
|
|
710
|
+
|
|
711
|
+
:param upsert_workspace_context_request: (required)
|
|
712
|
+
:type upsert_workspace_context_request: UpsertWorkspaceContextRequest
|
|
713
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
714
|
+
number provided, it will be total request
|
|
715
|
+
timeout. It can also be a pair (tuple) of
|
|
716
|
+
(connection, read) timeouts.
|
|
717
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
718
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
719
|
+
request; this effectively ignores the
|
|
720
|
+
authentication in the spec for a single request.
|
|
721
|
+
:type _request_auth: dict, optional
|
|
722
|
+
:param _content_type: force content-type for the request.
|
|
723
|
+
:type _content_type: str, Optional
|
|
724
|
+
:param _headers: set to override the headers for a single
|
|
725
|
+
request; this effectively ignores the headers
|
|
726
|
+
in the spec for a single request.
|
|
727
|
+
:type _headers: dict, optional
|
|
728
|
+
:param _host_index: set to override the host_index for a single
|
|
729
|
+
request; this effectively ignores the host_index
|
|
730
|
+
in the spec for a single request.
|
|
731
|
+
:type _host_index: int, optional
|
|
732
|
+
:return: Returns the result object.
|
|
733
|
+
""" # noqa: E501
|
|
734
|
+
|
|
735
|
+
_param = self._upsert_workspace_context_serialize(
|
|
736
|
+
upsert_workspace_context_request=upsert_workspace_context_request,
|
|
737
|
+
_request_auth=_request_auth,
|
|
738
|
+
_content_type=_content_type,
|
|
739
|
+
_headers=_headers,
|
|
740
|
+
_host_index=_host_index
|
|
741
|
+
)
|
|
742
|
+
|
|
743
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
744
|
+
'200': "UpsertWorkspaceContextResponse",
|
|
745
|
+
'400': "ApiErrorResponse",
|
|
746
|
+
}
|
|
747
|
+
response_data = self.api_client.call_api(
|
|
748
|
+
*_param,
|
|
749
|
+
_request_timeout=_request_timeout
|
|
750
|
+
)
|
|
751
|
+
return response_data.response
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
def _upsert_workspace_context_serialize(
|
|
755
|
+
self,
|
|
756
|
+
upsert_workspace_context_request,
|
|
757
|
+
_request_auth,
|
|
758
|
+
_content_type,
|
|
759
|
+
_headers,
|
|
760
|
+
_host_index,
|
|
761
|
+
) -> RequestSerialized:
|
|
762
|
+
|
|
763
|
+
_host = None
|
|
764
|
+
|
|
765
|
+
_collection_formats: Dict[str, str] = {
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
_path_params: Dict[str, str] = {}
|
|
769
|
+
_query_params: List[Tuple[str, str]] = []
|
|
770
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
771
|
+
_form_params: List[Tuple[str, str]] = []
|
|
772
|
+
_files: Dict[
|
|
773
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
774
|
+
] = {}
|
|
775
|
+
_body_params: Optional[bytes] = None
|
|
776
|
+
|
|
777
|
+
# process the path parameters
|
|
778
|
+
# process the query parameters
|
|
779
|
+
# process the header parameters
|
|
780
|
+
# process the form parameters
|
|
781
|
+
# process the body parameter
|
|
782
|
+
if upsert_workspace_context_request is not None:
|
|
783
|
+
_body_params = upsert_workspace_context_request
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
# set the HTTP header `Accept`
|
|
787
|
+
if 'Accept' not in _header_params:
|
|
788
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
789
|
+
[
|
|
790
|
+
'application/json'
|
|
791
|
+
]
|
|
792
|
+
)
|
|
793
|
+
|
|
794
|
+
# set the HTTP header `Content-Type`
|
|
795
|
+
if _content_type:
|
|
796
|
+
_header_params['Content-Type'] = _content_type
|
|
797
|
+
else:
|
|
798
|
+
_default_content_type = (
|
|
799
|
+
self.api_client.select_header_content_type(
|
|
800
|
+
[
|
|
801
|
+
'application/json'
|
|
802
|
+
]
|
|
803
|
+
)
|
|
804
|
+
)
|
|
805
|
+
if _default_content_type is not None:
|
|
806
|
+
_header_params['Content-Type'] = _default_content_type
|
|
807
|
+
|
|
808
|
+
# authentication setting
|
|
809
|
+
_auth_settings: List[str] = [
|
|
810
|
+
'BearerAuth'
|
|
811
|
+
]
|
|
812
|
+
|
|
813
|
+
return self.api_client.param_serialize(
|
|
814
|
+
method='POST',
|
|
815
|
+
resource_path='/v1/context',
|
|
816
|
+
path_params=_path_params,
|
|
817
|
+
query_params=_query_params,
|
|
818
|
+
header_params=_header_params,
|
|
819
|
+
body=_body_params,
|
|
820
|
+
post_params=_form_params,
|
|
821
|
+
files=_files,
|
|
822
|
+
auth_settings=_auth_settings,
|
|
823
|
+
collection_formats=_collection_formats,
|
|
824
|
+
_host=_host,
|
|
825
|
+
_request_auth=_request_auth
|
|
826
|
+
)
|
|
827
|
+
|
|
828
|
+
|