neurograph-core 1.202508221357__py3-none-any.whl → 1.202509152210__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.
- neurograph/v1/__init__.py +315 -5
- neurograph/v1/api/__init__.py +29 -2
- neurograph/v1/api/client_api.py +541 -0
- neurograph/v1/api/dagster_api.py +271 -2
- neurograph/v1/api/knowledge_api.py +4426 -0
- neurograph/v1/api/knowledge_extract_api.py +1798 -0
- neurograph/v1/api/persona_api.py +263 -2
- neurograph/v1/api_client.py +4 -1
- neurograph/v1/models/__init__.py +224 -2
- neurograph/v1/models/{client_client_create_request.py → client_client_info.py} +11 -7
- neurograph/v1/models/client_client_metadata_response.py +14 -2
- neurograph/v1/models/{client_client_creat_response.py → client_client_url_row.py} +21 -25
- neurograph/v1/models/client_client_url_snapshot_response.py +95 -0
- neurograph/v1/models/client_client_url_snapshot_row.py +99 -0
- neurograph/v1/models/client_client_urls_response.py +3 -3
- neurograph/v1/models/client_organization_brand.py +107 -0
- neurograph/v1/models/client_organization_detail.py +115 -0
- neurograph/v1/models/client_probe.py +105 -0
- neurograph/v1/models/client_probe_todo_row.py +89 -0
- neurograph/v1/models/client_trigger_probe_response.py +101 -0
- neurograph/v1/models/client_workbench_config.py +99 -0
- neurograph/v1/models/dagster_dagster_info.py +95 -0
- neurograph/v1/models/{atlas_atlas_version_many_response.py → dagster_dagster_log_get_response.py} +7 -7
- neurograph/v1/models/db_knowledge_customer.py +97 -0
- neurograph/v1/models/db_knowledge_order.py +177 -0
- neurograph/v1/models/db_knowledge_product.py +107 -0
- neurograph/v1/models/db_knowledge_store.py +99 -0
- neurograph/v1/models/knowledge_assertion.py +111 -0
- neurograph/v1/models/knowledge_assertion_create_request.py +103 -0
- neurograph/v1/models/knowledge_assertion_list_response.py +103 -0
- neurograph/v1/models/knowledge_assertion_query.py +99 -0
- neurograph/v1/models/knowledge_assertion_response.py +93 -0
- neurograph/v1/models/knowledge_customer_query.py +99 -0
- neurograph/v1/models/knowledge_customer_response.py +103 -0
- neurograph/v1/models/knowledge_enrichment_artifact.py +137 -0
- neurograph/v1/models/knowledge_enrichment_artifact_create_request.py +113 -0
- neurograph/v1/models/knowledge_enrichment_artifact_list_response.py +103 -0
- neurograph/v1/models/knowledge_enrichment_artifact_response.py +93 -0
- neurograph/v1/models/knowledge_enrichment_artifact_update_output_request.py +93 -0
- neurograph/v1/models/knowledge_enrichment_artifact_update_status_request.py +99 -0
- neurograph/v1/models/knowledge_enrichment_query.py +99 -0
- neurograph/v1/models/knowledge_entity.py +115 -0
- neurograph/v1/models/knowledge_entity_create_request.py +95 -0
- neurograph/v1/models/knowledge_entity_create_response.py +99 -0
- neurograph/v1/models/knowledge_entity_extra.py +91 -0
- neurograph/v1/models/knowledge_entity_get_many_response.py +103 -0
- neurograph/v1/models/knowledge_entity_in_db.py +117 -0
- neurograph/v1/models/knowledge_entity_relations.py +91 -0
- neurograph/v1/models/knowledge_entity_schema.py +89 -0
- neurograph/v1/models/{atlas_atlas_version_response.py → knowledge_entity_schema_row.py} +16 -18
- neurograph/v1/models/{organizations_organization_set_atlas_response.py → knowledge_entity_schema_upsert_request.py} +14 -16
- neurograph/v1/models/knowledge_entity_schemas_response.py +97 -0
- neurograph/v1/models/{atlas_atlas_version.py → knowledge_entity_schemas_upsert_response.py} +11 -15
- neurograph/v1/models/{organizations_atlas_config.py → knowledge_entity_type_row.py} +14 -14
- neurograph/v1/models/knowledge_entity_upsert_request.py +95 -0
- neurograph/v1/models/{atlas_atlas_version_upsert_request.py → knowledge_entity_upsert_row.py} +10 -12
- neurograph/v1/models/knowledge_err_entity_row.py +89 -0
- neurograph/v1/models/knowledge_ingest_raw_request.py +95 -0
- neurograph/v1/models/knowledge_ingest_raw_response.py +101 -0
- neurograph/v1/models/knowledge_ingest_raw_row.py +97 -0
- neurograph/v1/models/{tasks_sync_from_firebase_result.py → knowledge_kind_response.py} +8 -6
- neurograph/v1/models/knowledge_order_query.py +129 -0
- neurograph/v1/models/knowledge_order_response.py +103 -0
- neurograph/v1/models/knowledge_product_query.py +101 -0
- neurograph/v1/models/knowledge_product_response.py +103 -0
- neurograph/v1/models/knowledge_query.py +95 -0
- neurograph/v1/models/knowledge_store_query.py +97 -0
- neurograph/v1/models/knowledge_store_response.py +103 -0
- neurograph/v1/models/knowledge_type_response.py +97 -0
- neurograph/v1/models/{organizations_organization_set_atlas_request.py → pgtype_int8.py} +10 -14
- neurograph/v1/models/pgtype_text.py +89 -0
- {neurograph_core-1.202508221357.dist-info → neurograph_core-1.202509152210.dist-info}/METADATA +2 -1
- {neurograph_core-1.202508221357.dist-info → neurograph_core-1.202509152210.dist-info}/RECORD +75 -25
- neurograph/v1/api/atlas_api.py +0 -588
- neurograph/v1/api/tasks_api.py +0 -286
- {neurograph_core-1.202508221357.dist-info → neurograph_core-1.202509152210.dist-info}/WHEEL +0 -0
- {neurograph_core-1.202508221357.dist-info → neurograph_core-1.202509152210.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,4426 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Neurograph Core
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
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, StrictBool, StrictInt, StrictStr
|
|
20
|
+
from typing import Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from neurograph.v1.models.knowledge_assertion_create_request import KnowledgeAssertionCreateRequest
|
|
23
|
+
from neurograph.v1.models.knowledge_assertion_list_response import KnowledgeAssertionListResponse
|
|
24
|
+
from neurograph.v1.models.knowledge_assertion_response import KnowledgeAssertionResponse
|
|
25
|
+
from neurograph.v1.models.knowledge_enrichment_artifact_create_request import KnowledgeEnrichmentArtifactCreateRequest
|
|
26
|
+
from neurograph.v1.models.knowledge_enrichment_artifact_list_response import KnowledgeEnrichmentArtifactListResponse
|
|
27
|
+
from neurograph.v1.models.knowledge_enrichment_artifact_response import KnowledgeEnrichmentArtifactResponse
|
|
28
|
+
from neurograph.v1.models.knowledge_enrichment_artifact_update_output_request import KnowledgeEnrichmentArtifactUpdateOutputRequest
|
|
29
|
+
from neurograph.v1.models.knowledge_enrichment_artifact_update_status_request import KnowledgeEnrichmentArtifactUpdateStatusRequest
|
|
30
|
+
from neurograph.v1.models.knowledge_entity_create_request import KnowledgeEntityCreateRequest
|
|
31
|
+
from neurograph.v1.models.knowledge_entity_create_response import KnowledgeEntityCreateResponse
|
|
32
|
+
from neurograph.v1.models.knowledge_entity_get_many_response import KnowledgeEntityGetManyResponse
|
|
33
|
+
from neurograph.v1.models.knowledge_entity_schema_upsert_request import KnowledgeEntitySchemaUpsertRequest
|
|
34
|
+
from neurograph.v1.models.knowledge_entity_schemas_response import KnowledgeEntitySchemasResponse
|
|
35
|
+
from neurograph.v1.models.knowledge_entity_schemas_upsert_response import KnowledgeEntitySchemasUpsertResponse
|
|
36
|
+
from neurograph.v1.models.knowledge_entity_upsert_request import KnowledgeEntityUpsertRequest
|
|
37
|
+
from neurograph.v1.models.knowledge_ingest_raw_request import KnowledgeIngestRawRequest
|
|
38
|
+
from neurograph.v1.models.knowledge_ingest_raw_response import KnowledgeIngestRawResponse
|
|
39
|
+
from neurograph.v1.models.knowledge_kind_response import KnowledgeKindResponse
|
|
40
|
+
from neurograph.v1.models.knowledge_type_response import KnowledgeTypeResponse
|
|
41
|
+
|
|
42
|
+
from neurograph.v1.api_client import ApiClient, RequestSerialized
|
|
43
|
+
from neurograph.v1.api_response import ApiResponse
|
|
44
|
+
from neurograph.v1.rest import RESTResponseType
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class KnowledgeApi:
|
|
48
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
49
|
+
Ref: https://openapi-generator.tech
|
|
50
|
+
|
|
51
|
+
Do not edit the class manually.
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
def __init__(self, api_client=None) -> None:
|
|
55
|
+
if api_client is None:
|
|
56
|
+
api_client = ApiClient.get_default()
|
|
57
|
+
self.api_client = api_client
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
@validate_call
|
|
61
|
+
def api_v1_knowledge_assertion_client_id_entity_id_get(
|
|
62
|
+
self,
|
|
63
|
+
client_id: Annotated[StrictStr, Field(description="Client ID")],
|
|
64
|
+
entity_id: Annotated[StrictStr, Field(description="Entity ID")],
|
|
65
|
+
predicate: Annotated[Optional[StrictStr], Field(description="Filter by predicate")] = None,
|
|
66
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status")] = None,
|
|
67
|
+
_request_timeout: Union[
|
|
68
|
+
None,
|
|
69
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
70
|
+
Tuple[
|
|
71
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
72
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
73
|
+
]
|
|
74
|
+
] = None,
|
|
75
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
76
|
+
_content_type: Optional[StrictStr] = None,
|
|
77
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
78
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
79
|
+
) -> KnowledgeAssertionListResponse:
|
|
80
|
+
"""Get Assertions by Entity
|
|
81
|
+
|
|
82
|
+
Get assertions for a specific entity
|
|
83
|
+
|
|
84
|
+
:param client_id: Client ID (required)
|
|
85
|
+
:type client_id: str
|
|
86
|
+
:param entity_id: Entity ID (required)
|
|
87
|
+
:type entity_id: str
|
|
88
|
+
:param predicate: Filter by predicate
|
|
89
|
+
:type predicate: str
|
|
90
|
+
:param status: Filter by status
|
|
91
|
+
:type status: str
|
|
92
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
93
|
+
number provided, it will be total request
|
|
94
|
+
timeout. It can also be a pair (tuple) of
|
|
95
|
+
(connection, read) timeouts.
|
|
96
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
97
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
98
|
+
request; this effectively ignores the
|
|
99
|
+
authentication in the spec for a single request.
|
|
100
|
+
:type _request_auth: dict, optional
|
|
101
|
+
:param _content_type: force content-type for the request.
|
|
102
|
+
:type _content_type: str, Optional
|
|
103
|
+
:param _headers: set to override the headers for a single
|
|
104
|
+
request; this effectively ignores the headers
|
|
105
|
+
in the spec for a single request.
|
|
106
|
+
:type _headers: dict, optional
|
|
107
|
+
:param _host_index: set to override the host_index for a single
|
|
108
|
+
request; this effectively ignores the host_index
|
|
109
|
+
in the spec for a single request.
|
|
110
|
+
:type _host_index: int, optional
|
|
111
|
+
:return: Returns the result object.
|
|
112
|
+
""" # noqa: E501
|
|
113
|
+
|
|
114
|
+
_param = self._api_v1_knowledge_assertion_client_id_entity_id_get_serialize(
|
|
115
|
+
client_id=client_id,
|
|
116
|
+
entity_id=entity_id,
|
|
117
|
+
predicate=predicate,
|
|
118
|
+
status=status,
|
|
119
|
+
_request_auth=_request_auth,
|
|
120
|
+
_content_type=_content_type,
|
|
121
|
+
_headers=_headers,
|
|
122
|
+
_host_index=_host_index
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
126
|
+
'200': "KnowledgeAssertionListResponse",
|
|
127
|
+
'400': "KnowledgeAssertionListResponse",
|
|
128
|
+
'503': "KnowledgeAssertionListResponse",
|
|
129
|
+
}
|
|
130
|
+
response_data = self.api_client.call_api(
|
|
131
|
+
*_param,
|
|
132
|
+
_request_timeout=_request_timeout
|
|
133
|
+
)
|
|
134
|
+
response_data.read()
|
|
135
|
+
return self.api_client.response_deserialize(
|
|
136
|
+
response_data=response_data,
|
|
137
|
+
response_types_map=_response_types_map,
|
|
138
|
+
).data
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
@validate_call
|
|
142
|
+
def api_v1_knowledge_assertion_client_id_entity_id_get_with_http_info(
|
|
143
|
+
self,
|
|
144
|
+
client_id: Annotated[StrictStr, Field(description="Client ID")],
|
|
145
|
+
entity_id: Annotated[StrictStr, Field(description="Entity ID")],
|
|
146
|
+
predicate: Annotated[Optional[StrictStr], Field(description="Filter by predicate")] = None,
|
|
147
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status")] = None,
|
|
148
|
+
_request_timeout: Union[
|
|
149
|
+
None,
|
|
150
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
151
|
+
Tuple[
|
|
152
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
153
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
154
|
+
]
|
|
155
|
+
] = None,
|
|
156
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
157
|
+
_content_type: Optional[StrictStr] = None,
|
|
158
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
159
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
160
|
+
) -> ApiResponse[KnowledgeAssertionListResponse]:
|
|
161
|
+
"""Get Assertions by Entity
|
|
162
|
+
|
|
163
|
+
Get assertions for a specific entity
|
|
164
|
+
|
|
165
|
+
:param client_id: Client ID (required)
|
|
166
|
+
:type client_id: str
|
|
167
|
+
:param entity_id: Entity ID (required)
|
|
168
|
+
:type entity_id: str
|
|
169
|
+
:param predicate: Filter by predicate
|
|
170
|
+
:type predicate: str
|
|
171
|
+
:param status: Filter by status
|
|
172
|
+
:type status: str
|
|
173
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
174
|
+
number provided, it will be total request
|
|
175
|
+
timeout. It can also be a pair (tuple) of
|
|
176
|
+
(connection, read) timeouts.
|
|
177
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
178
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
179
|
+
request; this effectively ignores the
|
|
180
|
+
authentication in the spec for a single request.
|
|
181
|
+
:type _request_auth: dict, optional
|
|
182
|
+
:param _content_type: force content-type for the request.
|
|
183
|
+
:type _content_type: str, Optional
|
|
184
|
+
:param _headers: set to override the headers for a single
|
|
185
|
+
request; this effectively ignores the headers
|
|
186
|
+
in the spec for a single request.
|
|
187
|
+
:type _headers: dict, optional
|
|
188
|
+
:param _host_index: set to override the host_index for a single
|
|
189
|
+
request; this effectively ignores the host_index
|
|
190
|
+
in the spec for a single request.
|
|
191
|
+
:type _host_index: int, optional
|
|
192
|
+
:return: Returns the result object.
|
|
193
|
+
""" # noqa: E501
|
|
194
|
+
|
|
195
|
+
_param = self._api_v1_knowledge_assertion_client_id_entity_id_get_serialize(
|
|
196
|
+
client_id=client_id,
|
|
197
|
+
entity_id=entity_id,
|
|
198
|
+
predicate=predicate,
|
|
199
|
+
status=status,
|
|
200
|
+
_request_auth=_request_auth,
|
|
201
|
+
_content_type=_content_type,
|
|
202
|
+
_headers=_headers,
|
|
203
|
+
_host_index=_host_index
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
207
|
+
'200': "KnowledgeAssertionListResponse",
|
|
208
|
+
'400': "KnowledgeAssertionListResponse",
|
|
209
|
+
'503': "KnowledgeAssertionListResponse",
|
|
210
|
+
}
|
|
211
|
+
response_data = self.api_client.call_api(
|
|
212
|
+
*_param,
|
|
213
|
+
_request_timeout=_request_timeout
|
|
214
|
+
)
|
|
215
|
+
response_data.read()
|
|
216
|
+
return self.api_client.response_deserialize(
|
|
217
|
+
response_data=response_data,
|
|
218
|
+
response_types_map=_response_types_map,
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
@validate_call
|
|
223
|
+
def api_v1_knowledge_assertion_client_id_entity_id_get_without_preload_content(
|
|
224
|
+
self,
|
|
225
|
+
client_id: Annotated[StrictStr, Field(description="Client ID")],
|
|
226
|
+
entity_id: Annotated[StrictStr, Field(description="Entity ID")],
|
|
227
|
+
predicate: Annotated[Optional[StrictStr], Field(description="Filter by predicate")] = None,
|
|
228
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter by status")] = None,
|
|
229
|
+
_request_timeout: Union[
|
|
230
|
+
None,
|
|
231
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
232
|
+
Tuple[
|
|
233
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
234
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
235
|
+
]
|
|
236
|
+
] = None,
|
|
237
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
238
|
+
_content_type: Optional[StrictStr] = None,
|
|
239
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
240
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
241
|
+
) -> RESTResponseType:
|
|
242
|
+
"""Get Assertions by Entity
|
|
243
|
+
|
|
244
|
+
Get assertions for a specific entity
|
|
245
|
+
|
|
246
|
+
:param client_id: Client ID (required)
|
|
247
|
+
:type client_id: str
|
|
248
|
+
:param entity_id: Entity ID (required)
|
|
249
|
+
:type entity_id: str
|
|
250
|
+
:param predicate: Filter by predicate
|
|
251
|
+
:type predicate: str
|
|
252
|
+
:param status: Filter by status
|
|
253
|
+
:type status: str
|
|
254
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
255
|
+
number provided, it will be total request
|
|
256
|
+
timeout. It can also be a pair (tuple) of
|
|
257
|
+
(connection, read) timeouts.
|
|
258
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
259
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
260
|
+
request; this effectively ignores the
|
|
261
|
+
authentication in the spec for a single request.
|
|
262
|
+
:type _request_auth: dict, optional
|
|
263
|
+
:param _content_type: force content-type for the request.
|
|
264
|
+
:type _content_type: str, Optional
|
|
265
|
+
:param _headers: set to override the headers for a single
|
|
266
|
+
request; this effectively ignores the headers
|
|
267
|
+
in the spec for a single request.
|
|
268
|
+
:type _headers: dict, optional
|
|
269
|
+
:param _host_index: set to override the host_index for a single
|
|
270
|
+
request; this effectively ignores the host_index
|
|
271
|
+
in the spec for a single request.
|
|
272
|
+
:type _host_index: int, optional
|
|
273
|
+
:return: Returns the result object.
|
|
274
|
+
""" # noqa: E501
|
|
275
|
+
|
|
276
|
+
_param = self._api_v1_knowledge_assertion_client_id_entity_id_get_serialize(
|
|
277
|
+
client_id=client_id,
|
|
278
|
+
entity_id=entity_id,
|
|
279
|
+
predicate=predicate,
|
|
280
|
+
status=status,
|
|
281
|
+
_request_auth=_request_auth,
|
|
282
|
+
_content_type=_content_type,
|
|
283
|
+
_headers=_headers,
|
|
284
|
+
_host_index=_host_index
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
288
|
+
'200': "KnowledgeAssertionListResponse",
|
|
289
|
+
'400': "KnowledgeAssertionListResponse",
|
|
290
|
+
'503': "KnowledgeAssertionListResponse",
|
|
291
|
+
}
|
|
292
|
+
response_data = self.api_client.call_api(
|
|
293
|
+
*_param,
|
|
294
|
+
_request_timeout=_request_timeout
|
|
295
|
+
)
|
|
296
|
+
return response_data.response
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
def _api_v1_knowledge_assertion_client_id_entity_id_get_serialize(
|
|
300
|
+
self,
|
|
301
|
+
client_id,
|
|
302
|
+
entity_id,
|
|
303
|
+
predicate,
|
|
304
|
+
status,
|
|
305
|
+
_request_auth,
|
|
306
|
+
_content_type,
|
|
307
|
+
_headers,
|
|
308
|
+
_host_index,
|
|
309
|
+
) -> RequestSerialized:
|
|
310
|
+
|
|
311
|
+
_host = None
|
|
312
|
+
|
|
313
|
+
_collection_formats: Dict[str, str] = {
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
_path_params: Dict[str, str] = {}
|
|
317
|
+
_query_params: List[Tuple[str, str]] = []
|
|
318
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
319
|
+
_form_params: List[Tuple[str, str]] = []
|
|
320
|
+
_files: Dict[
|
|
321
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
322
|
+
] = {}
|
|
323
|
+
_body_params: Optional[bytes] = None
|
|
324
|
+
|
|
325
|
+
# process the path parameters
|
|
326
|
+
if client_id is not None:
|
|
327
|
+
_path_params['client_id'] = client_id
|
|
328
|
+
if entity_id is not None:
|
|
329
|
+
_path_params['entity_id'] = entity_id
|
|
330
|
+
# process the query parameters
|
|
331
|
+
if predicate is not None:
|
|
332
|
+
|
|
333
|
+
_query_params.append(('predicate', predicate))
|
|
334
|
+
|
|
335
|
+
if status is not None:
|
|
336
|
+
|
|
337
|
+
_query_params.append(('status', status))
|
|
338
|
+
|
|
339
|
+
# process the header parameters
|
|
340
|
+
# process the form parameters
|
|
341
|
+
# process the body parameter
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
# set the HTTP header `Accept`
|
|
345
|
+
if 'Accept' not in _header_params:
|
|
346
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
347
|
+
[
|
|
348
|
+
'application/json'
|
|
349
|
+
]
|
|
350
|
+
)
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
# authentication setting
|
|
354
|
+
_auth_settings: List[str] = [
|
|
355
|
+
'TokenAuth'
|
|
356
|
+
]
|
|
357
|
+
|
|
358
|
+
return self.api_client.param_serialize(
|
|
359
|
+
method='GET',
|
|
360
|
+
resource_path='/api/v1/knowledge/assertion/{client_id}/{entity_id}',
|
|
361
|
+
path_params=_path_params,
|
|
362
|
+
query_params=_query_params,
|
|
363
|
+
header_params=_header_params,
|
|
364
|
+
body=_body_params,
|
|
365
|
+
post_params=_form_params,
|
|
366
|
+
files=_files,
|
|
367
|
+
auth_settings=_auth_settings,
|
|
368
|
+
collection_formats=_collection_formats,
|
|
369
|
+
_host=_host,
|
|
370
|
+
_request_auth=_request_auth
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
@validate_call
|
|
377
|
+
def api_v1_knowledge_assertion_post(
|
|
378
|
+
self,
|
|
379
|
+
request: Annotated[KnowledgeAssertionCreateRequest, Field(description="Body")],
|
|
380
|
+
_request_timeout: Union[
|
|
381
|
+
None,
|
|
382
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
383
|
+
Tuple[
|
|
384
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
385
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
386
|
+
]
|
|
387
|
+
] = None,
|
|
388
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
389
|
+
_content_type: Optional[StrictStr] = None,
|
|
390
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
391
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
392
|
+
) -> KnowledgeAssertionResponse:
|
|
393
|
+
"""Create Knowledge Assertion
|
|
394
|
+
|
|
395
|
+
Create a new knowledge assertion attached to an entity
|
|
396
|
+
|
|
397
|
+
:param request: Body (required)
|
|
398
|
+
:type request: KnowledgeAssertionCreateRequest
|
|
399
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
400
|
+
number provided, it will be total request
|
|
401
|
+
timeout. It can also be a pair (tuple) of
|
|
402
|
+
(connection, read) timeouts.
|
|
403
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
404
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
405
|
+
request; this effectively ignores the
|
|
406
|
+
authentication in the spec for a single request.
|
|
407
|
+
:type _request_auth: dict, optional
|
|
408
|
+
:param _content_type: force content-type for the request.
|
|
409
|
+
:type _content_type: str, Optional
|
|
410
|
+
:param _headers: set to override the headers for a single
|
|
411
|
+
request; this effectively ignores the headers
|
|
412
|
+
in the spec for a single request.
|
|
413
|
+
:type _headers: dict, optional
|
|
414
|
+
:param _host_index: set to override the host_index for a single
|
|
415
|
+
request; this effectively ignores the host_index
|
|
416
|
+
in the spec for a single request.
|
|
417
|
+
:type _host_index: int, optional
|
|
418
|
+
:return: Returns the result object.
|
|
419
|
+
""" # noqa: E501
|
|
420
|
+
|
|
421
|
+
_param = self._api_v1_knowledge_assertion_post_serialize(
|
|
422
|
+
request=request,
|
|
423
|
+
_request_auth=_request_auth,
|
|
424
|
+
_content_type=_content_type,
|
|
425
|
+
_headers=_headers,
|
|
426
|
+
_host_index=_host_index
|
|
427
|
+
)
|
|
428
|
+
|
|
429
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
430
|
+
'201': "KnowledgeAssertionResponse",
|
|
431
|
+
'400': "KnowledgeAssertionResponse",
|
|
432
|
+
'503': "KnowledgeAssertionResponse",
|
|
433
|
+
}
|
|
434
|
+
response_data = self.api_client.call_api(
|
|
435
|
+
*_param,
|
|
436
|
+
_request_timeout=_request_timeout
|
|
437
|
+
)
|
|
438
|
+
response_data.read()
|
|
439
|
+
return self.api_client.response_deserialize(
|
|
440
|
+
response_data=response_data,
|
|
441
|
+
response_types_map=_response_types_map,
|
|
442
|
+
).data
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
@validate_call
|
|
446
|
+
def api_v1_knowledge_assertion_post_with_http_info(
|
|
447
|
+
self,
|
|
448
|
+
request: Annotated[KnowledgeAssertionCreateRequest, Field(description="Body")],
|
|
449
|
+
_request_timeout: Union[
|
|
450
|
+
None,
|
|
451
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
452
|
+
Tuple[
|
|
453
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
454
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
455
|
+
]
|
|
456
|
+
] = None,
|
|
457
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
458
|
+
_content_type: Optional[StrictStr] = None,
|
|
459
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
460
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
461
|
+
) -> ApiResponse[KnowledgeAssertionResponse]:
|
|
462
|
+
"""Create Knowledge Assertion
|
|
463
|
+
|
|
464
|
+
Create a new knowledge assertion attached to an entity
|
|
465
|
+
|
|
466
|
+
:param request: Body (required)
|
|
467
|
+
:type request: KnowledgeAssertionCreateRequest
|
|
468
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
469
|
+
number provided, it will be total request
|
|
470
|
+
timeout. It can also be a pair (tuple) of
|
|
471
|
+
(connection, read) timeouts.
|
|
472
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
473
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
474
|
+
request; this effectively ignores the
|
|
475
|
+
authentication in the spec for a single request.
|
|
476
|
+
:type _request_auth: dict, optional
|
|
477
|
+
:param _content_type: force content-type for the request.
|
|
478
|
+
:type _content_type: str, Optional
|
|
479
|
+
:param _headers: set to override the headers for a single
|
|
480
|
+
request; this effectively ignores the headers
|
|
481
|
+
in the spec for a single request.
|
|
482
|
+
:type _headers: dict, optional
|
|
483
|
+
:param _host_index: set to override the host_index for a single
|
|
484
|
+
request; this effectively ignores the host_index
|
|
485
|
+
in the spec for a single request.
|
|
486
|
+
:type _host_index: int, optional
|
|
487
|
+
:return: Returns the result object.
|
|
488
|
+
""" # noqa: E501
|
|
489
|
+
|
|
490
|
+
_param = self._api_v1_knowledge_assertion_post_serialize(
|
|
491
|
+
request=request,
|
|
492
|
+
_request_auth=_request_auth,
|
|
493
|
+
_content_type=_content_type,
|
|
494
|
+
_headers=_headers,
|
|
495
|
+
_host_index=_host_index
|
|
496
|
+
)
|
|
497
|
+
|
|
498
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
499
|
+
'201': "KnowledgeAssertionResponse",
|
|
500
|
+
'400': "KnowledgeAssertionResponse",
|
|
501
|
+
'503': "KnowledgeAssertionResponse",
|
|
502
|
+
}
|
|
503
|
+
response_data = self.api_client.call_api(
|
|
504
|
+
*_param,
|
|
505
|
+
_request_timeout=_request_timeout
|
|
506
|
+
)
|
|
507
|
+
response_data.read()
|
|
508
|
+
return self.api_client.response_deserialize(
|
|
509
|
+
response_data=response_data,
|
|
510
|
+
response_types_map=_response_types_map,
|
|
511
|
+
)
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
@validate_call
|
|
515
|
+
def api_v1_knowledge_assertion_post_without_preload_content(
|
|
516
|
+
self,
|
|
517
|
+
request: Annotated[KnowledgeAssertionCreateRequest, Field(description="Body")],
|
|
518
|
+
_request_timeout: Union[
|
|
519
|
+
None,
|
|
520
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
521
|
+
Tuple[
|
|
522
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
523
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
524
|
+
]
|
|
525
|
+
] = None,
|
|
526
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
527
|
+
_content_type: Optional[StrictStr] = None,
|
|
528
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
529
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
530
|
+
) -> RESTResponseType:
|
|
531
|
+
"""Create Knowledge Assertion
|
|
532
|
+
|
|
533
|
+
Create a new knowledge assertion attached to an entity
|
|
534
|
+
|
|
535
|
+
:param request: Body (required)
|
|
536
|
+
:type request: KnowledgeAssertionCreateRequest
|
|
537
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
538
|
+
number provided, it will be total request
|
|
539
|
+
timeout. It can also be a pair (tuple) of
|
|
540
|
+
(connection, read) timeouts.
|
|
541
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
542
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
543
|
+
request; this effectively ignores the
|
|
544
|
+
authentication in the spec for a single request.
|
|
545
|
+
:type _request_auth: dict, optional
|
|
546
|
+
:param _content_type: force content-type for the request.
|
|
547
|
+
:type _content_type: str, Optional
|
|
548
|
+
:param _headers: set to override the headers for a single
|
|
549
|
+
request; this effectively ignores the headers
|
|
550
|
+
in the spec for a single request.
|
|
551
|
+
:type _headers: dict, optional
|
|
552
|
+
:param _host_index: set to override the host_index for a single
|
|
553
|
+
request; this effectively ignores the host_index
|
|
554
|
+
in the spec for a single request.
|
|
555
|
+
:type _host_index: int, optional
|
|
556
|
+
:return: Returns the result object.
|
|
557
|
+
""" # noqa: E501
|
|
558
|
+
|
|
559
|
+
_param = self._api_v1_knowledge_assertion_post_serialize(
|
|
560
|
+
request=request,
|
|
561
|
+
_request_auth=_request_auth,
|
|
562
|
+
_content_type=_content_type,
|
|
563
|
+
_headers=_headers,
|
|
564
|
+
_host_index=_host_index
|
|
565
|
+
)
|
|
566
|
+
|
|
567
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
568
|
+
'201': "KnowledgeAssertionResponse",
|
|
569
|
+
'400': "KnowledgeAssertionResponse",
|
|
570
|
+
'503': "KnowledgeAssertionResponse",
|
|
571
|
+
}
|
|
572
|
+
response_data = self.api_client.call_api(
|
|
573
|
+
*_param,
|
|
574
|
+
_request_timeout=_request_timeout
|
|
575
|
+
)
|
|
576
|
+
return response_data.response
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
def _api_v1_knowledge_assertion_post_serialize(
|
|
580
|
+
self,
|
|
581
|
+
request,
|
|
582
|
+
_request_auth,
|
|
583
|
+
_content_type,
|
|
584
|
+
_headers,
|
|
585
|
+
_host_index,
|
|
586
|
+
) -> RequestSerialized:
|
|
587
|
+
|
|
588
|
+
_host = None
|
|
589
|
+
|
|
590
|
+
_collection_formats: Dict[str, str] = {
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
_path_params: Dict[str, str] = {}
|
|
594
|
+
_query_params: List[Tuple[str, str]] = []
|
|
595
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
596
|
+
_form_params: List[Tuple[str, str]] = []
|
|
597
|
+
_files: Dict[
|
|
598
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
599
|
+
] = {}
|
|
600
|
+
_body_params: Optional[bytes] = None
|
|
601
|
+
|
|
602
|
+
# process the path parameters
|
|
603
|
+
# process the query parameters
|
|
604
|
+
# process the header parameters
|
|
605
|
+
# process the form parameters
|
|
606
|
+
# process the body parameter
|
|
607
|
+
if request is not None:
|
|
608
|
+
_body_params = request
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
# set the HTTP header `Accept`
|
|
612
|
+
if 'Accept' not in _header_params:
|
|
613
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
614
|
+
[
|
|
615
|
+
'application/json'
|
|
616
|
+
]
|
|
617
|
+
)
|
|
618
|
+
|
|
619
|
+
# set the HTTP header `Content-Type`
|
|
620
|
+
if _content_type:
|
|
621
|
+
_header_params['Content-Type'] = _content_type
|
|
622
|
+
else:
|
|
623
|
+
_default_content_type = (
|
|
624
|
+
self.api_client.select_header_content_type(
|
|
625
|
+
[
|
|
626
|
+
'application/json'
|
|
627
|
+
]
|
|
628
|
+
)
|
|
629
|
+
)
|
|
630
|
+
if _default_content_type is not None:
|
|
631
|
+
_header_params['Content-Type'] = _default_content_type
|
|
632
|
+
|
|
633
|
+
# authentication setting
|
|
634
|
+
_auth_settings: List[str] = [
|
|
635
|
+
'TokenAuth'
|
|
636
|
+
]
|
|
637
|
+
|
|
638
|
+
return self.api_client.param_serialize(
|
|
639
|
+
method='POST',
|
|
640
|
+
resource_path='/api/v1/knowledge/assertion',
|
|
641
|
+
path_params=_path_params,
|
|
642
|
+
query_params=_query_params,
|
|
643
|
+
header_params=_header_params,
|
|
644
|
+
body=_body_params,
|
|
645
|
+
post_params=_form_params,
|
|
646
|
+
files=_files,
|
|
647
|
+
auth_settings=_auth_settings,
|
|
648
|
+
collection_formats=_collection_formats,
|
|
649
|
+
_host=_host,
|
|
650
|
+
_request_auth=_request_auth
|
|
651
|
+
)
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
@validate_call
|
|
657
|
+
def api_v1_knowledge_enrichment_artifact_client_id_artifact_id_get(
|
|
658
|
+
self,
|
|
659
|
+
client_id: Annotated[StrictStr, Field(description="Client ID")],
|
|
660
|
+
artifact_id: Annotated[StrictInt, Field(description="Artifact ID")],
|
|
661
|
+
_request_timeout: Union[
|
|
662
|
+
None,
|
|
663
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
664
|
+
Tuple[
|
|
665
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
666
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
667
|
+
]
|
|
668
|
+
] = None,
|
|
669
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
670
|
+
_content_type: Optional[StrictStr] = None,
|
|
671
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
672
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
673
|
+
) -> KnowledgeEnrichmentArtifactResponse:
|
|
674
|
+
"""Get Enrichment Artifact
|
|
675
|
+
|
|
676
|
+
Get enrichment artifact by ID
|
|
677
|
+
|
|
678
|
+
:param client_id: Client ID (required)
|
|
679
|
+
:type client_id: str
|
|
680
|
+
:param artifact_id: Artifact ID (required)
|
|
681
|
+
:type artifact_id: int
|
|
682
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
683
|
+
number provided, it will be total request
|
|
684
|
+
timeout. It can also be a pair (tuple) of
|
|
685
|
+
(connection, read) timeouts.
|
|
686
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
687
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
688
|
+
request; this effectively ignores the
|
|
689
|
+
authentication in the spec for a single request.
|
|
690
|
+
:type _request_auth: dict, optional
|
|
691
|
+
:param _content_type: force content-type for the request.
|
|
692
|
+
:type _content_type: str, Optional
|
|
693
|
+
:param _headers: set to override the headers for a single
|
|
694
|
+
request; this effectively ignores the headers
|
|
695
|
+
in the spec for a single request.
|
|
696
|
+
:type _headers: dict, optional
|
|
697
|
+
:param _host_index: set to override the host_index for a single
|
|
698
|
+
request; this effectively ignores the host_index
|
|
699
|
+
in the spec for a single request.
|
|
700
|
+
:type _host_index: int, optional
|
|
701
|
+
:return: Returns the result object.
|
|
702
|
+
""" # noqa: E501
|
|
703
|
+
|
|
704
|
+
_param = self._api_v1_knowledge_enrichment_artifact_client_id_artifact_id_get_serialize(
|
|
705
|
+
client_id=client_id,
|
|
706
|
+
artifact_id=artifact_id,
|
|
707
|
+
_request_auth=_request_auth,
|
|
708
|
+
_content_type=_content_type,
|
|
709
|
+
_headers=_headers,
|
|
710
|
+
_host_index=_host_index
|
|
711
|
+
)
|
|
712
|
+
|
|
713
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
714
|
+
'200': "KnowledgeEnrichmentArtifactResponse",
|
|
715
|
+
'400': "KnowledgeEnrichmentArtifactResponse",
|
|
716
|
+
'404': "KnowledgeEnrichmentArtifactResponse",
|
|
717
|
+
}
|
|
718
|
+
response_data = self.api_client.call_api(
|
|
719
|
+
*_param,
|
|
720
|
+
_request_timeout=_request_timeout
|
|
721
|
+
)
|
|
722
|
+
response_data.read()
|
|
723
|
+
return self.api_client.response_deserialize(
|
|
724
|
+
response_data=response_data,
|
|
725
|
+
response_types_map=_response_types_map,
|
|
726
|
+
).data
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
@validate_call
|
|
730
|
+
def api_v1_knowledge_enrichment_artifact_client_id_artifact_id_get_with_http_info(
|
|
731
|
+
self,
|
|
732
|
+
client_id: Annotated[StrictStr, Field(description="Client ID")],
|
|
733
|
+
artifact_id: Annotated[StrictInt, Field(description="Artifact ID")],
|
|
734
|
+
_request_timeout: Union[
|
|
735
|
+
None,
|
|
736
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
737
|
+
Tuple[
|
|
738
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
739
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
740
|
+
]
|
|
741
|
+
] = None,
|
|
742
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
743
|
+
_content_type: Optional[StrictStr] = None,
|
|
744
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
745
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
746
|
+
) -> ApiResponse[KnowledgeEnrichmentArtifactResponse]:
|
|
747
|
+
"""Get Enrichment Artifact
|
|
748
|
+
|
|
749
|
+
Get enrichment artifact by ID
|
|
750
|
+
|
|
751
|
+
:param client_id: Client ID (required)
|
|
752
|
+
:type client_id: str
|
|
753
|
+
:param artifact_id: Artifact ID (required)
|
|
754
|
+
:type artifact_id: int
|
|
755
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
756
|
+
number provided, it will be total request
|
|
757
|
+
timeout. It can also be a pair (tuple) of
|
|
758
|
+
(connection, read) timeouts.
|
|
759
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
760
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
761
|
+
request; this effectively ignores the
|
|
762
|
+
authentication in the spec for a single request.
|
|
763
|
+
:type _request_auth: dict, optional
|
|
764
|
+
:param _content_type: force content-type for the request.
|
|
765
|
+
:type _content_type: str, Optional
|
|
766
|
+
:param _headers: set to override the headers for a single
|
|
767
|
+
request; this effectively ignores the headers
|
|
768
|
+
in the spec for a single request.
|
|
769
|
+
:type _headers: dict, optional
|
|
770
|
+
:param _host_index: set to override the host_index for a single
|
|
771
|
+
request; this effectively ignores the host_index
|
|
772
|
+
in the spec for a single request.
|
|
773
|
+
:type _host_index: int, optional
|
|
774
|
+
:return: Returns the result object.
|
|
775
|
+
""" # noqa: E501
|
|
776
|
+
|
|
777
|
+
_param = self._api_v1_knowledge_enrichment_artifact_client_id_artifact_id_get_serialize(
|
|
778
|
+
client_id=client_id,
|
|
779
|
+
artifact_id=artifact_id,
|
|
780
|
+
_request_auth=_request_auth,
|
|
781
|
+
_content_type=_content_type,
|
|
782
|
+
_headers=_headers,
|
|
783
|
+
_host_index=_host_index
|
|
784
|
+
)
|
|
785
|
+
|
|
786
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
787
|
+
'200': "KnowledgeEnrichmentArtifactResponse",
|
|
788
|
+
'400': "KnowledgeEnrichmentArtifactResponse",
|
|
789
|
+
'404': "KnowledgeEnrichmentArtifactResponse",
|
|
790
|
+
}
|
|
791
|
+
response_data = self.api_client.call_api(
|
|
792
|
+
*_param,
|
|
793
|
+
_request_timeout=_request_timeout
|
|
794
|
+
)
|
|
795
|
+
response_data.read()
|
|
796
|
+
return self.api_client.response_deserialize(
|
|
797
|
+
response_data=response_data,
|
|
798
|
+
response_types_map=_response_types_map,
|
|
799
|
+
)
|
|
800
|
+
|
|
801
|
+
|
|
802
|
+
@validate_call
|
|
803
|
+
def api_v1_knowledge_enrichment_artifact_client_id_artifact_id_get_without_preload_content(
|
|
804
|
+
self,
|
|
805
|
+
client_id: Annotated[StrictStr, Field(description="Client ID")],
|
|
806
|
+
artifact_id: Annotated[StrictInt, Field(description="Artifact ID")],
|
|
807
|
+
_request_timeout: Union[
|
|
808
|
+
None,
|
|
809
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
810
|
+
Tuple[
|
|
811
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
812
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
813
|
+
]
|
|
814
|
+
] = None,
|
|
815
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
816
|
+
_content_type: Optional[StrictStr] = None,
|
|
817
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
818
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
819
|
+
) -> RESTResponseType:
|
|
820
|
+
"""Get Enrichment Artifact
|
|
821
|
+
|
|
822
|
+
Get enrichment artifact by ID
|
|
823
|
+
|
|
824
|
+
:param client_id: Client ID (required)
|
|
825
|
+
:type client_id: str
|
|
826
|
+
:param artifact_id: Artifact ID (required)
|
|
827
|
+
:type artifact_id: int
|
|
828
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
829
|
+
number provided, it will be total request
|
|
830
|
+
timeout. It can also be a pair (tuple) of
|
|
831
|
+
(connection, read) timeouts.
|
|
832
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
833
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
834
|
+
request; this effectively ignores the
|
|
835
|
+
authentication in the spec for a single request.
|
|
836
|
+
:type _request_auth: dict, optional
|
|
837
|
+
:param _content_type: force content-type for the request.
|
|
838
|
+
:type _content_type: str, Optional
|
|
839
|
+
:param _headers: set to override the headers for a single
|
|
840
|
+
request; this effectively ignores the headers
|
|
841
|
+
in the spec for a single request.
|
|
842
|
+
:type _headers: dict, optional
|
|
843
|
+
:param _host_index: set to override the host_index for a single
|
|
844
|
+
request; this effectively ignores the host_index
|
|
845
|
+
in the spec for a single request.
|
|
846
|
+
:type _host_index: int, optional
|
|
847
|
+
:return: Returns the result object.
|
|
848
|
+
""" # noqa: E501
|
|
849
|
+
|
|
850
|
+
_param = self._api_v1_knowledge_enrichment_artifact_client_id_artifact_id_get_serialize(
|
|
851
|
+
client_id=client_id,
|
|
852
|
+
artifact_id=artifact_id,
|
|
853
|
+
_request_auth=_request_auth,
|
|
854
|
+
_content_type=_content_type,
|
|
855
|
+
_headers=_headers,
|
|
856
|
+
_host_index=_host_index
|
|
857
|
+
)
|
|
858
|
+
|
|
859
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
860
|
+
'200': "KnowledgeEnrichmentArtifactResponse",
|
|
861
|
+
'400': "KnowledgeEnrichmentArtifactResponse",
|
|
862
|
+
'404': "KnowledgeEnrichmentArtifactResponse",
|
|
863
|
+
}
|
|
864
|
+
response_data = self.api_client.call_api(
|
|
865
|
+
*_param,
|
|
866
|
+
_request_timeout=_request_timeout
|
|
867
|
+
)
|
|
868
|
+
return response_data.response
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
def _api_v1_knowledge_enrichment_artifact_client_id_artifact_id_get_serialize(
|
|
872
|
+
self,
|
|
873
|
+
client_id,
|
|
874
|
+
artifact_id,
|
|
875
|
+
_request_auth,
|
|
876
|
+
_content_type,
|
|
877
|
+
_headers,
|
|
878
|
+
_host_index,
|
|
879
|
+
) -> RequestSerialized:
|
|
880
|
+
|
|
881
|
+
_host = None
|
|
882
|
+
|
|
883
|
+
_collection_formats: Dict[str, str] = {
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
_path_params: Dict[str, str] = {}
|
|
887
|
+
_query_params: List[Tuple[str, str]] = []
|
|
888
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
889
|
+
_form_params: List[Tuple[str, str]] = []
|
|
890
|
+
_files: Dict[
|
|
891
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
892
|
+
] = {}
|
|
893
|
+
_body_params: Optional[bytes] = None
|
|
894
|
+
|
|
895
|
+
# process the path parameters
|
|
896
|
+
if client_id is not None:
|
|
897
|
+
_path_params['client_id'] = client_id
|
|
898
|
+
if artifact_id is not None:
|
|
899
|
+
_path_params['artifact_id'] = artifact_id
|
|
900
|
+
# process the query parameters
|
|
901
|
+
# process the header parameters
|
|
902
|
+
# process the form parameters
|
|
903
|
+
# process the body parameter
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
# set the HTTP header `Accept`
|
|
907
|
+
if 'Accept' not in _header_params:
|
|
908
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
909
|
+
[
|
|
910
|
+
'application/json'
|
|
911
|
+
]
|
|
912
|
+
)
|
|
913
|
+
|
|
914
|
+
|
|
915
|
+
# authentication setting
|
|
916
|
+
_auth_settings: List[str] = [
|
|
917
|
+
'TokenAuth'
|
|
918
|
+
]
|
|
919
|
+
|
|
920
|
+
return self.api_client.param_serialize(
|
|
921
|
+
method='GET',
|
|
922
|
+
resource_path='/api/v1/knowledge/enrichment/artifact/{client_id}/{artifact_id}',
|
|
923
|
+
path_params=_path_params,
|
|
924
|
+
query_params=_query_params,
|
|
925
|
+
header_params=_header_params,
|
|
926
|
+
body=_body_params,
|
|
927
|
+
post_params=_form_params,
|
|
928
|
+
files=_files,
|
|
929
|
+
auth_settings=_auth_settings,
|
|
930
|
+
collection_formats=_collection_formats,
|
|
931
|
+
_host=_host,
|
|
932
|
+
_request_auth=_request_auth
|
|
933
|
+
)
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
@validate_call
|
|
939
|
+
def api_v1_knowledge_enrichment_artifact_client_id_artifact_id_output_put(
|
|
940
|
+
self,
|
|
941
|
+
client_id: Annotated[StrictStr, Field(description="Client ID")],
|
|
942
|
+
artifact_id: Annotated[StrictInt, Field(description="Artifact ID")],
|
|
943
|
+
request: Annotated[KnowledgeEnrichmentArtifactUpdateOutputRequest, Field(description="Body")],
|
|
944
|
+
_request_timeout: Union[
|
|
945
|
+
None,
|
|
946
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
947
|
+
Tuple[
|
|
948
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
949
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
950
|
+
]
|
|
951
|
+
] = None,
|
|
952
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
953
|
+
_content_type: Optional[StrictStr] = None,
|
|
954
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
955
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
956
|
+
) -> KnowledgeEnrichmentArtifactResponse:
|
|
957
|
+
"""Update Enrichment Artifact Output
|
|
958
|
+
|
|
959
|
+
Update output data for a completed enrichment artifact
|
|
960
|
+
|
|
961
|
+
:param client_id: Client ID (required)
|
|
962
|
+
:type client_id: str
|
|
963
|
+
:param artifact_id: Artifact ID (required)
|
|
964
|
+
:type artifact_id: int
|
|
965
|
+
:param request: Body (required)
|
|
966
|
+
:type request: KnowledgeEnrichmentArtifactUpdateOutputRequest
|
|
967
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
968
|
+
number provided, it will be total request
|
|
969
|
+
timeout. It can also be a pair (tuple) of
|
|
970
|
+
(connection, read) timeouts.
|
|
971
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
972
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
973
|
+
request; this effectively ignores the
|
|
974
|
+
authentication in the spec for a single request.
|
|
975
|
+
:type _request_auth: dict, optional
|
|
976
|
+
:param _content_type: force content-type for the request.
|
|
977
|
+
:type _content_type: str, Optional
|
|
978
|
+
:param _headers: set to override the headers for a single
|
|
979
|
+
request; this effectively ignores the headers
|
|
980
|
+
in the spec for a single request.
|
|
981
|
+
:type _headers: dict, optional
|
|
982
|
+
:param _host_index: set to override the host_index for a single
|
|
983
|
+
request; this effectively ignores the host_index
|
|
984
|
+
in the spec for a single request.
|
|
985
|
+
:type _host_index: int, optional
|
|
986
|
+
:return: Returns the result object.
|
|
987
|
+
""" # noqa: E501
|
|
988
|
+
|
|
989
|
+
_param = self._api_v1_knowledge_enrichment_artifact_client_id_artifact_id_output_put_serialize(
|
|
990
|
+
client_id=client_id,
|
|
991
|
+
artifact_id=artifact_id,
|
|
992
|
+
request=request,
|
|
993
|
+
_request_auth=_request_auth,
|
|
994
|
+
_content_type=_content_type,
|
|
995
|
+
_headers=_headers,
|
|
996
|
+
_host_index=_host_index
|
|
997
|
+
)
|
|
998
|
+
|
|
999
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1000
|
+
'200': "KnowledgeEnrichmentArtifactResponse",
|
|
1001
|
+
'400': "KnowledgeEnrichmentArtifactResponse",
|
|
1002
|
+
'404': "KnowledgeEnrichmentArtifactResponse",
|
|
1003
|
+
}
|
|
1004
|
+
response_data = self.api_client.call_api(
|
|
1005
|
+
*_param,
|
|
1006
|
+
_request_timeout=_request_timeout
|
|
1007
|
+
)
|
|
1008
|
+
response_data.read()
|
|
1009
|
+
return self.api_client.response_deserialize(
|
|
1010
|
+
response_data=response_data,
|
|
1011
|
+
response_types_map=_response_types_map,
|
|
1012
|
+
).data
|
|
1013
|
+
|
|
1014
|
+
|
|
1015
|
+
@validate_call
|
|
1016
|
+
def api_v1_knowledge_enrichment_artifact_client_id_artifact_id_output_put_with_http_info(
|
|
1017
|
+
self,
|
|
1018
|
+
client_id: Annotated[StrictStr, Field(description="Client ID")],
|
|
1019
|
+
artifact_id: Annotated[StrictInt, Field(description="Artifact ID")],
|
|
1020
|
+
request: Annotated[KnowledgeEnrichmentArtifactUpdateOutputRequest, Field(description="Body")],
|
|
1021
|
+
_request_timeout: Union[
|
|
1022
|
+
None,
|
|
1023
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1024
|
+
Tuple[
|
|
1025
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1026
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1027
|
+
]
|
|
1028
|
+
] = None,
|
|
1029
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1030
|
+
_content_type: Optional[StrictStr] = None,
|
|
1031
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1032
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1033
|
+
) -> ApiResponse[KnowledgeEnrichmentArtifactResponse]:
|
|
1034
|
+
"""Update Enrichment Artifact Output
|
|
1035
|
+
|
|
1036
|
+
Update output data for a completed enrichment artifact
|
|
1037
|
+
|
|
1038
|
+
:param client_id: Client ID (required)
|
|
1039
|
+
:type client_id: str
|
|
1040
|
+
:param artifact_id: Artifact ID (required)
|
|
1041
|
+
:type artifact_id: int
|
|
1042
|
+
:param request: Body (required)
|
|
1043
|
+
:type request: KnowledgeEnrichmentArtifactUpdateOutputRequest
|
|
1044
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1045
|
+
number provided, it will be total request
|
|
1046
|
+
timeout. It can also be a pair (tuple) of
|
|
1047
|
+
(connection, read) timeouts.
|
|
1048
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1049
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1050
|
+
request; this effectively ignores the
|
|
1051
|
+
authentication in the spec for a single request.
|
|
1052
|
+
:type _request_auth: dict, optional
|
|
1053
|
+
:param _content_type: force content-type for the request.
|
|
1054
|
+
:type _content_type: str, Optional
|
|
1055
|
+
:param _headers: set to override the headers for a single
|
|
1056
|
+
request; this effectively ignores the headers
|
|
1057
|
+
in the spec for a single request.
|
|
1058
|
+
:type _headers: dict, optional
|
|
1059
|
+
:param _host_index: set to override the host_index for a single
|
|
1060
|
+
request; this effectively ignores the host_index
|
|
1061
|
+
in the spec for a single request.
|
|
1062
|
+
:type _host_index: int, optional
|
|
1063
|
+
:return: Returns the result object.
|
|
1064
|
+
""" # noqa: E501
|
|
1065
|
+
|
|
1066
|
+
_param = self._api_v1_knowledge_enrichment_artifact_client_id_artifact_id_output_put_serialize(
|
|
1067
|
+
client_id=client_id,
|
|
1068
|
+
artifact_id=artifact_id,
|
|
1069
|
+
request=request,
|
|
1070
|
+
_request_auth=_request_auth,
|
|
1071
|
+
_content_type=_content_type,
|
|
1072
|
+
_headers=_headers,
|
|
1073
|
+
_host_index=_host_index
|
|
1074
|
+
)
|
|
1075
|
+
|
|
1076
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1077
|
+
'200': "KnowledgeEnrichmentArtifactResponse",
|
|
1078
|
+
'400': "KnowledgeEnrichmentArtifactResponse",
|
|
1079
|
+
'404': "KnowledgeEnrichmentArtifactResponse",
|
|
1080
|
+
}
|
|
1081
|
+
response_data = self.api_client.call_api(
|
|
1082
|
+
*_param,
|
|
1083
|
+
_request_timeout=_request_timeout
|
|
1084
|
+
)
|
|
1085
|
+
response_data.read()
|
|
1086
|
+
return self.api_client.response_deserialize(
|
|
1087
|
+
response_data=response_data,
|
|
1088
|
+
response_types_map=_response_types_map,
|
|
1089
|
+
)
|
|
1090
|
+
|
|
1091
|
+
|
|
1092
|
+
@validate_call
|
|
1093
|
+
def api_v1_knowledge_enrichment_artifact_client_id_artifact_id_output_put_without_preload_content(
|
|
1094
|
+
self,
|
|
1095
|
+
client_id: Annotated[StrictStr, Field(description="Client ID")],
|
|
1096
|
+
artifact_id: Annotated[StrictInt, Field(description="Artifact ID")],
|
|
1097
|
+
request: Annotated[KnowledgeEnrichmentArtifactUpdateOutputRequest, Field(description="Body")],
|
|
1098
|
+
_request_timeout: Union[
|
|
1099
|
+
None,
|
|
1100
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1101
|
+
Tuple[
|
|
1102
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1103
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1104
|
+
]
|
|
1105
|
+
] = None,
|
|
1106
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1107
|
+
_content_type: Optional[StrictStr] = None,
|
|
1108
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1109
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1110
|
+
) -> RESTResponseType:
|
|
1111
|
+
"""Update Enrichment Artifact Output
|
|
1112
|
+
|
|
1113
|
+
Update output data for a completed enrichment artifact
|
|
1114
|
+
|
|
1115
|
+
:param client_id: Client ID (required)
|
|
1116
|
+
:type client_id: str
|
|
1117
|
+
:param artifact_id: Artifact ID (required)
|
|
1118
|
+
:type artifact_id: int
|
|
1119
|
+
:param request: Body (required)
|
|
1120
|
+
:type request: KnowledgeEnrichmentArtifactUpdateOutputRequest
|
|
1121
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1122
|
+
number provided, it will be total request
|
|
1123
|
+
timeout. It can also be a pair (tuple) of
|
|
1124
|
+
(connection, read) timeouts.
|
|
1125
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1126
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1127
|
+
request; this effectively ignores the
|
|
1128
|
+
authentication in the spec for a single request.
|
|
1129
|
+
:type _request_auth: dict, optional
|
|
1130
|
+
:param _content_type: force content-type for the request.
|
|
1131
|
+
:type _content_type: str, Optional
|
|
1132
|
+
:param _headers: set to override the headers for a single
|
|
1133
|
+
request; this effectively ignores the headers
|
|
1134
|
+
in the spec for a single request.
|
|
1135
|
+
:type _headers: dict, optional
|
|
1136
|
+
:param _host_index: set to override the host_index for a single
|
|
1137
|
+
request; this effectively ignores the host_index
|
|
1138
|
+
in the spec for a single request.
|
|
1139
|
+
:type _host_index: int, optional
|
|
1140
|
+
:return: Returns the result object.
|
|
1141
|
+
""" # noqa: E501
|
|
1142
|
+
|
|
1143
|
+
_param = self._api_v1_knowledge_enrichment_artifact_client_id_artifact_id_output_put_serialize(
|
|
1144
|
+
client_id=client_id,
|
|
1145
|
+
artifact_id=artifact_id,
|
|
1146
|
+
request=request,
|
|
1147
|
+
_request_auth=_request_auth,
|
|
1148
|
+
_content_type=_content_type,
|
|
1149
|
+
_headers=_headers,
|
|
1150
|
+
_host_index=_host_index
|
|
1151
|
+
)
|
|
1152
|
+
|
|
1153
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1154
|
+
'200': "KnowledgeEnrichmentArtifactResponse",
|
|
1155
|
+
'400': "KnowledgeEnrichmentArtifactResponse",
|
|
1156
|
+
'404': "KnowledgeEnrichmentArtifactResponse",
|
|
1157
|
+
}
|
|
1158
|
+
response_data = self.api_client.call_api(
|
|
1159
|
+
*_param,
|
|
1160
|
+
_request_timeout=_request_timeout
|
|
1161
|
+
)
|
|
1162
|
+
return response_data.response
|
|
1163
|
+
|
|
1164
|
+
|
|
1165
|
+
def _api_v1_knowledge_enrichment_artifact_client_id_artifact_id_output_put_serialize(
|
|
1166
|
+
self,
|
|
1167
|
+
client_id,
|
|
1168
|
+
artifact_id,
|
|
1169
|
+
request,
|
|
1170
|
+
_request_auth,
|
|
1171
|
+
_content_type,
|
|
1172
|
+
_headers,
|
|
1173
|
+
_host_index,
|
|
1174
|
+
) -> RequestSerialized:
|
|
1175
|
+
|
|
1176
|
+
_host = None
|
|
1177
|
+
|
|
1178
|
+
_collection_formats: Dict[str, str] = {
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
_path_params: Dict[str, str] = {}
|
|
1182
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1183
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1184
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1185
|
+
_files: Dict[
|
|
1186
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1187
|
+
] = {}
|
|
1188
|
+
_body_params: Optional[bytes] = None
|
|
1189
|
+
|
|
1190
|
+
# process the path parameters
|
|
1191
|
+
if client_id is not None:
|
|
1192
|
+
_path_params['client_id'] = client_id
|
|
1193
|
+
if artifact_id is not None:
|
|
1194
|
+
_path_params['artifact_id'] = artifact_id
|
|
1195
|
+
# process the query parameters
|
|
1196
|
+
# process the header parameters
|
|
1197
|
+
# process the form parameters
|
|
1198
|
+
# process the body parameter
|
|
1199
|
+
if request is not None:
|
|
1200
|
+
_body_params = request
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
# set the HTTP header `Accept`
|
|
1204
|
+
if 'Accept' not in _header_params:
|
|
1205
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1206
|
+
[
|
|
1207
|
+
'application/json'
|
|
1208
|
+
]
|
|
1209
|
+
)
|
|
1210
|
+
|
|
1211
|
+
# set the HTTP header `Content-Type`
|
|
1212
|
+
if _content_type:
|
|
1213
|
+
_header_params['Content-Type'] = _content_type
|
|
1214
|
+
else:
|
|
1215
|
+
_default_content_type = (
|
|
1216
|
+
self.api_client.select_header_content_type(
|
|
1217
|
+
[
|
|
1218
|
+
'application/json'
|
|
1219
|
+
]
|
|
1220
|
+
)
|
|
1221
|
+
)
|
|
1222
|
+
if _default_content_type is not None:
|
|
1223
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1224
|
+
|
|
1225
|
+
# authentication setting
|
|
1226
|
+
_auth_settings: List[str] = [
|
|
1227
|
+
'TokenAuth'
|
|
1228
|
+
]
|
|
1229
|
+
|
|
1230
|
+
return self.api_client.param_serialize(
|
|
1231
|
+
method='PUT',
|
|
1232
|
+
resource_path='/api/v1/knowledge/enrichment/artifact/{client_id}/{artifact_id}/output',
|
|
1233
|
+
path_params=_path_params,
|
|
1234
|
+
query_params=_query_params,
|
|
1235
|
+
header_params=_header_params,
|
|
1236
|
+
body=_body_params,
|
|
1237
|
+
post_params=_form_params,
|
|
1238
|
+
files=_files,
|
|
1239
|
+
auth_settings=_auth_settings,
|
|
1240
|
+
collection_formats=_collection_formats,
|
|
1241
|
+
_host=_host,
|
|
1242
|
+
_request_auth=_request_auth
|
|
1243
|
+
)
|
|
1244
|
+
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
@validate_call
|
|
1249
|
+
def api_v1_knowledge_enrichment_artifact_client_id_artifact_id_status_put(
|
|
1250
|
+
self,
|
|
1251
|
+
client_id: Annotated[StrictStr, Field(description="Client ID")],
|
|
1252
|
+
artifact_id: Annotated[StrictInt, Field(description="Artifact ID")],
|
|
1253
|
+
request: Annotated[KnowledgeEnrichmentArtifactUpdateStatusRequest, Field(description="Body")],
|
|
1254
|
+
_request_timeout: Union[
|
|
1255
|
+
None,
|
|
1256
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1257
|
+
Tuple[
|
|
1258
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1259
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1260
|
+
]
|
|
1261
|
+
] = None,
|
|
1262
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1263
|
+
_content_type: Optional[StrictStr] = None,
|
|
1264
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1265
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1266
|
+
) -> KnowledgeEnrichmentArtifactResponse:
|
|
1267
|
+
"""Update Enrichment Artifact Status
|
|
1268
|
+
|
|
1269
|
+
Update status and execution metadata for an enrichment artifact
|
|
1270
|
+
|
|
1271
|
+
:param client_id: Client ID (required)
|
|
1272
|
+
:type client_id: str
|
|
1273
|
+
:param artifact_id: Artifact ID (required)
|
|
1274
|
+
:type artifact_id: int
|
|
1275
|
+
:param request: Body (required)
|
|
1276
|
+
:type request: KnowledgeEnrichmentArtifactUpdateStatusRequest
|
|
1277
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1278
|
+
number provided, it will be total request
|
|
1279
|
+
timeout. It can also be a pair (tuple) of
|
|
1280
|
+
(connection, read) timeouts.
|
|
1281
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1282
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1283
|
+
request; this effectively ignores the
|
|
1284
|
+
authentication in the spec for a single request.
|
|
1285
|
+
:type _request_auth: dict, optional
|
|
1286
|
+
:param _content_type: force content-type for the request.
|
|
1287
|
+
:type _content_type: str, Optional
|
|
1288
|
+
:param _headers: set to override the headers for a single
|
|
1289
|
+
request; this effectively ignores the headers
|
|
1290
|
+
in the spec for a single request.
|
|
1291
|
+
:type _headers: dict, optional
|
|
1292
|
+
:param _host_index: set to override the host_index for a single
|
|
1293
|
+
request; this effectively ignores the host_index
|
|
1294
|
+
in the spec for a single request.
|
|
1295
|
+
:type _host_index: int, optional
|
|
1296
|
+
:return: Returns the result object.
|
|
1297
|
+
""" # noqa: E501
|
|
1298
|
+
|
|
1299
|
+
_param = self._api_v1_knowledge_enrichment_artifact_client_id_artifact_id_status_put_serialize(
|
|
1300
|
+
client_id=client_id,
|
|
1301
|
+
artifact_id=artifact_id,
|
|
1302
|
+
request=request,
|
|
1303
|
+
_request_auth=_request_auth,
|
|
1304
|
+
_content_type=_content_type,
|
|
1305
|
+
_headers=_headers,
|
|
1306
|
+
_host_index=_host_index
|
|
1307
|
+
)
|
|
1308
|
+
|
|
1309
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1310
|
+
'200': "KnowledgeEnrichmentArtifactResponse",
|
|
1311
|
+
'400': "KnowledgeEnrichmentArtifactResponse",
|
|
1312
|
+
'404': "KnowledgeEnrichmentArtifactResponse",
|
|
1313
|
+
}
|
|
1314
|
+
response_data = self.api_client.call_api(
|
|
1315
|
+
*_param,
|
|
1316
|
+
_request_timeout=_request_timeout
|
|
1317
|
+
)
|
|
1318
|
+
response_data.read()
|
|
1319
|
+
return self.api_client.response_deserialize(
|
|
1320
|
+
response_data=response_data,
|
|
1321
|
+
response_types_map=_response_types_map,
|
|
1322
|
+
).data
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
|
+
@validate_call
|
|
1326
|
+
def api_v1_knowledge_enrichment_artifact_client_id_artifact_id_status_put_with_http_info(
|
|
1327
|
+
self,
|
|
1328
|
+
client_id: Annotated[StrictStr, Field(description="Client ID")],
|
|
1329
|
+
artifact_id: Annotated[StrictInt, Field(description="Artifact ID")],
|
|
1330
|
+
request: Annotated[KnowledgeEnrichmentArtifactUpdateStatusRequest, Field(description="Body")],
|
|
1331
|
+
_request_timeout: Union[
|
|
1332
|
+
None,
|
|
1333
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1334
|
+
Tuple[
|
|
1335
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1336
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1337
|
+
]
|
|
1338
|
+
] = None,
|
|
1339
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1340
|
+
_content_type: Optional[StrictStr] = None,
|
|
1341
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1342
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1343
|
+
) -> ApiResponse[KnowledgeEnrichmentArtifactResponse]:
|
|
1344
|
+
"""Update Enrichment Artifact Status
|
|
1345
|
+
|
|
1346
|
+
Update status and execution metadata for an enrichment artifact
|
|
1347
|
+
|
|
1348
|
+
:param client_id: Client ID (required)
|
|
1349
|
+
:type client_id: str
|
|
1350
|
+
:param artifact_id: Artifact ID (required)
|
|
1351
|
+
:type artifact_id: int
|
|
1352
|
+
:param request: Body (required)
|
|
1353
|
+
:type request: KnowledgeEnrichmentArtifactUpdateStatusRequest
|
|
1354
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1355
|
+
number provided, it will be total request
|
|
1356
|
+
timeout. It can also be a pair (tuple) of
|
|
1357
|
+
(connection, read) timeouts.
|
|
1358
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1359
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1360
|
+
request; this effectively ignores the
|
|
1361
|
+
authentication in the spec for a single request.
|
|
1362
|
+
:type _request_auth: dict, optional
|
|
1363
|
+
:param _content_type: force content-type for the request.
|
|
1364
|
+
:type _content_type: str, Optional
|
|
1365
|
+
:param _headers: set to override the headers for a single
|
|
1366
|
+
request; this effectively ignores the headers
|
|
1367
|
+
in the spec for a single request.
|
|
1368
|
+
:type _headers: dict, optional
|
|
1369
|
+
:param _host_index: set to override the host_index for a single
|
|
1370
|
+
request; this effectively ignores the host_index
|
|
1371
|
+
in the spec for a single request.
|
|
1372
|
+
:type _host_index: int, optional
|
|
1373
|
+
:return: Returns the result object.
|
|
1374
|
+
""" # noqa: E501
|
|
1375
|
+
|
|
1376
|
+
_param = self._api_v1_knowledge_enrichment_artifact_client_id_artifact_id_status_put_serialize(
|
|
1377
|
+
client_id=client_id,
|
|
1378
|
+
artifact_id=artifact_id,
|
|
1379
|
+
request=request,
|
|
1380
|
+
_request_auth=_request_auth,
|
|
1381
|
+
_content_type=_content_type,
|
|
1382
|
+
_headers=_headers,
|
|
1383
|
+
_host_index=_host_index
|
|
1384
|
+
)
|
|
1385
|
+
|
|
1386
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1387
|
+
'200': "KnowledgeEnrichmentArtifactResponse",
|
|
1388
|
+
'400': "KnowledgeEnrichmentArtifactResponse",
|
|
1389
|
+
'404': "KnowledgeEnrichmentArtifactResponse",
|
|
1390
|
+
}
|
|
1391
|
+
response_data = self.api_client.call_api(
|
|
1392
|
+
*_param,
|
|
1393
|
+
_request_timeout=_request_timeout
|
|
1394
|
+
)
|
|
1395
|
+
response_data.read()
|
|
1396
|
+
return self.api_client.response_deserialize(
|
|
1397
|
+
response_data=response_data,
|
|
1398
|
+
response_types_map=_response_types_map,
|
|
1399
|
+
)
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
@validate_call
|
|
1403
|
+
def api_v1_knowledge_enrichment_artifact_client_id_artifact_id_status_put_without_preload_content(
|
|
1404
|
+
self,
|
|
1405
|
+
client_id: Annotated[StrictStr, Field(description="Client ID")],
|
|
1406
|
+
artifact_id: Annotated[StrictInt, Field(description="Artifact ID")],
|
|
1407
|
+
request: Annotated[KnowledgeEnrichmentArtifactUpdateStatusRequest, Field(description="Body")],
|
|
1408
|
+
_request_timeout: Union[
|
|
1409
|
+
None,
|
|
1410
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1411
|
+
Tuple[
|
|
1412
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1413
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1414
|
+
]
|
|
1415
|
+
] = None,
|
|
1416
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1417
|
+
_content_type: Optional[StrictStr] = None,
|
|
1418
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1419
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1420
|
+
) -> RESTResponseType:
|
|
1421
|
+
"""Update Enrichment Artifact Status
|
|
1422
|
+
|
|
1423
|
+
Update status and execution metadata for an enrichment artifact
|
|
1424
|
+
|
|
1425
|
+
:param client_id: Client ID (required)
|
|
1426
|
+
:type client_id: str
|
|
1427
|
+
:param artifact_id: Artifact ID (required)
|
|
1428
|
+
:type artifact_id: int
|
|
1429
|
+
:param request: Body (required)
|
|
1430
|
+
:type request: KnowledgeEnrichmentArtifactUpdateStatusRequest
|
|
1431
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1432
|
+
number provided, it will be total request
|
|
1433
|
+
timeout. It can also be a pair (tuple) of
|
|
1434
|
+
(connection, read) timeouts.
|
|
1435
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1436
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1437
|
+
request; this effectively ignores the
|
|
1438
|
+
authentication in the spec for a single request.
|
|
1439
|
+
:type _request_auth: dict, optional
|
|
1440
|
+
:param _content_type: force content-type for the request.
|
|
1441
|
+
:type _content_type: str, Optional
|
|
1442
|
+
:param _headers: set to override the headers for a single
|
|
1443
|
+
request; this effectively ignores the headers
|
|
1444
|
+
in the spec for a single request.
|
|
1445
|
+
:type _headers: dict, optional
|
|
1446
|
+
:param _host_index: set to override the host_index for a single
|
|
1447
|
+
request; this effectively ignores the host_index
|
|
1448
|
+
in the spec for a single request.
|
|
1449
|
+
:type _host_index: int, optional
|
|
1450
|
+
:return: Returns the result object.
|
|
1451
|
+
""" # noqa: E501
|
|
1452
|
+
|
|
1453
|
+
_param = self._api_v1_knowledge_enrichment_artifact_client_id_artifact_id_status_put_serialize(
|
|
1454
|
+
client_id=client_id,
|
|
1455
|
+
artifact_id=artifact_id,
|
|
1456
|
+
request=request,
|
|
1457
|
+
_request_auth=_request_auth,
|
|
1458
|
+
_content_type=_content_type,
|
|
1459
|
+
_headers=_headers,
|
|
1460
|
+
_host_index=_host_index
|
|
1461
|
+
)
|
|
1462
|
+
|
|
1463
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1464
|
+
'200': "KnowledgeEnrichmentArtifactResponse",
|
|
1465
|
+
'400': "KnowledgeEnrichmentArtifactResponse",
|
|
1466
|
+
'404': "KnowledgeEnrichmentArtifactResponse",
|
|
1467
|
+
}
|
|
1468
|
+
response_data = self.api_client.call_api(
|
|
1469
|
+
*_param,
|
|
1470
|
+
_request_timeout=_request_timeout
|
|
1471
|
+
)
|
|
1472
|
+
return response_data.response
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
def _api_v1_knowledge_enrichment_artifact_client_id_artifact_id_status_put_serialize(
|
|
1476
|
+
self,
|
|
1477
|
+
client_id,
|
|
1478
|
+
artifact_id,
|
|
1479
|
+
request,
|
|
1480
|
+
_request_auth,
|
|
1481
|
+
_content_type,
|
|
1482
|
+
_headers,
|
|
1483
|
+
_host_index,
|
|
1484
|
+
) -> RequestSerialized:
|
|
1485
|
+
|
|
1486
|
+
_host = None
|
|
1487
|
+
|
|
1488
|
+
_collection_formats: Dict[str, str] = {
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
_path_params: Dict[str, str] = {}
|
|
1492
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1493
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1494
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1495
|
+
_files: Dict[
|
|
1496
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1497
|
+
] = {}
|
|
1498
|
+
_body_params: Optional[bytes] = None
|
|
1499
|
+
|
|
1500
|
+
# process the path parameters
|
|
1501
|
+
if client_id is not None:
|
|
1502
|
+
_path_params['client_id'] = client_id
|
|
1503
|
+
if artifact_id is not None:
|
|
1504
|
+
_path_params['artifact_id'] = artifact_id
|
|
1505
|
+
# process the query parameters
|
|
1506
|
+
# process the header parameters
|
|
1507
|
+
# process the form parameters
|
|
1508
|
+
# process the body parameter
|
|
1509
|
+
if request is not None:
|
|
1510
|
+
_body_params = request
|
|
1511
|
+
|
|
1512
|
+
|
|
1513
|
+
# set the HTTP header `Accept`
|
|
1514
|
+
if 'Accept' not in _header_params:
|
|
1515
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1516
|
+
[
|
|
1517
|
+
'application/json'
|
|
1518
|
+
]
|
|
1519
|
+
)
|
|
1520
|
+
|
|
1521
|
+
# set the HTTP header `Content-Type`
|
|
1522
|
+
if _content_type:
|
|
1523
|
+
_header_params['Content-Type'] = _content_type
|
|
1524
|
+
else:
|
|
1525
|
+
_default_content_type = (
|
|
1526
|
+
self.api_client.select_header_content_type(
|
|
1527
|
+
[
|
|
1528
|
+
'application/json'
|
|
1529
|
+
]
|
|
1530
|
+
)
|
|
1531
|
+
)
|
|
1532
|
+
if _default_content_type is not None:
|
|
1533
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1534
|
+
|
|
1535
|
+
# authentication setting
|
|
1536
|
+
_auth_settings: List[str] = [
|
|
1537
|
+
'TokenAuth'
|
|
1538
|
+
]
|
|
1539
|
+
|
|
1540
|
+
return self.api_client.param_serialize(
|
|
1541
|
+
method='PUT',
|
|
1542
|
+
resource_path='/api/v1/knowledge/enrichment/artifact/{client_id}/{artifact_id}/status',
|
|
1543
|
+
path_params=_path_params,
|
|
1544
|
+
query_params=_query_params,
|
|
1545
|
+
header_params=_header_params,
|
|
1546
|
+
body=_body_params,
|
|
1547
|
+
post_params=_form_params,
|
|
1548
|
+
files=_files,
|
|
1549
|
+
auth_settings=_auth_settings,
|
|
1550
|
+
collection_formats=_collection_formats,
|
|
1551
|
+
_host=_host,
|
|
1552
|
+
_request_auth=_request_auth
|
|
1553
|
+
)
|
|
1554
|
+
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
|
|
1558
|
+
@validate_call
|
|
1559
|
+
def api_v1_knowledge_enrichment_artifact_get(
|
|
1560
|
+
self,
|
|
1561
|
+
client_id: Optional[StrictStr] = None,
|
|
1562
|
+
is_current: Optional[StrictBool] = None,
|
|
1563
|
+
job_name: Optional[StrictStr] = None,
|
|
1564
|
+
limit: Optional[StrictInt] = None,
|
|
1565
|
+
offset: Optional[StrictInt] = None,
|
|
1566
|
+
status: Optional[StrictStr] = None,
|
|
1567
|
+
subject_entity_id: Optional[StrictStr] = None,
|
|
1568
|
+
_request_timeout: Union[
|
|
1569
|
+
None,
|
|
1570
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1571
|
+
Tuple[
|
|
1572
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1573
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1574
|
+
]
|
|
1575
|
+
] = None,
|
|
1576
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1577
|
+
_content_type: Optional[StrictStr] = None,
|
|
1578
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1579
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1580
|
+
) -> KnowledgeEnrichmentArtifactListResponse:
|
|
1581
|
+
"""Get Many Enrichment Artifacts
|
|
1582
|
+
|
|
1583
|
+
Get enrichment artifacts with filtering
|
|
1584
|
+
|
|
1585
|
+
:param client_id:
|
|
1586
|
+
:type client_id: str
|
|
1587
|
+
:param is_current:
|
|
1588
|
+
:type is_current: bool
|
|
1589
|
+
:param job_name:
|
|
1590
|
+
:type job_name: str
|
|
1591
|
+
:param limit:
|
|
1592
|
+
:type limit: int
|
|
1593
|
+
:param offset:
|
|
1594
|
+
:type offset: int
|
|
1595
|
+
:param status:
|
|
1596
|
+
:type status: str
|
|
1597
|
+
:param subject_entity_id:
|
|
1598
|
+
:type subject_entity_id: str
|
|
1599
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1600
|
+
number provided, it will be total request
|
|
1601
|
+
timeout. It can also be a pair (tuple) of
|
|
1602
|
+
(connection, read) timeouts.
|
|
1603
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1604
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1605
|
+
request; this effectively ignores the
|
|
1606
|
+
authentication in the spec for a single request.
|
|
1607
|
+
:type _request_auth: dict, optional
|
|
1608
|
+
:param _content_type: force content-type for the request.
|
|
1609
|
+
:type _content_type: str, Optional
|
|
1610
|
+
:param _headers: set to override the headers for a single
|
|
1611
|
+
request; this effectively ignores the headers
|
|
1612
|
+
in the spec for a single request.
|
|
1613
|
+
:type _headers: dict, optional
|
|
1614
|
+
:param _host_index: set to override the host_index for a single
|
|
1615
|
+
request; this effectively ignores the host_index
|
|
1616
|
+
in the spec for a single request.
|
|
1617
|
+
:type _host_index: int, optional
|
|
1618
|
+
:return: Returns the result object.
|
|
1619
|
+
""" # noqa: E501
|
|
1620
|
+
|
|
1621
|
+
_param = self._api_v1_knowledge_enrichment_artifact_get_serialize(
|
|
1622
|
+
client_id=client_id,
|
|
1623
|
+
is_current=is_current,
|
|
1624
|
+
job_name=job_name,
|
|
1625
|
+
limit=limit,
|
|
1626
|
+
offset=offset,
|
|
1627
|
+
status=status,
|
|
1628
|
+
subject_entity_id=subject_entity_id,
|
|
1629
|
+
_request_auth=_request_auth,
|
|
1630
|
+
_content_type=_content_type,
|
|
1631
|
+
_headers=_headers,
|
|
1632
|
+
_host_index=_host_index
|
|
1633
|
+
)
|
|
1634
|
+
|
|
1635
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1636
|
+
'200': "KnowledgeEnrichmentArtifactListResponse",
|
|
1637
|
+
'400': "KnowledgeEnrichmentArtifactListResponse",
|
|
1638
|
+
'503': "KnowledgeEnrichmentArtifactListResponse",
|
|
1639
|
+
}
|
|
1640
|
+
response_data = self.api_client.call_api(
|
|
1641
|
+
*_param,
|
|
1642
|
+
_request_timeout=_request_timeout
|
|
1643
|
+
)
|
|
1644
|
+
response_data.read()
|
|
1645
|
+
return self.api_client.response_deserialize(
|
|
1646
|
+
response_data=response_data,
|
|
1647
|
+
response_types_map=_response_types_map,
|
|
1648
|
+
).data
|
|
1649
|
+
|
|
1650
|
+
|
|
1651
|
+
@validate_call
|
|
1652
|
+
def api_v1_knowledge_enrichment_artifact_get_with_http_info(
|
|
1653
|
+
self,
|
|
1654
|
+
client_id: Optional[StrictStr] = None,
|
|
1655
|
+
is_current: Optional[StrictBool] = None,
|
|
1656
|
+
job_name: Optional[StrictStr] = None,
|
|
1657
|
+
limit: Optional[StrictInt] = None,
|
|
1658
|
+
offset: Optional[StrictInt] = None,
|
|
1659
|
+
status: Optional[StrictStr] = None,
|
|
1660
|
+
subject_entity_id: Optional[StrictStr] = None,
|
|
1661
|
+
_request_timeout: Union[
|
|
1662
|
+
None,
|
|
1663
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1664
|
+
Tuple[
|
|
1665
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1666
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1667
|
+
]
|
|
1668
|
+
] = None,
|
|
1669
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1670
|
+
_content_type: Optional[StrictStr] = None,
|
|
1671
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1672
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1673
|
+
) -> ApiResponse[KnowledgeEnrichmentArtifactListResponse]:
|
|
1674
|
+
"""Get Many Enrichment Artifacts
|
|
1675
|
+
|
|
1676
|
+
Get enrichment artifacts with filtering
|
|
1677
|
+
|
|
1678
|
+
:param client_id:
|
|
1679
|
+
:type client_id: str
|
|
1680
|
+
:param is_current:
|
|
1681
|
+
:type is_current: bool
|
|
1682
|
+
:param job_name:
|
|
1683
|
+
:type job_name: str
|
|
1684
|
+
:param limit:
|
|
1685
|
+
:type limit: int
|
|
1686
|
+
:param offset:
|
|
1687
|
+
:type offset: int
|
|
1688
|
+
:param status:
|
|
1689
|
+
:type status: str
|
|
1690
|
+
:param subject_entity_id:
|
|
1691
|
+
:type subject_entity_id: str
|
|
1692
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1693
|
+
number provided, it will be total request
|
|
1694
|
+
timeout. It can also be a pair (tuple) of
|
|
1695
|
+
(connection, read) timeouts.
|
|
1696
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1697
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1698
|
+
request; this effectively ignores the
|
|
1699
|
+
authentication in the spec for a single request.
|
|
1700
|
+
:type _request_auth: dict, optional
|
|
1701
|
+
:param _content_type: force content-type for the request.
|
|
1702
|
+
:type _content_type: str, Optional
|
|
1703
|
+
:param _headers: set to override the headers for a single
|
|
1704
|
+
request; this effectively ignores the headers
|
|
1705
|
+
in the spec for a single request.
|
|
1706
|
+
:type _headers: dict, optional
|
|
1707
|
+
:param _host_index: set to override the host_index for a single
|
|
1708
|
+
request; this effectively ignores the host_index
|
|
1709
|
+
in the spec for a single request.
|
|
1710
|
+
:type _host_index: int, optional
|
|
1711
|
+
:return: Returns the result object.
|
|
1712
|
+
""" # noqa: E501
|
|
1713
|
+
|
|
1714
|
+
_param = self._api_v1_knowledge_enrichment_artifact_get_serialize(
|
|
1715
|
+
client_id=client_id,
|
|
1716
|
+
is_current=is_current,
|
|
1717
|
+
job_name=job_name,
|
|
1718
|
+
limit=limit,
|
|
1719
|
+
offset=offset,
|
|
1720
|
+
status=status,
|
|
1721
|
+
subject_entity_id=subject_entity_id,
|
|
1722
|
+
_request_auth=_request_auth,
|
|
1723
|
+
_content_type=_content_type,
|
|
1724
|
+
_headers=_headers,
|
|
1725
|
+
_host_index=_host_index
|
|
1726
|
+
)
|
|
1727
|
+
|
|
1728
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1729
|
+
'200': "KnowledgeEnrichmentArtifactListResponse",
|
|
1730
|
+
'400': "KnowledgeEnrichmentArtifactListResponse",
|
|
1731
|
+
'503': "KnowledgeEnrichmentArtifactListResponse",
|
|
1732
|
+
}
|
|
1733
|
+
response_data = self.api_client.call_api(
|
|
1734
|
+
*_param,
|
|
1735
|
+
_request_timeout=_request_timeout
|
|
1736
|
+
)
|
|
1737
|
+
response_data.read()
|
|
1738
|
+
return self.api_client.response_deserialize(
|
|
1739
|
+
response_data=response_data,
|
|
1740
|
+
response_types_map=_response_types_map,
|
|
1741
|
+
)
|
|
1742
|
+
|
|
1743
|
+
|
|
1744
|
+
@validate_call
|
|
1745
|
+
def api_v1_knowledge_enrichment_artifact_get_without_preload_content(
|
|
1746
|
+
self,
|
|
1747
|
+
client_id: Optional[StrictStr] = None,
|
|
1748
|
+
is_current: Optional[StrictBool] = None,
|
|
1749
|
+
job_name: Optional[StrictStr] = None,
|
|
1750
|
+
limit: Optional[StrictInt] = None,
|
|
1751
|
+
offset: Optional[StrictInt] = None,
|
|
1752
|
+
status: Optional[StrictStr] = None,
|
|
1753
|
+
subject_entity_id: Optional[StrictStr] = None,
|
|
1754
|
+
_request_timeout: Union[
|
|
1755
|
+
None,
|
|
1756
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1757
|
+
Tuple[
|
|
1758
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1759
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1760
|
+
]
|
|
1761
|
+
] = None,
|
|
1762
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1763
|
+
_content_type: Optional[StrictStr] = None,
|
|
1764
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1765
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1766
|
+
) -> RESTResponseType:
|
|
1767
|
+
"""Get Many Enrichment Artifacts
|
|
1768
|
+
|
|
1769
|
+
Get enrichment artifacts with filtering
|
|
1770
|
+
|
|
1771
|
+
:param client_id:
|
|
1772
|
+
:type client_id: str
|
|
1773
|
+
:param is_current:
|
|
1774
|
+
:type is_current: bool
|
|
1775
|
+
:param job_name:
|
|
1776
|
+
:type job_name: str
|
|
1777
|
+
:param limit:
|
|
1778
|
+
:type limit: int
|
|
1779
|
+
:param offset:
|
|
1780
|
+
:type offset: int
|
|
1781
|
+
:param status:
|
|
1782
|
+
:type status: str
|
|
1783
|
+
:param subject_entity_id:
|
|
1784
|
+
:type subject_entity_id: str
|
|
1785
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1786
|
+
number provided, it will be total request
|
|
1787
|
+
timeout. It can also be a pair (tuple) of
|
|
1788
|
+
(connection, read) timeouts.
|
|
1789
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1790
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1791
|
+
request; this effectively ignores the
|
|
1792
|
+
authentication in the spec for a single request.
|
|
1793
|
+
:type _request_auth: dict, optional
|
|
1794
|
+
:param _content_type: force content-type for the request.
|
|
1795
|
+
:type _content_type: str, Optional
|
|
1796
|
+
:param _headers: set to override the headers for a single
|
|
1797
|
+
request; this effectively ignores the headers
|
|
1798
|
+
in the spec for a single request.
|
|
1799
|
+
:type _headers: dict, optional
|
|
1800
|
+
:param _host_index: set to override the host_index for a single
|
|
1801
|
+
request; this effectively ignores the host_index
|
|
1802
|
+
in the spec for a single request.
|
|
1803
|
+
:type _host_index: int, optional
|
|
1804
|
+
:return: Returns the result object.
|
|
1805
|
+
""" # noqa: E501
|
|
1806
|
+
|
|
1807
|
+
_param = self._api_v1_knowledge_enrichment_artifact_get_serialize(
|
|
1808
|
+
client_id=client_id,
|
|
1809
|
+
is_current=is_current,
|
|
1810
|
+
job_name=job_name,
|
|
1811
|
+
limit=limit,
|
|
1812
|
+
offset=offset,
|
|
1813
|
+
status=status,
|
|
1814
|
+
subject_entity_id=subject_entity_id,
|
|
1815
|
+
_request_auth=_request_auth,
|
|
1816
|
+
_content_type=_content_type,
|
|
1817
|
+
_headers=_headers,
|
|
1818
|
+
_host_index=_host_index
|
|
1819
|
+
)
|
|
1820
|
+
|
|
1821
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1822
|
+
'200': "KnowledgeEnrichmentArtifactListResponse",
|
|
1823
|
+
'400': "KnowledgeEnrichmentArtifactListResponse",
|
|
1824
|
+
'503': "KnowledgeEnrichmentArtifactListResponse",
|
|
1825
|
+
}
|
|
1826
|
+
response_data = self.api_client.call_api(
|
|
1827
|
+
*_param,
|
|
1828
|
+
_request_timeout=_request_timeout
|
|
1829
|
+
)
|
|
1830
|
+
return response_data.response
|
|
1831
|
+
|
|
1832
|
+
|
|
1833
|
+
def _api_v1_knowledge_enrichment_artifact_get_serialize(
|
|
1834
|
+
self,
|
|
1835
|
+
client_id,
|
|
1836
|
+
is_current,
|
|
1837
|
+
job_name,
|
|
1838
|
+
limit,
|
|
1839
|
+
offset,
|
|
1840
|
+
status,
|
|
1841
|
+
subject_entity_id,
|
|
1842
|
+
_request_auth,
|
|
1843
|
+
_content_type,
|
|
1844
|
+
_headers,
|
|
1845
|
+
_host_index,
|
|
1846
|
+
) -> RequestSerialized:
|
|
1847
|
+
|
|
1848
|
+
_host = None
|
|
1849
|
+
|
|
1850
|
+
_collection_formats: Dict[str, str] = {
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
_path_params: Dict[str, str] = {}
|
|
1854
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1855
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1856
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1857
|
+
_files: Dict[
|
|
1858
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1859
|
+
] = {}
|
|
1860
|
+
_body_params: Optional[bytes] = None
|
|
1861
|
+
|
|
1862
|
+
# process the path parameters
|
|
1863
|
+
# process the query parameters
|
|
1864
|
+
if client_id is not None:
|
|
1865
|
+
|
|
1866
|
+
_query_params.append(('client_id', client_id))
|
|
1867
|
+
|
|
1868
|
+
if is_current is not None:
|
|
1869
|
+
|
|
1870
|
+
_query_params.append(('is_current', is_current))
|
|
1871
|
+
|
|
1872
|
+
if job_name is not None:
|
|
1873
|
+
|
|
1874
|
+
_query_params.append(('job_name', job_name))
|
|
1875
|
+
|
|
1876
|
+
if limit is not None:
|
|
1877
|
+
|
|
1878
|
+
_query_params.append(('limit', limit))
|
|
1879
|
+
|
|
1880
|
+
if offset is not None:
|
|
1881
|
+
|
|
1882
|
+
_query_params.append(('offset', offset))
|
|
1883
|
+
|
|
1884
|
+
if status is not None:
|
|
1885
|
+
|
|
1886
|
+
_query_params.append(('status', status))
|
|
1887
|
+
|
|
1888
|
+
if subject_entity_id is not None:
|
|
1889
|
+
|
|
1890
|
+
_query_params.append(('subject_entity_id', subject_entity_id))
|
|
1891
|
+
|
|
1892
|
+
# process the header parameters
|
|
1893
|
+
# process the form parameters
|
|
1894
|
+
# process the body parameter
|
|
1895
|
+
|
|
1896
|
+
|
|
1897
|
+
# set the HTTP header `Accept`
|
|
1898
|
+
if 'Accept' not in _header_params:
|
|
1899
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1900
|
+
[
|
|
1901
|
+
'application/json'
|
|
1902
|
+
]
|
|
1903
|
+
)
|
|
1904
|
+
|
|
1905
|
+
|
|
1906
|
+
# authentication setting
|
|
1907
|
+
_auth_settings: List[str] = [
|
|
1908
|
+
'TokenAuth'
|
|
1909
|
+
]
|
|
1910
|
+
|
|
1911
|
+
return self.api_client.param_serialize(
|
|
1912
|
+
method='GET',
|
|
1913
|
+
resource_path='/api/v1/knowledge/enrichment/artifact',
|
|
1914
|
+
path_params=_path_params,
|
|
1915
|
+
query_params=_query_params,
|
|
1916
|
+
header_params=_header_params,
|
|
1917
|
+
body=_body_params,
|
|
1918
|
+
post_params=_form_params,
|
|
1919
|
+
files=_files,
|
|
1920
|
+
auth_settings=_auth_settings,
|
|
1921
|
+
collection_formats=_collection_formats,
|
|
1922
|
+
_host=_host,
|
|
1923
|
+
_request_auth=_request_auth
|
|
1924
|
+
)
|
|
1925
|
+
|
|
1926
|
+
|
|
1927
|
+
|
|
1928
|
+
|
|
1929
|
+
@validate_call
|
|
1930
|
+
def api_v1_knowledge_enrichment_artifact_post(
|
|
1931
|
+
self,
|
|
1932
|
+
request: Annotated[KnowledgeEnrichmentArtifactCreateRequest, Field(description="Body")],
|
|
1933
|
+
_request_timeout: Union[
|
|
1934
|
+
None,
|
|
1935
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1936
|
+
Tuple[
|
|
1937
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1938
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1939
|
+
]
|
|
1940
|
+
] = None,
|
|
1941
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1942
|
+
_content_type: Optional[StrictStr] = None,
|
|
1943
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1944
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1945
|
+
) -> KnowledgeEnrichmentArtifactResponse:
|
|
1946
|
+
"""Create Enrichment Artifact
|
|
1947
|
+
|
|
1948
|
+
Create a new enrichment artifact for async knowledge processing
|
|
1949
|
+
|
|
1950
|
+
:param request: Body (required)
|
|
1951
|
+
:type request: KnowledgeEnrichmentArtifactCreateRequest
|
|
1952
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1953
|
+
number provided, it will be total request
|
|
1954
|
+
timeout. It can also be a pair (tuple) of
|
|
1955
|
+
(connection, read) timeouts.
|
|
1956
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1957
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1958
|
+
request; this effectively ignores the
|
|
1959
|
+
authentication in the spec for a single request.
|
|
1960
|
+
:type _request_auth: dict, optional
|
|
1961
|
+
:param _content_type: force content-type for the request.
|
|
1962
|
+
:type _content_type: str, Optional
|
|
1963
|
+
:param _headers: set to override the headers for a single
|
|
1964
|
+
request; this effectively ignores the headers
|
|
1965
|
+
in the spec for a single request.
|
|
1966
|
+
:type _headers: dict, optional
|
|
1967
|
+
:param _host_index: set to override the host_index for a single
|
|
1968
|
+
request; this effectively ignores the host_index
|
|
1969
|
+
in the spec for a single request.
|
|
1970
|
+
:type _host_index: int, optional
|
|
1971
|
+
:return: Returns the result object.
|
|
1972
|
+
""" # noqa: E501
|
|
1973
|
+
|
|
1974
|
+
_param = self._api_v1_knowledge_enrichment_artifact_post_serialize(
|
|
1975
|
+
request=request,
|
|
1976
|
+
_request_auth=_request_auth,
|
|
1977
|
+
_content_type=_content_type,
|
|
1978
|
+
_headers=_headers,
|
|
1979
|
+
_host_index=_host_index
|
|
1980
|
+
)
|
|
1981
|
+
|
|
1982
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1983
|
+
'201': "KnowledgeEnrichmentArtifactResponse",
|
|
1984
|
+
'400': "KnowledgeEnrichmentArtifactResponse",
|
|
1985
|
+
'503': "KnowledgeEnrichmentArtifactResponse",
|
|
1986
|
+
}
|
|
1987
|
+
response_data = self.api_client.call_api(
|
|
1988
|
+
*_param,
|
|
1989
|
+
_request_timeout=_request_timeout
|
|
1990
|
+
)
|
|
1991
|
+
response_data.read()
|
|
1992
|
+
return self.api_client.response_deserialize(
|
|
1993
|
+
response_data=response_data,
|
|
1994
|
+
response_types_map=_response_types_map,
|
|
1995
|
+
).data
|
|
1996
|
+
|
|
1997
|
+
|
|
1998
|
+
@validate_call
|
|
1999
|
+
def api_v1_knowledge_enrichment_artifact_post_with_http_info(
|
|
2000
|
+
self,
|
|
2001
|
+
request: Annotated[KnowledgeEnrichmentArtifactCreateRequest, Field(description="Body")],
|
|
2002
|
+
_request_timeout: Union[
|
|
2003
|
+
None,
|
|
2004
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2005
|
+
Tuple[
|
|
2006
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2007
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2008
|
+
]
|
|
2009
|
+
] = None,
|
|
2010
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2011
|
+
_content_type: Optional[StrictStr] = None,
|
|
2012
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2013
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2014
|
+
) -> ApiResponse[KnowledgeEnrichmentArtifactResponse]:
|
|
2015
|
+
"""Create Enrichment Artifact
|
|
2016
|
+
|
|
2017
|
+
Create a new enrichment artifact for async knowledge processing
|
|
2018
|
+
|
|
2019
|
+
:param request: Body (required)
|
|
2020
|
+
:type request: KnowledgeEnrichmentArtifactCreateRequest
|
|
2021
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2022
|
+
number provided, it will be total request
|
|
2023
|
+
timeout. It can also be a pair (tuple) of
|
|
2024
|
+
(connection, read) timeouts.
|
|
2025
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2026
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2027
|
+
request; this effectively ignores the
|
|
2028
|
+
authentication in the spec for a single request.
|
|
2029
|
+
:type _request_auth: dict, optional
|
|
2030
|
+
:param _content_type: force content-type for the request.
|
|
2031
|
+
:type _content_type: str, Optional
|
|
2032
|
+
:param _headers: set to override the headers for a single
|
|
2033
|
+
request; this effectively ignores the headers
|
|
2034
|
+
in the spec for a single request.
|
|
2035
|
+
:type _headers: dict, optional
|
|
2036
|
+
:param _host_index: set to override the host_index for a single
|
|
2037
|
+
request; this effectively ignores the host_index
|
|
2038
|
+
in the spec for a single request.
|
|
2039
|
+
:type _host_index: int, optional
|
|
2040
|
+
:return: Returns the result object.
|
|
2041
|
+
""" # noqa: E501
|
|
2042
|
+
|
|
2043
|
+
_param = self._api_v1_knowledge_enrichment_artifact_post_serialize(
|
|
2044
|
+
request=request,
|
|
2045
|
+
_request_auth=_request_auth,
|
|
2046
|
+
_content_type=_content_type,
|
|
2047
|
+
_headers=_headers,
|
|
2048
|
+
_host_index=_host_index
|
|
2049
|
+
)
|
|
2050
|
+
|
|
2051
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2052
|
+
'201': "KnowledgeEnrichmentArtifactResponse",
|
|
2053
|
+
'400': "KnowledgeEnrichmentArtifactResponse",
|
|
2054
|
+
'503': "KnowledgeEnrichmentArtifactResponse",
|
|
2055
|
+
}
|
|
2056
|
+
response_data = self.api_client.call_api(
|
|
2057
|
+
*_param,
|
|
2058
|
+
_request_timeout=_request_timeout
|
|
2059
|
+
)
|
|
2060
|
+
response_data.read()
|
|
2061
|
+
return self.api_client.response_deserialize(
|
|
2062
|
+
response_data=response_data,
|
|
2063
|
+
response_types_map=_response_types_map,
|
|
2064
|
+
)
|
|
2065
|
+
|
|
2066
|
+
|
|
2067
|
+
@validate_call
|
|
2068
|
+
def api_v1_knowledge_enrichment_artifact_post_without_preload_content(
|
|
2069
|
+
self,
|
|
2070
|
+
request: Annotated[KnowledgeEnrichmentArtifactCreateRequest, Field(description="Body")],
|
|
2071
|
+
_request_timeout: Union[
|
|
2072
|
+
None,
|
|
2073
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2074
|
+
Tuple[
|
|
2075
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2076
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2077
|
+
]
|
|
2078
|
+
] = None,
|
|
2079
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2080
|
+
_content_type: Optional[StrictStr] = None,
|
|
2081
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2082
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2083
|
+
) -> RESTResponseType:
|
|
2084
|
+
"""Create Enrichment Artifact
|
|
2085
|
+
|
|
2086
|
+
Create a new enrichment artifact for async knowledge processing
|
|
2087
|
+
|
|
2088
|
+
:param request: Body (required)
|
|
2089
|
+
:type request: KnowledgeEnrichmentArtifactCreateRequest
|
|
2090
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2091
|
+
number provided, it will be total request
|
|
2092
|
+
timeout. It can also be a pair (tuple) of
|
|
2093
|
+
(connection, read) timeouts.
|
|
2094
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2095
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2096
|
+
request; this effectively ignores the
|
|
2097
|
+
authentication in the spec for a single request.
|
|
2098
|
+
:type _request_auth: dict, optional
|
|
2099
|
+
:param _content_type: force content-type for the request.
|
|
2100
|
+
:type _content_type: str, Optional
|
|
2101
|
+
:param _headers: set to override the headers for a single
|
|
2102
|
+
request; this effectively ignores the headers
|
|
2103
|
+
in the spec for a single request.
|
|
2104
|
+
:type _headers: dict, optional
|
|
2105
|
+
:param _host_index: set to override the host_index for a single
|
|
2106
|
+
request; this effectively ignores the host_index
|
|
2107
|
+
in the spec for a single request.
|
|
2108
|
+
:type _host_index: int, optional
|
|
2109
|
+
:return: Returns the result object.
|
|
2110
|
+
""" # noqa: E501
|
|
2111
|
+
|
|
2112
|
+
_param = self._api_v1_knowledge_enrichment_artifact_post_serialize(
|
|
2113
|
+
request=request,
|
|
2114
|
+
_request_auth=_request_auth,
|
|
2115
|
+
_content_type=_content_type,
|
|
2116
|
+
_headers=_headers,
|
|
2117
|
+
_host_index=_host_index
|
|
2118
|
+
)
|
|
2119
|
+
|
|
2120
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2121
|
+
'201': "KnowledgeEnrichmentArtifactResponse",
|
|
2122
|
+
'400': "KnowledgeEnrichmentArtifactResponse",
|
|
2123
|
+
'503': "KnowledgeEnrichmentArtifactResponse",
|
|
2124
|
+
}
|
|
2125
|
+
response_data = self.api_client.call_api(
|
|
2126
|
+
*_param,
|
|
2127
|
+
_request_timeout=_request_timeout
|
|
2128
|
+
)
|
|
2129
|
+
return response_data.response
|
|
2130
|
+
|
|
2131
|
+
|
|
2132
|
+
def _api_v1_knowledge_enrichment_artifact_post_serialize(
|
|
2133
|
+
self,
|
|
2134
|
+
request,
|
|
2135
|
+
_request_auth,
|
|
2136
|
+
_content_type,
|
|
2137
|
+
_headers,
|
|
2138
|
+
_host_index,
|
|
2139
|
+
) -> RequestSerialized:
|
|
2140
|
+
|
|
2141
|
+
_host = None
|
|
2142
|
+
|
|
2143
|
+
_collection_formats: Dict[str, str] = {
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
_path_params: Dict[str, str] = {}
|
|
2147
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2148
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2149
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2150
|
+
_files: Dict[
|
|
2151
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2152
|
+
] = {}
|
|
2153
|
+
_body_params: Optional[bytes] = None
|
|
2154
|
+
|
|
2155
|
+
# process the path parameters
|
|
2156
|
+
# process the query parameters
|
|
2157
|
+
# process the header parameters
|
|
2158
|
+
# process the form parameters
|
|
2159
|
+
# process the body parameter
|
|
2160
|
+
if request is not None:
|
|
2161
|
+
_body_params = request
|
|
2162
|
+
|
|
2163
|
+
|
|
2164
|
+
# set the HTTP header `Accept`
|
|
2165
|
+
if 'Accept' not in _header_params:
|
|
2166
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2167
|
+
[
|
|
2168
|
+
'application/json'
|
|
2169
|
+
]
|
|
2170
|
+
)
|
|
2171
|
+
|
|
2172
|
+
# set the HTTP header `Content-Type`
|
|
2173
|
+
if _content_type:
|
|
2174
|
+
_header_params['Content-Type'] = _content_type
|
|
2175
|
+
else:
|
|
2176
|
+
_default_content_type = (
|
|
2177
|
+
self.api_client.select_header_content_type(
|
|
2178
|
+
[
|
|
2179
|
+
'application/json'
|
|
2180
|
+
]
|
|
2181
|
+
)
|
|
2182
|
+
)
|
|
2183
|
+
if _default_content_type is not None:
|
|
2184
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2185
|
+
|
|
2186
|
+
# authentication setting
|
|
2187
|
+
_auth_settings: List[str] = [
|
|
2188
|
+
'TokenAuth'
|
|
2189
|
+
]
|
|
2190
|
+
|
|
2191
|
+
return self.api_client.param_serialize(
|
|
2192
|
+
method='POST',
|
|
2193
|
+
resource_path='/api/v1/knowledge/enrichment/artifact',
|
|
2194
|
+
path_params=_path_params,
|
|
2195
|
+
query_params=_query_params,
|
|
2196
|
+
header_params=_header_params,
|
|
2197
|
+
body=_body_params,
|
|
2198
|
+
post_params=_form_params,
|
|
2199
|
+
files=_files,
|
|
2200
|
+
auth_settings=_auth_settings,
|
|
2201
|
+
collection_formats=_collection_formats,
|
|
2202
|
+
_host=_host,
|
|
2203
|
+
_request_auth=_request_auth
|
|
2204
|
+
)
|
|
2205
|
+
|
|
2206
|
+
|
|
2207
|
+
|
|
2208
|
+
|
|
2209
|
+
@validate_call
|
|
2210
|
+
def api_v1_knowledge_entity_get(
|
|
2211
|
+
self,
|
|
2212
|
+
client_id: Optional[StrictStr] = None,
|
|
2213
|
+
kind: Optional[StrictStr] = None,
|
|
2214
|
+
limit: Optional[StrictInt] = None,
|
|
2215
|
+
offset: Optional[StrictInt] = None,
|
|
2216
|
+
schema_id: Optional[StrictStr] = None,
|
|
2217
|
+
_request_timeout: Union[
|
|
2218
|
+
None,
|
|
2219
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2220
|
+
Tuple[
|
|
2221
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2222
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2223
|
+
]
|
|
2224
|
+
] = None,
|
|
2225
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2226
|
+
_content_type: Optional[StrictStr] = None,
|
|
2227
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2228
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2229
|
+
) -> KnowledgeEntityGetManyResponse:
|
|
2230
|
+
"""Get Knowledge Entities
|
|
2231
|
+
|
|
2232
|
+
Get one or many knowledge Entities, up to 10mb per request
|
|
2233
|
+
|
|
2234
|
+
:param client_id:
|
|
2235
|
+
:type client_id: str
|
|
2236
|
+
:param kind:
|
|
2237
|
+
:type kind: str
|
|
2238
|
+
:param limit:
|
|
2239
|
+
:type limit: int
|
|
2240
|
+
:param offset:
|
|
2241
|
+
:type offset: int
|
|
2242
|
+
:param schema_id:
|
|
2243
|
+
:type schema_id: str
|
|
2244
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2245
|
+
number provided, it will be total request
|
|
2246
|
+
timeout. It can also be a pair (tuple) of
|
|
2247
|
+
(connection, read) timeouts.
|
|
2248
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2249
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2250
|
+
request; this effectively ignores the
|
|
2251
|
+
authentication in the spec for a single request.
|
|
2252
|
+
:type _request_auth: dict, optional
|
|
2253
|
+
:param _content_type: force content-type for the request.
|
|
2254
|
+
:type _content_type: str, Optional
|
|
2255
|
+
:param _headers: set to override the headers for a single
|
|
2256
|
+
request; this effectively ignores the headers
|
|
2257
|
+
in the spec for a single request.
|
|
2258
|
+
:type _headers: dict, optional
|
|
2259
|
+
:param _host_index: set to override the host_index for a single
|
|
2260
|
+
request; this effectively ignores the host_index
|
|
2261
|
+
in the spec for a single request.
|
|
2262
|
+
:type _host_index: int, optional
|
|
2263
|
+
:return: Returns the result object.
|
|
2264
|
+
""" # noqa: E501
|
|
2265
|
+
|
|
2266
|
+
_param = self._api_v1_knowledge_entity_get_serialize(
|
|
2267
|
+
client_id=client_id,
|
|
2268
|
+
kind=kind,
|
|
2269
|
+
limit=limit,
|
|
2270
|
+
offset=offset,
|
|
2271
|
+
schema_id=schema_id,
|
|
2272
|
+
_request_auth=_request_auth,
|
|
2273
|
+
_content_type=_content_type,
|
|
2274
|
+
_headers=_headers,
|
|
2275
|
+
_host_index=_host_index
|
|
2276
|
+
)
|
|
2277
|
+
|
|
2278
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2279
|
+
'200': "KnowledgeEntityGetManyResponse",
|
|
2280
|
+
'400': "KnowledgeEntityGetManyResponse",
|
|
2281
|
+
'503': "KnowledgeEntityGetManyResponse",
|
|
2282
|
+
}
|
|
2283
|
+
response_data = self.api_client.call_api(
|
|
2284
|
+
*_param,
|
|
2285
|
+
_request_timeout=_request_timeout
|
|
2286
|
+
)
|
|
2287
|
+
response_data.read()
|
|
2288
|
+
return self.api_client.response_deserialize(
|
|
2289
|
+
response_data=response_data,
|
|
2290
|
+
response_types_map=_response_types_map,
|
|
2291
|
+
).data
|
|
2292
|
+
|
|
2293
|
+
|
|
2294
|
+
@validate_call
|
|
2295
|
+
def api_v1_knowledge_entity_get_with_http_info(
|
|
2296
|
+
self,
|
|
2297
|
+
client_id: Optional[StrictStr] = None,
|
|
2298
|
+
kind: Optional[StrictStr] = None,
|
|
2299
|
+
limit: Optional[StrictInt] = None,
|
|
2300
|
+
offset: Optional[StrictInt] = None,
|
|
2301
|
+
schema_id: Optional[StrictStr] = None,
|
|
2302
|
+
_request_timeout: Union[
|
|
2303
|
+
None,
|
|
2304
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2305
|
+
Tuple[
|
|
2306
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2307
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2308
|
+
]
|
|
2309
|
+
] = None,
|
|
2310
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2311
|
+
_content_type: Optional[StrictStr] = None,
|
|
2312
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2313
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2314
|
+
) -> ApiResponse[KnowledgeEntityGetManyResponse]:
|
|
2315
|
+
"""Get Knowledge Entities
|
|
2316
|
+
|
|
2317
|
+
Get one or many knowledge Entities, up to 10mb per request
|
|
2318
|
+
|
|
2319
|
+
:param client_id:
|
|
2320
|
+
:type client_id: str
|
|
2321
|
+
:param kind:
|
|
2322
|
+
:type kind: str
|
|
2323
|
+
:param limit:
|
|
2324
|
+
:type limit: int
|
|
2325
|
+
:param offset:
|
|
2326
|
+
:type offset: int
|
|
2327
|
+
:param schema_id:
|
|
2328
|
+
:type schema_id: str
|
|
2329
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2330
|
+
number provided, it will be total request
|
|
2331
|
+
timeout. It can also be a pair (tuple) of
|
|
2332
|
+
(connection, read) timeouts.
|
|
2333
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2334
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2335
|
+
request; this effectively ignores the
|
|
2336
|
+
authentication in the spec for a single request.
|
|
2337
|
+
:type _request_auth: dict, optional
|
|
2338
|
+
:param _content_type: force content-type for the request.
|
|
2339
|
+
:type _content_type: str, Optional
|
|
2340
|
+
:param _headers: set to override the headers for a single
|
|
2341
|
+
request; this effectively ignores the headers
|
|
2342
|
+
in the spec for a single request.
|
|
2343
|
+
:type _headers: dict, optional
|
|
2344
|
+
:param _host_index: set to override the host_index for a single
|
|
2345
|
+
request; this effectively ignores the host_index
|
|
2346
|
+
in the spec for a single request.
|
|
2347
|
+
:type _host_index: int, optional
|
|
2348
|
+
:return: Returns the result object.
|
|
2349
|
+
""" # noqa: E501
|
|
2350
|
+
|
|
2351
|
+
_param = self._api_v1_knowledge_entity_get_serialize(
|
|
2352
|
+
client_id=client_id,
|
|
2353
|
+
kind=kind,
|
|
2354
|
+
limit=limit,
|
|
2355
|
+
offset=offset,
|
|
2356
|
+
schema_id=schema_id,
|
|
2357
|
+
_request_auth=_request_auth,
|
|
2358
|
+
_content_type=_content_type,
|
|
2359
|
+
_headers=_headers,
|
|
2360
|
+
_host_index=_host_index
|
|
2361
|
+
)
|
|
2362
|
+
|
|
2363
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2364
|
+
'200': "KnowledgeEntityGetManyResponse",
|
|
2365
|
+
'400': "KnowledgeEntityGetManyResponse",
|
|
2366
|
+
'503': "KnowledgeEntityGetManyResponse",
|
|
2367
|
+
}
|
|
2368
|
+
response_data = self.api_client.call_api(
|
|
2369
|
+
*_param,
|
|
2370
|
+
_request_timeout=_request_timeout
|
|
2371
|
+
)
|
|
2372
|
+
response_data.read()
|
|
2373
|
+
return self.api_client.response_deserialize(
|
|
2374
|
+
response_data=response_data,
|
|
2375
|
+
response_types_map=_response_types_map,
|
|
2376
|
+
)
|
|
2377
|
+
|
|
2378
|
+
|
|
2379
|
+
@validate_call
|
|
2380
|
+
def api_v1_knowledge_entity_get_without_preload_content(
|
|
2381
|
+
self,
|
|
2382
|
+
client_id: Optional[StrictStr] = None,
|
|
2383
|
+
kind: Optional[StrictStr] = None,
|
|
2384
|
+
limit: Optional[StrictInt] = None,
|
|
2385
|
+
offset: Optional[StrictInt] = None,
|
|
2386
|
+
schema_id: Optional[StrictStr] = None,
|
|
2387
|
+
_request_timeout: Union[
|
|
2388
|
+
None,
|
|
2389
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2390
|
+
Tuple[
|
|
2391
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2392
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2393
|
+
]
|
|
2394
|
+
] = None,
|
|
2395
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2396
|
+
_content_type: Optional[StrictStr] = None,
|
|
2397
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2398
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2399
|
+
) -> RESTResponseType:
|
|
2400
|
+
"""Get Knowledge Entities
|
|
2401
|
+
|
|
2402
|
+
Get one or many knowledge Entities, up to 10mb per request
|
|
2403
|
+
|
|
2404
|
+
:param client_id:
|
|
2405
|
+
:type client_id: str
|
|
2406
|
+
:param kind:
|
|
2407
|
+
:type kind: str
|
|
2408
|
+
:param limit:
|
|
2409
|
+
:type limit: int
|
|
2410
|
+
:param offset:
|
|
2411
|
+
:type offset: int
|
|
2412
|
+
:param schema_id:
|
|
2413
|
+
:type schema_id: str
|
|
2414
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2415
|
+
number provided, it will be total request
|
|
2416
|
+
timeout. It can also be a pair (tuple) of
|
|
2417
|
+
(connection, read) timeouts.
|
|
2418
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2419
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2420
|
+
request; this effectively ignores the
|
|
2421
|
+
authentication in the spec for a single request.
|
|
2422
|
+
:type _request_auth: dict, optional
|
|
2423
|
+
:param _content_type: force content-type for the request.
|
|
2424
|
+
:type _content_type: str, Optional
|
|
2425
|
+
:param _headers: set to override the headers for a single
|
|
2426
|
+
request; this effectively ignores the headers
|
|
2427
|
+
in the spec for a single request.
|
|
2428
|
+
:type _headers: dict, optional
|
|
2429
|
+
:param _host_index: set to override the host_index for a single
|
|
2430
|
+
request; this effectively ignores the host_index
|
|
2431
|
+
in the spec for a single request.
|
|
2432
|
+
:type _host_index: int, optional
|
|
2433
|
+
:return: Returns the result object.
|
|
2434
|
+
""" # noqa: E501
|
|
2435
|
+
|
|
2436
|
+
_param = self._api_v1_knowledge_entity_get_serialize(
|
|
2437
|
+
client_id=client_id,
|
|
2438
|
+
kind=kind,
|
|
2439
|
+
limit=limit,
|
|
2440
|
+
offset=offset,
|
|
2441
|
+
schema_id=schema_id,
|
|
2442
|
+
_request_auth=_request_auth,
|
|
2443
|
+
_content_type=_content_type,
|
|
2444
|
+
_headers=_headers,
|
|
2445
|
+
_host_index=_host_index
|
|
2446
|
+
)
|
|
2447
|
+
|
|
2448
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2449
|
+
'200': "KnowledgeEntityGetManyResponse",
|
|
2450
|
+
'400': "KnowledgeEntityGetManyResponse",
|
|
2451
|
+
'503': "KnowledgeEntityGetManyResponse",
|
|
2452
|
+
}
|
|
2453
|
+
response_data = self.api_client.call_api(
|
|
2454
|
+
*_param,
|
|
2455
|
+
_request_timeout=_request_timeout
|
|
2456
|
+
)
|
|
2457
|
+
return response_data.response
|
|
2458
|
+
|
|
2459
|
+
|
|
2460
|
+
def _api_v1_knowledge_entity_get_serialize(
|
|
2461
|
+
self,
|
|
2462
|
+
client_id,
|
|
2463
|
+
kind,
|
|
2464
|
+
limit,
|
|
2465
|
+
offset,
|
|
2466
|
+
schema_id,
|
|
2467
|
+
_request_auth,
|
|
2468
|
+
_content_type,
|
|
2469
|
+
_headers,
|
|
2470
|
+
_host_index,
|
|
2471
|
+
) -> RequestSerialized:
|
|
2472
|
+
|
|
2473
|
+
_host = None
|
|
2474
|
+
|
|
2475
|
+
_collection_formats: Dict[str, str] = {
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2478
|
+
_path_params: Dict[str, str] = {}
|
|
2479
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2480
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2481
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2482
|
+
_files: Dict[
|
|
2483
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2484
|
+
] = {}
|
|
2485
|
+
_body_params: Optional[bytes] = None
|
|
2486
|
+
|
|
2487
|
+
# process the path parameters
|
|
2488
|
+
# process the query parameters
|
|
2489
|
+
if client_id is not None:
|
|
2490
|
+
|
|
2491
|
+
_query_params.append(('clientId', client_id))
|
|
2492
|
+
|
|
2493
|
+
if kind is not None:
|
|
2494
|
+
|
|
2495
|
+
_query_params.append(('kind', kind))
|
|
2496
|
+
|
|
2497
|
+
if limit is not None:
|
|
2498
|
+
|
|
2499
|
+
_query_params.append(('limit', limit))
|
|
2500
|
+
|
|
2501
|
+
if offset is not None:
|
|
2502
|
+
|
|
2503
|
+
_query_params.append(('offset', offset))
|
|
2504
|
+
|
|
2505
|
+
if schema_id is not None:
|
|
2506
|
+
|
|
2507
|
+
_query_params.append(('schemaId', schema_id))
|
|
2508
|
+
|
|
2509
|
+
# process the header parameters
|
|
2510
|
+
# process the form parameters
|
|
2511
|
+
# process the body parameter
|
|
2512
|
+
|
|
2513
|
+
|
|
2514
|
+
# set the HTTP header `Accept`
|
|
2515
|
+
if 'Accept' not in _header_params:
|
|
2516
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2517
|
+
[
|
|
2518
|
+
'application/json'
|
|
2519
|
+
]
|
|
2520
|
+
)
|
|
2521
|
+
|
|
2522
|
+
|
|
2523
|
+
# authentication setting
|
|
2524
|
+
_auth_settings: List[str] = [
|
|
2525
|
+
'TokenAuth'
|
|
2526
|
+
]
|
|
2527
|
+
|
|
2528
|
+
return self.api_client.param_serialize(
|
|
2529
|
+
method='GET',
|
|
2530
|
+
resource_path='/api/v1/knowledge/entity/',
|
|
2531
|
+
path_params=_path_params,
|
|
2532
|
+
query_params=_query_params,
|
|
2533
|
+
header_params=_header_params,
|
|
2534
|
+
body=_body_params,
|
|
2535
|
+
post_params=_form_params,
|
|
2536
|
+
files=_files,
|
|
2537
|
+
auth_settings=_auth_settings,
|
|
2538
|
+
collection_formats=_collection_formats,
|
|
2539
|
+
_host=_host,
|
|
2540
|
+
_request_auth=_request_auth
|
|
2541
|
+
)
|
|
2542
|
+
|
|
2543
|
+
|
|
2544
|
+
|
|
2545
|
+
|
|
2546
|
+
@validate_call
|
|
2547
|
+
def api_v1_knowledge_entity_post(
|
|
2548
|
+
self,
|
|
2549
|
+
request: Annotated[KnowledgeEntityCreateRequest, Field(description="Body")],
|
|
2550
|
+
_request_timeout: Union[
|
|
2551
|
+
None,
|
|
2552
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2553
|
+
Tuple[
|
|
2554
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2555
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2556
|
+
]
|
|
2557
|
+
] = None,
|
|
2558
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2559
|
+
_content_type: Optional[StrictStr] = None,
|
|
2560
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2561
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2562
|
+
) -> KnowledgeEntityCreateResponse:
|
|
2563
|
+
"""Create Knowledge Entities
|
|
2564
|
+
|
|
2565
|
+
Create one or many knowledge Entities, up to 10mb per request
|
|
2566
|
+
|
|
2567
|
+
:param request: Body (required)
|
|
2568
|
+
:type request: KnowledgeEntityCreateRequest
|
|
2569
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2570
|
+
number provided, it will be total request
|
|
2571
|
+
timeout. It can also be a pair (tuple) of
|
|
2572
|
+
(connection, read) timeouts.
|
|
2573
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2574
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2575
|
+
request; this effectively ignores the
|
|
2576
|
+
authentication in the spec for a single request.
|
|
2577
|
+
:type _request_auth: dict, optional
|
|
2578
|
+
:param _content_type: force content-type for the request.
|
|
2579
|
+
:type _content_type: str, Optional
|
|
2580
|
+
:param _headers: set to override the headers for a single
|
|
2581
|
+
request; this effectively ignores the headers
|
|
2582
|
+
in the spec for a single request.
|
|
2583
|
+
:type _headers: dict, optional
|
|
2584
|
+
:param _host_index: set to override the host_index for a single
|
|
2585
|
+
request; this effectively ignores the host_index
|
|
2586
|
+
in the spec for a single request.
|
|
2587
|
+
:type _host_index: int, optional
|
|
2588
|
+
:return: Returns the result object.
|
|
2589
|
+
""" # noqa: E501
|
|
2590
|
+
|
|
2591
|
+
_param = self._api_v1_knowledge_entity_post_serialize(
|
|
2592
|
+
request=request,
|
|
2593
|
+
_request_auth=_request_auth,
|
|
2594
|
+
_content_type=_content_type,
|
|
2595
|
+
_headers=_headers,
|
|
2596
|
+
_host_index=_host_index
|
|
2597
|
+
)
|
|
2598
|
+
|
|
2599
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2600
|
+
'200': "KnowledgeEntityCreateResponse",
|
|
2601
|
+
'400': "KnowledgeEntityCreateResponse",
|
|
2602
|
+
'503': "KnowledgeEntityCreateResponse",
|
|
2603
|
+
}
|
|
2604
|
+
response_data = self.api_client.call_api(
|
|
2605
|
+
*_param,
|
|
2606
|
+
_request_timeout=_request_timeout
|
|
2607
|
+
)
|
|
2608
|
+
response_data.read()
|
|
2609
|
+
return self.api_client.response_deserialize(
|
|
2610
|
+
response_data=response_data,
|
|
2611
|
+
response_types_map=_response_types_map,
|
|
2612
|
+
).data
|
|
2613
|
+
|
|
2614
|
+
|
|
2615
|
+
@validate_call
|
|
2616
|
+
def api_v1_knowledge_entity_post_with_http_info(
|
|
2617
|
+
self,
|
|
2618
|
+
request: Annotated[KnowledgeEntityCreateRequest, Field(description="Body")],
|
|
2619
|
+
_request_timeout: Union[
|
|
2620
|
+
None,
|
|
2621
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2622
|
+
Tuple[
|
|
2623
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2624
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2625
|
+
]
|
|
2626
|
+
] = None,
|
|
2627
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2628
|
+
_content_type: Optional[StrictStr] = None,
|
|
2629
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2630
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2631
|
+
) -> ApiResponse[KnowledgeEntityCreateResponse]:
|
|
2632
|
+
"""Create Knowledge Entities
|
|
2633
|
+
|
|
2634
|
+
Create one or many knowledge Entities, up to 10mb per request
|
|
2635
|
+
|
|
2636
|
+
:param request: Body (required)
|
|
2637
|
+
:type request: KnowledgeEntityCreateRequest
|
|
2638
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2639
|
+
number provided, it will be total request
|
|
2640
|
+
timeout. It can also be a pair (tuple) of
|
|
2641
|
+
(connection, read) timeouts.
|
|
2642
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2643
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2644
|
+
request; this effectively ignores the
|
|
2645
|
+
authentication in the spec for a single request.
|
|
2646
|
+
:type _request_auth: dict, optional
|
|
2647
|
+
:param _content_type: force content-type for the request.
|
|
2648
|
+
:type _content_type: str, Optional
|
|
2649
|
+
:param _headers: set to override the headers for a single
|
|
2650
|
+
request; this effectively ignores the headers
|
|
2651
|
+
in the spec for a single request.
|
|
2652
|
+
:type _headers: dict, optional
|
|
2653
|
+
:param _host_index: set to override the host_index for a single
|
|
2654
|
+
request; this effectively ignores the host_index
|
|
2655
|
+
in the spec for a single request.
|
|
2656
|
+
:type _host_index: int, optional
|
|
2657
|
+
:return: Returns the result object.
|
|
2658
|
+
""" # noqa: E501
|
|
2659
|
+
|
|
2660
|
+
_param = self._api_v1_knowledge_entity_post_serialize(
|
|
2661
|
+
request=request,
|
|
2662
|
+
_request_auth=_request_auth,
|
|
2663
|
+
_content_type=_content_type,
|
|
2664
|
+
_headers=_headers,
|
|
2665
|
+
_host_index=_host_index
|
|
2666
|
+
)
|
|
2667
|
+
|
|
2668
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2669
|
+
'200': "KnowledgeEntityCreateResponse",
|
|
2670
|
+
'400': "KnowledgeEntityCreateResponse",
|
|
2671
|
+
'503': "KnowledgeEntityCreateResponse",
|
|
2672
|
+
}
|
|
2673
|
+
response_data = self.api_client.call_api(
|
|
2674
|
+
*_param,
|
|
2675
|
+
_request_timeout=_request_timeout
|
|
2676
|
+
)
|
|
2677
|
+
response_data.read()
|
|
2678
|
+
return self.api_client.response_deserialize(
|
|
2679
|
+
response_data=response_data,
|
|
2680
|
+
response_types_map=_response_types_map,
|
|
2681
|
+
)
|
|
2682
|
+
|
|
2683
|
+
|
|
2684
|
+
@validate_call
|
|
2685
|
+
def api_v1_knowledge_entity_post_without_preload_content(
|
|
2686
|
+
self,
|
|
2687
|
+
request: Annotated[KnowledgeEntityCreateRequest, Field(description="Body")],
|
|
2688
|
+
_request_timeout: Union[
|
|
2689
|
+
None,
|
|
2690
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2691
|
+
Tuple[
|
|
2692
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2693
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2694
|
+
]
|
|
2695
|
+
] = None,
|
|
2696
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2697
|
+
_content_type: Optional[StrictStr] = None,
|
|
2698
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2699
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2700
|
+
) -> RESTResponseType:
|
|
2701
|
+
"""Create Knowledge Entities
|
|
2702
|
+
|
|
2703
|
+
Create one or many knowledge Entities, up to 10mb per request
|
|
2704
|
+
|
|
2705
|
+
:param request: Body (required)
|
|
2706
|
+
:type request: KnowledgeEntityCreateRequest
|
|
2707
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2708
|
+
number provided, it will be total request
|
|
2709
|
+
timeout. It can also be a pair (tuple) of
|
|
2710
|
+
(connection, read) timeouts.
|
|
2711
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2712
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2713
|
+
request; this effectively ignores the
|
|
2714
|
+
authentication in the spec for a single request.
|
|
2715
|
+
:type _request_auth: dict, optional
|
|
2716
|
+
:param _content_type: force content-type for the request.
|
|
2717
|
+
:type _content_type: str, Optional
|
|
2718
|
+
:param _headers: set to override the headers for a single
|
|
2719
|
+
request; this effectively ignores the headers
|
|
2720
|
+
in the spec for a single request.
|
|
2721
|
+
:type _headers: dict, optional
|
|
2722
|
+
:param _host_index: set to override the host_index for a single
|
|
2723
|
+
request; this effectively ignores the host_index
|
|
2724
|
+
in the spec for a single request.
|
|
2725
|
+
:type _host_index: int, optional
|
|
2726
|
+
:return: Returns the result object.
|
|
2727
|
+
""" # noqa: E501
|
|
2728
|
+
|
|
2729
|
+
_param = self._api_v1_knowledge_entity_post_serialize(
|
|
2730
|
+
request=request,
|
|
2731
|
+
_request_auth=_request_auth,
|
|
2732
|
+
_content_type=_content_type,
|
|
2733
|
+
_headers=_headers,
|
|
2734
|
+
_host_index=_host_index
|
|
2735
|
+
)
|
|
2736
|
+
|
|
2737
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2738
|
+
'200': "KnowledgeEntityCreateResponse",
|
|
2739
|
+
'400': "KnowledgeEntityCreateResponse",
|
|
2740
|
+
'503': "KnowledgeEntityCreateResponse",
|
|
2741
|
+
}
|
|
2742
|
+
response_data = self.api_client.call_api(
|
|
2743
|
+
*_param,
|
|
2744
|
+
_request_timeout=_request_timeout
|
|
2745
|
+
)
|
|
2746
|
+
return response_data.response
|
|
2747
|
+
|
|
2748
|
+
|
|
2749
|
+
def _api_v1_knowledge_entity_post_serialize(
|
|
2750
|
+
self,
|
|
2751
|
+
request,
|
|
2752
|
+
_request_auth,
|
|
2753
|
+
_content_type,
|
|
2754
|
+
_headers,
|
|
2755
|
+
_host_index,
|
|
2756
|
+
) -> RequestSerialized:
|
|
2757
|
+
|
|
2758
|
+
_host = None
|
|
2759
|
+
|
|
2760
|
+
_collection_formats: Dict[str, str] = {
|
|
2761
|
+
}
|
|
2762
|
+
|
|
2763
|
+
_path_params: Dict[str, str] = {}
|
|
2764
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2765
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2766
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2767
|
+
_files: Dict[
|
|
2768
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2769
|
+
] = {}
|
|
2770
|
+
_body_params: Optional[bytes] = None
|
|
2771
|
+
|
|
2772
|
+
# process the path parameters
|
|
2773
|
+
# process the query parameters
|
|
2774
|
+
# process the header parameters
|
|
2775
|
+
# process the form parameters
|
|
2776
|
+
# process the body parameter
|
|
2777
|
+
if request is not None:
|
|
2778
|
+
_body_params = request
|
|
2779
|
+
|
|
2780
|
+
|
|
2781
|
+
# set the HTTP header `Accept`
|
|
2782
|
+
if 'Accept' not in _header_params:
|
|
2783
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2784
|
+
[
|
|
2785
|
+
'application/json'
|
|
2786
|
+
]
|
|
2787
|
+
)
|
|
2788
|
+
|
|
2789
|
+
# set the HTTP header `Content-Type`
|
|
2790
|
+
if _content_type:
|
|
2791
|
+
_header_params['Content-Type'] = _content_type
|
|
2792
|
+
else:
|
|
2793
|
+
_default_content_type = (
|
|
2794
|
+
self.api_client.select_header_content_type(
|
|
2795
|
+
[
|
|
2796
|
+
'application/json'
|
|
2797
|
+
]
|
|
2798
|
+
)
|
|
2799
|
+
)
|
|
2800
|
+
if _default_content_type is not None:
|
|
2801
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2802
|
+
|
|
2803
|
+
# authentication setting
|
|
2804
|
+
_auth_settings: List[str] = [
|
|
2805
|
+
'TokenAuth'
|
|
2806
|
+
]
|
|
2807
|
+
|
|
2808
|
+
return self.api_client.param_serialize(
|
|
2809
|
+
method='POST',
|
|
2810
|
+
resource_path='/api/v1/knowledge/entity/',
|
|
2811
|
+
path_params=_path_params,
|
|
2812
|
+
query_params=_query_params,
|
|
2813
|
+
header_params=_header_params,
|
|
2814
|
+
body=_body_params,
|
|
2815
|
+
post_params=_form_params,
|
|
2816
|
+
files=_files,
|
|
2817
|
+
auth_settings=_auth_settings,
|
|
2818
|
+
collection_formats=_collection_formats,
|
|
2819
|
+
_host=_host,
|
|
2820
|
+
_request_auth=_request_auth
|
|
2821
|
+
)
|
|
2822
|
+
|
|
2823
|
+
|
|
2824
|
+
|
|
2825
|
+
|
|
2826
|
+
@validate_call
|
|
2827
|
+
def api_v1_knowledge_ingest_raw_post(
|
|
2828
|
+
self,
|
|
2829
|
+
request: Annotated[KnowledgeIngestRawRequest, Field(description="Body")],
|
|
2830
|
+
_request_timeout: Union[
|
|
2831
|
+
None,
|
|
2832
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2833
|
+
Tuple[
|
|
2834
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2835
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2836
|
+
]
|
|
2837
|
+
] = None,
|
|
2838
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2839
|
+
_content_type: Optional[StrictStr] = None,
|
|
2840
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2841
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2842
|
+
) -> KnowledgeIngestRawResponse:
|
|
2843
|
+
"""Ingest raw source payloads
|
|
2844
|
+
|
|
2845
|
+
Append raw payloads into knowledge.ingest_raw (deduped by conflict key)
|
|
2846
|
+
|
|
2847
|
+
:param request: Body (required)
|
|
2848
|
+
:type request: KnowledgeIngestRawRequest
|
|
2849
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2850
|
+
number provided, it will be total request
|
|
2851
|
+
timeout. It can also be a pair (tuple) of
|
|
2852
|
+
(connection, read) timeouts.
|
|
2853
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2854
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2855
|
+
request; this effectively ignores the
|
|
2856
|
+
authentication in the spec for a single request.
|
|
2857
|
+
:type _request_auth: dict, optional
|
|
2858
|
+
:param _content_type: force content-type for the request.
|
|
2859
|
+
:type _content_type: str, Optional
|
|
2860
|
+
:param _headers: set to override the headers for a single
|
|
2861
|
+
request; this effectively ignores the headers
|
|
2862
|
+
in the spec for a single request.
|
|
2863
|
+
:type _headers: dict, optional
|
|
2864
|
+
:param _host_index: set to override the host_index for a single
|
|
2865
|
+
request; this effectively ignores the host_index
|
|
2866
|
+
in the spec for a single request.
|
|
2867
|
+
:type _host_index: int, optional
|
|
2868
|
+
:return: Returns the result object.
|
|
2869
|
+
""" # noqa: E501
|
|
2870
|
+
|
|
2871
|
+
_param = self._api_v1_knowledge_ingest_raw_post_serialize(
|
|
2872
|
+
request=request,
|
|
2873
|
+
_request_auth=_request_auth,
|
|
2874
|
+
_content_type=_content_type,
|
|
2875
|
+
_headers=_headers,
|
|
2876
|
+
_host_index=_host_index
|
|
2877
|
+
)
|
|
2878
|
+
|
|
2879
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2880
|
+
'200': "KnowledgeIngestRawResponse",
|
|
2881
|
+
'400': "KnowledgeIngestRawResponse",
|
|
2882
|
+
'503': "KnowledgeIngestRawResponse",
|
|
2883
|
+
}
|
|
2884
|
+
response_data = self.api_client.call_api(
|
|
2885
|
+
*_param,
|
|
2886
|
+
_request_timeout=_request_timeout
|
|
2887
|
+
)
|
|
2888
|
+
response_data.read()
|
|
2889
|
+
return self.api_client.response_deserialize(
|
|
2890
|
+
response_data=response_data,
|
|
2891
|
+
response_types_map=_response_types_map,
|
|
2892
|
+
).data
|
|
2893
|
+
|
|
2894
|
+
|
|
2895
|
+
@validate_call
|
|
2896
|
+
def api_v1_knowledge_ingest_raw_post_with_http_info(
|
|
2897
|
+
self,
|
|
2898
|
+
request: Annotated[KnowledgeIngestRawRequest, Field(description="Body")],
|
|
2899
|
+
_request_timeout: Union[
|
|
2900
|
+
None,
|
|
2901
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2902
|
+
Tuple[
|
|
2903
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2904
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2905
|
+
]
|
|
2906
|
+
] = None,
|
|
2907
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2908
|
+
_content_type: Optional[StrictStr] = None,
|
|
2909
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2910
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2911
|
+
) -> ApiResponse[KnowledgeIngestRawResponse]:
|
|
2912
|
+
"""Ingest raw source payloads
|
|
2913
|
+
|
|
2914
|
+
Append raw payloads into knowledge.ingest_raw (deduped by conflict key)
|
|
2915
|
+
|
|
2916
|
+
:param request: Body (required)
|
|
2917
|
+
:type request: KnowledgeIngestRawRequest
|
|
2918
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2919
|
+
number provided, it will be total request
|
|
2920
|
+
timeout. It can also be a pair (tuple) of
|
|
2921
|
+
(connection, read) timeouts.
|
|
2922
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2923
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2924
|
+
request; this effectively ignores the
|
|
2925
|
+
authentication in the spec for a single request.
|
|
2926
|
+
:type _request_auth: dict, optional
|
|
2927
|
+
:param _content_type: force content-type for the request.
|
|
2928
|
+
:type _content_type: str, Optional
|
|
2929
|
+
:param _headers: set to override the headers for a single
|
|
2930
|
+
request; this effectively ignores the headers
|
|
2931
|
+
in the spec for a single request.
|
|
2932
|
+
:type _headers: dict, optional
|
|
2933
|
+
:param _host_index: set to override the host_index for a single
|
|
2934
|
+
request; this effectively ignores the host_index
|
|
2935
|
+
in the spec for a single request.
|
|
2936
|
+
:type _host_index: int, optional
|
|
2937
|
+
:return: Returns the result object.
|
|
2938
|
+
""" # noqa: E501
|
|
2939
|
+
|
|
2940
|
+
_param = self._api_v1_knowledge_ingest_raw_post_serialize(
|
|
2941
|
+
request=request,
|
|
2942
|
+
_request_auth=_request_auth,
|
|
2943
|
+
_content_type=_content_type,
|
|
2944
|
+
_headers=_headers,
|
|
2945
|
+
_host_index=_host_index
|
|
2946
|
+
)
|
|
2947
|
+
|
|
2948
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2949
|
+
'200': "KnowledgeIngestRawResponse",
|
|
2950
|
+
'400': "KnowledgeIngestRawResponse",
|
|
2951
|
+
'503': "KnowledgeIngestRawResponse",
|
|
2952
|
+
}
|
|
2953
|
+
response_data = self.api_client.call_api(
|
|
2954
|
+
*_param,
|
|
2955
|
+
_request_timeout=_request_timeout
|
|
2956
|
+
)
|
|
2957
|
+
response_data.read()
|
|
2958
|
+
return self.api_client.response_deserialize(
|
|
2959
|
+
response_data=response_data,
|
|
2960
|
+
response_types_map=_response_types_map,
|
|
2961
|
+
)
|
|
2962
|
+
|
|
2963
|
+
|
|
2964
|
+
@validate_call
|
|
2965
|
+
def api_v1_knowledge_ingest_raw_post_without_preload_content(
|
|
2966
|
+
self,
|
|
2967
|
+
request: Annotated[KnowledgeIngestRawRequest, Field(description="Body")],
|
|
2968
|
+
_request_timeout: Union[
|
|
2969
|
+
None,
|
|
2970
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2971
|
+
Tuple[
|
|
2972
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2973
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2974
|
+
]
|
|
2975
|
+
] = None,
|
|
2976
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2977
|
+
_content_type: Optional[StrictStr] = None,
|
|
2978
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2979
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2980
|
+
) -> RESTResponseType:
|
|
2981
|
+
"""Ingest raw source payloads
|
|
2982
|
+
|
|
2983
|
+
Append raw payloads into knowledge.ingest_raw (deduped by conflict key)
|
|
2984
|
+
|
|
2985
|
+
:param request: Body (required)
|
|
2986
|
+
:type request: KnowledgeIngestRawRequest
|
|
2987
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2988
|
+
number provided, it will be total request
|
|
2989
|
+
timeout. It can also be a pair (tuple) of
|
|
2990
|
+
(connection, read) timeouts.
|
|
2991
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2992
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2993
|
+
request; this effectively ignores the
|
|
2994
|
+
authentication in the spec for a single request.
|
|
2995
|
+
:type _request_auth: dict, optional
|
|
2996
|
+
:param _content_type: force content-type for the request.
|
|
2997
|
+
:type _content_type: str, Optional
|
|
2998
|
+
:param _headers: set to override the headers for a single
|
|
2999
|
+
request; this effectively ignores the headers
|
|
3000
|
+
in the spec for a single request.
|
|
3001
|
+
:type _headers: dict, optional
|
|
3002
|
+
:param _host_index: set to override the host_index for a single
|
|
3003
|
+
request; this effectively ignores the host_index
|
|
3004
|
+
in the spec for a single request.
|
|
3005
|
+
:type _host_index: int, optional
|
|
3006
|
+
:return: Returns the result object.
|
|
3007
|
+
""" # noqa: E501
|
|
3008
|
+
|
|
3009
|
+
_param = self._api_v1_knowledge_ingest_raw_post_serialize(
|
|
3010
|
+
request=request,
|
|
3011
|
+
_request_auth=_request_auth,
|
|
3012
|
+
_content_type=_content_type,
|
|
3013
|
+
_headers=_headers,
|
|
3014
|
+
_host_index=_host_index
|
|
3015
|
+
)
|
|
3016
|
+
|
|
3017
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3018
|
+
'200': "KnowledgeIngestRawResponse",
|
|
3019
|
+
'400': "KnowledgeIngestRawResponse",
|
|
3020
|
+
'503': "KnowledgeIngestRawResponse",
|
|
3021
|
+
}
|
|
3022
|
+
response_data = self.api_client.call_api(
|
|
3023
|
+
*_param,
|
|
3024
|
+
_request_timeout=_request_timeout
|
|
3025
|
+
)
|
|
3026
|
+
return response_data.response
|
|
3027
|
+
|
|
3028
|
+
|
|
3029
|
+
def _api_v1_knowledge_ingest_raw_post_serialize(
|
|
3030
|
+
self,
|
|
3031
|
+
request,
|
|
3032
|
+
_request_auth,
|
|
3033
|
+
_content_type,
|
|
3034
|
+
_headers,
|
|
3035
|
+
_host_index,
|
|
3036
|
+
) -> RequestSerialized:
|
|
3037
|
+
|
|
3038
|
+
_host = None
|
|
3039
|
+
|
|
3040
|
+
_collection_formats: Dict[str, str] = {
|
|
3041
|
+
}
|
|
3042
|
+
|
|
3043
|
+
_path_params: Dict[str, str] = {}
|
|
3044
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3045
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3046
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3047
|
+
_files: Dict[
|
|
3048
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3049
|
+
] = {}
|
|
3050
|
+
_body_params: Optional[bytes] = None
|
|
3051
|
+
|
|
3052
|
+
# process the path parameters
|
|
3053
|
+
# process the query parameters
|
|
3054
|
+
# process the header parameters
|
|
3055
|
+
# process the form parameters
|
|
3056
|
+
# process the body parameter
|
|
3057
|
+
if request is not None:
|
|
3058
|
+
_body_params = request
|
|
3059
|
+
|
|
3060
|
+
|
|
3061
|
+
# set the HTTP header `Accept`
|
|
3062
|
+
if 'Accept' not in _header_params:
|
|
3063
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3064
|
+
[
|
|
3065
|
+
'application/json'
|
|
3066
|
+
]
|
|
3067
|
+
)
|
|
3068
|
+
|
|
3069
|
+
# set the HTTP header `Content-Type`
|
|
3070
|
+
if _content_type:
|
|
3071
|
+
_header_params['Content-Type'] = _content_type
|
|
3072
|
+
else:
|
|
3073
|
+
_default_content_type = (
|
|
3074
|
+
self.api_client.select_header_content_type(
|
|
3075
|
+
[
|
|
3076
|
+
'application/json'
|
|
3077
|
+
]
|
|
3078
|
+
)
|
|
3079
|
+
)
|
|
3080
|
+
if _default_content_type is not None:
|
|
3081
|
+
_header_params['Content-Type'] = _default_content_type
|
|
3082
|
+
|
|
3083
|
+
# authentication setting
|
|
3084
|
+
_auth_settings: List[str] = [
|
|
3085
|
+
'TokenAuth'
|
|
3086
|
+
]
|
|
3087
|
+
|
|
3088
|
+
return self.api_client.param_serialize(
|
|
3089
|
+
method='POST',
|
|
3090
|
+
resource_path='/api/v1/knowledge/ingest-raw/',
|
|
3091
|
+
path_params=_path_params,
|
|
3092
|
+
query_params=_query_params,
|
|
3093
|
+
header_params=_header_params,
|
|
3094
|
+
body=_body_params,
|
|
3095
|
+
post_params=_form_params,
|
|
3096
|
+
files=_files,
|
|
3097
|
+
auth_settings=_auth_settings,
|
|
3098
|
+
collection_formats=_collection_formats,
|
|
3099
|
+
_host=_host,
|
|
3100
|
+
_request_auth=_request_auth
|
|
3101
|
+
)
|
|
3102
|
+
|
|
3103
|
+
|
|
3104
|
+
|
|
3105
|
+
|
|
3106
|
+
@validate_call
|
|
3107
|
+
def api_v1_knowledge_kind_get(
|
|
3108
|
+
self,
|
|
3109
|
+
_request_timeout: Union[
|
|
3110
|
+
None,
|
|
3111
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3112
|
+
Tuple[
|
|
3113
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3114
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3115
|
+
]
|
|
3116
|
+
] = None,
|
|
3117
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3118
|
+
_content_type: Optional[StrictStr] = None,
|
|
3119
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3120
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3121
|
+
) -> KnowledgeKindResponse:
|
|
3122
|
+
"""Get Knowledge Kinds
|
|
3123
|
+
|
|
3124
|
+
Knowledge kinds are an enum of the valid knowledg entity 'kind' field
|
|
3125
|
+
|
|
3126
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3127
|
+
number provided, it will be total request
|
|
3128
|
+
timeout. It can also be a pair (tuple) of
|
|
3129
|
+
(connection, read) timeouts.
|
|
3130
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3131
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3132
|
+
request; this effectively ignores the
|
|
3133
|
+
authentication in the spec for a single request.
|
|
3134
|
+
:type _request_auth: dict, optional
|
|
3135
|
+
:param _content_type: force content-type for the request.
|
|
3136
|
+
:type _content_type: str, Optional
|
|
3137
|
+
:param _headers: set to override the headers for a single
|
|
3138
|
+
request; this effectively ignores the headers
|
|
3139
|
+
in the spec for a single request.
|
|
3140
|
+
:type _headers: dict, optional
|
|
3141
|
+
:param _host_index: set to override the host_index for a single
|
|
3142
|
+
request; this effectively ignores the host_index
|
|
3143
|
+
in the spec for a single request.
|
|
3144
|
+
:type _host_index: int, optional
|
|
3145
|
+
:return: Returns the result object.
|
|
3146
|
+
""" # noqa: E501
|
|
3147
|
+
|
|
3148
|
+
_param = self._api_v1_knowledge_kind_get_serialize(
|
|
3149
|
+
_request_auth=_request_auth,
|
|
3150
|
+
_content_type=_content_type,
|
|
3151
|
+
_headers=_headers,
|
|
3152
|
+
_host_index=_host_index
|
|
3153
|
+
)
|
|
3154
|
+
|
|
3155
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3156
|
+
'200': "KnowledgeKindResponse",
|
|
3157
|
+
'400': "KnowledgeKindResponse",
|
|
3158
|
+
'503': "KnowledgeKindResponse",
|
|
3159
|
+
}
|
|
3160
|
+
response_data = self.api_client.call_api(
|
|
3161
|
+
*_param,
|
|
3162
|
+
_request_timeout=_request_timeout
|
|
3163
|
+
)
|
|
3164
|
+
response_data.read()
|
|
3165
|
+
return self.api_client.response_deserialize(
|
|
3166
|
+
response_data=response_data,
|
|
3167
|
+
response_types_map=_response_types_map,
|
|
3168
|
+
).data
|
|
3169
|
+
|
|
3170
|
+
|
|
3171
|
+
@validate_call
|
|
3172
|
+
def api_v1_knowledge_kind_get_with_http_info(
|
|
3173
|
+
self,
|
|
3174
|
+
_request_timeout: Union[
|
|
3175
|
+
None,
|
|
3176
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3177
|
+
Tuple[
|
|
3178
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3179
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3180
|
+
]
|
|
3181
|
+
] = None,
|
|
3182
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3183
|
+
_content_type: Optional[StrictStr] = None,
|
|
3184
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3185
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3186
|
+
) -> ApiResponse[KnowledgeKindResponse]:
|
|
3187
|
+
"""Get Knowledge Kinds
|
|
3188
|
+
|
|
3189
|
+
Knowledge kinds are an enum of the valid knowledg entity 'kind' field
|
|
3190
|
+
|
|
3191
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3192
|
+
number provided, it will be total request
|
|
3193
|
+
timeout. It can also be a pair (tuple) of
|
|
3194
|
+
(connection, read) timeouts.
|
|
3195
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3196
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3197
|
+
request; this effectively ignores the
|
|
3198
|
+
authentication in the spec for a single request.
|
|
3199
|
+
:type _request_auth: dict, optional
|
|
3200
|
+
:param _content_type: force content-type for the request.
|
|
3201
|
+
:type _content_type: str, Optional
|
|
3202
|
+
:param _headers: set to override the headers for a single
|
|
3203
|
+
request; this effectively ignores the headers
|
|
3204
|
+
in the spec for a single request.
|
|
3205
|
+
:type _headers: dict, optional
|
|
3206
|
+
:param _host_index: set to override the host_index for a single
|
|
3207
|
+
request; this effectively ignores the host_index
|
|
3208
|
+
in the spec for a single request.
|
|
3209
|
+
:type _host_index: int, optional
|
|
3210
|
+
:return: Returns the result object.
|
|
3211
|
+
""" # noqa: E501
|
|
3212
|
+
|
|
3213
|
+
_param = self._api_v1_knowledge_kind_get_serialize(
|
|
3214
|
+
_request_auth=_request_auth,
|
|
3215
|
+
_content_type=_content_type,
|
|
3216
|
+
_headers=_headers,
|
|
3217
|
+
_host_index=_host_index
|
|
3218
|
+
)
|
|
3219
|
+
|
|
3220
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3221
|
+
'200': "KnowledgeKindResponse",
|
|
3222
|
+
'400': "KnowledgeKindResponse",
|
|
3223
|
+
'503': "KnowledgeKindResponse",
|
|
3224
|
+
}
|
|
3225
|
+
response_data = self.api_client.call_api(
|
|
3226
|
+
*_param,
|
|
3227
|
+
_request_timeout=_request_timeout
|
|
3228
|
+
)
|
|
3229
|
+
response_data.read()
|
|
3230
|
+
return self.api_client.response_deserialize(
|
|
3231
|
+
response_data=response_data,
|
|
3232
|
+
response_types_map=_response_types_map,
|
|
3233
|
+
)
|
|
3234
|
+
|
|
3235
|
+
|
|
3236
|
+
@validate_call
|
|
3237
|
+
def api_v1_knowledge_kind_get_without_preload_content(
|
|
3238
|
+
self,
|
|
3239
|
+
_request_timeout: Union[
|
|
3240
|
+
None,
|
|
3241
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3242
|
+
Tuple[
|
|
3243
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3244
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3245
|
+
]
|
|
3246
|
+
] = None,
|
|
3247
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3248
|
+
_content_type: Optional[StrictStr] = None,
|
|
3249
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3250
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3251
|
+
) -> RESTResponseType:
|
|
3252
|
+
"""Get Knowledge Kinds
|
|
3253
|
+
|
|
3254
|
+
Knowledge kinds are an enum of the valid knowledg entity 'kind' field
|
|
3255
|
+
|
|
3256
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3257
|
+
number provided, it will be total request
|
|
3258
|
+
timeout. It can also be a pair (tuple) of
|
|
3259
|
+
(connection, read) timeouts.
|
|
3260
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3261
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3262
|
+
request; this effectively ignores the
|
|
3263
|
+
authentication in the spec for a single request.
|
|
3264
|
+
:type _request_auth: dict, optional
|
|
3265
|
+
:param _content_type: force content-type for the request.
|
|
3266
|
+
:type _content_type: str, Optional
|
|
3267
|
+
:param _headers: set to override the headers for a single
|
|
3268
|
+
request; this effectively ignores the headers
|
|
3269
|
+
in the spec for a single request.
|
|
3270
|
+
:type _headers: dict, optional
|
|
3271
|
+
:param _host_index: set to override the host_index for a single
|
|
3272
|
+
request; this effectively ignores the host_index
|
|
3273
|
+
in the spec for a single request.
|
|
3274
|
+
:type _host_index: int, optional
|
|
3275
|
+
:return: Returns the result object.
|
|
3276
|
+
""" # noqa: E501
|
|
3277
|
+
|
|
3278
|
+
_param = self._api_v1_knowledge_kind_get_serialize(
|
|
3279
|
+
_request_auth=_request_auth,
|
|
3280
|
+
_content_type=_content_type,
|
|
3281
|
+
_headers=_headers,
|
|
3282
|
+
_host_index=_host_index
|
|
3283
|
+
)
|
|
3284
|
+
|
|
3285
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3286
|
+
'200': "KnowledgeKindResponse",
|
|
3287
|
+
'400': "KnowledgeKindResponse",
|
|
3288
|
+
'503': "KnowledgeKindResponse",
|
|
3289
|
+
}
|
|
3290
|
+
response_data = self.api_client.call_api(
|
|
3291
|
+
*_param,
|
|
3292
|
+
_request_timeout=_request_timeout
|
|
3293
|
+
)
|
|
3294
|
+
return response_data.response
|
|
3295
|
+
|
|
3296
|
+
|
|
3297
|
+
def _api_v1_knowledge_kind_get_serialize(
|
|
3298
|
+
self,
|
|
3299
|
+
_request_auth,
|
|
3300
|
+
_content_type,
|
|
3301
|
+
_headers,
|
|
3302
|
+
_host_index,
|
|
3303
|
+
) -> RequestSerialized:
|
|
3304
|
+
|
|
3305
|
+
_host = None
|
|
3306
|
+
|
|
3307
|
+
_collection_formats: Dict[str, str] = {
|
|
3308
|
+
}
|
|
3309
|
+
|
|
3310
|
+
_path_params: Dict[str, str] = {}
|
|
3311
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3312
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3313
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3314
|
+
_files: Dict[
|
|
3315
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3316
|
+
] = {}
|
|
3317
|
+
_body_params: Optional[bytes] = None
|
|
3318
|
+
|
|
3319
|
+
# process the path parameters
|
|
3320
|
+
# process the query parameters
|
|
3321
|
+
# process the header parameters
|
|
3322
|
+
# process the form parameters
|
|
3323
|
+
# process the body parameter
|
|
3324
|
+
|
|
3325
|
+
|
|
3326
|
+
# set the HTTP header `Accept`
|
|
3327
|
+
if 'Accept' not in _header_params:
|
|
3328
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3329
|
+
[
|
|
3330
|
+
'application/json'
|
|
3331
|
+
]
|
|
3332
|
+
)
|
|
3333
|
+
|
|
3334
|
+
|
|
3335
|
+
# authentication setting
|
|
3336
|
+
_auth_settings: List[str] = [
|
|
3337
|
+
'TokenAuth',
|
|
3338
|
+
'ApiKeyAuth'
|
|
3339
|
+
]
|
|
3340
|
+
|
|
3341
|
+
return self.api_client.param_serialize(
|
|
3342
|
+
method='GET',
|
|
3343
|
+
resource_path='/api/v1/knowledge/kind/',
|
|
3344
|
+
path_params=_path_params,
|
|
3345
|
+
query_params=_query_params,
|
|
3346
|
+
header_params=_header_params,
|
|
3347
|
+
body=_body_params,
|
|
3348
|
+
post_params=_form_params,
|
|
3349
|
+
files=_files,
|
|
3350
|
+
auth_settings=_auth_settings,
|
|
3351
|
+
collection_formats=_collection_formats,
|
|
3352
|
+
_host=_host,
|
|
3353
|
+
_request_auth=_request_auth
|
|
3354
|
+
)
|
|
3355
|
+
|
|
3356
|
+
|
|
3357
|
+
|
|
3358
|
+
|
|
3359
|
+
@validate_call
|
|
3360
|
+
def api_v1_knowledge_schema_get(
|
|
3361
|
+
self,
|
|
3362
|
+
limit: Annotated[Optional[StrictInt], Field(description="Maximum number of records")] = None,
|
|
3363
|
+
offset: Annotated[Optional[StrictInt], Field(description="Record offset")] = None,
|
|
3364
|
+
_request_timeout: Union[
|
|
3365
|
+
None,
|
|
3366
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3367
|
+
Tuple[
|
|
3368
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3369
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3370
|
+
]
|
|
3371
|
+
] = None,
|
|
3372
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3373
|
+
_content_type: Optional[StrictStr] = None,
|
|
3374
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3375
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3376
|
+
) -> KnowledgeEntitySchemasResponse:
|
|
3377
|
+
"""Get Knowledge Entity Schemas
|
|
3378
|
+
|
|
3379
|
+
|
|
3380
|
+
:param limit: Maximum number of records
|
|
3381
|
+
:type limit: int
|
|
3382
|
+
:param offset: Record offset
|
|
3383
|
+
:type offset: int
|
|
3384
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3385
|
+
number provided, it will be total request
|
|
3386
|
+
timeout. It can also be a pair (tuple) of
|
|
3387
|
+
(connection, read) timeouts.
|
|
3388
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3389
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3390
|
+
request; this effectively ignores the
|
|
3391
|
+
authentication in the spec for a single request.
|
|
3392
|
+
:type _request_auth: dict, optional
|
|
3393
|
+
:param _content_type: force content-type for the request.
|
|
3394
|
+
:type _content_type: str, Optional
|
|
3395
|
+
:param _headers: set to override the headers for a single
|
|
3396
|
+
request; this effectively ignores the headers
|
|
3397
|
+
in the spec for a single request.
|
|
3398
|
+
:type _headers: dict, optional
|
|
3399
|
+
:param _host_index: set to override the host_index for a single
|
|
3400
|
+
request; this effectively ignores the host_index
|
|
3401
|
+
in the spec for a single request.
|
|
3402
|
+
:type _host_index: int, optional
|
|
3403
|
+
:return: Returns the result object.
|
|
3404
|
+
""" # noqa: E501
|
|
3405
|
+
|
|
3406
|
+
_param = self._api_v1_knowledge_schema_get_serialize(
|
|
3407
|
+
limit=limit,
|
|
3408
|
+
offset=offset,
|
|
3409
|
+
_request_auth=_request_auth,
|
|
3410
|
+
_content_type=_content_type,
|
|
3411
|
+
_headers=_headers,
|
|
3412
|
+
_host_index=_host_index
|
|
3413
|
+
)
|
|
3414
|
+
|
|
3415
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3416
|
+
'200': "KnowledgeEntitySchemasResponse",
|
|
3417
|
+
'400': "KnowledgeEntitySchemasResponse",
|
|
3418
|
+
'503': "KnowledgeEntitySchemasResponse",
|
|
3419
|
+
}
|
|
3420
|
+
response_data = self.api_client.call_api(
|
|
3421
|
+
*_param,
|
|
3422
|
+
_request_timeout=_request_timeout
|
|
3423
|
+
)
|
|
3424
|
+
response_data.read()
|
|
3425
|
+
return self.api_client.response_deserialize(
|
|
3426
|
+
response_data=response_data,
|
|
3427
|
+
response_types_map=_response_types_map,
|
|
3428
|
+
).data
|
|
3429
|
+
|
|
3430
|
+
|
|
3431
|
+
@validate_call
|
|
3432
|
+
def api_v1_knowledge_schema_get_with_http_info(
|
|
3433
|
+
self,
|
|
3434
|
+
limit: Annotated[Optional[StrictInt], Field(description="Maximum number of records")] = None,
|
|
3435
|
+
offset: Annotated[Optional[StrictInt], Field(description="Record offset")] = None,
|
|
3436
|
+
_request_timeout: Union[
|
|
3437
|
+
None,
|
|
3438
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3439
|
+
Tuple[
|
|
3440
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3441
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3442
|
+
]
|
|
3443
|
+
] = None,
|
|
3444
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3445
|
+
_content_type: Optional[StrictStr] = None,
|
|
3446
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3447
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3448
|
+
) -> ApiResponse[KnowledgeEntitySchemasResponse]:
|
|
3449
|
+
"""Get Knowledge Entity Schemas
|
|
3450
|
+
|
|
3451
|
+
|
|
3452
|
+
:param limit: Maximum number of records
|
|
3453
|
+
:type limit: int
|
|
3454
|
+
:param offset: Record offset
|
|
3455
|
+
:type offset: int
|
|
3456
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3457
|
+
number provided, it will be total request
|
|
3458
|
+
timeout. It can also be a pair (tuple) of
|
|
3459
|
+
(connection, read) timeouts.
|
|
3460
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3461
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3462
|
+
request; this effectively ignores the
|
|
3463
|
+
authentication in the spec for a single request.
|
|
3464
|
+
:type _request_auth: dict, optional
|
|
3465
|
+
:param _content_type: force content-type for the request.
|
|
3466
|
+
:type _content_type: str, Optional
|
|
3467
|
+
:param _headers: set to override the headers for a single
|
|
3468
|
+
request; this effectively ignores the headers
|
|
3469
|
+
in the spec for a single request.
|
|
3470
|
+
:type _headers: dict, optional
|
|
3471
|
+
:param _host_index: set to override the host_index for a single
|
|
3472
|
+
request; this effectively ignores the host_index
|
|
3473
|
+
in the spec for a single request.
|
|
3474
|
+
:type _host_index: int, optional
|
|
3475
|
+
:return: Returns the result object.
|
|
3476
|
+
""" # noqa: E501
|
|
3477
|
+
|
|
3478
|
+
_param = self._api_v1_knowledge_schema_get_serialize(
|
|
3479
|
+
limit=limit,
|
|
3480
|
+
offset=offset,
|
|
3481
|
+
_request_auth=_request_auth,
|
|
3482
|
+
_content_type=_content_type,
|
|
3483
|
+
_headers=_headers,
|
|
3484
|
+
_host_index=_host_index
|
|
3485
|
+
)
|
|
3486
|
+
|
|
3487
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3488
|
+
'200': "KnowledgeEntitySchemasResponse",
|
|
3489
|
+
'400': "KnowledgeEntitySchemasResponse",
|
|
3490
|
+
'503': "KnowledgeEntitySchemasResponse",
|
|
3491
|
+
}
|
|
3492
|
+
response_data = self.api_client.call_api(
|
|
3493
|
+
*_param,
|
|
3494
|
+
_request_timeout=_request_timeout
|
|
3495
|
+
)
|
|
3496
|
+
response_data.read()
|
|
3497
|
+
return self.api_client.response_deserialize(
|
|
3498
|
+
response_data=response_data,
|
|
3499
|
+
response_types_map=_response_types_map,
|
|
3500
|
+
)
|
|
3501
|
+
|
|
3502
|
+
|
|
3503
|
+
@validate_call
|
|
3504
|
+
def api_v1_knowledge_schema_get_without_preload_content(
|
|
3505
|
+
self,
|
|
3506
|
+
limit: Annotated[Optional[StrictInt], Field(description="Maximum number of records")] = None,
|
|
3507
|
+
offset: Annotated[Optional[StrictInt], Field(description="Record offset")] = None,
|
|
3508
|
+
_request_timeout: Union[
|
|
3509
|
+
None,
|
|
3510
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3511
|
+
Tuple[
|
|
3512
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3513
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3514
|
+
]
|
|
3515
|
+
] = None,
|
|
3516
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3517
|
+
_content_type: Optional[StrictStr] = None,
|
|
3518
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3519
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3520
|
+
) -> RESTResponseType:
|
|
3521
|
+
"""Get Knowledge Entity Schemas
|
|
3522
|
+
|
|
3523
|
+
|
|
3524
|
+
:param limit: Maximum number of records
|
|
3525
|
+
:type limit: int
|
|
3526
|
+
:param offset: Record offset
|
|
3527
|
+
:type offset: int
|
|
3528
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3529
|
+
number provided, it will be total request
|
|
3530
|
+
timeout. It can also be a pair (tuple) of
|
|
3531
|
+
(connection, read) timeouts.
|
|
3532
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3533
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3534
|
+
request; this effectively ignores the
|
|
3535
|
+
authentication in the spec for a single request.
|
|
3536
|
+
:type _request_auth: dict, optional
|
|
3537
|
+
:param _content_type: force content-type for the request.
|
|
3538
|
+
:type _content_type: str, Optional
|
|
3539
|
+
:param _headers: set to override the headers for a single
|
|
3540
|
+
request; this effectively ignores the headers
|
|
3541
|
+
in the spec for a single request.
|
|
3542
|
+
:type _headers: dict, optional
|
|
3543
|
+
:param _host_index: set to override the host_index for a single
|
|
3544
|
+
request; this effectively ignores the host_index
|
|
3545
|
+
in the spec for a single request.
|
|
3546
|
+
:type _host_index: int, optional
|
|
3547
|
+
:return: Returns the result object.
|
|
3548
|
+
""" # noqa: E501
|
|
3549
|
+
|
|
3550
|
+
_param = self._api_v1_knowledge_schema_get_serialize(
|
|
3551
|
+
limit=limit,
|
|
3552
|
+
offset=offset,
|
|
3553
|
+
_request_auth=_request_auth,
|
|
3554
|
+
_content_type=_content_type,
|
|
3555
|
+
_headers=_headers,
|
|
3556
|
+
_host_index=_host_index
|
|
3557
|
+
)
|
|
3558
|
+
|
|
3559
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3560
|
+
'200': "KnowledgeEntitySchemasResponse",
|
|
3561
|
+
'400': "KnowledgeEntitySchemasResponse",
|
|
3562
|
+
'503': "KnowledgeEntitySchemasResponse",
|
|
3563
|
+
}
|
|
3564
|
+
response_data = self.api_client.call_api(
|
|
3565
|
+
*_param,
|
|
3566
|
+
_request_timeout=_request_timeout
|
|
3567
|
+
)
|
|
3568
|
+
return response_data.response
|
|
3569
|
+
|
|
3570
|
+
|
|
3571
|
+
def _api_v1_knowledge_schema_get_serialize(
|
|
3572
|
+
self,
|
|
3573
|
+
limit,
|
|
3574
|
+
offset,
|
|
3575
|
+
_request_auth,
|
|
3576
|
+
_content_type,
|
|
3577
|
+
_headers,
|
|
3578
|
+
_host_index,
|
|
3579
|
+
) -> RequestSerialized:
|
|
3580
|
+
|
|
3581
|
+
_host = None
|
|
3582
|
+
|
|
3583
|
+
_collection_formats: Dict[str, str] = {
|
|
3584
|
+
}
|
|
3585
|
+
|
|
3586
|
+
_path_params: Dict[str, str] = {}
|
|
3587
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3588
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3589
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3590
|
+
_files: Dict[
|
|
3591
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3592
|
+
] = {}
|
|
3593
|
+
_body_params: Optional[bytes] = None
|
|
3594
|
+
|
|
3595
|
+
# process the path parameters
|
|
3596
|
+
# process the query parameters
|
|
3597
|
+
if limit is not None:
|
|
3598
|
+
|
|
3599
|
+
_query_params.append(('limit', limit))
|
|
3600
|
+
|
|
3601
|
+
if offset is not None:
|
|
3602
|
+
|
|
3603
|
+
_query_params.append(('offset', offset))
|
|
3604
|
+
|
|
3605
|
+
# process the header parameters
|
|
3606
|
+
# process the form parameters
|
|
3607
|
+
# process the body parameter
|
|
3608
|
+
|
|
3609
|
+
|
|
3610
|
+
# set the HTTP header `Accept`
|
|
3611
|
+
if 'Accept' not in _header_params:
|
|
3612
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3613
|
+
[
|
|
3614
|
+
'application/json'
|
|
3615
|
+
]
|
|
3616
|
+
)
|
|
3617
|
+
|
|
3618
|
+
|
|
3619
|
+
# authentication setting
|
|
3620
|
+
_auth_settings: List[str] = [
|
|
3621
|
+
'TokenAuth',
|
|
3622
|
+
'ApiKeyAuth'
|
|
3623
|
+
]
|
|
3624
|
+
|
|
3625
|
+
return self.api_client.param_serialize(
|
|
3626
|
+
method='GET',
|
|
3627
|
+
resource_path='/api/v1/knowledge/schema/',
|
|
3628
|
+
path_params=_path_params,
|
|
3629
|
+
query_params=_query_params,
|
|
3630
|
+
header_params=_header_params,
|
|
3631
|
+
body=_body_params,
|
|
3632
|
+
post_params=_form_params,
|
|
3633
|
+
files=_files,
|
|
3634
|
+
auth_settings=_auth_settings,
|
|
3635
|
+
collection_formats=_collection_formats,
|
|
3636
|
+
_host=_host,
|
|
3637
|
+
_request_auth=_request_auth
|
|
3638
|
+
)
|
|
3639
|
+
|
|
3640
|
+
|
|
3641
|
+
|
|
3642
|
+
|
|
3643
|
+
@validate_call
|
|
3644
|
+
def api_v1_knowledge_schema_post(
|
|
3645
|
+
self,
|
|
3646
|
+
request: Annotated[KnowledgeEntitySchemaUpsertRequest, Field(description="Body")],
|
|
3647
|
+
_request_timeout: Union[
|
|
3648
|
+
None,
|
|
3649
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3650
|
+
Tuple[
|
|
3651
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3652
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3653
|
+
]
|
|
3654
|
+
] = None,
|
|
3655
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3656
|
+
_content_type: Optional[StrictStr] = None,
|
|
3657
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3658
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3659
|
+
) -> KnowledgeEntitySchemasUpsertResponse:
|
|
3660
|
+
"""Upsert a Knowledge Entity Schema
|
|
3661
|
+
|
|
3662
|
+
|
|
3663
|
+
:param request: Body (required)
|
|
3664
|
+
:type request: KnowledgeEntitySchemaUpsertRequest
|
|
3665
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3666
|
+
number provided, it will be total request
|
|
3667
|
+
timeout. It can also be a pair (tuple) of
|
|
3668
|
+
(connection, read) timeouts.
|
|
3669
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3670
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3671
|
+
request; this effectively ignores the
|
|
3672
|
+
authentication in the spec for a single request.
|
|
3673
|
+
:type _request_auth: dict, optional
|
|
3674
|
+
:param _content_type: force content-type for the request.
|
|
3675
|
+
:type _content_type: str, Optional
|
|
3676
|
+
:param _headers: set to override the headers for a single
|
|
3677
|
+
request; this effectively ignores the headers
|
|
3678
|
+
in the spec for a single request.
|
|
3679
|
+
:type _headers: dict, optional
|
|
3680
|
+
:param _host_index: set to override the host_index for a single
|
|
3681
|
+
request; this effectively ignores the host_index
|
|
3682
|
+
in the spec for a single request.
|
|
3683
|
+
:type _host_index: int, optional
|
|
3684
|
+
:return: Returns the result object.
|
|
3685
|
+
""" # noqa: E501
|
|
3686
|
+
|
|
3687
|
+
_param = self._api_v1_knowledge_schema_post_serialize(
|
|
3688
|
+
request=request,
|
|
3689
|
+
_request_auth=_request_auth,
|
|
3690
|
+
_content_type=_content_type,
|
|
3691
|
+
_headers=_headers,
|
|
3692
|
+
_host_index=_host_index
|
|
3693
|
+
)
|
|
3694
|
+
|
|
3695
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3696
|
+
'200': "KnowledgeEntitySchemasUpsertResponse",
|
|
3697
|
+
'400': "KnowledgeEntitySchemasUpsertResponse",
|
|
3698
|
+
'503': "KnowledgeEntitySchemasUpsertResponse",
|
|
3699
|
+
}
|
|
3700
|
+
response_data = self.api_client.call_api(
|
|
3701
|
+
*_param,
|
|
3702
|
+
_request_timeout=_request_timeout
|
|
3703
|
+
)
|
|
3704
|
+
response_data.read()
|
|
3705
|
+
return self.api_client.response_deserialize(
|
|
3706
|
+
response_data=response_data,
|
|
3707
|
+
response_types_map=_response_types_map,
|
|
3708
|
+
).data
|
|
3709
|
+
|
|
3710
|
+
|
|
3711
|
+
@validate_call
|
|
3712
|
+
def api_v1_knowledge_schema_post_with_http_info(
|
|
3713
|
+
self,
|
|
3714
|
+
request: Annotated[KnowledgeEntitySchemaUpsertRequest, Field(description="Body")],
|
|
3715
|
+
_request_timeout: Union[
|
|
3716
|
+
None,
|
|
3717
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3718
|
+
Tuple[
|
|
3719
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3720
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3721
|
+
]
|
|
3722
|
+
] = None,
|
|
3723
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3724
|
+
_content_type: Optional[StrictStr] = None,
|
|
3725
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3726
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3727
|
+
) -> ApiResponse[KnowledgeEntitySchemasUpsertResponse]:
|
|
3728
|
+
"""Upsert a Knowledge Entity Schema
|
|
3729
|
+
|
|
3730
|
+
|
|
3731
|
+
:param request: Body (required)
|
|
3732
|
+
:type request: KnowledgeEntitySchemaUpsertRequest
|
|
3733
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3734
|
+
number provided, it will be total request
|
|
3735
|
+
timeout. It can also be a pair (tuple) of
|
|
3736
|
+
(connection, read) timeouts.
|
|
3737
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3738
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3739
|
+
request; this effectively ignores the
|
|
3740
|
+
authentication in the spec for a single request.
|
|
3741
|
+
:type _request_auth: dict, optional
|
|
3742
|
+
:param _content_type: force content-type for the request.
|
|
3743
|
+
:type _content_type: str, Optional
|
|
3744
|
+
:param _headers: set to override the headers for a single
|
|
3745
|
+
request; this effectively ignores the headers
|
|
3746
|
+
in the spec for a single request.
|
|
3747
|
+
:type _headers: dict, optional
|
|
3748
|
+
:param _host_index: set to override the host_index for a single
|
|
3749
|
+
request; this effectively ignores the host_index
|
|
3750
|
+
in the spec for a single request.
|
|
3751
|
+
:type _host_index: int, optional
|
|
3752
|
+
:return: Returns the result object.
|
|
3753
|
+
""" # noqa: E501
|
|
3754
|
+
|
|
3755
|
+
_param = self._api_v1_knowledge_schema_post_serialize(
|
|
3756
|
+
request=request,
|
|
3757
|
+
_request_auth=_request_auth,
|
|
3758
|
+
_content_type=_content_type,
|
|
3759
|
+
_headers=_headers,
|
|
3760
|
+
_host_index=_host_index
|
|
3761
|
+
)
|
|
3762
|
+
|
|
3763
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3764
|
+
'200': "KnowledgeEntitySchemasUpsertResponse",
|
|
3765
|
+
'400': "KnowledgeEntitySchemasUpsertResponse",
|
|
3766
|
+
'503': "KnowledgeEntitySchemasUpsertResponse",
|
|
3767
|
+
}
|
|
3768
|
+
response_data = self.api_client.call_api(
|
|
3769
|
+
*_param,
|
|
3770
|
+
_request_timeout=_request_timeout
|
|
3771
|
+
)
|
|
3772
|
+
response_data.read()
|
|
3773
|
+
return self.api_client.response_deserialize(
|
|
3774
|
+
response_data=response_data,
|
|
3775
|
+
response_types_map=_response_types_map,
|
|
3776
|
+
)
|
|
3777
|
+
|
|
3778
|
+
|
|
3779
|
+
@validate_call
|
|
3780
|
+
def api_v1_knowledge_schema_post_without_preload_content(
|
|
3781
|
+
self,
|
|
3782
|
+
request: Annotated[KnowledgeEntitySchemaUpsertRequest, Field(description="Body")],
|
|
3783
|
+
_request_timeout: Union[
|
|
3784
|
+
None,
|
|
3785
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3786
|
+
Tuple[
|
|
3787
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3788
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3789
|
+
]
|
|
3790
|
+
] = None,
|
|
3791
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3792
|
+
_content_type: Optional[StrictStr] = None,
|
|
3793
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3794
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3795
|
+
) -> RESTResponseType:
|
|
3796
|
+
"""Upsert a Knowledge Entity Schema
|
|
3797
|
+
|
|
3798
|
+
|
|
3799
|
+
:param request: Body (required)
|
|
3800
|
+
:type request: KnowledgeEntitySchemaUpsertRequest
|
|
3801
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3802
|
+
number provided, it will be total request
|
|
3803
|
+
timeout. It can also be a pair (tuple) of
|
|
3804
|
+
(connection, read) timeouts.
|
|
3805
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3806
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3807
|
+
request; this effectively ignores the
|
|
3808
|
+
authentication in the spec for a single request.
|
|
3809
|
+
:type _request_auth: dict, optional
|
|
3810
|
+
:param _content_type: force content-type for the request.
|
|
3811
|
+
:type _content_type: str, Optional
|
|
3812
|
+
:param _headers: set to override the headers for a single
|
|
3813
|
+
request; this effectively ignores the headers
|
|
3814
|
+
in the spec for a single request.
|
|
3815
|
+
:type _headers: dict, optional
|
|
3816
|
+
:param _host_index: set to override the host_index for a single
|
|
3817
|
+
request; this effectively ignores the host_index
|
|
3818
|
+
in the spec for a single request.
|
|
3819
|
+
:type _host_index: int, optional
|
|
3820
|
+
:return: Returns the result object.
|
|
3821
|
+
""" # noqa: E501
|
|
3822
|
+
|
|
3823
|
+
_param = self._api_v1_knowledge_schema_post_serialize(
|
|
3824
|
+
request=request,
|
|
3825
|
+
_request_auth=_request_auth,
|
|
3826
|
+
_content_type=_content_type,
|
|
3827
|
+
_headers=_headers,
|
|
3828
|
+
_host_index=_host_index
|
|
3829
|
+
)
|
|
3830
|
+
|
|
3831
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3832
|
+
'200': "KnowledgeEntitySchemasUpsertResponse",
|
|
3833
|
+
'400': "KnowledgeEntitySchemasUpsertResponse",
|
|
3834
|
+
'503': "KnowledgeEntitySchemasUpsertResponse",
|
|
3835
|
+
}
|
|
3836
|
+
response_data = self.api_client.call_api(
|
|
3837
|
+
*_param,
|
|
3838
|
+
_request_timeout=_request_timeout
|
|
3839
|
+
)
|
|
3840
|
+
return response_data.response
|
|
3841
|
+
|
|
3842
|
+
|
|
3843
|
+
def _api_v1_knowledge_schema_post_serialize(
|
|
3844
|
+
self,
|
|
3845
|
+
request,
|
|
3846
|
+
_request_auth,
|
|
3847
|
+
_content_type,
|
|
3848
|
+
_headers,
|
|
3849
|
+
_host_index,
|
|
3850
|
+
) -> RequestSerialized:
|
|
3851
|
+
|
|
3852
|
+
_host = None
|
|
3853
|
+
|
|
3854
|
+
_collection_formats: Dict[str, str] = {
|
|
3855
|
+
}
|
|
3856
|
+
|
|
3857
|
+
_path_params: Dict[str, str] = {}
|
|
3858
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3859
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3860
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3861
|
+
_files: Dict[
|
|
3862
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3863
|
+
] = {}
|
|
3864
|
+
_body_params: Optional[bytes] = None
|
|
3865
|
+
|
|
3866
|
+
# process the path parameters
|
|
3867
|
+
# process the query parameters
|
|
3868
|
+
# process the header parameters
|
|
3869
|
+
# process the form parameters
|
|
3870
|
+
# process the body parameter
|
|
3871
|
+
if request is not None:
|
|
3872
|
+
_body_params = request
|
|
3873
|
+
|
|
3874
|
+
|
|
3875
|
+
# set the HTTP header `Accept`
|
|
3876
|
+
if 'Accept' not in _header_params:
|
|
3877
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3878
|
+
[
|
|
3879
|
+
'application/json'
|
|
3880
|
+
]
|
|
3881
|
+
)
|
|
3882
|
+
|
|
3883
|
+
|
|
3884
|
+
# authentication setting
|
|
3885
|
+
_auth_settings: List[str] = [
|
|
3886
|
+
'TokenAuth',
|
|
3887
|
+
'ApiKeyAuth'
|
|
3888
|
+
]
|
|
3889
|
+
|
|
3890
|
+
return self.api_client.param_serialize(
|
|
3891
|
+
method='POST',
|
|
3892
|
+
resource_path='/api/v1/knowledge/schema/',
|
|
3893
|
+
path_params=_path_params,
|
|
3894
|
+
query_params=_query_params,
|
|
3895
|
+
header_params=_header_params,
|
|
3896
|
+
body=_body_params,
|
|
3897
|
+
post_params=_form_params,
|
|
3898
|
+
files=_files,
|
|
3899
|
+
auth_settings=_auth_settings,
|
|
3900
|
+
collection_formats=_collection_formats,
|
|
3901
|
+
_host=_host,
|
|
3902
|
+
_request_auth=_request_auth
|
|
3903
|
+
)
|
|
3904
|
+
|
|
3905
|
+
|
|
3906
|
+
|
|
3907
|
+
|
|
3908
|
+
@validate_call
|
|
3909
|
+
def api_v1_knowledge_type_get(
|
|
3910
|
+
self,
|
|
3911
|
+
_request_timeout: Union[
|
|
3912
|
+
None,
|
|
3913
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3914
|
+
Tuple[
|
|
3915
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3916
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3917
|
+
]
|
|
3918
|
+
] = None,
|
|
3919
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3920
|
+
_content_type: Optional[StrictStr] = None,
|
|
3921
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3922
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3923
|
+
) -> KnowledgeTypeResponse:
|
|
3924
|
+
"""Get Knowledge Types
|
|
3925
|
+
|
|
3926
|
+
Knowledge Types are a sub-classification under kind.
|
|
3927
|
+
|
|
3928
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3929
|
+
number provided, it will be total request
|
|
3930
|
+
timeout. It can also be a pair (tuple) of
|
|
3931
|
+
(connection, read) timeouts.
|
|
3932
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3933
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3934
|
+
request; this effectively ignores the
|
|
3935
|
+
authentication in the spec for a single request.
|
|
3936
|
+
:type _request_auth: dict, optional
|
|
3937
|
+
:param _content_type: force content-type for the request.
|
|
3938
|
+
:type _content_type: str, Optional
|
|
3939
|
+
:param _headers: set to override the headers for a single
|
|
3940
|
+
request; this effectively ignores the headers
|
|
3941
|
+
in the spec for a single request.
|
|
3942
|
+
:type _headers: dict, optional
|
|
3943
|
+
:param _host_index: set to override the host_index for a single
|
|
3944
|
+
request; this effectively ignores the host_index
|
|
3945
|
+
in the spec for a single request.
|
|
3946
|
+
:type _host_index: int, optional
|
|
3947
|
+
:return: Returns the result object.
|
|
3948
|
+
""" # noqa: E501
|
|
3949
|
+
|
|
3950
|
+
_param = self._api_v1_knowledge_type_get_serialize(
|
|
3951
|
+
_request_auth=_request_auth,
|
|
3952
|
+
_content_type=_content_type,
|
|
3953
|
+
_headers=_headers,
|
|
3954
|
+
_host_index=_host_index
|
|
3955
|
+
)
|
|
3956
|
+
|
|
3957
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3958
|
+
'200': "KnowledgeTypeResponse",
|
|
3959
|
+
'400': "KnowledgeTypeResponse",
|
|
3960
|
+
'503': "KnowledgeTypeResponse",
|
|
3961
|
+
}
|
|
3962
|
+
response_data = self.api_client.call_api(
|
|
3963
|
+
*_param,
|
|
3964
|
+
_request_timeout=_request_timeout
|
|
3965
|
+
)
|
|
3966
|
+
response_data.read()
|
|
3967
|
+
return self.api_client.response_deserialize(
|
|
3968
|
+
response_data=response_data,
|
|
3969
|
+
response_types_map=_response_types_map,
|
|
3970
|
+
).data
|
|
3971
|
+
|
|
3972
|
+
|
|
3973
|
+
@validate_call
|
|
3974
|
+
def api_v1_knowledge_type_get_with_http_info(
|
|
3975
|
+
self,
|
|
3976
|
+
_request_timeout: Union[
|
|
3977
|
+
None,
|
|
3978
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3979
|
+
Tuple[
|
|
3980
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3981
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3982
|
+
]
|
|
3983
|
+
] = None,
|
|
3984
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3985
|
+
_content_type: Optional[StrictStr] = None,
|
|
3986
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3987
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3988
|
+
) -> ApiResponse[KnowledgeTypeResponse]:
|
|
3989
|
+
"""Get Knowledge Types
|
|
3990
|
+
|
|
3991
|
+
Knowledge Types are a sub-classification under kind.
|
|
3992
|
+
|
|
3993
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3994
|
+
number provided, it will be total request
|
|
3995
|
+
timeout. It can also be a pair (tuple) of
|
|
3996
|
+
(connection, read) timeouts.
|
|
3997
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3998
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3999
|
+
request; this effectively ignores the
|
|
4000
|
+
authentication in the spec for a single request.
|
|
4001
|
+
:type _request_auth: dict, optional
|
|
4002
|
+
:param _content_type: force content-type for the request.
|
|
4003
|
+
:type _content_type: str, Optional
|
|
4004
|
+
:param _headers: set to override the headers for a single
|
|
4005
|
+
request; this effectively ignores the headers
|
|
4006
|
+
in the spec for a single request.
|
|
4007
|
+
:type _headers: dict, optional
|
|
4008
|
+
:param _host_index: set to override the host_index for a single
|
|
4009
|
+
request; this effectively ignores the host_index
|
|
4010
|
+
in the spec for a single request.
|
|
4011
|
+
:type _host_index: int, optional
|
|
4012
|
+
:return: Returns the result object.
|
|
4013
|
+
""" # noqa: E501
|
|
4014
|
+
|
|
4015
|
+
_param = self._api_v1_knowledge_type_get_serialize(
|
|
4016
|
+
_request_auth=_request_auth,
|
|
4017
|
+
_content_type=_content_type,
|
|
4018
|
+
_headers=_headers,
|
|
4019
|
+
_host_index=_host_index
|
|
4020
|
+
)
|
|
4021
|
+
|
|
4022
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4023
|
+
'200': "KnowledgeTypeResponse",
|
|
4024
|
+
'400': "KnowledgeTypeResponse",
|
|
4025
|
+
'503': "KnowledgeTypeResponse",
|
|
4026
|
+
}
|
|
4027
|
+
response_data = self.api_client.call_api(
|
|
4028
|
+
*_param,
|
|
4029
|
+
_request_timeout=_request_timeout
|
|
4030
|
+
)
|
|
4031
|
+
response_data.read()
|
|
4032
|
+
return self.api_client.response_deserialize(
|
|
4033
|
+
response_data=response_data,
|
|
4034
|
+
response_types_map=_response_types_map,
|
|
4035
|
+
)
|
|
4036
|
+
|
|
4037
|
+
|
|
4038
|
+
@validate_call
|
|
4039
|
+
def api_v1_knowledge_type_get_without_preload_content(
|
|
4040
|
+
self,
|
|
4041
|
+
_request_timeout: Union[
|
|
4042
|
+
None,
|
|
4043
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4044
|
+
Tuple[
|
|
4045
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4046
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4047
|
+
]
|
|
4048
|
+
] = None,
|
|
4049
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4050
|
+
_content_type: Optional[StrictStr] = None,
|
|
4051
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4052
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4053
|
+
) -> RESTResponseType:
|
|
4054
|
+
"""Get Knowledge Types
|
|
4055
|
+
|
|
4056
|
+
Knowledge Types are a sub-classification under kind.
|
|
4057
|
+
|
|
4058
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4059
|
+
number provided, it will be total request
|
|
4060
|
+
timeout. It can also be a pair (tuple) of
|
|
4061
|
+
(connection, read) timeouts.
|
|
4062
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4063
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4064
|
+
request; this effectively ignores the
|
|
4065
|
+
authentication in the spec for a single request.
|
|
4066
|
+
:type _request_auth: dict, optional
|
|
4067
|
+
:param _content_type: force content-type for the request.
|
|
4068
|
+
:type _content_type: str, Optional
|
|
4069
|
+
:param _headers: set to override the headers for a single
|
|
4070
|
+
request; this effectively ignores the headers
|
|
4071
|
+
in the spec for a single request.
|
|
4072
|
+
:type _headers: dict, optional
|
|
4073
|
+
:param _host_index: set to override the host_index for a single
|
|
4074
|
+
request; this effectively ignores the host_index
|
|
4075
|
+
in the spec for a single request.
|
|
4076
|
+
:type _host_index: int, optional
|
|
4077
|
+
:return: Returns the result object.
|
|
4078
|
+
""" # noqa: E501
|
|
4079
|
+
|
|
4080
|
+
_param = self._api_v1_knowledge_type_get_serialize(
|
|
4081
|
+
_request_auth=_request_auth,
|
|
4082
|
+
_content_type=_content_type,
|
|
4083
|
+
_headers=_headers,
|
|
4084
|
+
_host_index=_host_index
|
|
4085
|
+
)
|
|
4086
|
+
|
|
4087
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4088
|
+
'200': "KnowledgeTypeResponse",
|
|
4089
|
+
'400': "KnowledgeTypeResponse",
|
|
4090
|
+
'503': "KnowledgeTypeResponse",
|
|
4091
|
+
}
|
|
4092
|
+
response_data = self.api_client.call_api(
|
|
4093
|
+
*_param,
|
|
4094
|
+
_request_timeout=_request_timeout
|
|
4095
|
+
)
|
|
4096
|
+
return response_data.response
|
|
4097
|
+
|
|
4098
|
+
|
|
4099
|
+
def _api_v1_knowledge_type_get_serialize(
|
|
4100
|
+
self,
|
|
4101
|
+
_request_auth,
|
|
4102
|
+
_content_type,
|
|
4103
|
+
_headers,
|
|
4104
|
+
_host_index,
|
|
4105
|
+
) -> RequestSerialized:
|
|
4106
|
+
|
|
4107
|
+
_host = None
|
|
4108
|
+
|
|
4109
|
+
_collection_formats: Dict[str, str] = {
|
|
4110
|
+
}
|
|
4111
|
+
|
|
4112
|
+
_path_params: Dict[str, str] = {}
|
|
4113
|
+
_query_params: List[Tuple[str, str]] = []
|
|
4114
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
4115
|
+
_form_params: List[Tuple[str, str]] = []
|
|
4116
|
+
_files: Dict[
|
|
4117
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
4118
|
+
] = {}
|
|
4119
|
+
_body_params: Optional[bytes] = None
|
|
4120
|
+
|
|
4121
|
+
# process the path parameters
|
|
4122
|
+
# process the query parameters
|
|
4123
|
+
# process the header parameters
|
|
4124
|
+
# process the form parameters
|
|
4125
|
+
# process the body parameter
|
|
4126
|
+
|
|
4127
|
+
|
|
4128
|
+
# set the HTTP header `Accept`
|
|
4129
|
+
if 'Accept' not in _header_params:
|
|
4130
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
4131
|
+
[
|
|
4132
|
+
'application/json'
|
|
4133
|
+
]
|
|
4134
|
+
)
|
|
4135
|
+
|
|
4136
|
+
|
|
4137
|
+
# authentication setting
|
|
4138
|
+
_auth_settings: List[str] = [
|
|
4139
|
+
'TokenAuth',
|
|
4140
|
+
'ApiKeyAuth'
|
|
4141
|
+
]
|
|
4142
|
+
|
|
4143
|
+
return self.api_client.param_serialize(
|
|
4144
|
+
method='GET',
|
|
4145
|
+
resource_path='/api/v1/knowledge/type/',
|
|
4146
|
+
path_params=_path_params,
|
|
4147
|
+
query_params=_query_params,
|
|
4148
|
+
header_params=_header_params,
|
|
4149
|
+
body=_body_params,
|
|
4150
|
+
post_params=_form_params,
|
|
4151
|
+
files=_files,
|
|
4152
|
+
auth_settings=_auth_settings,
|
|
4153
|
+
collection_formats=_collection_formats,
|
|
4154
|
+
_host=_host,
|
|
4155
|
+
_request_auth=_request_auth
|
|
4156
|
+
)
|
|
4157
|
+
|
|
4158
|
+
|
|
4159
|
+
|
|
4160
|
+
|
|
4161
|
+
@validate_call
|
|
4162
|
+
def api_v1_knowledge_type_post(
|
|
4163
|
+
self,
|
|
4164
|
+
request: Annotated[KnowledgeEntityUpsertRequest, Field(description="Body")],
|
|
4165
|
+
_request_timeout: Union[
|
|
4166
|
+
None,
|
|
4167
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4168
|
+
Tuple[
|
|
4169
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4170
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4171
|
+
]
|
|
4172
|
+
] = None,
|
|
4173
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4174
|
+
_content_type: Optional[StrictStr] = None,
|
|
4175
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4176
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4177
|
+
) -> KnowledgeTypeResponse:
|
|
4178
|
+
"""Get Knowledge Types
|
|
4179
|
+
|
|
4180
|
+
Knowledge Types are a sub-classification under kind.
|
|
4181
|
+
|
|
4182
|
+
:param request: Body (required)
|
|
4183
|
+
:type request: KnowledgeEntityUpsertRequest
|
|
4184
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4185
|
+
number provided, it will be total request
|
|
4186
|
+
timeout. It can also be a pair (tuple) of
|
|
4187
|
+
(connection, read) timeouts.
|
|
4188
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4189
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4190
|
+
request; this effectively ignores the
|
|
4191
|
+
authentication in the spec for a single request.
|
|
4192
|
+
:type _request_auth: dict, optional
|
|
4193
|
+
:param _content_type: force content-type for the request.
|
|
4194
|
+
:type _content_type: str, Optional
|
|
4195
|
+
:param _headers: set to override the headers for a single
|
|
4196
|
+
request; this effectively ignores the headers
|
|
4197
|
+
in the spec for a single request.
|
|
4198
|
+
:type _headers: dict, optional
|
|
4199
|
+
:param _host_index: set to override the host_index for a single
|
|
4200
|
+
request; this effectively ignores the host_index
|
|
4201
|
+
in the spec for a single request.
|
|
4202
|
+
:type _host_index: int, optional
|
|
4203
|
+
:return: Returns the result object.
|
|
4204
|
+
""" # noqa: E501
|
|
4205
|
+
|
|
4206
|
+
_param = self._api_v1_knowledge_type_post_serialize(
|
|
4207
|
+
request=request,
|
|
4208
|
+
_request_auth=_request_auth,
|
|
4209
|
+
_content_type=_content_type,
|
|
4210
|
+
_headers=_headers,
|
|
4211
|
+
_host_index=_host_index
|
|
4212
|
+
)
|
|
4213
|
+
|
|
4214
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4215
|
+
'200': "KnowledgeTypeResponse",
|
|
4216
|
+
'400': "KnowledgeTypeResponse",
|
|
4217
|
+
'503': "KnowledgeTypeResponse",
|
|
4218
|
+
}
|
|
4219
|
+
response_data = self.api_client.call_api(
|
|
4220
|
+
*_param,
|
|
4221
|
+
_request_timeout=_request_timeout
|
|
4222
|
+
)
|
|
4223
|
+
response_data.read()
|
|
4224
|
+
return self.api_client.response_deserialize(
|
|
4225
|
+
response_data=response_data,
|
|
4226
|
+
response_types_map=_response_types_map,
|
|
4227
|
+
).data
|
|
4228
|
+
|
|
4229
|
+
|
|
4230
|
+
@validate_call
|
|
4231
|
+
def api_v1_knowledge_type_post_with_http_info(
|
|
4232
|
+
self,
|
|
4233
|
+
request: Annotated[KnowledgeEntityUpsertRequest, Field(description="Body")],
|
|
4234
|
+
_request_timeout: Union[
|
|
4235
|
+
None,
|
|
4236
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4237
|
+
Tuple[
|
|
4238
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4239
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4240
|
+
]
|
|
4241
|
+
] = None,
|
|
4242
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4243
|
+
_content_type: Optional[StrictStr] = None,
|
|
4244
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4245
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4246
|
+
) -> ApiResponse[KnowledgeTypeResponse]:
|
|
4247
|
+
"""Get Knowledge Types
|
|
4248
|
+
|
|
4249
|
+
Knowledge Types are a sub-classification under kind.
|
|
4250
|
+
|
|
4251
|
+
:param request: Body (required)
|
|
4252
|
+
:type request: KnowledgeEntityUpsertRequest
|
|
4253
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4254
|
+
number provided, it will be total request
|
|
4255
|
+
timeout. It can also be a pair (tuple) of
|
|
4256
|
+
(connection, read) timeouts.
|
|
4257
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4258
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4259
|
+
request; this effectively ignores the
|
|
4260
|
+
authentication in the spec for a single request.
|
|
4261
|
+
:type _request_auth: dict, optional
|
|
4262
|
+
:param _content_type: force content-type for the request.
|
|
4263
|
+
:type _content_type: str, Optional
|
|
4264
|
+
:param _headers: set to override the headers for a single
|
|
4265
|
+
request; this effectively ignores the headers
|
|
4266
|
+
in the spec for a single request.
|
|
4267
|
+
:type _headers: dict, optional
|
|
4268
|
+
:param _host_index: set to override the host_index for a single
|
|
4269
|
+
request; this effectively ignores the host_index
|
|
4270
|
+
in the spec for a single request.
|
|
4271
|
+
:type _host_index: int, optional
|
|
4272
|
+
:return: Returns the result object.
|
|
4273
|
+
""" # noqa: E501
|
|
4274
|
+
|
|
4275
|
+
_param = self._api_v1_knowledge_type_post_serialize(
|
|
4276
|
+
request=request,
|
|
4277
|
+
_request_auth=_request_auth,
|
|
4278
|
+
_content_type=_content_type,
|
|
4279
|
+
_headers=_headers,
|
|
4280
|
+
_host_index=_host_index
|
|
4281
|
+
)
|
|
4282
|
+
|
|
4283
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4284
|
+
'200': "KnowledgeTypeResponse",
|
|
4285
|
+
'400': "KnowledgeTypeResponse",
|
|
4286
|
+
'503': "KnowledgeTypeResponse",
|
|
4287
|
+
}
|
|
4288
|
+
response_data = self.api_client.call_api(
|
|
4289
|
+
*_param,
|
|
4290
|
+
_request_timeout=_request_timeout
|
|
4291
|
+
)
|
|
4292
|
+
response_data.read()
|
|
4293
|
+
return self.api_client.response_deserialize(
|
|
4294
|
+
response_data=response_data,
|
|
4295
|
+
response_types_map=_response_types_map,
|
|
4296
|
+
)
|
|
4297
|
+
|
|
4298
|
+
|
|
4299
|
+
@validate_call
|
|
4300
|
+
def api_v1_knowledge_type_post_without_preload_content(
|
|
4301
|
+
self,
|
|
4302
|
+
request: Annotated[KnowledgeEntityUpsertRequest, Field(description="Body")],
|
|
4303
|
+
_request_timeout: Union[
|
|
4304
|
+
None,
|
|
4305
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4306
|
+
Tuple[
|
|
4307
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
4308
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
4309
|
+
]
|
|
4310
|
+
] = None,
|
|
4311
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
4312
|
+
_content_type: Optional[StrictStr] = None,
|
|
4313
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4314
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4315
|
+
) -> RESTResponseType:
|
|
4316
|
+
"""Get Knowledge Types
|
|
4317
|
+
|
|
4318
|
+
Knowledge Types are a sub-classification under kind.
|
|
4319
|
+
|
|
4320
|
+
:param request: Body (required)
|
|
4321
|
+
:type request: KnowledgeEntityUpsertRequest
|
|
4322
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
4323
|
+
number provided, it will be total request
|
|
4324
|
+
timeout. It can also be a pair (tuple) of
|
|
4325
|
+
(connection, read) timeouts.
|
|
4326
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
4327
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
4328
|
+
request; this effectively ignores the
|
|
4329
|
+
authentication in the spec for a single request.
|
|
4330
|
+
:type _request_auth: dict, optional
|
|
4331
|
+
:param _content_type: force content-type for the request.
|
|
4332
|
+
:type _content_type: str, Optional
|
|
4333
|
+
:param _headers: set to override the headers for a single
|
|
4334
|
+
request; this effectively ignores the headers
|
|
4335
|
+
in the spec for a single request.
|
|
4336
|
+
:type _headers: dict, optional
|
|
4337
|
+
:param _host_index: set to override the host_index for a single
|
|
4338
|
+
request; this effectively ignores the host_index
|
|
4339
|
+
in the spec for a single request.
|
|
4340
|
+
:type _host_index: int, optional
|
|
4341
|
+
:return: Returns the result object.
|
|
4342
|
+
""" # noqa: E501
|
|
4343
|
+
|
|
4344
|
+
_param = self._api_v1_knowledge_type_post_serialize(
|
|
4345
|
+
request=request,
|
|
4346
|
+
_request_auth=_request_auth,
|
|
4347
|
+
_content_type=_content_type,
|
|
4348
|
+
_headers=_headers,
|
|
4349
|
+
_host_index=_host_index
|
|
4350
|
+
)
|
|
4351
|
+
|
|
4352
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
4353
|
+
'200': "KnowledgeTypeResponse",
|
|
4354
|
+
'400': "KnowledgeTypeResponse",
|
|
4355
|
+
'503': "KnowledgeTypeResponse",
|
|
4356
|
+
}
|
|
4357
|
+
response_data = self.api_client.call_api(
|
|
4358
|
+
*_param,
|
|
4359
|
+
_request_timeout=_request_timeout
|
|
4360
|
+
)
|
|
4361
|
+
return response_data.response
|
|
4362
|
+
|
|
4363
|
+
|
|
4364
|
+
def _api_v1_knowledge_type_post_serialize(
|
|
4365
|
+
self,
|
|
4366
|
+
request,
|
|
4367
|
+
_request_auth,
|
|
4368
|
+
_content_type,
|
|
4369
|
+
_headers,
|
|
4370
|
+
_host_index,
|
|
4371
|
+
) -> RequestSerialized:
|
|
4372
|
+
|
|
4373
|
+
_host = None
|
|
4374
|
+
|
|
4375
|
+
_collection_formats: Dict[str, str] = {
|
|
4376
|
+
}
|
|
4377
|
+
|
|
4378
|
+
_path_params: Dict[str, str] = {}
|
|
4379
|
+
_query_params: List[Tuple[str, str]] = []
|
|
4380
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
4381
|
+
_form_params: List[Tuple[str, str]] = []
|
|
4382
|
+
_files: Dict[
|
|
4383
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
4384
|
+
] = {}
|
|
4385
|
+
_body_params: Optional[bytes] = None
|
|
4386
|
+
|
|
4387
|
+
# process the path parameters
|
|
4388
|
+
# process the query parameters
|
|
4389
|
+
# process the header parameters
|
|
4390
|
+
# process the form parameters
|
|
4391
|
+
# process the body parameter
|
|
4392
|
+
if request is not None:
|
|
4393
|
+
_body_params = request
|
|
4394
|
+
|
|
4395
|
+
|
|
4396
|
+
# set the HTTP header `Accept`
|
|
4397
|
+
if 'Accept' not in _header_params:
|
|
4398
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
4399
|
+
[
|
|
4400
|
+
'application/json'
|
|
4401
|
+
]
|
|
4402
|
+
)
|
|
4403
|
+
|
|
4404
|
+
|
|
4405
|
+
# authentication setting
|
|
4406
|
+
_auth_settings: List[str] = [
|
|
4407
|
+
'TokenAuth',
|
|
4408
|
+
'ApiKeyAuth'
|
|
4409
|
+
]
|
|
4410
|
+
|
|
4411
|
+
return self.api_client.param_serialize(
|
|
4412
|
+
method='POST',
|
|
4413
|
+
resource_path='/api/v1/knowledge/type/',
|
|
4414
|
+
path_params=_path_params,
|
|
4415
|
+
query_params=_query_params,
|
|
4416
|
+
header_params=_header_params,
|
|
4417
|
+
body=_body_params,
|
|
4418
|
+
post_params=_form_params,
|
|
4419
|
+
files=_files,
|
|
4420
|
+
auth_settings=_auth_settings,
|
|
4421
|
+
collection_formats=_collection_formats,
|
|
4422
|
+
_host=_host,
|
|
4423
|
+
_request_auth=_request_auth
|
|
4424
|
+
)
|
|
4425
|
+
|
|
4426
|
+
|