vectorize_client.api.files_api

Vectorize API (Beta)

API for Vectorize services

The version of the OpenAPI document: 0.0.1 Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

  1# coding: utf-8
  2
  3"""
  4    Vectorize API (Beta)
  5
  6    API for Vectorize services
  7
  8    The version of the OpenAPI document: 0.0.1
  9    Generated by OpenAPI Generator (https://openapi-generator.tech)
 10
 11    Do not edit the class manually.
 12"""  # noqa: E501
 13
 14import warnings
 15from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
 16from typing import Any, Dict, List, Optional, Tuple, Union
 17from typing_extensions import Annotated
 18
 19from pydantic import StrictStr
 20from vectorize_client.models.start_file_upload_request import StartFileUploadRequest
 21from vectorize_client.models.start_file_upload_response import StartFileUploadResponse
 22
 23from vectorize_client.api_client import ApiClient, RequestSerialized
 24from vectorize_client.api_response import ApiResponse
 25from vectorize_client.rest import RESTResponseType
 26
 27
 28class FilesApi:
 29    """NOTE: This class is auto generated by OpenAPI Generator
 30    Ref: https://openapi-generator.tech
 31
 32    Do not edit the class manually.
 33    """
 34
 35    def __init__(self, api_client=None) -> None:
 36        if api_client is None:
 37            api_client = ApiClient.get_default()
 38        self.api_client = api_client
 39
 40
 41    @validate_call
 42    def start_file_upload(
 43        self,
 44        organization: StrictStr,
 45        start_file_upload_request: StartFileUploadRequest,
 46        _request_timeout: Union[
 47            None,
 48            Annotated[StrictFloat, Field(gt=0)],
 49            Tuple[
 50                Annotated[StrictFloat, Field(gt=0)],
 51                Annotated[StrictFloat, Field(gt=0)]
 52            ]
 53        ] = None,
 54        _request_auth: Optional[Dict[StrictStr, Any]] = None,
 55        _content_type: Optional[StrictStr] = None,
 56        _headers: Optional[Dict[StrictStr, Any]] = None,
 57        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
 58    ) -> StartFileUploadResponse:
 59        """Upload a generic file to the platform
 60
 61
 62        :param organization: (required)
 63        :type organization: str
 64        :param start_file_upload_request: (required)
 65        :type start_file_upload_request: StartFileUploadRequest
 66        :param _request_timeout: timeout setting for this request. If one
 67                                 number provided, it will be total request
 68                                 timeout. It can also be a pair (tuple) of
 69                                 (connection, read) timeouts.
 70        :type _request_timeout: int, tuple(int, int), optional
 71        :param _request_auth: set to override the auth_settings for an a single
 72                              request; this effectively ignores the
 73                              authentication in the spec for a single request.
 74        :type _request_auth: dict, optional
 75        :param _content_type: force content-type for the request.
 76        :type _content_type: str, Optional
 77        :param _headers: set to override the headers for a single
 78                         request; this effectively ignores the headers
 79                         in the spec for a single request.
 80        :type _headers: dict, optional
 81        :param _host_index: set to override the host_index for a single
 82                            request; this effectively ignores the host_index
 83                            in the spec for a single request.
 84        :type _host_index: int, optional
 85        :return: Returns the result object.
 86        """ # noqa: E501
 87
 88        _param = self._start_file_upload_serialize(
 89            organization=organization,
 90            start_file_upload_request=start_file_upload_request,
 91            _request_auth=_request_auth,
 92            _content_type=_content_type,
 93            _headers=_headers,
 94            _host_index=_host_index
 95        )
 96
 97        _response_types_map: Dict[str, Optional[str]] = {
 98            '200': "StartFileUploadResponse",
 99            '400': "GetPipelines400Response",
100            '401': "GetPipelines400Response",
101            '403': "GetPipelines400Response",
102            '404': "GetPipelines400Response",
103            '500': "GetPipelines400Response",
104        }
105        response_data = self.api_client.call_api(
106            *_param,
107            _request_timeout=_request_timeout
108        )
109        response_data.read()
110        return self.api_client.response_deserialize(
111            response_data=response_data,
112            response_types_map=_response_types_map,
113        ).data
114
115
116    @validate_call
117    def start_file_upload_with_http_info(
118        self,
119        organization: StrictStr,
120        start_file_upload_request: StartFileUploadRequest,
121        _request_timeout: Union[
122            None,
123            Annotated[StrictFloat, Field(gt=0)],
124            Tuple[
125                Annotated[StrictFloat, Field(gt=0)],
126                Annotated[StrictFloat, Field(gt=0)]
127            ]
128        ] = None,
129        _request_auth: Optional[Dict[StrictStr, Any]] = None,
130        _content_type: Optional[StrictStr] = None,
131        _headers: Optional[Dict[StrictStr, Any]] = None,
132        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
133    ) -> ApiResponse[StartFileUploadResponse]:
134        """Upload a generic file to the platform
135
136
137        :param organization: (required)
138        :type organization: str
139        :param start_file_upload_request: (required)
140        :type start_file_upload_request: StartFileUploadRequest
141        :param _request_timeout: timeout setting for this request. If one
142                                 number provided, it will be total request
143                                 timeout. It can also be a pair (tuple) of
144                                 (connection, read) timeouts.
145        :type _request_timeout: int, tuple(int, int), optional
146        :param _request_auth: set to override the auth_settings for an a single
147                              request; this effectively ignores the
148                              authentication in the spec for a single request.
149        :type _request_auth: dict, optional
150        :param _content_type: force content-type for the request.
151        :type _content_type: str, Optional
152        :param _headers: set to override the headers for a single
153                         request; this effectively ignores the headers
154                         in the spec for a single request.
155        :type _headers: dict, optional
156        :param _host_index: set to override the host_index for a single
157                            request; this effectively ignores the host_index
158                            in the spec for a single request.
159        :type _host_index: int, optional
160        :return: Returns the result object.
161        """ # noqa: E501
162
163        _param = self._start_file_upload_serialize(
164            organization=organization,
165            start_file_upload_request=start_file_upload_request,
166            _request_auth=_request_auth,
167            _content_type=_content_type,
168            _headers=_headers,
169            _host_index=_host_index
170        )
171
172        _response_types_map: Dict[str, Optional[str]] = {
173            '200': "StartFileUploadResponse",
174            '400': "GetPipelines400Response",
175            '401': "GetPipelines400Response",
176            '403': "GetPipelines400Response",
177            '404': "GetPipelines400Response",
178            '500': "GetPipelines400Response",
179        }
180        response_data = self.api_client.call_api(
181            *_param,
182            _request_timeout=_request_timeout
183        )
184        response_data.read()
185        return self.api_client.response_deserialize(
186            response_data=response_data,
187            response_types_map=_response_types_map,
188        )
189
190
191    @validate_call
192    def start_file_upload_without_preload_content(
193        self,
194        organization: StrictStr,
195        start_file_upload_request: StartFileUploadRequest,
196        _request_timeout: Union[
197            None,
198            Annotated[StrictFloat, Field(gt=0)],
199            Tuple[
200                Annotated[StrictFloat, Field(gt=0)],
201                Annotated[StrictFloat, Field(gt=0)]
202            ]
203        ] = None,
204        _request_auth: Optional[Dict[StrictStr, Any]] = None,
205        _content_type: Optional[StrictStr] = None,
206        _headers: Optional[Dict[StrictStr, Any]] = None,
207        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
208    ) -> RESTResponseType:
209        """Upload a generic file to the platform
210
211
212        :param organization: (required)
213        :type organization: str
214        :param start_file_upload_request: (required)
215        :type start_file_upload_request: StartFileUploadRequest
216        :param _request_timeout: timeout setting for this request. If one
217                                 number provided, it will be total request
218                                 timeout. It can also be a pair (tuple) of
219                                 (connection, read) timeouts.
220        :type _request_timeout: int, tuple(int, int), optional
221        :param _request_auth: set to override the auth_settings for an a single
222                              request; this effectively ignores the
223                              authentication in the spec for a single request.
224        :type _request_auth: dict, optional
225        :param _content_type: force content-type for the request.
226        :type _content_type: str, Optional
227        :param _headers: set to override the headers for a single
228                         request; this effectively ignores the headers
229                         in the spec for a single request.
230        :type _headers: dict, optional
231        :param _host_index: set to override the host_index for a single
232                            request; this effectively ignores the host_index
233                            in the spec for a single request.
234        :type _host_index: int, optional
235        :return: Returns the result object.
236        """ # noqa: E501
237
238        _param = self._start_file_upload_serialize(
239            organization=organization,
240            start_file_upload_request=start_file_upload_request,
241            _request_auth=_request_auth,
242            _content_type=_content_type,
243            _headers=_headers,
244            _host_index=_host_index
245        )
246
247        _response_types_map: Dict[str, Optional[str]] = {
248            '200': "StartFileUploadResponse",
249            '400': "GetPipelines400Response",
250            '401': "GetPipelines400Response",
251            '403': "GetPipelines400Response",
252            '404': "GetPipelines400Response",
253            '500': "GetPipelines400Response",
254        }
255        response_data = self.api_client.call_api(
256            *_param,
257            _request_timeout=_request_timeout
258        )
259        return response_data.response
260
261
262    def _start_file_upload_serialize(
263        self,
264        organization,
265        start_file_upload_request,
266        _request_auth,
267        _content_type,
268        _headers,
269        _host_index,
270    ) -> RequestSerialized:
271
272        _host = None
273
274        _collection_formats: Dict[str, str] = {
275        }
276
277        _path_params: Dict[str, str] = {}
278        _query_params: List[Tuple[str, str]] = []
279        _header_params: Dict[str, Optional[str]] = _headers or {}
280        _form_params: List[Tuple[str, str]] = []
281        _files: Dict[
282            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
283        ] = {}
284        _body_params: Optional[bytes] = None
285
286        # process the path parameters
287        if organization is not None:
288            _path_params['organization'] = organization
289        # process the query parameters
290        # process the header parameters
291        # process the form parameters
292        # process the body parameter
293        if start_file_upload_request is not None:
294            _body_params = start_file_upload_request
295
296
297        # set the HTTP header `Accept`
298        if 'Accept' not in _header_params:
299            _header_params['Accept'] = self.api_client.select_header_accept(
300                [
301                    'application/json'
302                ]
303            )
304
305        # set the HTTP header `Content-Type`
306        if _content_type:
307            _header_params['Content-Type'] = _content_type
308        else:
309            _default_content_type = (
310                self.api_client.select_header_content_type(
311                    [
312                        'application/json'
313                    ]
314                )
315            )
316            if _default_content_type is not None:
317                _header_params['Content-Type'] = _default_content_type
318
319        # authentication setting
320        _auth_settings: List[str] = [
321            'bearerAuth'
322        ]
323
324        return self.api_client.param_serialize(
325            method='POST',
326            resource_path='/org/{organization}/files',
327            path_params=_path_params,
328            query_params=_query_params,
329            header_params=_header_params,
330            body=_body_params,
331            post_params=_form_params,
332            files=_files,
333            auth_settings=_auth_settings,
334            collection_formats=_collection_formats,
335            _host=_host,
336            _request_auth=_request_auth
337        )
class FilesApi:
 29class FilesApi:
 30    """NOTE: This class is auto generated by OpenAPI Generator
 31    Ref: https://openapi-generator.tech
 32
 33    Do not edit the class manually.
 34    """
 35
 36    def __init__(self, api_client=None) -> None:
 37        if api_client is None:
 38            api_client = ApiClient.get_default()
 39        self.api_client = api_client
 40
 41
 42    @validate_call
 43    def start_file_upload(
 44        self,
 45        organization: StrictStr,
 46        start_file_upload_request: StartFileUploadRequest,
 47        _request_timeout: Union[
 48            None,
 49            Annotated[StrictFloat, Field(gt=0)],
 50            Tuple[
 51                Annotated[StrictFloat, Field(gt=0)],
 52                Annotated[StrictFloat, Field(gt=0)]
 53            ]
 54        ] = None,
 55        _request_auth: Optional[Dict[StrictStr, Any]] = None,
 56        _content_type: Optional[StrictStr] = None,
 57        _headers: Optional[Dict[StrictStr, Any]] = None,
 58        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
 59    ) -> StartFileUploadResponse:
 60        """Upload a generic file to the platform
 61
 62
 63        :param organization: (required)
 64        :type organization: str
 65        :param start_file_upload_request: (required)
 66        :type start_file_upload_request: StartFileUploadRequest
 67        :param _request_timeout: timeout setting for this request. If one
 68                                 number provided, it will be total request
 69                                 timeout. It can also be a pair (tuple) of
 70                                 (connection, read) timeouts.
 71        :type _request_timeout: int, tuple(int, int), optional
 72        :param _request_auth: set to override the auth_settings for an a single
 73                              request; this effectively ignores the
 74                              authentication in the spec for a single request.
 75        :type _request_auth: dict, optional
 76        :param _content_type: force content-type for the request.
 77        :type _content_type: str, Optional
 78        :param _headers: set to override the headers for a single
 79                         request; this effectively ignores the headers
 80                         in the spec for a single request.
 81        :type _headers: dict, optional
 82        :param _host_index: set to override the host_index for a single
 83                            request; this effectively ignores the host_index
 84                            in the spec for a single request.
 85        :type _host_index: int, optional
 86        :return: Returns the result object.
 87        """ # noqa: E501
 88
 89        _param = self._start_file_upload_serialize(
 90            organization=organization,
 91            start_file_upload_request=start_file_upload_request,
 92            _request_auth=_request_auth,
 93            _content_type=_content_type,
 94            _headers=_headers,
 95            _host_index=_host_index
 96        )
 97
 98        _response_types_map: Dict[str, Optional[str]] = {
 99            '200': "StartFileUploadResponse",
100            '400': "GetPipelines400Response",
101            '401': "GetPipelines400Response",
102            '403': "GetPipelines400Response",
103            '404': "GetPipelines400Response",
104            '500': "GetPipelines400Response",
105        }
106        response_data = self.api_client.call_api(
107            *_param,
108            _request_timeout=_request_timeout
109        )
110        response_data.read()
111        return self.api_client.response_deserialize(
112            response_data=response_data,
113            response_types_map=_response_types_map,
114        ).data
115
116
117    @validate_call
118    def start_file_upload_with_http_info(
119        self,
120        organization: StrictStr,
121        start_file_upload_request: StartFileUploadRequest,
122        _request_timeout: Union[
123            None,
124            Annotated[StrictFloat, Field(gt=0)],
125            Tuple[
126                Annotated[StrictFloat, Field(gt=0)],
127                Annotated[StrictFloat, Field(gt=0)]
128            ]
129        ] = None,
130        _request_auth: Optional[Dict[StrictStr, Any]] = None,
131        _content_type: Optional[StrictStr] = None,
132        _headers: Optional[Dict[StrictStr, Any]] = None,
133        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
134    ) -> ApiResponse[StartFileUploadResponse]:
135        """Upload a generic file to the platform
136
137
138        :param organization: (required)
139        :type organization: str
140        :param start_file_upload_request: (required)
141        :type start_file_upload_request: StartFileUploadRequest
142        :param _request_timeout: timeout setting for this request. If one
143                                 number provided, it will be total request
144                                 timeout. It can also be a pair (tuple) of
145                                 (connection, read) timeouts.
146        :type _request_timeout: int, tuple(int, int), optional
147        :param _request_auth: set to override the auth_settings for an a single
148                              request; this effectively ignores the
149                              authentication in the spec for a single request.
150        :type _request_auth: dict, optional
151        :param _content_type: force content-type for the request.
152        :type _content_type: str, Optional
153        :param _headers: set to override the headers for a single
154                         request; this effectively ignores the headers
155                         in the spec for a single request.
156        :type _headers: dict, optional
157        :param _host_index: set to override the host_index for a single
158                            request; this effectively ignores the host_index
159                            in the spec for a single request.
160        :type _host_index: int, optional
161        :return: Returns the result object.
162        """ # noqa: E501
163
164        _param = self._start_file_upload_serialize(
165            organization=organization,
166            start_file_upload_request=start_file_upload_request,
167            _request_auth=_request_auth,
168            _content_type=_content_type,
169            _headers=_headers,
170            _host_index=_host_index
171        )
172
173        _response_types_map: Dict[str, Optional[str]] = {
174            '200': "StartFileUploadResponse",
175            '400': "GetPipelines400Response",
176            '401': "GetPipelines400Response",
177            '403': "GetPipelines400Response",
178            '404': "GetPipelines400Response",
179            '500': "GetPipelines400Response",
180        }
181        response_data = self.api_client.call_api(
182            *_param,
183            _request_timeout=_request_timeout
184        )
185        response_data.read()
186        return self.api_client.response_deserialize(
187            response_data=response_data,
188            response_types_map=_response_types_map,
189        )
190
191
192    @validate_call
193    def start_file_upload_without_preload_content(
194        self,
195        organization: StrictStr,
196        start_file_upload_request: StartFileUploadRequest,
197        _request_timeout: Union[
198            None,
199            Annotated[StrictFloat, Field(gt=0)],
200            Tuple[
201                Annotated[StrictFloat, Field(gt=0)],
202                Annotated[StrictFloat, Field(gt=0)]
203            ]
204        ] = None,
205        _request_auth: Optional[Dict[StrictStr, Any]] = None,
206        _content_type: Optional[StrictStr] = None,
207        _headers: Optional[Dict[StrictStr, Any]] = None,
208        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
209    ) -> RESTResponseType:
210        """Upload a generic file to the platform
211
212
213        :param organization: (required)
214        :type organization: str
215        :param start_file_upload_request: (required)
216        :type start_file_upload_request: StartFileUploadRequest
217        :param _request_timeout: timeout setting for this request. If one
218                                 number provided, it will be total request
219                                 timeout. It can also be a pair (tuple) of
220                                 (connection, read) timeouts.
221        :type _request_timeout: int, tuple(int, int), optional
222        :param _request_auth: set to override the auth_settings for an a single
223                              request; this effectively ignores the
224                              authentication in the spec for a single request.
225        :type _request_auth: dict, optional
226        :param _content_type: force content-type for the request.
227        :type _content_type: str, Optional
228        :param _headers: set to override the headers for a single
229                         request; this effectively ignores the headers
230                         in the spec for a single request.
231        :type _headers: dict, optional
232        :param _host_index: set to override the host_index for a single
233                            request; this effectively ignores the host_index
234                            in the spec for a single request.
235        :type _host_index: int, optional
236        :return: Returns the result object.
237        """ # noqa: E501
238
239        _param = self._start_file_upload_serialize(
240            organization=organization,
241            start_file_upload_request=start_file_upload_request,
242            _request_auth=_request_auth,
243            _content_type=_content_type,
244            _headers=_headers,
245            _host_index=_host_index
246        )
247
248        _response_types_map: Dict[str, Optional[str]] = {
249            '200': "StartFileUploadResponse",
250            '400': "GetPipelines400Response",
251            '401': "GetPipelines400Response",
252            '403': "GetPipelines400Response",
253            '404': "GetPipelines400Response",
254            '500': "GetPipelines400Response",
255        }
256        response_data = self.api_client.call_api(
257            *_param,
258            _request_timeout=_request_timeout
259        )
260        return response_data.response
261
262
263    def _start_file_upload_serialize(
264        self,
265        organization,
266        start_file_upload_request,
267        _request_auth,
268        _content_type,
269        _headers,
270        _host_index,
271    ) -> RequestSerialized:
272
273        _host = None
274
275        _collection_formats: Dict[str, str] = {
276        }
277
278        _path_params: Dict[str, str] = {}
279        _query_params: List[Tuple[str, str]] = []
280        _header_params: Dict[str, Optional[str]] = _headers or {}
281        _form_params: List[Tuple[str, str]] = []
282        _files: Dict[
283            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
284        ] = {}
285        _body_params: Optional[bytes] = None
286
287        # process the path parameters
288        if organization is not None:
289            _path_params['organization'] = organization
290        # process the query parameters
291        # process the header parameters
292        # process the form parameters
293        # process the body parameter
294        if start_file_upload_request is not None:
295            _body_params = start_file_upload_request
296
297
298        # set the HTTP header `Accept`
299        if 'Accept' not in _header_params:
300            _header_params['Accept'] = self.api_client.select_header_accept(
301                [
302                    'application/json'
303                ]
304            )
305
306        # set the HTTP header `Content-Type`
307        if _content_type:
308            _header_params['Content-Type'] = _content_type
309        else:
310            _default_content_type = (
311                self.api_client.select_header_content_type(
312                    [
313                        'application/json'
314                    ]
315                )
316            )
317            if _default_content_type is not None:
318                _header_params['Content-Type'] = _default_content_type
319
320        # authentication setting
321        _auth_settings: List[str] = [
322            'bearerAuth'
323        ]
324
325        return self.api_client.param_serialize(
326            method='POST',
327            resource_path='/org/{organization}/files',
328            path_params=_path_params,
329            query_params=_query_params,
330            header_params=_header_params,
331            body=_body_params,
332            post_params=_form_params,
333            files=_files,
334            auth_settings=_auth_settings,
335            collection_formats=_collection_formats,
336            _host=_host,
337            _request_auth=_request_auth
338        )

NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech

Do not edit the class manually.

FilesApi(api_client=None)
36    def __init__(self, api_client=None) -> None:
37        if api_client is None:
38            api_client = ApiClient.get_default()
39        self.api_client = api_client
api_client
@validate_call
def start_file_upload( self, organization: typing.Annotated[str, Strict(strict=True)], start_file_upload_request: vectorize_client.models.start_file_upload_request.StartFileUploadRequest, _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> vectorize_client.models.start_file_upload_response.StartFileUploadResponse:
 42    @validate_call
 43    def start_file_upload(
 44        self,
 45        organization: StrictStr,
 46        start_file_upload_request: StartFileUploadRequest,
 47        _request_timeout: Union[
 48            None,
 49            Annotated[StrictFloat, Field(gt=0)],
 50            Tuple[
 51                Annotated[StrictFloat, Field(gt=0)],
 52                Annotated[StrictFloat, Field(gt=0)]
 53            ]
 54        ] = None,
 55        _request_auth: Optional[Dict[StrictStr, Any]] = None,
 56        _content_type: Optional[StrictStr] = None,
 57        _headers: Optional[Dict[StrictStr, Any]] = None,
 58        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
 59    ) -> StartFileUploadResponse:
 60        """Upload a generic file to the platform
 61
 62
 63        :param organization: (required)
 64        :type organization: str
 65        :param start_file_upload_request: (required)
 66        :type start_file_upload_request: StartFileUploadRequest
 67        :param _request_timeout: timeout setting for this request. If one
 68                                 number provided, it will be total request
 69                                 timeout. It can also be a pair (tuple) of
 70                                 (connection, read) timeouts.
 71        :type _request_timeout: int, tuple(int, int), optional
 72        :param _request_auth: set to override the auth_settings for an a single
 73                              request; this effectively ignores the
 74                              authentication in the spec for a single request.
 75        :type _request_auth: dict, optional
 76        :param _content_type: force content-type for the request.
 77        :type _content_type: str, Optional
 78        :param _headers: set to override the headers for a single
 79                         request; this effectively ignores the headers
 80                         in the spec for a single request.
 81        :type _headers: dict, optional
 82        :param _host_index: set to override the host_index for a single
 83                            request; this effectively ignores the host_index
 84                            in the spec for a single request.
 85        :type _host_index: int, optional
 86        :return: Returns the result object.
 87        """ # noqa: E501
 88
 89        _param = self._start_file_upload_serialize(
 90            organization=organization,
 91            start_file_upload_request=start_file_upload_request,
 92            _request_auth=_request_auth,
 93            _content_type=_content_type,
 94            _headers=_headers,
 95            _host_index=_host_index
 96        )
 97
 98        _response_types_map: Dict[str, Optional[str]] = {
 99            '200': "StartFileUploadResponse",
100            '400': "GetPipelines400Response",
101            '401': "GetPipelines400Response",
102            '403': "GetPipelines400Response",
103            '404': "GetPipelines400Response",
104            '500': "GetPipelines400Response",
105        }
106        response_data = self.api_client.call_api(
107            *_param,
108            _request_timeout=_request_timeout
109        )
110        response_data.read()
111        return self.api_client.response_deserialize(
112            response_data=response_data,
113            response_types_map=_response_types_map,
114        ).data

Upload a generic file to the platform

Parameters
  • organization: (required)
  • start_file_upload_request: (required)
  • _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
  • _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
  • _content_type: force content-type for the request.
  • _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
  • _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns

Returns the result object.

@validate_call
def start_file_upload_with_http_info( self, organization: typing.Annotated[str, Strict(strict=True)], start_file_upload_request: vectorize_client.models.start_file_upload_request.StartFileUploadRequest, _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> vectorize_client.api_response.ApiResponse[StartFileUploadResponse]:
117    @validate_call
118    def start_file_upload_with_http_info(
119        self,
120        organization: StrictStr,
121        start_file_upload_request: StartFileUploadRequest,
122        _request_timeout: Union[
123            None,
124            Annotated[StrictFloat, Field(gt=0)],
125            Tuple[
126                Annotated[StrictFloat, Field(gt=0)],
127                Annotated[StrictFloat, Field(gt=0)]
128            ]
129        ] = None,
130        _request_auth: Optional[Dict[StrictStr, Any]] = None,
131        _content_type: Optional[StrictStr] = None,
132        _headers: Optional[Dict[StrictStr, Any]] = None,
133        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
134    ) -> ApiResponse[StartFileUploadResponse]:
135        """Upload a generic file to the platform
136
137
138        :param organization: (required)
139        :type organization: str
140        :param start_file_upload_request: (required)
141        :type start_file_upload_request: StartFileUploadRequest
142        :param _request_timeout: timeout setting for this request. If one
143                                 number provided, it will be total request
144                                 timeout. It can also be a pair (tuple) of
145                                 (connection, read) timeouts.
146        :type _request_timeout: int, tuple(int, int), optional
147        :param _request_auth: set to override the auth_settings for an a single
148                              request; this effectively ignores the
149                              authentication in the spec for a single request.
150        :type _request_auth: dict, optional
151        :param _content_type: force content-type for the request.
152        :type _content_type: str, Optional
153        :param _headers: set to override the headers for a single
154                         request; this effectively ignores the headers
155                         in the spec for a single request.
156        :type _headers: dict, optional
157        :param _host_index: set to override the host_index for a single
158                            request; this effectively ignores the host_index
159                            in the spec for a single request.
160        :type _host_index: int, optional
161        :return: Returns the result object.
162        """ # noqa: E501
163
164        _param = self._start_file_upload_serialize(
165            organization=organization,
166            start_file_upload_request=start_file_upload_request,
167            _request_auth=_request_auth,
168            _content_type=_content_type,
169            _headers=_headers,
170            _host_index=_host_index
171        )
172
173        _response_types_map: Dict[str, Optional[str]] = {
174            '200': "StartFileUploadResponse",
175            '400': "GetPipelines400Response",
176            '401': "GetPipelines400Response",
177            '403': "GetPipelines400Response",
178            '404': "GetPipelines400Response",
179            '500': "GetPipelines400Response",
180        }
181        response_data = self.api_client.call_api(
182            *_param,
183            _request_timeout=_request_timeout
184        )
185        response_data.read()
186        return self.api_client.response_deserialize(
187            response_data=response_data,
188            response_types_map=_response_types_map,
189        )

Upload a generic file to the platform

Parameters
  • organization: (required)
  • start_file_upload_request: (required)
  • _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
  • _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
  • _content_type: force content-type for the request.
  • _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
  • _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns

Returns the result object.

@validate_call
def start_file_upload_without_preload_content( self, organization: typing.Annotated[str, Strict(strict=True)], start_file_upload_request: vectorize_client.models.start_file_upload_request.StartFileUploadRequest, _request_timeout: Union[NoneType, Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Tuple[Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])], Annotated[float, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]]] = None, _request_auth: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _content_type: Optional[Annotated[str, Strict(strict=True)]] = None, _headers: Optional[Dict[Annotated[str, Strict(strict=True)], Any]] = None, _host_index: typing.Annotated[int, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=0)])] = 0) -> urllib3.response.HTTPResponse:
192    @validate_call
193    def start_file_upload_without_preload_content(
194        self,
195        organization: StrictStr,
196        start_file_upload_request: StartFileUploadRequest,
197        _request_timeout: Union[
198            None,
199            Annotated[StrictFloat, Field(gt=0)],
200            Tuple[
201                Annotated[StrictFloat, Field(gt=0)],
202                Annotated[StrictFloat, Field(gt=0)]
203            ]
204        ] = None,
205        _request_auth: Optional[Dict[StrictStr, Any]] = None,
206        _content_type: Optional[StrictStr] = None,
207        _headers: Optional[Dict[StrictStr, Any]] = None,
208        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
209    ) -> RESTResponseType:
210        """Upload a generic file to the platform
211
212
213        :param organization: (required)
214        :type organization: str
215        :param start_file_upload_request: (required)
216        :type start_file_upload_request: StartFileUploadRequest
217        :param _request_timeout: timeout setting for this request. If one
218                                 number provided, it will be total request
219                                 timeout. It can also be a pair (tuple) of
220                                 (connection, read) timeouts.
221        :type _request_timeout: int, tuple(int, int), optional
222        :param _request_auth: set to override the auth_settings for an a single
223                              request; this effectively ignores the
224                              authentication in the spec for a single request.
225        :type _request_auth: dict, optional
226        :param _content_type: force content-type for the request.
227        :type _content_type: str, Optional
228        :param _headers: set to override the headers for a single
229                         request; this effectively ignores the headers
230                         in the spec for a single request.
231        :type _headers: dict, optional
232        :param _host_index: set to override the host_index for a single
233                            request; this effectively ignores the host_index
234                            in the spec for a single request.
235        :type _host_index: int, optional
236        :return: Returns the result object.
237        """ # noqa: E501
238
239        _param = self._start_file_upload_serialize(
240            organization=organization,
241            start_file_upload_request=start_file_upload_request,
242            _request_auth=_request_auth,
243            _content_type=_content_type,
244            _headers=_headers,
245            _host_index=_host_index
246        )
247
248        _response_types_map: Dict[str, Optional[str]] = {
249            '200': "StartFileUploadResponse",
250            '400': "GetPipelines400Response",
251            '401': "GetPipelines400Response",
252            '403': "GetPipelines400Response",
253            '404': "GetPipelines400Response",
254            '500': "GetPipelines400Response",
255        }
256        response_data = self.api_client.call_api(
257            *_param,
258            _request_timeout=_request_timeout
259        )
260        return response_data.response

Upload a generic file to the platform

Parameters
  • organization: (required)
  • start_file_upload_request: (required)
  • _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.
  • _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.
  • _content_type: force content-type for the request.
  • _headers: set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.
  • _host_index: set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.
Returns

Returns the result object.